gitlab-org--gitlab-foss/db/migrate/20160919145149_add_group_id_to_labels.rb

14 lines
337 B
Ruby
Raw Normal View History

2016-09-19 11:04:38 -04:00
class AddGroupIdToLabels < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def change
add_column :labels, :group_id, :integer
add_foreign_key :labels, :namespaces, column: :group_id, on_delete: :cascade
add_concurrent_index :labels, :group_id
end
end