Closed dbpolito closed 11 years ago
At the moment that would only be possible for MySQL, as the current database layer does not support the required functionality for other platforms.
Having said that, +1 :)
yep, my +1 stands here as well :)
+1
It should be possible to implement now, as the PDO driver now has list_columns() implemented.
I'd say, code it up and request a pull :)
Great... i'm going to start working on it. :D
+1
+2
There is an implementation of my friend.
See https://github.com/mp-php/fuel-myapp/blob/master/tasks/scafdb.php
To be usable it would need an ORM implementation too. And it needs a check to see if list_columns() doesn't throw exceptions and returns something useful.
This task is calling the standard method of FuelPHP. https://github.com/fuel/oil/issues/103#issuecomment-10261672
Model_Crud will be generated if '--crud' option is given. ORM is generated if no option is given.
Since some corrections were made, please see. https://github.com/mp-php/fuel-myapp/blob/master/tasks/scafdb.php
Thank you :)
Would be great if we have a way to generate scaffold based on created database tables instead of create it all from oil then we can use a DB Design Tool.
oil g scaffold users --from-table (get the fields on users table and generate the files)
Does it make sense for someone else?