Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
11 | public function up(Schema $schema): void |
||
12 | { |
||
13 | $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
||
14 | |||
15 | $this->addSql('ALTER TABLE bookable ADD credit_account_id INT DEFAULT NULL'); |
||
16 | $this->addSql('ALTER TABLE bookable ADD CONSTRAINT FK_A10B81246813E404 FOREIGN KEY (credit_account_id) REFERENCES account (id) ON DELETE CASCADE'); |
||
17 | $this->addSql('CREATE INDEX IDX_A10B81246813E404 ON bookable (credit_account_id)'); |
||
18 | } |
||
20 |