debian-mirror-gitlab/db/migrate/20200703124823_create_namespace_settings.rb
2020-08-09 17:41:57 +05:30

22 lines
538 B
Ruby

# frozen_string_literal: true
class CreateNamespaceSettings < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
with_lock_retries do
create_table :namespace_settings, id: false do |t|
t.timestamps_with_timezone null: false
t.references :namespace, primary_key: true, default: nil, type: :integer, index: false, foreign_key: { on_delete: :cascade }
end
end
end
def down
drop_table :namespace_settings
end
end