Fixed update sql for coupon and export
This commit is contained in:
@@ -153,24 +153,25 @@ ALTER TABLE `coupon_version` ADD `version_created_by` VARCHAR(100) AFTER `versio
|
|||||||
# Add coupon_customer_count table
|
# Add coupon_customer_count table
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
|
|
||||||
CREATE TABLE `coupon_customer_count`
|
ALTER TABLE `coupon_customer_count`
|
||||||
(
|
DROP FOREIGN KEY `fk_coupon_customer_customer_id`;
|
||||||
`coupon_id` INTEGER NOT NULL,
|
|
||||||
`customer_id` INTEGER NOT NULL,
|
ALTER TABLE `coupon_customer_count`
|
||||||
`count` INTEGER DEFAULT 0 NOT NULL,
|
DROP FOREIGN KEY `fk_coupon_customer_coupon_id`;
|
||||||
INDEX `fk_coupon_customer_customer_id_idx` (`customer_id`),
|
|
||||||
INDEX `fk_coupon_customer_coupon_id_idx` (`coupon_id`),
|
ALTER TABLE `coupon_customer_count`
|
||||||
CONSTRAINT `fk_coupon_customer_customer_id`
|
ADD CONSTRAINT `fk_coupon_customer_customer_id`
|
||||||
FOREIGN KEY (`customer_id`)
|
FOREIGN KEY (`customer_id`)
|
||||||
REFERENCES `customer` (`id`)
|
REFERENCES `customer` (`id`)
|
||||||
ON UPDATE RESTRICT
|
ON UPDATE RESTRICT
|
||||||
ON DELETE CASCADE,
|
ON DELETE CASCADE;
|
||||||
CONSTRAINT `fk_coupon_customer_coupon_id`
|
|
||||||
|
ALTER TABLE `coupon_customer_count`
|
||||||
|
ADD CONSTRAINT `fk_coupon_customer_coupon_id`
|
||||||
FOREIGN KEY (`coupon_id`)
|
FOREIGN KEY (`coupon_id`)
|
||||||
REFERENCES `coupon` (`id`)
|
REFERENCES `coupon` (`id`)
|
||||||
ON UPDATE RESTRICT
|
ON UPDATE RESTRICT
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE;
|
||||||
) ENGINE=InnoDB;
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
# Add Brand tables and related resources
|
# Add Brand tables and related resources
|
||||||
@@ -441,6 +442,82 @@ CREATE TABLE `export`
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- import_category_i18n
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `import_category_i18n`;
|
||||||
|
|
||||||
|
CREATE TABLE `import_category_i18n`
|
||||||
|
(
|
||||||
|
`id` INTEGER NOT NULL,
|
||||||
|
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||||
|
`title` VARCHAR(255) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`,`locale`),
|
||||||
|
CONSTRAINT `import_category_i18n_FK_1`
|
||||||
|
FOREIGN KEY (`id`)
|
||||||
|
REFERENCES `import_category` (`id`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- export_category_i18n
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `export_category_i18n`;
|
||||||
|
|
||||||
|
CREATE TABLE `export_category_i18n`
|
||||||
|
(
|
||||||
|
`id` INTEGER NOT NULL,
|
||||||
|
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||||
|
`title` VARCHAR(255) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`,`locale`),
|
||||||
|
CONSTRAINT `export_category_i18n_FK_1`
|
||||||
|
FOREIGN KEY (`id`)
|
||||||
|
REFERENCES `export_category` (`id`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- import_i18n
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `import_i18n`;
|
||||||
|
|
||||||
|
CREATE TABLE `import_i18n`
|
||||||
|
(
|
||||||
|
`id` INTEGER NOT NULL,
|
||||||
|
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||||
|
`title` VARCHAR(255) NOT NULL,
|
||||||
|
`description` LONGTEXT,
|
||||||
|
PRIMARY KEY (`id`,`locale`),
|
||||||
|
CONSTRAINT `import_i18n_FK_1`
|
||||||
|
FOREIGN KEY (`id`)
|
||||||
|
REFERENCES `import` (`id`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- export_i18n
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `export_i18n`;
|
||||||
|
|
||||||
|
CREATE TABLE `export_i18n`
|
||||||
|
(
|
||||||
|
`id` INTEGER NOT NULL,
|
||||||
|
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||||
|
`title` VARCHAR(255) NOT NULL,
|
||||||
|
`description` LONGTEXT,
|
||||||
|
PRIMARY KEY (`id`,`locale`),
|
||||||
|
CONSTRAINT `export_i18n_FK_1`
|
||||||
|
FOREIGN KEY (`id`)
|
||||||
|
REFERENCES `export` (`id`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `config`(`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
INSERT INTO `config`(`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||||
('form_firewall_bruteforce_time_to_wait', '10', 0, 0, NOW(), NOW()),
|
('form_firewall_bruteforce_time_to_wait', '10', 0, 0, NOW(), NOW()),
|
||||||
('form_firewall_time_to_wait', '60', 0, 0, NOW(), NOW()),
|
('form_firewall_time_to_wait', '60', 0, 0, NOW(), NOW()),
|
||||||
|
|||||||
Reference in New Issue
Block a user