2017-06-13 07:44:13 -04:00
|
|
|
# rubocop:disable Migration/Timestamps
|
2018-11-13 02:27:31 -05:00
|
|
|
class CreateContainerRepository < ActiveRecord::Migration[4.2]
|
2016-11-01 22:33:35 -04:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def change
|
2017-03-23 09:00:41 -04:00
|
|
|
create_table :container_repositories do |t|
|
2017-04-06 06:25:09 -04:00
|
|
|
t.references :project, foreign_key: true, index: true, null: false
|
2017-04-05 09:12:29 -04:00
|
|
|
t.string :name, null: false
|
|
|
|
|
|
|
|
t.timestamps null: false
|
2016-11-01 22:33:35 -04:00
|
|
|
end
|
2017-04-05 09:12:29 -04:00
|
|
|
|
|
|
|
add_index :container_repositories, [:project_id, :name], unique: true
|
2016-11-01 22:33:35 -04:00
|
|
|
end
|
|
|
|
end
|