diff --git a/app/controllers/admin/university/organizations_controller.rb b/app/controllers/admin/university/organizations_controller.rb index b375686373ccbdf33a0b1fc3be39e0cfd5e1b775..49fbfea4a063fff5fc810b294689943a2dfbd166 100644 --- a/app/controllers/admin/university/organizations_controller.rb +++ b/app/controllers/admin/university/organizations_controller.rb @@ -34,6 +34,18 @@ class Admin::University::OrganizationsController < Admin::University::Applicatio breadcrumb end + def in_language + language = Language.find_by!(iso_code: params[:lang]) + translation = @organization.find_or_translate!(language) + if translation.newly_translated + # There's an attribute accessor named "newly_translated" that we set to true + # when we just created the translation. We use it to redirect to the form instead of the show. + redirect_to [:edit, :admin, translation.becomes(translation.class.base_class)] + else + redirect_to [:admin, translation.becomes(translation.class.base_class)] + end + end + def static @about = @organization @website = @organization.websites&.first diff --git a/app/models/communication/extranet.rb b/app/models/communication/extranet.rb index 1a4615b3d6c6865f180dd318b43f9c1268235907..0dc31636314ab864924471003317609996665e7c 100644 --- a/app/models/communication/extranet.rb +++ b/app/models/communication/extranet.rb @@ -2,35 +2,34 @@ # # Table name: communication_extranets # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# allow_experiences_modification :boolean default(TRUE) -# color :string -# cookies_policy :text -# css :text -# feature_alumni :boolean default(FALSE) -# feature_contacts :boolean default(FALSE) -# feature_jobs :boolean default(FALSE) -# feature_library :boolean default(FALSE) -# feature_posts :boolean default(FALSE) -# has_sso :boolean default(FALSE) -# home_sentence :text -# host :string -# name :string -# privacy_policy :text -# registration_contact :string -# sass :text -# sso_button_label :string -# sso_cert :text -# sso_mapping :jsonb -# sso_name_identifier_format :string -# sso_provider :integer default("saml") -# sso_target_url :string -# terms :text -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid indexed => [about_type] -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# about_type :string indexed => [about_id] +# color :string +# cookies_policy :text +# css :text +# feature_alumni :boolean default(FALSE) +# feature_contacts :boolean default(FALSE) +# feature_jobs :boolean default(FALSE) +# feature_library :boolean default(FALSE) +# feature_posts :boolean default(FALSE) +# has_sso :boolean default(FALSE) +# home_sentence :text +# host :string +# name :string +# privacy_policy :text +# registration_contact :string +# sass :text +# sso_button_label :string +# sso_cert :text +# sso_mapping :jsonb +# sso_name_identifier_format :string +# sso_provider :integer default("saml") +# sso_target_url :string +# terms :text +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid indexed => [about_type] +# university_id :uuid not null, indexed # # Indexes # diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb index be1dea930f4fd74ca200f261ac669a6d443cacd2..5762b6d2202412cf495a28da5f7a7ac56f8880f6 100644 --- a/app/models/communication/website.rb +++ b/app/models/communication/website.rb @@ -2,25 +2,26 @@ # # Table name: communication_websites # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# access_token :string -# git_branch :string -# git_endpoint :string -# git_provider :integer default("github") -# in_production :boolean default(FALSE) -# name :string -# plausible_url :string -# repository :string -# style :text -# style_updated_at :date -# theme_version :string default("NA") -# url :string -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid indexed => [about_type] -# default_language_id :uuid not null, indexed -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# about_type :string indexed => [about_id] +# access_token :string +# deployment_status_badge :text +# git_branch :string +# git_endpoint :string +# git_provider :integer default("github") +# in_production :boolean default(FALSE) +# name :string +# plausible_url :string +# repository :string +# style :text +# style_updated_at :date +# theme_version :string default("NA") +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid indexed => [about_type] +# default_language_id :uuid not null, indexed +# university_id :uuid not null, indexed # # Indexes # diff --git a/app/models/communication/website/configs/base.rb b/app/models/communication/website/configs/base.rb index 2cc59f41047c557dfa03aff67084dae40f353934..b14fd096b81c949010d47183ce85d759c7d77704 100644 --- a/app/models/communication/website/configs/base.rb +++ b/app/models/communication/website/configs/base.rb @@ -2,25 +2,26 @@ # # Table name: communication_websites # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# access_token :string -# git_branch :string -# git_endpoint :string -# git_provider :integer default("github") -# in_production :boolean default(FALSE) -# name :string -# plausible_url :string -# repository :string -# style :text -# style_updated_at :date -# theme_version :string default("NA") -# url :string -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid indexed => [about_type] -# default_language_id :uuid not null, indexed -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# about_type :string indexed => [about_id] +# access_token :string +# deployment_status_badge :text +# git_branch :string +# git_endpoint :string +# git_provider :integer default("github") +# in_production :boolean default(FALSE) +# name :string +# plausible_url :string +# repository :string +# style :text +# style_updated_at :date +# theme_version :string default("NA") +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid indexed => [about_type] +# default_language_id :uuid not null, indexed +# university_id :uuid not null, indexed # # Indexes # diff --git a/app/models/communication/website/configs/default_languages.rb b/app/models/communication/website/configs/default_languages.rb index 53bac0a2bf5a7c489521235808b397348d8fa813..14a78fdd45b56d6b550a0f92d44e07ba14d9e8fb 100644 --- a/app/models/communication/website/configs/default_languages.rb +++ b/app/models/communication/website/configs/default_languages.rb @@ -2,25 +2,26 @@ # # Table name: communication_websites # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# access_token :string -# git_branch :string -# git_endpoint :string -# git_provider :integer default("github") -# in_production :boolean default(FALSE) -# name :string -# plausible_url :string -# repository :string -# style :text -# style_updated_at :date -# theme_version :string default("NA") -# url :string -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid indexed => [about_type] -# default_language_id :uuid not null, indexed -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# about_type :string indexed => [about_id] +# access_token :string +# deployment_status_badge :text +# git_branch :string +# git_endpoint :string +# git_provider :integer default("github") +# in_production :boolean default(FALSE) +# name :string +# plausible_url :string +# repository :string +# style :text +# style_updated_at :date +# theme_version :string default("NA") +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid indexed => [about_type] +# default_language_id :uuid not null, indexed +# university_id :uuid not null, indexed # # Indexes # diff --git a/app/models/communication/website/configs/default_permalinks.rb b/app/models/communication/website/configs/default_permalinks.rb index c0feec9c1b9375f9c19499e56634a9af64f35d79..9251792cd61b14941324c492b084fa49375a5ae0 100644 --- a/app/models/communication/website/configs/default_permalinks.rb +++ b/app/models/communication/website/configs/default_permalinks.rb @@ -2,25 +2,26 @@ # # Table name: communication_websites # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# access_token :string -# git_branch :string -# git_endpoint :string -# git_provider :integer default("github") -# in_production :boolean default(FALSE) -# name :string -# plausible_url :string -# repository :string -# style :text -# style_updated_at :date -# theme_version :string default("NA") -# url :string -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid indexed => [about_type] -# default_language_id :uuid not null, indexed -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# about_type :string indexed => [about_id] +# access_token :string +# deployment_status_badge :text +# git_branch :string +# git_endpoint :string +# git_provider :integer default("github") +# in_production :boolean default(FALSE) +# name :string +# plausible_url :string +# repository :string +# style :text +# style_updated_at :date +# theme_version :string default("NA") +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid indexed => [about_type] +# default_language_id :uuid not null, indexed +# university_id :uuid not null, indexed # # Indexes # diff --git a/app/models/communication/website/configs/development_config.rb b/app/models/communication/website/configs/development_config.rb index e6c253f00e3a39818515f760ee531b5e0ed8e27e..b6f29a2359c48289a1d05ee59e224840199e9e87 100644 --- a/app/models/communication/website/configs/development_config.rb +++ b/app/models/communication/website/configs/development_config.rb @@ -2,25 +2,26 @@ # # Table name: communication_websites # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# access_token :string -# git_branch :string -# git_endpoint :string -# git_provider :integer default("github") -# in_production :boolean default(FALSE) -# name :string -# plausible_url :string -# repository :string -# style :text -# style_updated_at :date -# theme_version :string default("NA") -# url :string -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid indexed => [about_type] -# default_language_id :uuid not null, indexed -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# about_type :string indexed => [about_id] +# access_token :string +# deployment_status_badge :text +# git_branch :string +# git_endpoint :string +# git_provider :integer default("github") +# in_production :boolean default(FALSE) +# name :string +# plausible_url :string +# repository :string +# style :text +# style_updated_at :date +# theme_version :string default("NA") +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid indexed => [about_type] +# default_language_id :uuid not null, indexed +# university_id :uuid not null, indexed # # Indexes # diff --git a/app/models/communication/website/configs/production_config.rb b/app/models/communication/website/configs/production_config.rb index 7a5ca3cd6d3a37e17f4c4e73cccf528715b36702..0761e697239a98038c5d61ce351f47e37fc5dab5 100644 --- a/app/models/communication/website/configs/production_config.rb +++ b/app/models/communication/website/configs/production_config.rb @@ -2,25 +2,26 @@ # # Table name: communication_websites # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# access_token :string -# git_branch :string -# git_endpoint :string -# git_provider :integer default("github") -# in_production :boolean default(FALSE) -# name :string -# plausible_url :string -# repository :string -# style :text -# style_updated_at :date -# theme_version :string default("NA") -# url :string -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid indexed => [about_type] -# default_language_id :uuid not null, indexed -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# about_type :string indexed => [about_id] +# access_token :string +# deployment_status_badge :text +# git_branch :string +# git_endpoint :string +# git_provider :integer default("github") +# in_production :boolean default(FALSE) +# name :string +# plausible_url :string +# repository :string +# style :text +# style_updated_at :date +# theme_version :string default("NA") +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid indexed => [about_type] +# default_language_id :uuid not null, indexed +# university_id :uuid not null, indexed # # Indexes # diff --git a/app/models/research/hal/publication.rb b/app/models/research/hal/publication.rb index 9682b57fb4da7b323272410c52ad7705777e7a09..b51772181c60cef522881dccd70504136471c6b9 100644 --- a/app/models/research/hal/publication.rb +++ b/app/models/research/hal/publication.rb @@ -3,10 +3,15 @@ # Table name: research_hal_publications # # id :uuid not null, primary key +# abstract :text +# citation_full :text # data :jsonb # docid :string indexed # doi :string +# file :text # hal_url :string +# journal_title :string +# open_access :boolean # publication_date :date # ref :string # slug :string diff --git a/app/models/university/organization.rb b/app/models/university/organization.rb index 0ff6fddf33b60316ff8d1ff01f1f495d210591f4..1083a766945cbc9e77afbae2457ac2b164a8f3c5 100644 --- a/app/models/university/organization.rb +++ b/app/models/university/organization.rb @@ -29,15 +29,21 @@ # zipcode :string # created_at :datetime not null # updated_at :datetime not null +# language_id :uuid indexed +# original_id :uuid indexed # university_id :uuid not null, indexed # # Indexes # +# index_university_organizations_on_language_id (language_id) +# index_university_organizations_on_original_id (original_id) # index_university_organizations_on_university_id (university_id) # # Foreign Keys # # fk_rails_35fcd198e0 (university_id => universities.id) +# fk_rails_3a9208fa29 (language_id => languages.id) +# fk_rails_5af11ea0cc (original_id => university_organizations.id) # class University::Organization < ApplicationRecord include AsIndirectObject @@ -49,6 +55,7 @@ class University::Organization < ApplicationRecord include WithGitFiles include WithPermalink include WithSlug + include WithTranslations include WithUniversity attr_accessor :created_from_extranet diff --git a/app/views/admin/university/organizations/show.html.erb b/app/views/admin/university/organizations/show.html.erb index 3b96834afb1074cbb29af9fa55d6f9909ad41bad..032e2489d340bdc6c98cec97da2fb16e89655082 100644 --- a/app/views/admin/university/organizations/show.html.erb +++ b/app/views/admin/university/organizations/show.html.erb @@ -18,20 +18,26 @@ ].each do |property| %> <% value = @organization.send property %> <% next if value.blank? %> - <div class="col-xxl-6"> + <div class="col-md-4"> <%= osuny_label University::Organization.human_attribute_name(property) %> - <p><%= value %></p> + </div> + <div class="col-md-8"> + <p><%= value %></p> </div> <% end %> <% if @organization.country.present? %> - <div class="col-xxl-6"> + <div class="col-md-4"> <%= osuny_label University::Organization.human_attribute_name('country') %> + </div> + <div class="col-md-8"> <p><%= @organization.country_name %></p> </div> <% end %> <% if @organization.geolocated? %> - <div class="col-xxl-6"> + <div class="col-md-4"> <%= osuny_label University::Organization.human_attribute_name('geolocation') %> + </div> + <div class="col-md-8"> <p><%= @organization.geo_point.to_s %></p> </div> <% end %> @@ -40,9 +46,11 @@ <%= osuny_panel University::Organization.human_attribute_name('digital') do %> <div class="row pure__row--small"> <% unless @organization.url.blank? %> - <div class="col-xxl-6"> + <div class="col-md-4"> <%= osuny_label University::Organization.human_attribute_name('url') %> - <p><%= link_to @organization.url, + </div> + <div class="col-md-8"> + <p><%= link_to @organization.url, @organization.url, target: :_blank %></p> </div> @@ -56,8 +64,10 @@ ].each do |property| %> <% value = @organization.send property %> <% next if value.blank? %> - <div class="col-xxl-6"> + <div class="col-md-4"> <%= osuny_label University::Organization.human_attribute_name(property) %> + </div> + <div class="col-md-8"> <p><%= value %></p> </div> <% end %> @@ -66,21 +76,29 @@ <%= osuny_panel University::Organization.human_attribute_name('legal') do %> <div class="row pure__row--small"> - <div class="col-xxl-6"> + <div class="col-md-4"> <%= osuny_label University::Organization.human_attribute_name('long_name') %> + </div> + <div class="col-md-8"> <p><%= @organization.long_name %></p> </div> - <div class="col-xxl-6"> + <div class="col-md-4"> <%= osuny_label University::Organization.human_attribute_name('kind') %> + </div> + <div class="col-md-8"> <p><%= @organization.kind_i18n %></p> </div> - <div class="col-xxl-6"> + <div class="col-md-4"> <%= osuny_label University::Organization.human_attribute_name('siren') %> + </div> + <div class="col-md-8"> <p><%= @organization.siren %></p> </div> </div> <% end %> + <%= osuny_separator %> + <%= render 'admin/communication/blocks/content/editor', about: @organization %> </div> @@ -92,6 +110,8 @@ <p><%= t @organization.active %></> <% end %> + <%= render 'admin/application/i18n/widget', about: @organization %> + <% if @organization.categories.any? %> <%= osuny_panel University::Organization.human_attribute_name('categories') do %> <ul class="list-unstyled"> diff --git a/config/routes/admin/university.rb b/config/routes/admin/university.rb index af658daef3fa0fbf537f1098cc0c5bc593d12dc2..10d8c533ac62025ac1d2e7a9e773f3a78ca7b09a 100644 --- a/config/routes/admin/university.rb +++ b/config/routes/admin/university.rb @@ -38,6 +38,7 @@ namespace :university do end member do get :static + get "/translations/:lang" => "organizations#in_language", as: :show_in_language end end root to: 'dashboard#index' diff --git a/db/migrate/20230705103400_addi18n_infos_to_university_organizations.rb b/db/migrate/20230705103400_addi18n_infos_to_university_organizations.rb new file mode 100644 index 0000000000000000000000000000000000000000..7e0d5a56596b80da32fa7666ceac7120698d45b9 --- /dev/null +++ b/db/migrate/20230705103400_addi18n_infos_to_university_organizations.rb @@ -0,0 +1,16 @@ +class Addi18nInfosToUniversityOrganizations < ActiveRecord::Migration[7.0] + def up + add_reference :university_organizations, :language, foreign_key: true, type: :uuid + add_reference :university_organizations, :original, foreign_key: {to_table: :university_organizations}, type: :uuid + + University::Organization.reset_column_information + University.all.find_each do |university| + university.organizations.update_all(language_id: university.default_language_id) + end + end + + def down + remove_reference :university_organizations, :language + remove_reference :university_organizations, :original + end +end diff --git a/db/schema.rb b/db/schema.rb index 548674c3aa1144c91760977417adf4b1fe8b34d7..6366c92c831c4123214b9879a7911640c4f40d33 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_07_04_113222) do +ActiveRecord::Schema[7.0].define(version: 2023_07_05_103400) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -738,6 +738,11 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_04_113222) do t.date "publication_date" t.string "doi" t.string "slug" + t.text "citation_full" + t.boolean "open_access" + t.text "abstract" + t.string "journal_title" + t.text "file" t.index ["docid"], name: "index_research_hal_publications_on_docid" end @@ -938,6 +943,10 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_04_113222) do t.float "longitude" t.string "address_name" t.string "address_additional" + t.uuid "language_id" + t.uuid "original_id" + t.index ["language_id"], name: "index_university_organizations_on_language_id" + t.index ["original_id"], name: "index_university_organizations_on_original_id" t.index ["university_id"], name: "index_university_organizations_on_university_id" end @@ -1205,7 +1214,9 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_04_113222) do add_foreign_key "research_theses", "university_people", column: "director_id" add_foreign_key "universities", "languages", column: "default_language_id" add_foreign_key "university_organization_categories", "universities" + add_foreign_key "university_organizations", "languages" add_foreign_key "university_organizations", "universities" + add_foreign_key "university_organizations", "university_organizations", column: "original_id" add_foreign_key "university_organizations_categories", "university_organization_categories", column: "category_id" add_foreign_key "university_organizations_categories", "university_organizations", column: "organization_id" add_foreign_key "university_people", "languages" diff --git a/test/fixtures/communication/extranets.yml b/test/fixtures/communication/extranets.yml index 5b00f559b78ac19b9a3871e2736923e92e325c4b..c4a72564511a4905256b44eff1b90d9ad95d76db 100644 --- a/test/fixtures/communication/extranets.yml +++ b/test/fixtures/communication/extranets.yml @@ -2,35 +2,34 @@ # # Table name: communication_extranets # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# allow_experiences_modification :boolean default(TRUE) -# color :string -# cookies_policy :text -# css :text -# feature_alumni :boolean default(FALSE) -# feature_contacts :boolean default(FALSE) -# feature_jobs :boolean default(FALSE) -# feature_library :boolean default(FALSE) -# feature_posts :boolean default(FALSE) -# has_sso :boolean default(FALSE) -# home_sentence :text -# host :string -# name :string -# privacy_policy :text -# registration_contact :string -# sass :text -# sso_button_label :string -# sso_cert :text -# sso_mapping :jsonb -# sso_name_identifier_format :string -# sso_provider :integer default("saml") -# sso_target_url :string -# terms :text -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid indexed => [about_type] -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# about_type :string indexed => [about_id] +# color :string +# cookies_policy :text +# css :text +# feature_alumni :boolean default(FALSE) +# feature_contacts :boolean default(FALSE) +# feature_jobs :boolean default(FALSE) +# feature_library :boolean default(FALSE) +# feature_posts :boolean default(FALSE) +# has_sso :boolean default(FALSE) +# home_sentence :text +# host :string +# name :string +# privacy_policy :text +# registration_contact :string +# sass :text +# sso_button_label :string +# sso_cert :text +# sso_mapping :jsonb +# sso_name_identifier_format :string +# sso_provider :integer default("saml") +# sso_target_url :string +# terms :text +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid indexed => [about_type] +# university_id :uuid not null, indexed # # Indexes # diff --git a/test/fixtures/communication/websites.yml b/test/fixtures/communication/websites.yml index 8f739d38af84415d173df302117170720604e07d..1a331e18999b2829449964614d8d0c01ffb3b5fb 100644 --- a/test/fixtures/communication/websites.yml +++ b/test/fixtures/communication/websites.yml @@ -2,25 +2,26 @@ # # Table name: communication_websites # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# access_token :string -# git_branch :string -# git_endpoint :string -# git_provider :integer default("github") -# in_production :boolean default(FALSE) -# name :string -# plausible_url :string -# repository :string -# style :text -# style_updated_at :date -# theme_version :string default("NA") -# url :string -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid indexed => [about_type] -# default_language_id :uuid not null, indexed -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# about_type :string indexed => [about_id] +# access_token :string +# deployment_status_badge :text +# git_branch :string +# git_endpoint :string +# git_provider :integer default("github") +# in_production :boolean default(FALSE) +# name :string +# plausible_url :string +# repository :string +# style :text +# style_updated_at :date +# theme_version :string default("NA") +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid indexed => [about_type] +# default_language_id :uuid not null, indexed +# university_id :uuid not null, indexed # # Indexes # diff --git a/test/fixtures/research/hal/publications.yml b/test/fixtures/research/hal/publications.yml index 8580abd33e5ddfa09d5929af7d96930803a92e87..e94b3c2eadf87e2a671f983703cc5bfa786f3591 100644 --- a/test/fixtures/research/hal/publications.yml +++ b/test/fixtures/research/hal/publications.yml @@ -3,10 +3,15 @@ # Table name: research_hal_publications # # id :uuid not null, primary key +# abstract :text +# citation_full :text # data :jsonb # docid :string indexed # doi :string +# file :text # hal_url :string +# journal_title :string +# open_access :boolean # publication_date :date # ref :string # slug :string diff --git a/test/fixtures/university/organizations.yml b/test/fixtures/university/organizations.yml index cb758b3b35c137658843d246d4e05f1fd96d1806..c65f25bbf0bd342f30454f4fbbf7c0486a82bb28 100644 --- a/test/fixtures/university/organizations.yml +++ b/test/fixtures/university/organizations.yml @@ -29,15 +29,21 @@ # zipcode :string # created_at :datetime not null # updated_at :datetime not null +# language_id :uuid indexed +# original_id :uuid indexed # university_id :uuid not null, indexed # # Indexes # +# index_university_organizations_on_language_id (language_id) +# index_university_organizations_on_original_id (original_id) # index_university_organizations_on_university_id (university_id) # # Foreign Keys # # fk_rails_35fcd198e0 (university_id => universities.id) +# fk_rails_3a9208fa29 (language_id => languages.id) +# fk_rails_5af11ea0cc (original_id => university_organizations.id) # default_organization: diff --git a/test/models/university/organization_test.rb b/test/models/university/organization_test.rb index b358e842fff8fafabf0dc9309c869d602b8870b8..c3facdee2cc5023375bf0e3414dd6324ce9be09b 100644 --- a/test/models/university/organization_test.rb +++ b/test/models/university/organization_test.rb @@ -29,15 +29,21 @@ # zipcode :string # created_at :datetime not null # updated_at :datetime not null +# language_id :uuid indexed +# original_id :uuid indexed # university_id :uuid not null, indexed # # Indexes # +# index_university_organizations_on_language_id (language_id) +# index_university_organizations_on_original_id (original_id) # index_university_organizations_on_university_id (university_id) # # Foreign Keys # # fk_rails_35fcd198e0 (university_id => universities.id) +# fk_rails_3a9208fa29 (language_id => languages.id) +# fk_rails_5af11ea0cc (original_id => university_organizations.id) # require "test_helper"