22 lines
424 B
Ruby
22 lines
424 B
Ruby
class CreateComments < ActiveRecord::Migration
|
|
def self.up
|
|
create_table :comments do |t|
|
|
t.string :pseudo, :default => ""
|
|
t.string :email, :default => ""
|
|
t.string :website, :default => ""
|
|
t.boolean :enabled
|
|
t.text :comment
|
|
t.references :commentable, :polymorphic => true
|
|
t.references :user
|
|
t.timestamps
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
def self.down
|
|
drop_table :comments
|
|
end
|
|
end
|