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: David Avendasora <email@hidden>
- Date: Tue, 22 Apr 2008 16:57:39 -0400
On Apr 22, 2008, at 3:05 PM, David Avendasora wrote:
Which generates an error stating that either it has to be NULL, or a
default be passed. As you can see, I did define a default value
("Default") in the Migration, but the plugin isn't picking it up.
I'm working on getting the ERXMicrosoftPlugIn to do it, but I can't
even find the code in the FrontbasePlugIn that would add the DEFAULT
clause so I'm not sure how to get the Microsoft plugin to do it.
That is what is confusing me.
Okay, so it looks to me like the EOSynchronizationFactory method
_columnCreationClauseForAttribute(EOAttribute attribute) is the one I
need to override and add the DEFAULT clause to the end of. I notice
that this method is not overridden in the FrontbasePlugIn though. Is
this the right place?
Previously Mike said:
It gets passed as a default value for the database column (you can
see the sql it generates). This exists only to accommodate
migrations from allows null true to allows null false to deal with
existing data and should not be relied on for ANYTHING else.
And this is pretty-much exactly what I want to do, but the
ERXMicrosoftPlugIn doesn't seem to add the DEFAULT clause to the ALTER
TABLE statement.
Dave
_______________________________________________
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