Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

There is a SVN repository. When the trunk/ in the repository updates, our scripts automatically update our testing server. When branches/stable/ updates, our scripts automatically update our main Web server.

There is also two MySQL databases: for the main server and for the testing server.

I'd like to also manage the SQL database structure with SVN. Note that I'd like to manage only structure not the data in the database.

Is it possible to extract and manage with SVN only the structure of the MySQL database not its data?

share|improve this question

1 Answer 1

Dump your database structure with

mysqldump --no-data schema_name > schema_name.sql

and commit that file to your SVN repository

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.