diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb index b72ab03ad9624fe10a4dd3cc7de6b2f2f10aa7cc..34d1eb1cfc8e8919fe33bde6bf232ffb6adbce3c 100644 --- a/app/models/communication/website.rb +++ b/app/models/communication/website.rb @@ -2,27 +2,18 @@ # # Table name: communication_websites # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# access_token :string -# git_endpoint :string -# git_provider :integer default("github") -# name :string -# repository :string -# static_pathname_administrators :string default("administrators") -# static_pathname_authors :string default("authors") -# static_pathname_posts :string default("posts") -# static_pathname_programs :string default("programs") -# static_pathname_research_articles :string default("articles") -# static_pathname_research_volumes :string default("volumes") -# static_pathname_researchers :string default("researchers") -# static_pathname_staff :string default("staff") -# static_pathname_teachers :string default("teachers") -# url :string -# 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] +# access_token :string +# git_endpoint :string +# git_provider :integer default("github") +# name :string +# repository :string +# url :string +# 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/configs/base_url.rb b/app/models/communication/website/configs/base_url.rb index ffae459359e38b6ebbd72a6ba4deff313e44175a..a2510c716f8662e46e01f66222730e6c680e3505 100644 --- a/app/models/communication/website/configs/base_url.rb +++ b/app/models/communication/website/configs/base_url.rb @@ -2,27 +2,18 @@ # # Table name: communication_websites # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# access_token :string -# git_endpoint :string -# git_provider :integer default("github") -# name :string -# repository :string -# static_pathname_administrators :string default("administrators") -# static_pathname_authors :string default("authors") -# static_pathname_posts :string default("posts") -# static_pathname_programs :string default("programs") -# static_pathname_research_articles :string default("articles") -# static_pathname_research_volumes :string default("volumes") -# static_pathname_researchers :string default("researchers") -# static_pathname_staff :string default("staff") -# static_pathname_teachers :string default("teachers") -# url :string -# 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] +# access_token :string +# git_endpoint :string +# git_provider :integer default("github") +# name :string +# repository :string +# url :string +# 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/configs/permalinks.rb b/app/models/communication/website/configs/permalinks.rb index 0f269522ac9088f6e58be42e405358bfc6719c50..04a9cc323c8d694bff15d5cfa331c933edde9025 100644 --- a/app/models/communication/website/configs/permalinks.rb +++ b/app/models/communication/website/configs/permalinks.rb @@ -2,27 +2,18 @@ # # Table name: communication_websites # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# access_token :string -# git_endpoint :string -# git_provider :integer default("github") -# name :string -# repository :string -# static_pathname_administrators :string default("administrators") -# static_pathname_authors :string default("authors") -# static_pathname_posts :string default("posts") -# static_pathname_programs :string default("programs") -# static_pathname_research_articles :string default("articles") -# static_pathname_research_volumes :string default("volumes") -# static_pathname_researchers :string default("researchers") -# static_pathname_staff :string default("staff") -# static_pathname_teachers :string default("teachers") -# url :string -# 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] +# access_token :string +# git_endpoint :string +# git_provider :integer default("github") +# name :string +# repository :string +# url :string +# 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/db/migrate/20220303125819_remove_unused_static_paths_in_website.rb b/db/migrate/20220303125819_remove_unused_static_paths_in_website.rb new file mode 100644 index 0000000000000000000000000000000000000000..ec18acb2f9ffc9e7beeff155e8068966aa3619a1 --- /dev/null +++ b/db/migrate/20220303125819_remove_unused_static_paths_in_website.rb @@ -0,0 +1,13 @@ +class RemoveUnusedStaticPathsInWebsite < ActiveRecord::Migration[6.1] + def change + remove_column :communication_websites, :static_pathname_administrators + remove_column :communication_websites, :static_pathname_authors + remove_column :communication_websites, :static_pathname_posts + remove_column :communication_websites, :static_pathname_programs + remove_column :communication_websites, :static_pathname_research_articles + remove_column :communication_websites, :static_pathname_research_volumes + remove_column :communication_websites, :static_pathname_researchers + remove_column :communication_websites, :static_pathname_staff + remove_column :communication_websites, :static_pathname_teachers + end +end diff --git a/db/schema.rb b/db/schema.rb index 8afbdb0f0c4f2d46a1b0e1d27d31d23c54dd7a71..0c898ee2263531f05ff0dfa7129422c3a4f893e6 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_03_02_140425) do +ActiveRecord::Schema.define(version: 2022_03_03_125819) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" @@ -356,15 +356,6 @@ ActiveRecord::Schema.define(version: 2022_03_02_140425) do t.string "repository" t.string "about_type" t.uuid "about_id" - t.string "static_pathname_authors", default: "authors" - t.string "static_pathname_posts", default: "posts" - t.string "static_pathname_programs", default: "programs" - t.string "static_pathname_staff", default: "staff" - t.string "static_pathname_research_volumes", default: "volumes" - t.string "static_pathname_research_articles", default: "articles" - t.string "static_pathname_administrators", default: "administrators" - t.string "static_pathname_researchers", default: "researchers" - t.string "static_pathname_teachers", default: "teachers" t.integer "git_provider", default: 0 t.string "git_endpoint" t.index ["about_type", "about_id"], name: "index_communication_websites_on_about" diff --git a/test/fixtures/communication/websites.yml b/test/fixtures/communication/websites.yml index 33965b28a8dd69b5dbcc9a665aa1e1a116fd2b17..aea91b89aedf7bdf88dc35453d5b5aaa4d1d2f25 100644 --- a/test/fixtures/communication/websites.yml +++ b/test/fixtures/communication/websites.yml @@ -2,27 +2,18 @@ # # Table name: communication_websites # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# access_token :string -# git_endpoint :string -# git_provider :integer default("github") -# name :string -# repository :string -# static_pathname_administrators :string default("administrators") -# static_pathname_authors :string default("authors") -# static_pathname_posts :string default("posts") -# static_pathname_programs :string default("programs") -# static_pathname_research_articles :string default("articles") -# static_pathname_research_volumes :string default("volumes") -# static_pathname_researchers :string default("researchers") -# static_pathname_staff :string default("staff") -# static_pathname_teachers :string default("teachers") -# url :string -# 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] +# access_token :string +# git_endpoint :string +# git_provider :integer default("github") +# name :string +# repository :string +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid indexed => [about_type] +# university_id :uuid not null, indexed # # Indexes #