Re: ERXMigrationTable.newColumn does not set default value
Re: ERXMigrationTable.newColumn does not set default value
- Subject: Re: ERXMigrationTable.newColumn does not set default value
- From: "Mr. Pierre Frisch" <email@hidden>
- Date: Fri, 11 Apr 2008 11:53:11 -0700
Actually it is. The integrated FB plug-in in WO 5.4.x has the same
capabilities as the Wonder one. May be we should define an extension
to the EOModel format so that we could extent it to all vendors.
Pierre
--
Pierre Frisch
email@hidden
On Apr 9, 2008, at 10:38, Mike Schrag wrote:
I tried to update an existing Model (PostGreSQL) by adding a TEXT
field which shouldn't be NULL.
In the upgrade method I used
table.newColumn("responsible", java.sql.Types.LONGVARCHAR, 0, 0, 0,
false, "", "default");
to fill the new field with a default value "default" to deal with
the already existing datasets.
But I always get an org.postgresql.util.PSQLException: ERROR:
column "responsible" contains null values.
The default value flag is not supported by EOF plugins normally.
This is a custom extension hint that is put into the attribute
userInfo during the migration process. Only the FrontBasePlugIn (in
Wonder -- I doubt it's in 5.4) actually interprets this value and
generates a "DEFAULT xxx" string in the SQL. It should be pretty
easy to add this to postgresql also, though.
ms
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden