]> git.openstreetmap.org Git - rails.git/blobdiff - lib/migrate.rb
Move db engine changing into db adaptor monkeypatch
[rails.git] / lib / migrate.rb
index 77bc93646d0eef922d958973e4acd8481df69c79..df7e5f7aee91d08d3aaf345ca27d0dd6bdfd7393 100644 (file)
@@ -73,6 +73,14 @@ module ActiveRecord
       def innodb_table
         return { :id => false, :force => true, :options => "ENGINE=InnoDB" }
       end
+
+      def innodb_option
+        return "ENGINE=InnoDB"
+      end
+      def change_engine (table_name, engine)
+        execute "ALTER TABLE #{table_name} ENGINE = #{engine}"
+      end
     end
   end
 end