Hi,
I am getting the following error when restoring the dump created with Drop Before Restore option enabled.
Error in query (1091): Can't DROP FOREIGN KEY `fk_address_book_postal_code_list`; check that it exists
The database does exist before i load the dump.
I am guessing the drop table, drop the foreign key as well, below is the sql.
-- CREATE TABLE "address_book" -----------------------------
-- DROP TABLE "address_book" -----------------------------------
DROP TABLE IF EXISTS `address_book` CASCADE;
-- -------------------------------------------------------------
-- CREATE TABLE "address_book" ---------------------------------
CREATE TABLE `address_book` (
`id` BigInt( 20 ) UNSIGNED AUTO_INCREMENT NOT NULL COMMENT 'sequence number of address entry.',
`address_line_1` VarChar( 100 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT 'address line 1',
`address_line_2` VarChar( 100 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT 'address line 2',
`postal_code` Char( 5 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '-' COMMENT '5 char postal code.',
`state_code` Char( 3 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '-' COMMENT '3 char State Code',
`country_code` Char( 2 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '-' COMMENT 'country unique id',
CONSTRAINT `idx_address_book_seq_num` UNIQUE( `seq_num` ) )
CHARACTER SET = latin1
COLLATE = latin1_swedish_ci
COMMENT 'containt client address'
ENGINE = InnoDB
AUTO_INCREMENT = 3;
-- -------------------------------------------------------------
-- ---------------------------------------------------------
-- CREATE LINK "fk_address_book_postal_code_list" ----------
-- DROP LINK "fk_address_book_postal_code_list" ----------------
ALTER TABLE `address_book` DROP FOREIGN KEY `fk_address_book_postal_code_list`;
-- -------------------------------------------------------------
-- CREATE LINK "fk_address_book_postal_code_list" --------------
ALTER TABLE `address_book`
ADD CONSTRAINT `fk_address_book_postal_code_list` FOREIGN KEY ( `postal_code_id` )
REFERENCES `postal_code_list`( `postal_code_id` )
ON DELETE No Action
ON UPDATE No Action;
-- -------------------------------------------------------------
-- ---------------------------------------------------------