debian-mirror-gitlab/db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb
2020-06-23 00:09:42 +05:30

25 lines
674 B
Ruby

# 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
# rubocop:disable Migration/DropTable
drop_table :project_compliance_framework_settings
# rubocop:enable Migration/DropTable
end
end
end