I've been using sqlite3 for my database under development and my app has gotten complex enough that it's a bit slow to work with.
I've just switched to MySQL and run rake db:create ; rake db:migrate
and one of my migrations failed with the following error message:
undefined method `alter_table` for #<ActiveRecord::ConnectionAdapters::MysqlAdapter:0xb6e6088c>
I've had a quick google and turned up nothing. Then I checked the API and there is no documented method alter_table
. However, it does work with sqlite3!
Here's my migration:
class AddSettingsToUsers < ActiveRecord::Migration
def self.up
alter_table :users do |t|
t.text signature
...
end
end
...
end
This works as expected with sqlite3.
Am I going crazy? Did I just invent this method and it happened to be an undocumented feature that works only on a subset of supported databases?
Does anyone have some insight on this??