20151105094515_create_releases.rb 347 Bytes
Newer Older
1
# rubocop:disable all
2
class CreateReleases < ActiveRecord::Migration[4.2]
3 4
  DOWNTIME = false

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
5 6 7 8 9 10
  def change
    create_table :releases do |t|
      t.string :tag
      t.text :description
      t.integer :project_id

11
      t.timestamps null: true
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
12 13 14 15 16 17
    end

    add_index :releases, :project_id
    add_index :releases, [:project_id, :tag]
  end
end