Subject | RE: [firebird-support] Changing column type |
---|---|
Author | Rick DeBay |
Post date | 2004-10-13T21:18:20Z |
I just checked the dependencies table, and the PRODUCTID field is not in
the table, so this won't work. However, trying to delete the field from
the table yields:
Column PRODUCTID from table CLAIMSPAIDREVERSED is referenced in view
V_INVOICED_CLAIMS.
Would I modify RDB$RELATION_FIELDS?
-----Original Message-----
From: Martijn Tonies [mailto:m.tonies@...]
Sent: Wednesday, October 13, 2004 3:59 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Changing column type
Hello Rick, Milan,
column types. Doing otherwise might result in data-loss errors.
Rick, in your case, I suggest adding two new columns, one with
the right type and one with the current same type. Transfer the
data. Update RDB$DEPENDENCIES to point to the new column
of the same type. Drop the old column. Rename the new column
with the new type to have the old name, update
RDB$DEPENDENCIES again to hold the old name and drop
the dummy column.
Of course, all after a backup :-)
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS
SQL
Server.
Upscene Productions
http://www.upscene.com
Yahoo! Groups Links
the table, so this won't work. However, trying to delete the field from
the table yields:
Column PRODUCTID from table CLAIMSPAIDREVERSED is referenced in view
V_INVOICED_CLAIMS.
Would I modify RDB$RELATION_FIELDS?
-----Original Message-----
From: Martijn Tonies [mailto:m.tonies@...]
Sent: Wednesday, October 13, 2004 3:59 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Changing column type
Hello Rick, Milan,
>Indeed, Database Workbench only uses standard DDL to update
> DBW updates, as far as I can tell, using standard DDL. It was what I
> was using when I got the error.
> I was hoping to avoid the massive recreate :-)
column types. Doing otherwise might result in data-loss errors.
Rick, in your case, I suggest adding two new columns, one with
the right type and one with the current same type. Transfer the
data. Update RDB$DEPENDENCIES to point to the new column
of the same type. Drop the old column. Rename the new column
with the new type to have the old name, update
RDB$DEPENDENCIES again to hold the old name and drop
the dummy column.
Of course, all after a backup :-)
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS
SQL
Server.
Upscene Productions
http://www.upscene.com
Yahoo! Groups Links