Hi,

I've managed to run it manually using ERXMigrator class and it's just working 
perfect. I do face a small issue for foreign keys where both source and target 
column names are quite long that the foreign key name length exceeds the 
Postgresql allowed size. For that I've modified the _newRelationship(...) 
method in the ERXMigrationTable to shorten the name considering only the first 
letter of every word. I guess this can be useful for others too or we can have 
an extra method as follows:

public void addForeignKey(String sourceColumnName, String destinationTableName, 
String destinationColumnName, String foreignKeyName) throws SQLException {
        addForeignKey(existingColumnNamed(sourceColumnName), 
database().existingColumnNamed(destinationTableName, destinationColumnName), 
String foreignKeyName);
}

Just a suggestion.

Farrukh

On 2010-09-19, at 12:28 PM, Farrukh Ijaz wrote:

> Hi again,
> 
> How can I control the execution of finishInitialization() method of my 
> application to execute after the all the models have been upgraded using 
> Migrations?
> 
> Right now what happens, our applications use some entities in the 
> finishInitialization() method however the application breaks with exception 
> that relationship blah blah does not exist, as Migrations's upgrade method 
> have not yet called. This I've tested also placing some debugging information 
> and break points in the upgrade and finishInitialization() method.
> 
> Do we need to use Notifications? If so, what would be the appropriate place 
> to post notification?
> 
> Thanks,
> 
> Farrukh _______________________________________________
> 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/farrukh.ijaz%40fuegodigitalmedia.com
> 
> This email sent to [email protected]

 _______________________________________________
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