OSDN Git Service

8748a140abbc879f6386e9336a914419b7585c49
[pettanr/pettanr.git] / db / migrate / 20111206105830_create_comics.rb
1 class CreateComics < ActiveRecord::Migration
2   def change
3     create_table :comics do |t|
4       t.string :title
5       t.integer :width, :null => false, :default => 200
6       t.integer :height, :null => false, :default => 80
7       t.integer :visible, :null => false, :default => 0
8       t.integer :editable, :null => false, :default => 0
9       t.integer :author_id
10
11       t.timestamps
12     end
13     add_index :comics, [:author_id]
14   end
15 end