2015-01-08 12:00:43 +08:00
|
|
|
class CreatePolls < ActiveRecord::Migration
|
2015-01-08 17:42:46 +08:00
|
|
|
def up
|
2015-01-08 12:00:43 +08:00
|
|
|
create_table :polls do |t|
|
|
|
|
t.string :polls_name
|
|
|
|
t.string :polls_type
|
|
|
|
t.integer :polls_group_id
|
|
|
|
t.integer :polls_status
|
|
|
|
t.integer :user_id
|
|
|
|
t.datetime :published_at
|
|
|
|
t.datetime :closed_at
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
end
|
2015-01-08 17:42:46 +08:00
|
|
|
|
|
|
|
def down
|
|
|
|
drop_table :polls
|
|
|
|
end
|
2015-01-08 12:00:43 +08:00
|
|
|
end
|