Subject | Re: [firebird-support] Modify Primary key |
---|---|
Author | Martijn Tonies |
Post date | 2003-07-17T17:06:31Z |
Scott,
one with the right columns! Don't start fiddling around with
the system tables!
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com
> I need to add another field to a primary key on a live database. IPardon me?!
> added the record to the RDB$INDEX_SEGMENTS and all looks good except I
> can't change RDB$INDICES.RDB$SEGMENT_COUNT with out getting an error:
> ISC ERROR MESSAGE:Yes! DROP the primary key constraint and ADD another
> action cancelled by trigger (1) to preserve data integrity
> Cannot modify index used by an Integrity Constraint
>
> Makes sense, but is there any way to get around this?
>
> I don't want to loose the data by removing the table and rewriting it.
>
> The table is only used in one application, by one user, so it's easy
> enough to make sure it's not accessed while it's modified.
>
> Adding the field to the primary key will relax uniqueness not cause
> duplicates, so it should be allowed, or at least doable.
>
> Is there a better way?
one with the right columns! Don't start fiddling around with
the system tables!
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com