Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 10 |
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 user CHANGE role role ENUM(\'booking_only\', \'individual\', \'member\', \'responsible\', \'administrator\') DEFAULT \'individual\' NOT NULL COMMENT \'(DC2Type:UserRole)\''); |
||
16 | |||
17 | $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649602AD315'); |
||
18 | $this->addSql('DROP INDEX IDX_8D93D649602AD315 ON user'); |
||
19 | $this->addSql('UPDATE user SET owner_id = responsible_id'); |
||
20 | $this->addSql('ALTER TABLE user DROP responsible_id'); |
||
21 | |||
22 | $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE602AD315'); |
||
23 | $this->addSql('DROP INDEX IDX_E00CEDDE602AD315 ON booking'); |
||
24 | $this->addSql('UPDATE booking SET owner_id = responsible_id'); |
||
25 | $this->addSql('ALTER TABLE booking DROP responsible_id'); |
||
26 | } |
||
28 |