| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| 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 transaction ADD bookable_id INT DEFAULT NULL'); |
||
| 16 | $this->addSql('ALTER TABLE transaction ADD CONSTRAINT FK_723705D1EC4F5B2F FOREIGN KEY (bookable_id) REFERENCES bookable (id) ON DELETE SET NULL'); |
||
| 17 | $this->addSql('CREATE INDEX IDX_723705D1EC4F5B2F ON transaction (bookable_id)'); |
||
| 18 | $this->addSql('ALTER TABLE user CHANGE name first_name VARCHAR(191) NOT NULL, ADD last_name VARCHAR(191) NOT NULL AFTER first_name'); |
||
| 19 | } |
||
| 21 |