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