debian-mirror-gitlab/db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb

25 lines
674 B
Ruby
Raw Normal View History

2020-04-22 19:07:51 +05:30
# frozen_string_literal: true
class AddProjectComplianceFrameworkSettingsTable < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
create_table :project_compliance_framework_settings, id: false do |t|
t.references :project, primary_key: true, null: false, index: true, foreign_key: { on_delete: :cascade }
t.integer :framework, null: false, limit: 2
end
end
end
def down
with_lock_retries do
2020-06-23 00:09:42 +05:30
# rubocop:disable Migration/DropTable
2020-04-22 19:07:51 +05:30
drop_table :project_compliance_framework_settings
2020-06-23 00:09:42 +05:30
# rubocop:enable Migration/DropTable
2020-04-22 19:07:51 +05:30
end
end
end