Subject Re: [firebird-support] Drop a field with PK with FB 2.1
Author Guido Klapperich
> It's not possible with FB 2.1 RC2. When I'm trying to drop a field which
> is part of a composite PK constraint, I get the following error message:
>
> unsuccessful metadata update ERASE RDB$RELATION_FIELDS failed action
> cancelled by trigger (1) to preserve data integrity Cannot delete column
> being used in an Integrity Constraint.

I run FB 2.1 RC2 and it is possible to run the following script

CREATE TABLE CUSTOMERGROUPS (
CUID INTEGER NOT NULL);
alter table CUSTOMERGROUPS
add constraint PK_CUSTOMERGROUPS
primary key (CUID);
COMMENT ON COLUMN CUSTOMERGROUPS.CUID IS
'Primary Key';

commit;

ALTER TABLE CUSTOMERGROUPS
ADD CUPARENTID INTEGER;

commit;

ALTER TABLE CUSTOMERGROUPS DROP CUID;

commit;


With FB 2.0.3 I get the error mentioned in my last mail.

Regards

Guido