]> git.openstreetmap.org Git - rails.git/blobdiff - lib/migrate.rb
1st amf_controller tests, and some basic sanity check fixes
[rails.git] / lib / migrate.rb
index 77bc93646d0eef922d958973e4acd8481df69c79..585b47b1ca624d7bfc2cad06f7dd24432cb8857f 100644 (file)
@@ -73,6 +73,18 @@ 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
+
+      def add_fulltext_index (table_name, column)
+        execute "CREATE FULLTEXT INDEX `#{table_name}_#{column}_idx` ON `#{table_name}` (`#{column}`)"
+      end
     end
   end
 end