sfPropelSqlDiffPlugin
sfPropelSqlDiff plugin generate diff.sql file, which contains difference beetween schema.yml and current database structure.
Description
It provides new symfony task - propel-build-sql-diff which will create file diff.sql with ALTER TABLE statements, whitch will make current database structure exactly as it described 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 only for symfony 1.0 and tested only for mysql. You can discuss it at thread in symfony forum
Installation
symfony plugin-install http://plugins.symfony-project.com/sfPropelSqlDiffPlugin-0.1.2 symfony cc
Usage
After making changes in schema.yml
symfony propel-build-sql-diff frontend
(first parameter is application name, second, if not ommited, environment)
Then you can find sql file at data/sql/diff.sql
To execute diff.sql
symfony propel-insert-sql-diff frontend
To run model rebuild and apply database changes to database
symfony propel-update-all frontend
Changelog
0.1.2
- added task propel-update-all
- fixed problem with short open tags
- fixed problem with "foreign key constraint fails" error during diff.sql execution
0.1.1
- added task propel-insert-sql-diff
- fixed php notices
- fixed problem with default values like
Attachments
- sfPropelSqlDiffPlugin-0.1.0.tgz (4.4 kB) - added by gray on 01/10/08 18:42:50.
- sfPropelSqlDiffPlugin-0.1.1.tgz (4.8 kB) - added by gray on 01/30/08 18:29:05.
- sfPropelSqlDiffPlugin-0.1.2.tgz (5.2 kB) - added by gray on 03/25/08 16:51:34.
- sfPropelSqlDiffPlugin-0.1.3.2.tgz (6.1 kB) - added by gray on 04/11/08 16:48:09.
- sfPropelSqlDiffPlugin-0.1.3.tgz (6.1 kB) - added by gray on 04/11/08 17:15:29.
- sfPropelSqlDiffPlugin-0.1.4.tgz (6.1 kB) - added by gray on 04/22/08 17:45:23.