rosa-build/db/migrate/20120220175615_create_label...

23 lines
462 B
Ruby
Raw Normal View History

# -*- 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