21 lines
386 B
Ruby
21 lines
386 B
Ruby
class CreateIssues < ActiveRecord::Migration
|
|
def self.up
|
|
create_table :issues do |t|
|
|
t.integer :serial_id
|
|
t.integer :project_id
|
|
t.integer :user_id
|
|
t.string :title
|
|
t.text :body
|
|
t.string :status
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :issues, [:project_id, :serial_id], :unique => true
|
|
end
|
|
|
|
def self.down
|
|
drop_table :issues
|
|
end
|
|
end
|