I was a bit disappointed to see that there weren't standard AR migrations. I tend to use SQLite locally, and might even
stick with it for small projects, and there wasn't a schema for that.
So, instead of writing a SQLite schema, I modified the existing migration to use ActiveRecord? migration methods if
a schema isn't found. This may not work completely, as there seem to be lots of database-specific clauses in the statements,
but it may be enough to get those of us not using a supported database up and running quickly.
Unfortunately I don't have the original migration anymore, so instead of including a patch I'm just attaching the new
file.
Also, I'm unfortunately not able to test this because the tests are using instantiated fixtures, and the engine testing
extensions seem to be failing because there are no actual classes for the many_to_many join models (Specifically, errors
around line 86 of the engine testing extensions.) I don't know if that is due to my migration, but I suspect it's due
to the fact that the join tables aren't rich associations with their own models. Might be worthwhile to either fix that
in the plugin, or to make them rich via has_many :through.
|