Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CakePHP/CakePHP 2.4 app

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?

like image 748
Sukhwant Singh Avatar asked Sep 10 '14 17:09

Sukhwant Singh


1 Answers

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

like image 76
VerySeriousSoftwareEndeavours Avatar answered Oct 12 '22 00:10

VerySeriousSoftwareEndeavours