Files
domokits/local/modules/ColissimoLabel/Config/thelia.sql
Laurent LE CORRE 649c92e52f Ajout des modules ColissimoWs et ColissimoLabel.php
Ne pas oublier de vérifier si les tables nécessaires sont bien créées en BDD.
2020-05-07 11:45:31 +02:00

31 lines
926 B
SQL

# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;
-- ---------------------------------------------------------------------
-- colissimo_label
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `colissimo_label`;
CREATE TABLE `colissimo_label`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`order_id` INTEGER NOT NULL,
`weight` DECIMAL(6,2) DEFAULT 0.00,
`number` VARCHAR(255),
`created_at` DATETIME,
`updated_at` DATETIME,
PRIMARY KEY (`id`),
INDEX `colissimo_label_FI_1` (`order_id`),
CONSTRAINT `colissimo_label_FK_1`
FOREIGN KEY (`order_id`)
REFERENCES `order` (`id`)
ON UPDATE RESTRICT
ON DELETE CASCADE
) ENGINE=InnoDB;
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;