2011-12-19 15:30:14 +00:00
|
|
|
class CreateIssues < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
|
|
create_table :issues do |t|
|
2014-03-14 17:41:49 +00:00
|
|
|
t.integer :serial_id, references: nil
|
2011-12-19 15:30:14 +00:00
|
|
|
t.integer :project_id
|
|
|
|
t.integer :user_id
|
|
|
|
t.string :title
|
|
|
|
t.text :body
|
|
|
|
t.string :status
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
|
2014-01-21 04:51:49 +00:00
|
|
|
add_index :issues, [:project_id, :serial_id], unique: true
|
2011-12-19 15:30:14 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
drop_table :issues
|
|
|
|
end
|
|
|
|
end
|