Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20160610204158_add_environments.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e1c71d173c41758e32e7c945c4e0e094a6a13ee8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

class AddEnvironments < ActiveRecord::Migration
  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