Subject | RE: [firebird-support] Database Integrity |
---|---|
Author | Nigel Weeks |
Post date | 2005-11-30T23:47:40Z |
> I've had a look in the archives but I cant seem to findYep, it has occurred before(to me many times)
> anything on this (I could of sworn that I'd seen it somewhere before).
>Is the customer waiting to restore this DB? Ie, they're restoring from a
> We've just had a customer who can no longer restore their
> database backups because someone has added a column with a
> not null constraint to one of the existing tables. This then
> filled the existing rows with a null value in the added
> column... So at restore time it tries to insert null data
> into a not null field.
disaster, and the only copy they have is this backup?
The reason I ask is, if the live database is ok, set a value in the field
with nulls, and then backups and restores will run ok.
`update table set field = 0 where field is null;`
As long as it doesn't break business rules/processing, that'll make every
backup and restore from here on ok.
> I guess my question is this: Why does firebird allow a columnI seem to recall this issue being fixed. What version of Firebird are you
> to be added with a not null constraint without specifying a
> default value? When adding this column it destroys the
> database integrity by clearly violating one of the constraints.
running?
N.