-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/plugin/path/Installation/Migrations/pdo_mysql/Version20210903090000.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Innova\PathBundle\Installation\Migrations\pdo_mysql; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated migration based on mapping information: modify it with caution. | ||
* | ||
* Generation date: 2021/09/03 09:00:00 | ||
*/ | ||
class Version20210903090000 extends AbstractMigration | ||
{ | ||
public function up(Schema $schema): void | ||
{ | ||
$this->addSql(' | ||
UPDATE innova_step t1 | ||
INNER JOIN innova_step t2 | ||
SET t1.slug = CONCAT(t1.slug, "-", t1.id) | ||
WHERE t1.id < t2.id | ||
AND t1.slug = t2.slug | ||
AND t1.path_id = t2.path_id | ||
'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
} | ||
} |