From 8b59e3517d1caa0f7a9f501696cf5c1073bda351 Mon Sep 17 00:00:00 2001 From: Anton Lubin Date: Fri, 3 Feb 2023 19:28:42 +0500 Subject: [PATCH] [#377] Delete old fields from database --- .../20230203071725_delete_obsolete_fields_from_repo.rb | 5 +++++ core/test/dummy/db/schema.rb | 4 +--- ...3134111_delete_obsolete_fields_from_repo.uffizzi_core.rb | 6 ++++++ db/schema.rb | 4 +--- 4 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 core/db/migrate/20230203071725_delete_obsolete_fields_from_repo.rb create mode 100644 db/migrate/20230203134111_delete_obsolete_fields_from_repo.uffizzi_core.rb diff --git a/core/db/migrate/20230203071725_delete_obsolete_fields_from_repo.rb b/core/db/migrate/20230203071725_delete_obsolete_fields_from_repo.rb new file mode 100644 index 000000000..c889dc7fd --- /dev/null +++ b/core/db/migrate/20230203071725_delete_obsolete_fields_from_repo.rb @@ -0,0 +1,5 @@ +class DeleteObsoleteFieldsFromRepo < ActiveRecord::Migration[6.1] + def change + remove_columns :uffizzi_core_repos, :deploy_preview_when_pull_request_is_opened, :delete_preview_when_pull_request_is_closed, type: :boolean + end +end diff --git a/core/test/dummy/db/schema.rb b/core/test/dummy/db/schema.rb index ec3279061..5578a5285 100644 --- a/core/test/dummy/db/schema.rb +++ b/core/test/dummy/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_09_27_113647) do +ActiveRecord::Schema.define(version: 2023_02_03_071725) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -331,8 +331,6 @@ t.string "dockerfile_path" t.jsonb "args" t.string "dockerfile_context_path" - t.boolean "deploy_preview_when_pull_request_is_opened" - t.boolean "delete_preview_when_pull_request_is_closed" t.boolean "deploy_preview_when_image_tag_is_created" t.boolean "delete_preview_when_image_tag_is_updated" t.boolean "share_to_github" diff --git a/db/migrate/20230203134111_delete_obsolete_fields_from_repo.uffizzi_core.rb b/db/migrate/20230203134111_delete_obsolete_fields_from_repo.uffizzi_core.rb new file mode 100644 index 000000000..e345141b8 --- /dev/null +++ b/db/migrate/20230203134111_delete_obsolete_fields_from_repo.uffizzi_core.rb @@ -0,0 +1,6 @@ +# This migration comes from uffizzi_core (originally 20230203071725) +class DeleteObsoleteFieldsFromRepo < ActiveRecord::Migration[6.1] + def change + remove_columns :uffizzi_core_repos, :deploy_preview_when_pull_request_is_opened, :delete_preview_when_pull_request_is_closed, type: :boolean + end +end diff --git a/db/schema.rb b/db/schema.rb index ec3279061..0e8afc896 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_09_27_113647) do +ActiveRecord::Schema.define(version: 2023_02_03_134111) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -331,8 +331,6 @@ t.string "dockerfile_path" t.jsonb "args" t.string "dockerfile_context_path" - t.boolean "deploy_preview_when_pull_request_is_opened" - t.boolean "delete_preview_when_pull_request_is_closed" t.boolean "deploy_preview_when_image_tag_is_created" t.boolean "delete_preview_when_image_tag_is_updated" t.boolean "share_to_github"