|
| Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #61785 is a reply to message #43210 ] |
Thu, 25 September 2008 00:42   |
mikecrowe Messages: 27 Registered: August 2006 |
Junior Member |
|
|
Update: Needs a little more work -- will provide shortly.
For those using SF 1.1 and Propel 1.3, the attached diff allows you to support multiple schema's with multiple databases (I hope). Works for me.
[Updated on: Thu, 25 September 2008 00:48] Cheers!
Mike
From despair.com:
INSPIRATION: Genius is 1% inspiration and 99% perspiration...
which explains why engineers smell so bad...
|
|
|
|
|
|
|
| Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #78190 is a reply to message #43210 ] |
Tue, 12 May 2009 15:51   |
raj1965 Messages: 25 Registered: April 2009 |
Junior Member |
|
|
hi,
i want to be able to check out the trunk of my project, work on it, edit the schema, etc, and then have a way of recording changes made to the database before I commit.
Has anyone any idea how i could do this? This plugin is almost what I want, but in reverse, i.e. i want to be able to take an old schema file and look at a database, and get some sql that would bring a database using the old schema up-to-date with the new db.
thanks,
raj
|
|
|
| Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #78191 is a reply to message #78190 ] |
Tue, 12 May 2009 15:55   |
florynth Messages: 185 Registered: January 2007 Location: Québec - Montréal |
Senior Member |
|
|
You just have to run the
symfony propel-build-sql-diff [application_name]
And it will generate a diff.slq file that you'll copy and commit it somewhere
The best way to improve your Symfony knowledge is to read the source code !
When you start a project two main issues : database and security.
Sorry for my english, my first language is french.
Working for : http://www.tribalnova.com
|
|
|
|
|
| Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #82037 is a reply to message #43210 ] |
Fri, 17 July 2009 11:03   |
cancausecancer Messages: 9 Registered: January 2009 Location: The marble |
Junior Member |
|
|
I modified the plugin to add foreign key checking for columns which already exist in the db and have mismatched column types which keep foreign keys from being built or keeps column types from being changed.
If the column types are different for the fkey'd column and foreign table's column, it fixes it by dropping the fkey, changing the fkey column type to match the foreign table's type and then adding the fkey back.
Don't use this version unless you are having problems being unable to make foreign keys or being unable to change column types because the tables have foreign keys already and their types don't match.
I've ran it on my db more than 50 times and it works for my db with 100s of tables. It's use at your own risk and make sure to back up any vital data and your old version of the plugin too just for safety.
I have to code in other langs besides what I use at work because work is lowering my iq.
|
|
|
| Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #84268 is a reply to message #43210 ] |
Mon, 24 August 2009 15:36   |
omansour Messages: 3 Registered: August 2006 |
Junior Member |
|
|
Hey
Using your plugin in our big symfony project I found some bugs on default value and null detection.
Here the patch I have created for the 1.2 version.
best regards
Olivier
|
|
|
|
| Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #84742 is a reply to message #84566 ] |
Wed, 02 September 2009 22:10   |
cancausecancer Messages: 9 Registered: January 2009 Location: The marble |
Junior Member |
|
|
>When I run the propel:build-sql-diff, it creates whole schema...
>The problem is, that it does not load anything from db.
Do the tables exist in the DB? Is it looking at the correct DB name?
You may have to execute the sql diff file so it creates the DB in MySQL. I believe propel:insert-sql-diff will do that. You would have to run it after you build-diff. If that is what you need, you can also go to the /data/sql/ folder and find the diff.sql (or propel.diff.sql in the new version) and execute that on the server. That sql file is the resulting sql from the sql-diff.
I have to code in other langs besides what I use at work because work is lowering my iq.
|
|
|
|
|
| Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #91679 is a reply to message #43210 ] |
Mon, 18 January 2010 15:41  |
JackJones Messages: 67 Registered: February 2007 |
Member |
|
|
Hi All
Seems to be a very nice plugin.
I have some problem's with the installation, what is the best whay to install it ?
Thx
|
|
|