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. From what I saw it basically
boils down to copy that code and to avoid outputting to the standard
output, am I right?
I'd really love to see your code when it's done; probably also trying to
come up with something re-usable for installation and updating
functionalities (a plugin?) for cake!
cheers
Lorenzo
Jamie wrote:
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 model and then use that to handle schema updating.
A lot of the code in the schema shell can be transferred into a
controller with minimal changes - the database updating code is pretty
straightforward.
I've actually got something like this planned that I hope to get to in
the next week or so; I'll gladly share my results once I'm done.
- Jamie
On Jan 24, 10:31 am, Lorenzo Bettini <bett...@dsi.unifi.it> wrote:
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
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en