gitlab-org--gitlab-foss/db/migrate/20180305095250_create_inter...

16 lines
418 B
Ruby
Raw Normal View History

class CreateInternalIdsTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
2018-03-16 12:34:08 +00:00
def change
2018-03-12 17:12:38 +00:00
create_table :internal_ids, id: :bigserial do |t|
t.references :project, null: false, foreign_key: { on_delete: :cascade }
t.integer :usage, null: false
t.integer :last_value, null: false
t.index [:usage, :project_id], unique: true
end
end
end