Add foreign key constraints for order_address

modifié:         core/lib/Thelia/Model/Base/Country.php
	modifié:         core/lib/Thelia/Model/Base/CountryQuery.php
	modifié:         core/lib/Thelia/Model/Base/CustomerTitle.php
	modifié:         core/lib/Thelia/Model/Base/CustomerTitleQuery.php
	modifié:         core/lib/Thelia/Model/Base/OrderAddress.php
	modifié:         core/lib/Thelia/Model/Base/OrderAddressQuery.php
	modifié:         core/lib/Thelia/Model/Map/CountryTableMap.php
	modifié:         core/lib/Thelia/Model/Map/CustomerTitleTableMap.php
	modifié:         core/lib/Thelia/Model/Map/OrderAddressTableMap.php
	modifié:         local/config/schema.xml
	modifié:         setup/thelia.sql
	modifié:         setup/update/2.0.3.sql
This commit is contained in:
Benjamin Perche
2014-07-29 14:14:46 +02:00
parent 6963754d62
commit c39e6bcf85
12 changed files with 1104 additions and 3 deletions

View File

@@ -15,6 +15,21 @@ ALTER TABLE `order` ADD `version` INT DEFAULT 0 AFTER `updated_at`;
ALTER TABLE `order` ADD `version_created_at` DATE AFTER `version`;
ALTER TABLE `order` ADD `version_created_by` VARCHAR(100) AFTER `version_created_at`;
ALTER TABLE `order_address`
ADD CONSTRAINT `fk_order_address_customer_title_id`
FOREIGN KEY (`customer_title_id`)
REFERENCES `customer_title` (`id`)
ON UPDATE RESTRICT
ON DELETE RESTRICT
;
ALTER TABLE `order_address`
ADD CONSTRAINT `fk_order_address_country_id`
FOREIGN KEY (`country_id`)
REFERENCES `country` (`id`)
ON UPDATE RESTRICT
ON DELETE RESTRICT
;
DROP TABLE IF EXISTS `order_version`;
CREATE TABLE `order_version`