June 5, 2009 by pedro mota

ActiveRecord database schema migration info is stored in the main database, so that if one needs to manually hack a migration (fastforward/rewind), just update TABLENAME\_schema\_infos column ‘version’ to a new value and manually change your schema.

Next ‘boot’ may generate (or not) new migrations.

riverside=# select * from foobar_schema_infos; id | version\n—+———
1 | 1.4
(1 row)

In a self note, forget not to set option :id => false on join tables for has_and_belongs_to_many relations.

© 2018 | Follow on Twitter | pedro mg & Hugo