suramon / sf-propel-sql-diff-plugin
Generate diff.sql file, which contains difference between schema.yml and current database structure
Installs: 3 692
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
README
= sfPropelSqlDiffPlugin = [[PageOutline]] sfPropelSqlDiff plugin generates database sql patch, which contains difference beetween schema.yml and current database structure. == Description == It provides new symfony task - propel:build-sql-diff which will create file propel.diff.sql with ALTER TABLE statements, whitch will make current database structure exactly as it described in schema.yml without deleting data in tables as it does propel:build-sql task. Currently it handles: - creation and deletion of tables/fields/indexes/foreign keys - changing fields/indexes/foreign keys Plugin is in beta state now. It is tested only for mysql. You can discuss it at [http://www.symfony-project.org/forum/index.php/t/10679/ thread in symfony forum] == Usage == After making changes in schema.yml {{{ php symfony propel:build-sql-diff }}} Then you can find sql file at data/sql/propel.diff.sql To execute propel.diff.sql {{{ php symfony propel:insert-sql-diff }}} To run model rebuild and apply database changes to database {{{ php symfony propel:build-all-diff }}} You can also specify connection name if you have more than one database, application name, environment. For more info please take a look at {{{ php symfony help propel:build-sql-diff }}}