There's no requirement that you use migrations, "funny" or otherwise. Just start creating models from your tables. The Rails authors are smart enough to recognise the need to support "legacy schemas".
Note that if your primary keys aren't called id
then you'll need to define primary keys (see p316 of "Agile Web Development With Rails 3rd edition"):
class LegacyBook < ActiveRecord::Base
self.primary_key = "isbn"
end
Similarly, if your foreign key names do not follow the AR conventional default style, you'll need to explicitly define them in your relationship definitions.
Out of the box, ActiveRecord doesn't support composite primary keys yet: it kind of assumes something more like 5th Normal Form (PK just a sort of arbitrary number with no meaning in the business domain). There is at least one gem, appropriately named composite_primary_keys (gem install in the usual way) but it may not support AR 2.3 yet (I see v2.2.2 when I gem list --remote composite
). There's some discussion on Google Groups.