diff --git a/app/models/communication/website/index_page/administrators.rb b/app/models/communication/website/index_page/administrators.rb index 6663997ecf44ef5dabcf952c4ba6a5760eaacc23..7d4b0191db24fede12be10b9b996677c525521d0 100644 --- a/app/models/communication/website/index_page/administrators.rb +++ b/app/models/communication/website/index_page/administrators.rb @@ -1,3 +1,29 @@ +# == Schema Information +# +# Table name: communication_website_index_pages +# +# id :uuid not null, primary key +# description :text +# featured_image_alt :string +# kind :integer +# path :string +# text :text +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# communication_website_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# idx_comm_website_index_page_on_communication_website_id (communication_website_id) +# index_communication_website_index_pages_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_5cd2482227 (communication_website_id => communication_websites.id) +# fk_rails_7eb45227ae (university_id => universities.id) +# class Communication::Website::IndexPage::Administrators < Communication::Website::IndexPage def self.polymorphic_name 'Communication::Website::IndexPage::Administrators' diff --git a/app/models/communication/website/index_page/authors.rb b/app/models/communication/website/index_page/authors.rb index 0153feea361335961b420c7385f4f2326fd4db1b..3dbde4e04257de62dc2ced61a7265a85fedb10f9 100644 --- a/app/models/communication/website/index_page/authors.rb +++ b/app/models/communication/website/index_page/authors.rb @@ -1,3 +1,29 @@ +# == Schema Information +# +# Table name: communication_website_index_pages +# +# id :uuid not null, primary key +# description :text +# featured_image_alt :string +# kind :integer +# path :string +# text :text +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# communication_website_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# idx_comm_website_index_page_on_communication_website_id (communication_website_id) +# index_communication_website_index_pages_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_5cd2482227 (communication_website_id => communication_websites.id) +# fk_rails_7eb45227ae (university_id => universities.id) +# class Communication::Website::IndexPage::Authors < Communication::Website::IndexPage def self.polymorphic_name 'Communication::Website::IndexPage::Authors' diff --git a/app/models/communication/website/index_page/communication_posts.rb b/app/models/communication/website/index_page/communication_posts.rb index ac3e628531c51952f0468b974a898be10952295c..a4fa2e93cdd8b3211c97e629f56ab7040f66ddcb 100644 --- a/app/models/communication/website/index_page/communication_posts.rb +++ b/app/models/communication/website/index_page/communication_posts.rb @@ -1,3 +1,29 @@ +# == Schema Information +# +# Table name: communication_website_index_pages +# +# id :uuid not null, primary key +# description :text +# featured_image_alt :string +# kind :integer +# path :string +# text :text +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# communication_website_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# idx_comm_website_index_page_on_communication_website_id (communication_website_id) +# index_communication_website_index_pages_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_5cd2482227 (communication_website_id => communication_websites.id) +# fk_rails_7eb45227ae (university_id => universities.id) +# class Communication::Website::IndexPage::CommunicationPosts < Communication::Website::IndexPage def self.polymorphic_name 'Communication::Website::IndexPage::CommunicationPosts' diff --git a/app/models/communication/website/index_page/education_programs.rb b/app/models/communication/website/index_page/education_programs.rb index fd6fa1571efe694cc3c1f7fd6af54860e03323f6..e37b33724f36d27f02b313b111f27928aa11237c 100644 --- a/app/models/communication/website/index_page/education_programs.rb +++ b/app/models/communication/website/index_page/education_programs.rb @@ -1,3 +1,29 @@ +# == Schema Information +# +# Table name: communication_website_index_pages +# +# id :uuid not null, primary key +# description :text +# featured_image_alt :string +# kind :integer +# path :string +# text :text +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# communication_website_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# idx_comm_website_index_page_on_communication_website_id (communication_website_id) +# index_communication_website_index_pages_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_5cd2482227 (communication_website_id => communication_websites.id) +# fk_rails_7eb45227ae (university_id => universities.id) +# class Communication::Website::IndexPage::EducationPrograms < Communication::Website::IndexPage def self.polymorphic_name 'Communication::Website::IndexPage::EducationPrograms' diff --git a/app/models/communication/website/index_page/home.rb b/app/models/communication/website/index_page/home.rb index 55f211f50b3d72a7acb0030f02588200108dfcfb..0cd4a282e6a1ce30d002f774c5db4ecb1a3c0185 100644 --- a/app/models/communication/website/index_page/home.rb +++ b/app/models/communication/website/index_page/home.rb @@ -1,3 +1,29 @@ +# == Schema Information +# +# Table name: communication_website_index_pages +# +# id :uuid not null, primary key +# description :text +# featured_image_alt :string +# kind :integer +# path :string +# text :text +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# communication_website_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# idx_comm_website_index_page_on_communication_website_id (communication_website_id) +# index_communication_website_index_pages_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_5cd2482227 (communication_website_id => communication_websites.id) +# fk_rails_7eb45227ae (university_id => universities.id) +# class Communication::Website::IndexPage::Home < Communication::Website::IndexPage def self.polymorphic_name 'Communication::Website::IndexPage::Home' diff --git a/app/models/communication/website/index_page/persons.rb b/app/models/communication/website/index_page/persons.rb index f6685bfb7e968344dc579139c5510042f0137ef4..68de1550664f11296c9b65559a18405612a8fd41 100644 --- a/app/models/communication/website/index_page/persons.rb +++ b/app/models/communication/website/index_page/persons.rb @@ -1,3 +1,29 @@ +# == Schema Information +# +# Table name: communication_website_index_pages +# +# id :uuid not null, primary key +# description :text +# featured_image_alt :string +# kind :integer +# path :string +# text :text +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# communication_website_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# idx_comm_website_index_page_on_communication_website_id (communication_website_id) +# index_communication_website_index_pages_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_5cd2482227 (communication_website_id => communication_websites.id) +# fk_rails_7eb45227ae (university_id => universities.id) +# class Communication::Website::IndexPage::Persons < Communication::Website::IndexPage def self.polymorphic_name 'Communication::Website::IndexPage::Persons' diff --git a/app/models/communication/website/index_page/research_articles.rb b/app/models/communication/website/index_page/research_articles.rb index 28c2576516d41143d2562b1b35a1516c4006d055..2fb5905fd230d7873e28cc8c908e575bd7dd4792 100644 --- a/app/models/communication/website/index_page/research_articles.rb +++ b/app/models/communication/website/index_page/research_articles.rb @@ -1,3 +1,29 @@ +# == Schema Information +# +# Table name: communication_website_index_pages +# +# id :uuid not null, primary key +# description :text +# featured_image_alt :string +# kind :integer +# path :string +# text :text +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# communication_website_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# idx_comm_website_index_page_on_communication_website_id (communication_website_id) +# index_communication_website_index_pages_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_5cd2482227 (communication_website_id => communication_websites.id) +# fk_rails_7eb45227ae (university_id => universities.id) +# class Communication::Website::IndexPage::ResearchArticles < Communication::Website::IndexPage def self.polymorphic_name 'Communication::Website::IndexPage::ResearchArticles' diff --git a/app/models/communication/website/index_page/research_volumes.rb b/app/models/communication/website/index_page/research_volumes.rb index 5f7845d018f8b90528018c0e62f86f6d82ea1692..c240e4a0a2a77b6582dd935eb1d8f4e93a410185 100644 --- a/app/models/communication/website/index_page/research_volumes.rb +++ b/app/models/communication/website/index_page/research_volumes.rb @@ -1,3 +1,29 @@ +# == Schema Information +# +# Table name: communication_website_index_pages +# +# id :uuid not null, primary key +# description :text +# featured_image_alt :string +# kind :integer +# path :string +# text :text +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# communication_website_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# idx_comm_website_index_page_on_communication_website_id (communication_website_id) +# index_communication_website_index_pages_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_5cd2482227 (communication_website_id => communication_websites.id) +# fk_rails_7eb45227ae (university_id => universities.id) +# class Communication::Website::IndexPage::ResearchVolumes < Communication::Website::IndexPage def self.polymorphic_name 'Communication::Website::IndexPage::ResearchVolumes' diff --git a/app/models/communication/website/index_page/researchers.rb b/app/models/communication/website/index_page/researchers.rb index 37fe8b782b7e3e3d94c0e44257162c0ac849e4cf..727c395dd5920a112a76a895c1014039ff48b9f4 100644 --- a/app/models/communication/website/index_page/researchers.rb +++ b/app/models/communication/website/index_page/researchers.rb @@ -1,3 +1,29 @@ +# == Schema Information +# +# Table name: communication_website_index_pages +# +# id :uuid not null, primary key +# description :text +# featured_image_alt :string +# kind :integer +# path :string +# text :text +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# communication_website_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# idx_comm_website_index_page_on_communication_website_id (communication_website_id) +# index_communication_website_index_pages_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_5cd2482227 (communication_website_id => communication_websites.id) +# fk_rails_7eb45227ae (university_id => universities.id) +# class Communication::Website::IndexPage::Researchers < Communication::Website::IndexPage def self.polymorphic_name 'Communication::Website::IndexPage::Researchers' diff --git a/app/models/communication/website/index_page/teachers.rb b/app/models/communication/website/index_page/teachers.rb index 1679da753a73d1b217f010ee833f7914edeea7cd..f979e22f585194d4bc44eb03d8b80904ee348c74 100644 --- a/app/models/communication/website/index_page/teachers.rb +++ b/app/models/communication/website/index_page/teachers.rb @@ -1,3 +1,29 @@ +# == Schema Information +# +# Table name: communication_website_index_pages +# +# id :uuid not null, primary key +# description :text +# featured_image_alt :string +# kind :integer +# path :string +# text :text +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# communication_website_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# idx_comm_website_index_page_on_communication_website_id (communication_website_id) +# index_communication_website_index_pages_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_5cd2482227 (communication_website_id => communication_websites.id) +# fk_rails_7eb45227ae (university_id => universities.id) +# class Communication::Website::IndexPage::Teachers < Communication::Website::IndexPage def self.polymorphic_name 'Communication::Website::IndexPage::Teachers' diff --git a/db/migrate/20220217183218_remove_unused_tables.rb b/db/migrate/20220217183218_remove_unused_tables.rb new file mode 100644 index 0000000000000000000000000000000000000000..18ff66efd1a31214d5fafea8add1ebedbff6caa0 --- /dev/null +++ b/db/migrate/20220217183218_remove_unused_tables.rb @@ -0,0 +1,6 @@ +class RemoveUnusedTables < ActiveRecord::Migration[6.1] + def change + drop_table :communication_website_homes + drop_table :communication_website_structures + end +end diff --git a/db/schema.rb b/db/schema.rb index e310ee7e92b8fcf355f9dac6ac011713e7da3a55..362101367ebc22d71499b5c8cd6d8c8db6af843a 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.define(version: 2022_02_15_142845) do +ActiveRecord::Schema.define(version: 2022_02_17_183218) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" @@ -133,19 +133,6 @@ ActiveRecord::Schema.define(version: 2022_02_15_142845) do t.index ["website_id"], name: "index_communication_website_git_files_on_website_id" end - create_table "communication_website_homes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| - t.uuid "university_id", null: false - t.uuid "communication_website_id", null: false - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false - t.text "github_path" - t.string "featured_image_alt" - t.text "description" - t.text "text" - t.index ["communication_website_id"], name: "idx_comm_website_homes_on_communication_website_id" - t.index ["university_id"], name: "index_communication_website_homes_on_university_id" - end - create_table "communication_website_imported_authors", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false @@ -348,43 +335,6 @@ ActiveRecord::Schema.define(version: 2022_02_15_142845) do t.index ["university_id"], name: "index_communication_website_posts_on_university_id" end - create_table "communication_website_structures", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| - t.uuid "university_id", null: false - t.uuid "communication_website_id", null: false - t.string "persons_title", default: "Équipe" - t.text "persons_description", default: "Liste des membres de l'équipe" - t.string "persons_path", default: "equipe" - t.string "authors_title", default: "Équipe éditoriale" - t.text "authors_description", default: "Liste des membres de l'équipe éditoriale" - t.string "authors_path", default: "equipe-editoriale" - t.string "researchers_title", default: "Équipe de recherche" - t.text "researchers_description", default: "Liste des membres de l'équipe de recherche" - t.string "researchers_path", default: "equipe-de-recherche" - t.string "administrators_title", default: "Équipe administrative" - t.text "administrators_description", default: "Liste des membres de l'équipe administrative" - t.string "administrators_path", default: "equipe-administrative" - t.string "teachers_title", default: "Équipe pédagogique" - t.text "teachers_description", default: "Liste des membres de l'équipe pédagogique" - t.string "teachers_path", default: "equipe-pedagogique" - t.string "communication_posts_title", default: "Actualités" - t.text "communication_posts_description", default: "Liste des actualités" - t.string "communication_posts_path", default: "actualites" - t.string "education_programs_title", default: "L'offre de formation" - t.text "education_programs_description", default: "Liste des formations proposées" - t.string "education_programs_path", default: "offre-de-formation" - t.string "research_volumes_title", default: "Volumes" - t.text "research_volumes_description", default: "Liste des volumes" - t.string "research_volumes_path", default: "volumes" - t.string "research_articles_title", default: "Articles" - t.text "research_articles_description", default: "Liste des articles" - t.string "research_articles_path", default: "articles" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false - t.string "home_title", default: "Accueil" - t.index ["communication_website_id"], name: "idx_comm_website_structures_on_communication_website_id" - t.index ["university_id"], name: "index_communication_website_structures_on_university_id" - end - create_table "communication_websites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" @@ -709,8 +659,6 @@ ActiveRecord::Schema.define(version: 2022_02_15_142845) do add_foreign_key "communication_website_categories", "education_programs", column: "program_id" add_foreign_key "communication_website_categories", "universities" add_foreign_key "communication_website_git_files", "communication_websites", column: "website_id" - add_foreign_key "communication_website_homes", "communication_websites" - add_foreign_key "communication_website_homes", "universities" add_foreign_key "communication_website_imported_authors", "communication_website_imported_websites", column: "website_id" add_foreign_key "communication_website_imported_authors", "universities" add_foreign_key "communication_website_imported_authors", "university_people", column: "author_id" @@ -744,8 +692,6 @@ ActiveRecord::Schema.define(version: 2022_02_15_142845) do add_foreign_key "communication_website_posts", "communication_websites" add_foreign_key "communication_website_posts", "universities" add_foreign_key "communication_website_posts", "university_people", column: "author_id" - add_foreign_key "communication_website_structures", "communication_websites" - add_foreign_key "communication_website_structures", "universities" add_foreign_key "communication_websites", "universities" add_foreign_key "education_programs", "education_programs", column: "parent_id" add_foreign_key "education_programs", "universities"