OSDN Git Service

try sort
[pettanr/pettanr.git] / db / migrate / 20130611092857_remove_index_t_on_panel_pictures.rb
diff --git a/db/migrate/20130611092857_remove_index_t_on_panel_pictures.rb b/db/migrate/20130611092857_remove_index_t_on_panel_pictures.rb
new file mode 100644 (file)
index 0000000..ac44c9e
--- /dev/null
@@ -0,0 +1,9 @@
+class RemoveIndexTOnPanelPictures < ActiveRecord::Migration
+  def up
+    remove_index  "panel_pictures", :name => "altered_panel_pictures_idt"
+  end
+
+  def down
+    add_index "panel_pictures", ["panel_id", "t"], :name => "altered_panel_pictures_idt", :unique => true
+  end
+end