Re: using CakeSchema from the app

2010-01-25 Thread Lorenzo Bettini
but are you re-using sql dumps? Because I'd aim at using either sql dumps and possibly sql table update statements (which I've done in the past) or cake generated schema files (which should be the cake way). cheers Lorenzo Miles J wrote: They require shells (or at least what I

Re: using CakeSchema from the app

2010-01-25 Thread Lorenzo Bettini
That's nice to hear :) I had already started taking a look at the shell code and it looked to me as well that most of the code could be shared to be used also inside a controller. It'd be nice to isolate that code so that it can be used in the shell code and also in the controller code.

using CakeSchema from the app

2010-01-24 Thread Lorenzo Bettini
Hi I found http://book.cakephp.org/view/735/Generating-and-using-Schema-files which is cool to migrate database schemas with cake console; but I'd like to migrate and apply schema (e.g., for installation and update pages) from the application... can it be done? thanks in advance

Re: using CakeSchema from the app

2010-01-24 Thread Miles J
They require shells (or at least what I found). I recently had the same dilemma with my forum plugin as I wanted to build an install script and use the Schema classes. I just had to use plain SQL files. http://github.com/milesj/forum/blob/master/controllers/install_controller.php If someone has

Re: using CakeSchema from the app

2010-01-24 Thread Jamie
It can't be done out of the box, since, like you mentioned, the only tool that the Cake core comes with for managing schemas is the shell class. But the schema shell just uses the CakeSchema model to do most of the heavy lifting. So you could just make a SchemaController that uses the CakeSchema