Feature Requests: Browse | Submit New | Admin

[#8281] ActiveRecord migrations for ActiveRBAC

Date:
2007-01-29 11:38
Priority:
3
Submitted By:
Daniel Weinand (dweinand)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
ActiveRecord migrations for ActiveRBAC

Detailed description
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.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
001_import_active_rbac_schema.rb Download

Changes:

Field Old Value Date By
File Added1187: 001_import_active_rbac_schema.rb2007-01-29 11:38dweinand