Subject | Re: Alter table - how to add ON DELETE CASCADE |
---|---|
Author | ainpoissee |
Post date | 2005-08-30T20:48:35Z |
--- In firebird-support@yahoogroups.com, Ivan Cruz <ivan@a...> wrote:
CREATE TABLE TAB_KuuYletunnid (
UID DOM_PK PRIMARY KEY,
Tooleping DOM_FK REFERENCES TAB_Tooleping(UID) ON UPDATE CASCADE,
...
);
So I don't know the name of the constraint. But I have to add ON
DELETE CASCADE to it in update script (I'm using TUIBScript to execute
scripts).
Is there any plans to add support for user defined names in inline
constraint declarations? I know that one can have user defined
constraint names using ADD CONSTRAINT syntax, but I like the inline
style and would like to continue using it...
I also recall Jim Starkey to talk about UPGRADE syntax, if I
understand right, it would allow me to do what I want without knowing
the name of the constraint... anyone know what the status of this
proposal is?
TIA
ain
> >Am I correct that current ALTER TABLE syntax doesn't support addingBecause I create tables using syntax like:
> >"ON DELETE CASCADE" to existing FK
> >
> Yes. That operation is not supported.
>
> >(ie I have to create new FK field,
> >move data over and drop old fileld to achieve this)?
> >
> Why not drop the constraint and create it again in the correct
> form? I can't see a reason for a new field and a data move here.
CREATE TABLE TAB_KuuYletunnid (
UID DOM_PK PRIMARY KEY,
Tooleping DOM_FK REFERENCES TAB_Tooleping(UID) ON UPDATE CASCADE,
...
);
So I don't know the name of the constraint. But I have to add ON
DELETE CASCADE to it in update script (I'm using TUIBScript to execute
scripts).
Is there any plans to add support for user defined names in inline
constraint declarations? I know that one can have user defined
constraint names using ADD CONSTRAINT syntax, but I like the inline
style and would like to continue using it...
I also recall Jim Starkey to talk about UPGRADE syntax, if I
understand right, it would allow me to do what I want without knowing
the name of the constraint... anyone know what the status of this
proposal is?
TIA
ain