2012-03-22 17:11:12 +00:00
|
|
|
# -*- encoding : utf-8 -*-
|
2012-02-21 20:28:04 +00:00
|
|
|
class CreateLabels < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
create_table :labels do |t|
|
|
|
|
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|
|
|
|
|
t.references :label, :null => false
|
|
|
|
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
|