diff --git a/spec/factories/annotations.rb b/spec/factories/annotations.rb index fc8562c..c698c89 100644 --- a/spec/factories/annotations.rb +++ b/spec/factories/annotations.rb @@ -3,12 +3,21 @@ # Table name: annotations # # id :integer not null, primary key -# question_id :integer -# org_id :integer # text :text # type :integer default(0), not null # created_at :datetime # updated_at :datetime +# org_id :integer +# question_id :integer +# +# Indexes +# +# index_annotations_on_question_id (question_id) +# +# Foreign Keys +# +# fk_rails_... (org_id => orgs.id) +# fk_rails_... (question_id => questions.id) # FactoryBot.define do diff --git a/spec/factories/answers.rb b/spec/factories/answers.rb index d227aea..b6674f2 100644 --- a/spec/factories/answers.rb +++ b/spec/factories/answers.rb @@ -3,13 +3,24 @@ # Table name: answers # # id :integer not null, primary key +# lock_version :integer default(0) # text :text -# plan_id :integer -# user_id :integer -# question_id :integer # created_at :datetime # updated_at :datetime -# lock_version :integer default(0) +# plan_id :integer +# question_id :integer +# user_id :integer +# +# Indexes +# +# index_answers_on_plan_id (plan_id) +# index_answers_on_question_id (question_id) +# +# Foreign Keys +# +# fk_rails_... (plan_id => plans.id) +# fk_rails_... (question_id => questions.id) +# fk_rails_... (user_id => users.id) # FactoryBot.define do diff --git a/spec/factories/guidance_groups.rb b/spec/factories/guidance_groups.rb index f7e2b49..82c7b09 100644 --- a/spec/factories/guidance_groups.rb +++ b/spec/factories/guidance_groups.rb @@ -4,11 +4,19 @@ # # id :integer not null, primary key # name :string -# org_id :integer -# created_at :datetime not null -# updated_at :datetime not null # optional_subset :boolean # published :boolean +# created_at :datetime not null +# updated_at :datetime not null +# org_id :integer +# +# Indexes +# +# index_guidance_groups_on_org_id (org_id) +# +# Foreign Keys +# +# fk_rails_... (org_id => orgs.id) # FactoryBot.define do diff --git a/spec/factories/guidances.rb b/spec/factories/guidances.rb index 53e3d4b..d57c1a0 100644 --- a/spec/factories/guidances.rb +++ b/spec/factories/guidances.rb @@ -3,12 +3,20 @@ # Table name: guidances # # id :integer not null, primary key +# published :boolean # text :text -# guidance_group_id :integer # created_at :datetime not null # updated_at :datetime not null +# guidance_group_id :integer # question_id :integer -# published :boolean +# +# Indexes +# +# index_guidances_on_guidance_group_id (guidance_group_id) +# +# Foreign Keys +# +# fk_rails_... (guidance_group_id => guidance_groups.id) # FactoryBot.define do diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb index d133a59..5aa5919 100644 --- a/spec/factories/notes.rb +++ b/spec/factories/notes.rb @@ -3,13 +3,22 @@ # Table name: notes # # id :integer not null, primary key -# user_id :integer -# text :text # archived :boolean -# answer_id :integer # archived_by :integer +# text :text # created_at :datetime # updated_at :datetime +# answer_id :integer +# user_id :integer +# +# Indexes +# +# index_notes_on_answer_id (answer_id) +# +# Foreign Keys +# +# fk_rails_... (answer_id => answers.id) +# fk_rails_... (user_id => users.id) # FactoryBot.define do diff --git a/spec/factories/org_identifiers.rb b/spec/factories/org_identifiers.rb index 2663d43..dbfafef 100644 --- a/spec/factories/org_identifiers.rb +++ b/spec/factories/org_identifiers.rb @@ -3,12 +3,17 @@ # Table name: org_identifiers # # id :integer not null, primary key -# identifier :string # attrs :string +# identifier :string # created_at :datetime # updated_at :datetime -# org_id :integer # identifier_scheme_id :integer +# org_id :integer +# +# Foreign Keys +# +# fk_rails_... (identifier_scheme_id => identifier_schemes.id) +# fk_rails_... (org_id => orgs.id) # FactoryBot.define do diff --git a/spec/factories/orgs.rb b/spec/factories/orgs.rb index aa76bf6..c4477f6 100644 --- a/spec/factories/orgs.rb +++ b/spec/factories/orgs.rb @@ -3,28 +3,33 @@ # Table name: orgs # # id :integer not null, primary key -# name :string # abbreviation :string +# banner_text :text +# contact_email :string +# contact_name :string +# feedback_email_msg :text +# feedback_email_subject :string +# feedback_enabled :boolean default(FALSE) +# is_other :boolean +# links :text +# logo_file_name :string +# logo_name :string +# logo_uid :string +# name :string +# org_type :integer default(0), not null +# sort_name :string # target_url :string # wayfless_entity :string # created_at :datetime not null # updated_at :datetime not null -# parent_id :integer -# is_other :boolean -# sort_name :string -# banner_text :text -# logo_file_name :string -# region_id :integer # language_id :integer -# logo_uid :string -# logo_name :string -# contact_email :string -# org_type :integer default(0), not null -# links :text default({"org"=>[]}) -# contact_name :string -# feedback_enabled :boolean default(FALSE) -# feedback_email_subject :string -# feedback_email_msg :text +# parent_id :integer +# region_id :integer +# +# Foreign Keys +# +# fk_rails_... (language_id => languages.id) +# fk_rails_... (region_id => regions.id) # FactoryBot.define do diff --git a/spec/factories/phases.rb b/spec/factories/phases.rb index 41b0f55..9cb7d85 100644 --- a/spec/factories/phases.rb +++ b/spec/factories/phases.rb @@ -3,14 +3,22 @@ # Table name: phases # # id :integer not null, primary key -# title :string # description :text +# modifiable :boolean # number :integer -# template_id :integer +# slug :string +# title :string # created_at :datetime # updated_at :datetime -# slug :string -# modifiable :boolean +# template_id :integer +# +# Indexes +# +# index_phases_on_template_id (template_id) +# +# Foreign Keys +# +# fk_rails_... (template_id => templates.id) # FactoryBot.define do diff --git a/spec/factories/plans.rb b/spec/factories/plans.rb index 5aaac06..bbb922b 100644 --- a/spec/factories/plans.rb +++ b/spec/factories/plans.rb @@ -3,25 +3,33 @@ # Table name: plans # # id :integer not null, primary key -# title :string -# template_id :integer -# created_at :datetime -# updated_at :datetime -# slug :string -# grant_number :string -# identifier :string -# description :text -# principal_investigator :string -# principal_investigator_identifier :string +# complete :boolean default(FALSE) # data_contact :string -# funder_name :string -# visibility :integer default(3), not null # data_contact_email :string # data_contact_phone :string -# principal_investigator_email :string -# principal_investigator_phone :string +# description :text # feedback_requested :boolean default(FALSE) -# complete :boolean default(FALSE) +# funder_name :string +# grant_number :string +# identifier :string +# principal_investigator :string +# principal_investigator_email :string +# principal_investigator_identifier :string +# principal_investigator_phone :string +# slug :string +# title :string +# visibility :integer default(3), not null +# created_at :datetime +# updated_at :datetime +# template_id :integer +# +# Indexes +# +# index_plans_on_template_id (template_id) +# +# Foreign Keys +# +# fk_rails_... (template_id => templates.id) # FactoryBot.define do diff --git a/spec/factories/question_options.rb b/spec/factories/question_options.rb index bbe919a..ed91536 100644 --- a/spec/factories/question_options.rb +++ b/spec/factories/question_options.rb @@ -3,12 +3,20 @@ # Table name: question_options # # id :integer not null, primary key -# question_id :integer -# text :string -# number :integer # is_default :boolean +# number :integer +# text :string # created_at :datetime # updated_at :datetime +# question_id :integer +# +# Indexes +# +# index_question_options_on_question_id (question_id) +# +# Foreign Keys +# +# fk_rails_... (question_id => questions.id) # FactoryBot.define do diff --git a/spec/factories/questions.rb b/spec/factories/questions.rb index ac05c80..6015297 100644 --- a/spec/factories/questions.rb +++ b/spec/factories/questions.rb @@ -3,15 +3,24 @@ # Table name: questions # # id :integer not null, primary key -# text :text # default_value :text +# modifiable :boolean # number :integer -# section_id :integer +# option_comment_display :boolean default(TRUE) +# text :text # created_at :datetime # updated_at :datetime # question_format_id :integer -# option_comment_display :boolean default(TRUE) -# modifiable :boolean +# section_id :integer +# +# Indexes +# +# index_questions_on_section_id (section_id) +# +# Foreign Keys +# +# fk_rails_... (question_format_id => question_formats.id) +# fk_rails_... (section_id => sections.id) # FactoryBot.define do diff --git a/spec/factories/roles.rb b/spec/factories/roles.rb index 30eb3b6..f4422af 100644 --- a/spec/factories/roles.rb +++ b/spec/factories/roles.rb @@ -3,12 +3,22 @@ # Table name: roles # # id :integer not null, primary key -# user_id :integer -# plan_id :integer -# created_at :datetime -# updated_at :datetime # access :integer default(0), not null # active :boolean default(TRUE) +# created_at :datetime +# updated_at :datetime +# plan_id :integer +# user_id :integer +# +# Indexes +# +# index_roles_on_plan_id (plan_id) +# index_roles_on_user_id (user_id) +# +# Foreign Keys +# +# fk_rails_... (plan_id => plans.id) +# fk_rails_... (user_id => users.id) # FactoryBot.define do diff --git a/spec/factories/sections.rb b/spec/factories/sections.rb index 9fbadc3..b7272ae 100644 --- a/spec/factories/sections.rb +++ b/spec/factories/sections.rb @@ -3,14 +3,21 @@ # Table name: sections # # id :integer not null, primary key -# title :string # description :text +# modifiable :boolean # number :integer +# title :string # created_at :datetime # updated_at :datetime -# published :boolean # phase_id :integer -# modifiable :boolean +# +# Indexes +# +# index_sections_on_phase_id (phase_id) +# +# Foreign Keys +# +# fk_rails_... (phase_id => phases.id) # FactoryBot.define do diff --git a/spec/factories/templates.rb b/spec/factories/templates.rb index f60a507..bcd4113 100644 --- a/spec/factories/templates.rb +++ b/spec/factories/templates.rb @@ -3,20 +3,32 @@ # Table name: templates # # id :integer not null, primary key -# title :string +# archived :boolean +# customization_of :integer # description :text -# published :boolean -# org_id :integer -# locale :string # is_default :boolean -# created_at :datetime -# updated_at :datetime +# links :text +# locale :string +# published :boolean +# title :string # version :integer # visibility :integer -# customization_of :integer +# created_at :datetime +# updated_at :datetime # family_id :integer -# archived :boolean -# links :text default({"funder"=>[], "sample_plan"=>[]}) +# org_id :integer +# +# Indexes +# +# index_templates_on_customization_of_and_version_and_org_id (customization_of,version,org_id) UNIQUE +# index_templates_on_family_id (family_id) +# index_templates_on_family_id_and_version (family_id,version) UNIQUE +# index_templates_on_org_id (org_id) +# template_organisation_dmptemplate_index (org_id,family_id) +# +# Foreign Keys +# +# fk_rails_... (org_id => orgs.id) # FactoryBot.define do diff --git a/spec/factories/user_identifiers.rb b/spec/factories/user_identifiers.rb index d838dd5..d338189 100644 --- a/spec/factories/user_identifiers.rb +++ b/spec/factories/user_identifiers.rb @@ -6,8 +6,17 @@ # identifier :string # created_at :datetime # updated_at :datetime -# user_id :integer # identifier_scheme_id :integer +# user_id :integer +# +# Indexes +# +# index_user_identifiers_on_user_id (user_id) +# +# Foreign Keys +# +# fk_rails_... (identifier_scheme_id => identifier_schemes.id) +# fk_rails_... (user_id => users.id) # FactoryBot.define do diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 057937e..0f32562 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -3,38 +3,48 @@ # Table name: users # # id :integer not null, primary key -# firstname :string -# surname :string -# email :string default(""), not null -# orcid_id :string -# shibboleth_id :string -# created_at :datetime not null -# updated_at :datetime not null -# encrypted_password :string default("") -# reset_password_token :string -# reset_password_sent_at :datetime -# remember_created_at :datetime -# sign_in_count :integer default(0) -# current_sign_in_at :datetime -# last_sign_in_at :datetime -# current_sign_in_ip :string -# last_sign_in_ip :string +# accept_terms :boolean +# active :boolean default(TRUE) +# api_token :string +# confirmation_sent_at :datetime # confirmation_token :string # confirmed_at :datetime -# confirmation_sent_at :datetime -# invitation_token :string +# current_sign_in_at :datetime +# current_sign_in_ip :string +# email :string(80) default(""), not null +# encrypted_password :string default("") +# firstname :string +# invitation_accepted_at :datetime # invitation_created_at :datetime # invitation_sent_at :datetime -# invitation_accepted_at :datetime -# other_organisation :string -# accept_terms :boolean -# org_id :integer -# api_token :string -# invited_by_id :integer +# invitation_token :string # invited_by_type :string -# language_id :integer +# last_sign_in_at :datetime +# last_sign_in_ip :string +# other_organisation :string # recovery_email :string -# active :boolean default(TRUE) +# remember_created_at :datetime +# reset_password_sent_at :datetime +# reset_password_token :string +# sign_in_count :integer default(0) +# surname :string +# created_at :datetime not null +# updated_at :datetime not null +# invited_by_id :integer +# language_id :integer +# orcid_id :string +# org_id :integer +# shibboleth_id :string +# +# Indexes +# +# index_users_on_email (email) UNIQUE +# index_users_on_org_id (org_id) +# +# Foreign Keys +# +# fk_rails_... (language_id => languages.id) +# fk_rails_... (org_id => orgs.id) # FactoryBot.define do