2016-06-16 23:09:34 +05:30
|
|
|
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
|
|
|
|
# for more information on how to write migrations for GitLab.
|
2018-12-23 12:14:25 +05:30
|
|
|
class AddEnvironments < ActiveRecord::Migration[4.2]
|
2016-06-16 23:09:34 +05:30
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
def change
|
|
|
|
create_table :environments, force: true do |t|
|
|
|
|
t.integer :project_id, null: false
|
|
|
|
t.string :name, null: false
|
|
|
|
t.datetime :created_at
|
|
|
|
t.datetime :updated_at
|
|
|
|
end
|
|
|
|
|
|
|
|
add_index :environments, [:project_id, :name]
|
|
|
|
end
|
|
|
|
end
|