-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from softspring/BUNDLES-171-cms-route-groups-w…
…ith-parents BUNDLES-171 - add route groups
- Loading branch information
Showing
23 changed files
with
267 additions
and
20 deletions.
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
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
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
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
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Softspring\CmsBundle\Model\RoutePathInterface: | ||
constraints: | ||
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: | ||
fields: ['path', 'locale', 'site'] | ||
ignoreNull: false | ||
fields: ['compiledPath', 'locale', 'site'] | ||
ignoreNull: true |
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
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
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
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
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,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Softspring\CmsBundle\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20230328091638 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Support parent routes'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->addSql('ALTER TABLE cms_route ADD parent_id VARCHAR(255) DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE cms_route ADD CONSTRAINT FK_2CB7BB55727ACA70 FOREIGN KEY (parent_id) REFERENCES cms_route (id) ON DELETE RESTRICT'); | ||
$this->addSql('CREATE INDEX IDX_2CB7BB55727ACA70 ON cms_route (parent_id)'); | ||
$this->addSql('ALTER TABLE cms_route_path ADD compiled_path CHAR(255) DEFAULT NULL'); | ||
$this->addSql('UPDATE cms_route_path SET compiled_path = path'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->addSql('ALTER TABLE cms_route DROP FOREIGN KEY FK_2CB7BB55727ACA70'); | ||
$this->addSql('DROP INDEX IDX_2CB7BB55727ACA70 ON cms_route'); | ||
$this->addSql('ALTER TABLE cms_route DROP parent_id'); | ||
$this->addSql('ALTER TABLE cms_route_path DROP compiled_path'); | ||
} | ||
} |
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
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
Oops, something went wrong.