Is there a way for ActiveRecord to capture all the data base's fields, including the Pks and FKs? Like what the ORM DBIx::Class script does on Catalyst?
Here's a brief description of that:
Generate the model using the Catalyst "_create.pl" script
script:
$ rm lib/MyApp/Model/DB.pm
$ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \ create=static components=TimeStamp,PassphraseColumn \ 'dbi:Pg:dbname=catappdb' 'catappuser' 'catalyst' '{ AutoCommit => 1 }'
More details on DBIx::Class
So, I need to be able to create my DB using sql and then just run a script so that Rail's ORM ActiveRecord maps all the tables and relations.
(sorry for my bad english :3 )