Hi Jeff,

I am not currently using Migrations but, have you looked here? 
http://webobjects.mdimension.com/wonder/api/index.html?er/extensions/partials/package-summary.html

This has an excellent overview of how to setup and use ERMigrations.

I would put the Migration Classes in the same project where your EOModel is, but put the migration properties in the Application's properties file. That way you can control the migration settings on a per-application basis.

As far as the startup goes, I think you have your properties setup incorrectly.

You are naming the model "netbracketsFW":

er.migration.modelNames=netbracketsFW

But you are calling "netbrackets"

netbrackets.MigrationClassPrefix=com.netbrackets.migration.Netbrackets


This should be netbracketsFW.MigrationClassPrefix=...

It doesn't matter where the class is located as long as the class is on the classpath somewhere (framework is on the build path).

I hope this helps!

Dave

On Apr 14, 2009, at 7:33 AM, Jeff Schmitz wrote:

Hello,
I'm trying to get migrations to run on my model that is defined in a framework, but I'm not sure where to put the migrations class (in the framework or my application that references the framework) and where to put the properties related to migrations (framework or app?). Also, what should the first part of the below "netbrackets.MigrationClassPrefix" be named after, the framework project or the app project? I've tried about every different combination I can think of but can't seem to hit on the correct setup as when I run, the database tables don't get created.

Below are how my properties are set:

# Migrations
er.migration.migrateAtStartup=true
er.migration.createTablesIfNecessary=true
er.migration.modelNames=netbracketsFW
netbrackets.MigrationClassPrefix=com.netbrackets.migration.Netbrackets

#Connection Dictionary
dbConnectURLGLOBAL=jdbc:frontbase://localhost/myDB
dbConnectUserGLOBAL=myDBUser
dbConnectPasswordGLOBAL=myPW


thanks,
Jeff
_______________________________________________
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]

 _______________________________________________
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