fuel / orm

Fuel PHP Framework - Fuel v1.x ORM
http://fuelphp.com/docs/packages/orm/intro.html
152 stars 96 forks source link

Use $_properties with datatype set to generate tables #58

Closed jeffutter closed 13 years ago

jeffutter commented 13 years ago

It would be very handy if we could setup our 'schema' in the $_properties variable and then generate the create table queries from that. This would limit defining our schema to one place: in $_properties rather than $_properties and migrations. Migrations could still be used but they would just call something like Model_User->table_up() and Model_User->table_down() which would do the actual work.

jschreuder commented 13 years ago

This isn't something that should go into the Orm itself, I could see it as an extension for Oil that can generate migrations based on Models. But you'd have to code it, won't pop up on my priority list anywhere.

Also, someone already took a stab at this: http://www.fuelphp.com/forums/topics/view/929