That seems to have done the trick.  The changes to the database were performed 
on startup.

I used to get an SQL error.

Thanks,

Johnny


On Jan 5, 2010, at 10:26 AM, David Avendasora wrote:

> Hi Johnny,
> 
> That should do it. Ramsey would know for sure. Try that and post back if it 
> doesn't work.
> 
> Dave
> 
> On Jan 5, 2010, at 3:22 PM, Johnny Miller wrote:
> 
>> To use this plugin do you just add the project to the workspace, build it 
>> and then include it as a WO Framework?
>> 
>> Thanks in advance,
>> 
>> Johnny
>> 
>> 
>> On Jan 2, 2010, at 7:29 AM, David LeBer wrote:
>> 
>>> Before we go any further, are you using WO5.4 and MySQL without using 
>>> Ramsey's MySQL plugin?
>>> 
>>> <http://issues.objectstyle.org/jira/browse/WONDER-339>
>>> 
>>> On 2010-01-02, at 12:23 PM, Mark Woollard wrote:
>>> 
>>>> Am using Wonder Project migration for the first time. The initial database 
>>>> creation works but am now trying to add a single column as the second 
>>>> revision of the database. When running application am getting error as 
>>>> follows:
>>>> 
>>>> Jan 02 17:13:28 TheApp[53817] INFO  er.extensions.jdbc.ERXJDBCUtilities  - 
>>>> Executing alter table t_position null c_abbreviation longtext NOT NULL
>>>> Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal 
>>>> Transaction
>>>> Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal 
>>>> Transaction
>>>> Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  evaluateExpression: 
>>>> <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "UPDATE 
>>>> _dbupdater SET lockowner = NULL, updatelock = ? WHERE modelname = ?" 
>>>> withBindings: 1:0(updateLock), 2:"MockDraft"(modelName)>
>>>> Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal 
>>>> Transaction
>>>> Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal 
>>>> Transaction
>>>> Jan 02 17:14:20 TheApp[53817] DEBUG NSLog  -  === Rollback Internal 
>>>> Transaction
>>>> Jan 02 17:14:36 TheApp[53817] ERROR er.extensions.appserver.ERXApplication 
>>>>  - TheApp failed to start.
>>>> MySQLSyntaxErrorException: You have an error in your SQL syntax; check the 
>>>> manual that corresponds to your MySQL server version for the right syntax 
>>>> to use near 'null c_abbreviation longtext NOT NULL' at line 1
>>>> 
>>>> The database is mysql, and it seems to me that the alter statement is 
>>>> incorrect on the first line of the log, there should be 'add column' 
>>>> rather than 'null'. The migration class is as follows:
>>>> 
>>>> public class DbVersion1 extends Migration {
>>>> 
>>>>    @Override
>>>>    public void downgrade(EOEditingContext ec, ERXMigrationDatabase 
>>>> database)
>>>>                    throws Throwable {
>>>>            
>>>> database.existingTableNamed("t_position").existingColumnNamed("c_abbreviation").delete();
>>>>    }
>>>> 
>>>>    @Override
>>>>    public void upgrade(EOEditingContext ec, ERXMigrationDatabase database)
>>>>                    throws Throwable {
>>>>            ERXMigrationTable table = 
>>>> database.existingTableNamed("t_position");
>>>>            table.newStringColumn("c_abbreviation", false, "");
>>>>    }
>>>> }
>>>> 
>>>> The new column is using the varchar10 prototype. Am stuck as can't see why 
>>>> the sql is being generated incorrectly. Anyone have any ideas?
>>>> 
>>>> Thanks
>>>> Mark
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list      ([email protected])
>>>> Help/Unsubscribe/Update your Subscription:
>>>> http://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
>>>> 
>>>> This email sent to [email protected]
>>> 
>>> ;david
>>> 
>>> --
>>> David LeBer
>>> Codeferous Software
>>> 'co-def-er-ous' adj. Literally 'code-bearing'
>>> site:       http://codeferous.com
>>> blog:       http://davidleber.net
>>> profile:    http://www.linkedin.com/in/davidleber
>>> twitter:    http://twitter.com/rebeld
>>> --
>>> Toronto Area Cocoa / WebObjects developers group:
>>> http://tacow.org
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.com
>>> 
>>> This email sent to [email protected]
>> 
>> Johnny Miller
>> Kahalawai Media Corp
>> http://www.kahalawai.com
>> 
>> 
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
>> 
>> This email sent to [email protected]
>> 
>> 
> 

Johnny Miller
Kahalawai Media Corp
http://www.kahalawai.com



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to