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: Mike Schrag <email@hidden>
- Date: Tue, 22 Apr 2008 14:46:59 -0400
Microsoft is so helpful in that after the initial creation of a
table it doesn't allow you to add a new column and mark it as NOT
NULL without defining a default value. You can _not_ create the
column, then populate it after. You have to do it all in one
function. I suppose the work around it to create it as NULL, then
_change_ it to NOT NULL with a second function. It would be nice to
handle it so it is invisible to the developer that SQL Server is a
PITA though...
Even with no rows in the table? That's an odd restriction ...
However, "after table creation" presumably means "in another
migration" which couldn't guarantee the table is empty anyway, so this
seems like a reasonable restriction (as your migration should probably
ALWAYS declare a default for new not-null columns to protect against
this).
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