Subject | Error in restore (foreign key violation) |
---|---|
Author | Faisal Abdullah |
Post date | 2005-06-20T06:46:25Z |
Hello people,
I have this error during my gback -v -c ;
gbak: ERROR: violation of FOREIGN KEY constraint "PK_T_INV_ITEM_LOT"
on table "T_INV_ITEM_LOT"
gbak: ERROR: action cancelled by trigger (3) to preserve data integrity
gbak: ERROR: Cannot deactivate primary index
gbak: Exiting before completion due to errors
Here is the structure for T_INV_ITEM_LOT:
CREATE TABLE T_INV_ITEM_LOT (
LOTID ID NOT NULL /* ID = INTEGER NOT NULL */,
OUTLETID ID NOT NULL /* ID = INTEGER NOT NULL */,
LOTNO TRANS_NO NOT NULL /* TRANS_NO = VARCHAR(40) NOT NULL */,
RECEIPTDATE DATE NOT NULL,
CREATEDBY LOGINID NOT NULL /* LOGINID = VARCHAR(10) NOT NULL */,
CREATEDDATETIME CREATEDDATETIME NOT NULL /* CREATEDDATETIME =
TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL */,
UPDATEDBY LOGINIDNULL /* LOGINIDNULL = VARCHAR(10) */,
UPDATEDDATETIME UPDATEDDATETIME /* UPDATEDDATETIME = TIMESTAMP */
);
ALTER TABLE T_INV_ITEM_LOT ADD CONSTRAINT PK_T_INV_ITEM_LOT PRIMARY KEY (LOTID);
ALTER TABLE T_INV_ITEM_LOT ADD CONSTRAINT FK_T_INV_ITEM_LOT_OUTLET
FOREIGN KEY (OUTLETID) REFERENCES T_OUTLET_MASTER (OUTLETID);
Anyway pointers would be appreciated.
Thanks.
Regards,
Faisal
There are many ways of going forward, but there is only one way of
standing still.
I have this error during my gback -v -c ;
gbak: ERROR: violation of FOREIGN KEY constraint "PK_T_INV_ITEM_LOT"
on table "T_INV_ITEM_LOT"
gbak: ERROR: action cancelled by trigger (3) to preserve data integrity
gbak: ERROR: Cannot deactivate primary index
gbak: Exiting before completion due to errors
Here is the structure for T_INV_ITEM_LOT:
CREATE TABLE T_INV_ITEM_LOT (
LOTID ID NOT NULL /* ID = INTEGER NOT NULL */,
OUTLETID ID NOT NULL /* ID = INTEGER NOT NULL */,
LOTNO TRANS_NO NOT NULL /* TRANS_NO = VARCHAR(40) NOT NULL */,
RECEIPTDATE DATE NOT NULL,
CREATEDBY LOGINID NOT NULL /* LOGINID = VARCHAR(10) NOT NULL */,
CREATEDDATETIME CREATEDDATETIME NOT NULL /* CREATEDDATETIME =
TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL */,
UPDATEDBY LOGINIDNULL /* LOGINIDNULL = VARCHAR(10) */,
UPDATEDDATETIME UPDATEDDATETIME /* UPDATEDDATETIME = TIMESTAMP */
);
ALTER TABLE T_INV_ITEM_LOT ADD CONSTRAINT PK_T_INV_ITEM_LOT PRIMARY KEY (LOTID);
ALTER TABLE T_INV_ITEM_LOT ADD CONSTRAINT FK_T_INV_ITEM_LOT_OUTLET
FOREIGN KEY (OUTLETID) REFERENCES T_OUTLET_MASTER (OUTLETID);
Anyway pointers would be appreciated.
Thanks.
Regards,
Faisal
There are many ways of going forward, but there is only one way of
standing still.