20 lines
437 B
Ruby
20 lines
437 B
Ruby
|
|
class CreateComics < ActiveRecord::Migration
|
||
|
|
def self.up
|
||
|
|
create_table :comics do |t|
|
||
|
|
t.date :publish_on, :null => false
|
||
|
|
t.string :image_file_name, :null => false
|
||
|
|
t.string :image_content_type
|
||
|
|
t.integer :image_file_size
|
||
|
|
t.datetime :image_updated_at
|
||
|
|
t.string :name
|
||
|
|
t.text :story
|
||
|
|
|
||
|
|
t.timestamps
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
def self.down
|
||
|
|
drop_table :comics
|
||
|
|
end
|
||
|
|
end
|