Total Complexity | 4 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
10 | final class Version20210318175742 extends AbstractMigration |
||
11 | { |
||
12 | public function getDescription(): string |
||
15 | } |
||
16 | |||
17 | public function up(Schema $schema): void |
||
18 | { |
||
19 | $this->addSql('ALTER TABLE comments ADD CONSTRAINT FK_5F9E962AA76ED395 FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE'); |
||
20 | $this->addSql('ALTER TABLE comments ADD CONSTRAINT FK_5F9E962A4B89032C FOREIGN KEY (post_id) REFERENCES posts (id) ON DELETE CASCADE'); |
||
21 | $this->addSql('ALTER TABLE posts ADD CONSTRAINT FK_885DBAFA12469DE2 FOREIGN KEY (category_id) REFERENCES categories (id)'); |
||
22 | $this->addSql('ALTER TABLE post_tag ADD CONSTRAINT FK_5ACE3AF04B89032C FOREIGN KEY (post_id) REFERENCES posts (id) ON DELETE CASCADE'); |
||
23 | $this->addSql('ALTER TABLE post_tag ADD CONSTRAINT FK_5ACE3AF0BAD26311 FOREIGN KEY (tag_id) REFERENCES tags (id) ON DELETE CASCADE'); |
||
24 | } |
||
25 | |||
26 | public function down(Schema $schema): void |
||
28 | } |
||
29 | |||
30 | public function isTransactional(): bool |
||
35 |