I am currently developing a CakePHP 2.4 app and trying to manage changes to my database table schemas with the schema manager. I figured out how to generate the schema and restore it, but is there a way to backup the entire database's schema with it? Seems like should be a method to solve this... Any thoughts?
Of course, use the schema dump command from the Cake Console.
It will write the entire schema to a .sql
file and store it in App/Config/Schema
.
Example of usage:
Console/cake schema dump --write filename.sql
(change 'filename.sql' to whatever the dump file should be called.)
This can also be find in the cake docs: http://book.cakephp.org/2.0/en/console-and-shells/schema-management-and-migrations.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With