order tax tables

This commit is contained in:
Etienne Roudeix
2013-09-20 08:23:02 +02:00
parent 6a990bf625
commit 17548e3526
13 changed files with 712 additions and 3491 deletions

View File

@@ -772,7 +772,8 @@ CREATE TABLE `order_product`
`was_new` TINYINT NOT NULL,
`was_in_promo` TINYINT NOT NULL,
`weight` VARCHAR(45),
`tax` FLOAT,
`tax_rule_title` VARCHAR(255),
`tax_rule_description` LONGTEXT,
`parent` INTEGER COMMENT 'not managed yet',
`created_at` DATETIME,
`updated_at` DATETIME,
@@ -802,12 +803,12 @@ CREATE TABLE `order_status`
) ENGINE=InnoDB;
-- ---------------------------------------------------------------------
-- order_attribute_combination
-- order_product_attribute_combination
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `order_attribute_combination`;
DROP TABLE IF EXISTS `order_product_attribute_combination`;
CREATE TABLE `order_attribute_combination`
CREATE TABLE `order_product_attribute_combination`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`order_product_id` INTEGER NOT NULL,
@@ -822,8 +823,8 @@ CREATE TABLE `order_attribute_combination`
`created_at` DATETIME,
`updated_at` DATETIME,
PRIMARY KEY (`id`),
INDEX `idx_order_feature_order_product_id` (`order_product_id`),
CONSTRAINT `fk_order_feature_order_product_id`
INDEX `idx_order_product_attribute_combination_order_product_id` (`order_product_id`),
CONSTRAINT `fk_order_product_attribute_combination_order_product_id`
FOREIGN KEY (`order_product_id`)
REFERENCES `order_product` (`id`)
ON UPDATE RESTRICT
@@ -1572,6 +1573,30 @@ CREATE TABLE `module_image`
ON DELETE CASCADE
) ENGINE=InnoDB;
-- ---------------------------------------------------------------------
-- order_product_tax
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `order_product_tax`;
CREATE TABLE `order_product_tax`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`order_product_id` INTEGER NOT NULL,
`title` VARCHAR(255) NOT NULL,
`description` LONGTEXT,
`amount` FLOAT NOT NULL,
`created_at` DATETIME,
`updated_at` DATETIME,
PRIMARY KEY (`id`),
INDEX `idx_ order_product_tax_order_product_id` (`order_product_id`),
CONSTRAINT `fk_ order_product_tax_order_product_id0`
FOREIGN KEY (`order_product_id`)
REFERENCES `order_product` (`id`)
ON UPDATE RESTRICT
ON DELETE CASCADE
) ENGINE=InnoDB;
-- ---------------------------------------------------------------------
-- category_i18n
-- ---------------------------------------------------------------------
@@ -1646,7 +1671,7 @@ CREATE TABLE `tax_i18n`
`id` INTEGER NOT NULL,
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
`title` VARCHAR(255),
`description` TEXT,
`description` LONGTEXT,
PRIMARY KEY (`id`,`locale`),
CONSTRAINT `tax_i18n_FK_1`
FOREIGN KEY (`id`)
@@ -1665,7 +1690,7 @@ CREATE TABLE `tax_rule_i18n`
`id` INTEGER NOT NULL,
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
`title` VARCHAR(255),
`description` TEXT,
`description` LONGTEXT,
PRIMARY KEY (`id`,`locale`),
CONSTRAINT `tax_rule_i18n_FK_1`
FOREIGN KEY (`id`)