OSDN Git Service

fix: any
[pettanr/pettanr.git] / db / migrate / 20130914061319_restruct_comic.rb
1 class RestructComic < ActiveRecord::Migration
2   def up
3     drop_table :comics
4     create_table :comics do |t|
5       t.string :title, :null => false, :limit => 100
6       t.integer :visible, :null => false, :default => 0
7       t.text :description
8       t.integer :author_id, :null => false
9
10       t.timestamps
11     end
12     drop_table :stories
13     create_table :stories do |t|
14       t.integer :comic_id, :null => false, :default => 0
15       t.string :title, :null => false, :limit => 100
16       t.integer :visible, :null => false, :default => 0
17       t.text :description
18       t.integer :t, :null => false, :default => 0
19
20       t.timestamps
21     end
22   end
23
24   def down
25   end
26 end