Commit 6a58ff1b authored by Sean Carroll's avatar Sean Carroll

Set project_ci_cd_settings.merge_trains_enabled to ignored

parent a359716e
Pipeline #94495945 failed with stages
in 85 minutes and 33 seconds
# frozen_string_literal: true
class ProjectCiCdSetting < ApplicationRecord
self.ignored_columns += %i[merge_trains_enabled]
belongs_to :project, inverse_of: :ci_cd_settings
# The version of the schema that first introduced this model/table.
......
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2019_11_05_094625) do
ActiveRecord::Schema.define(version: 2019_11_06_162854) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
......
......@@ -9,12 +9,14 @@ describe DropProjectCiCdSettingsMergeTrainsEnabled, :migration do
it 'correctly migrates up and down' do
reversible_migration do |migration|
migration.before -> {
expect(project_ci_cd_setting.merge_trains_enabled).not_to be_nil
expect(project_ci_cd_setting.column_names).to include("merge_trains_enabled")
}
migration.after -> {
expect(project_ci_cd_setting.merge_trains_enabled).to be_nil
project_ci_cd_setting.reset_column_information
expect(project_ci_cd_setting.column_names).not_to include("merge_trains_enabled")
}
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment