Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function up(Schema $schema) |
||
17 | { |
||
18 | $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
||
19 | |||
20 | $this->addSql('ALTER TABLE sylius_product_option ADD position INT NOT NULL'); |
||
21 | $this->addSql('SET @row_number = -1'); |
||
22 | $this->addSql('UPDATE sylius_product_option SET position = @row_number := @row_number + 1'); |
||
23 | } |
||
24 | |||
35 |