2012-02-21 20:28:04 +00:00
|
|
|
class CreateLabels < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
create_table :labels do |t|
|
2014-01-21 04:51:49 +00:00
|
|
|
t.string :name, null: false
|
|
|
|
t.string :color, null: false
|
2012-02-23 14:48:31 +00:00
|
|
|
t.references :project
|
2012-02-21 20:28:04 +00:00
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
|
|
|
|
create_table :labelings do |t|
|
2014-01-21 04:51:49 +00:00
|
|
|
t.references :label, null: false
|
2012-02-21 20:28:04 +00:00
|
|
|
t.references :issue
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
|
|
|
|
add_index :labelings, :issue_id
|
2012-02-23 14:48:31 +00:00
|
|
|
add_index :labels, :project_id
|
2012-02-21 20:28:04 +00:00
|
|
|
end
|
|
|
|
end
|