| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 8 | class Migration1536233520PromotionCartRule extends MigrationStep |
||
| 9 | { |
||
| 10 | public function getCreationTimestamp(): int |
||
| 11 | { |
||
| 12 | return 1536233520; |
||
| 13 | } |
||
| 14 | |||
| 15 | public function update(Connection $connection): void |
||
| 16 | { |
||
| 17 | $connection->executeQuery(' |
||
| 18 | CREATE TABLE `promotion_cart_rule` ( |
||
| 19 | promotion_id BINARY(16) NOT NULL, |
||
| 20 | rule_id BINARY(16) NOT NULL, |
||
| 21 | PRIMARY KEY (`promotion_id`, `rule_id`), |
||
| 22 | CONSTRAINT `fk.promotion_cart_rule.promotion_id` FOREIGN KEY (promotion_id) |
||
| 23 | REFERENCES promotion (id) ON DELETE CASCADE, |
||
| 24 | CONSTRAINT `fk.promotion_cart_rule.rule_id` FOREIGN KEY (rule_id) |
||
| 25 | REFERENCES rule (id) ON DELETE CASCADE |
||
| 26 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
||
| 27 | '); |
||
| 28 | } |
||
| 29 | |||
| 30 | public function updateDestructive(Connection $connection): void |
||
| 31 | { |
||
| 32 | // implement update destructive |
||
| 35 |