OSDN Git Service

t#30021:add repeat on gp
[pettanr/pettanr.git] / db / migrate / 20121107091403_add_repeat_on_gp.rb
diff --git a/db/migrate/20121107091403_add_repeat_on_gp.rb b/db/migrate/20121107091403_add_repeat_on_gp.rb
new file mode 100644 (file)
index 0000000..cdf0376
--- /dev/null
@@ -0,0 +1,13 @@
+class AddRepeatOnGp < ActiveRecord::Migration
+  def up
+    add_column :ground_pictures, :repeat, :integer, :null => false, :default => 0
+    add_column :ground_pictures, :x, :integer, :null => false, :default => 0
+    add_column :ground_pictures, :y, :integer, :null => false, :default => 0
+  end
+
+  def down
+    remove_column :ground_pictures, :repeat
+    remove_column :ground_pictures, :x
+    remove_column :ground_pictures, :y
+  end
+end