OSDN Git Service

t#29312:any update
[pettanr/pettanr.git] / db / migrate / 20120815045014_rm_default_size_on_comic.rb
diff --git a/db/migrate/20120815045014_rm_default_size_on_comic.rb b/db/migrate/20120815045014_rm_default_size_on_comic.rb
new file mode 100644 (file)
index 0000000..0aca16a
--- /dev/null
@@ -0,0 +1,11 @@
+class RmDefaultSizeOnComic < ActiveRecord::Migration
+  def up
+    remove_column :comics, :width
+    remove_column :comics, :height
+  end
+
+  def down
+    add_column :comics, :width, :integer , :null => false, :default => 0
+    add_column :comics, :height, :integer , :null => false, :default => 0
+  end
+end