Subject | Re: [firebird-support] Temporary disable FK constraint |
---|---|
Author | Rik van Kekem |
Post date | 2015-11-06T17:13:47Z |
Scott Morgan blumf@... [firebird-support] wrote:
I didn't expect that.
You could drop the constraint but would need to recreate it afterwards.
ALTER TABLE FOO_TABLE DROP FK_FOO;
But I agree, it's not very convenient.
Deactivating would be so much simpler.
Grtz,
Rik
> You can't inactivate a FK constraint:O, wow. And even deactivating the trigger/PK doesn't work with that.
>
> SQL> ALTER INDEX FK_FOO INACTIVE;
>
> unsuccessful metadata update
> -MODIFY RDB$INDICES failed
> -action cancelled by trigger (2) to preserve data integrity
> -Cannot deactivate index used by an integrity constraint
I didn't expect that.
You could drop the constraint but would need to recreate it afterwards.
ALTER TABLE FOO_TABLE DROP FK_FOO;
But I agree, it's not very convenient.
Deactivating would be so much simpler.
Grtz,
Rik