forked from thelia/thelia
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Update sql constraint for table product_sale_elements_product_image a…
…nd product_sale_elements_product_document (related to thelia#1732)
- Loading branch information
Julien Chanseaume
committed
Oct 19, 2015
1 parent
cf4c491
commit 4cc2403
Showing
8 changed files
with
75 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
SET FOREIGN_KEY_CHECKS = 0; | ||
|
||
UPDATE `config` SET `value`='2.1.7' WHERE `name`='thelia_version'; | ||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version'; | ||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version'; | ||
UPDATE `config` SET `value`='7' WHERE `name`='thelia_release_version'; | ||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version'; | ||
|
||
ALTER TABLE `product_sale_elements_product_image` DROP FOREIGN KEY `fk_pse_product_image_product_sale_elements_id`; | ||
|
||
ALTER TABLE product_sale_elements_product_image | ||
ADD CONSTRAINT `fk_pse_product_image_product_sale_elements_id` | ||
FOREIGN KEY (`product_sale_elements_id`) | ||
REFERENCES `product_sale_elements` (`id`) | ||
ON UPDATE RESTRICT | ||
ON DELETE CASCADE; | ||
|
||
ALTER TABLE `product_sale_elements_product_image` DROP FOREIGN KEY `fk_pse_product_image_product_image_id`; | ||
|
||
ALTER TABLE product_sale_elements_product_image | ||
ADD CONSTRAINT `fk_pse_product_image_product_image_id` | ||
FOREIGN KEY (`product_image_id`) | ||
REFERENCES `product_image` (`id`) | ||
ON UPDATE RESTRICT | ||
ON DELETE CASCADE; | ||
|
||
ALTER TABLE `product_sale_elements_product_document` DROP FOREIGN KEY `fk_pse_product_document_product_sale_elements_id`; | ||
|
||
ALTER TABLE product_sale_elements_product_document | ||
ADD CONSTRAINT `fk_pse_product_document_product_sale_elements_id` | ||
FOREIGN KEY (`product_sale_elements_id`) | ||
REFERENCES `product_sale_elements` (`id`) | ||
ON UPDATE RESTRICT | ||
ON DELETE CASCADE; | ||
|
||
ALTER TABLE `product_sale_elements_product_document` DROP FOREIGN KEY `fk_pse_product_document_product_document_id`; | ||
|
||
ALTER TABLE product_sale_elements_product_document | ||
ADD CONSTRAINT `fk_pse_product_document_product_document_id` | ||
FOREIGN KEY (`product_document_id`) | ||
REFERENCES `product_document` (`id`) | ||
ON UPDATE RESTRICT | ||
ON DELETE CASCADE; | ||
|
||
SET FOREIGN_KEY_CHECKS = 1; |