1. Chew LM
  2. Valentina Studio
  3. Вторник, Август 07 2018, 01:43 PM
  4.  Подписаться через email
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;
-- -------------------------------------------------------------
-- ---------------------------------------------------------
Комментарий
There are no comments made yet.
Chew LM Ответ принят
Thanks, good to know.
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hello,

Thank you, fix will be available in the next version
Комментарий
There are no comments made yet.
  • Страница :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories