BigW Consortium Gitlab

20170322013926_create_container_repository.rb 456 Bytes
Newer Older
1
# rubocop:disable Migration/Timestamps
2
class CreateContainerRepository < ActiveRecord::Migration
3 4 5 6 7
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def change
8
    create_table :container_repositories do |t|
9
      t.references :project, foreign_key: true, index: true, null: false
10 11 12
      t.string :name, null: false

      t.timestamps null: false
13
    end
14 15

    add_index :container_repositories, [:project_id, :name], unique: true
16 17
  end
end