-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/8.3' into 8.4
- Loading branch information
Showing
12 changed files
with
307 additions
and
11 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
48 changes: 48 additions & 0 deletions
48
Neos.ContentRepository/Migrations/Mysql/Version20230430183156.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,48 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Neos\Flow\Persistence\Doctrine\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Make index on movedto unique | ||
*/ | ||
final class Version20230430183156 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Make index on movedto unique'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->abortIf( | ||
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MysqlPlatform, | ||
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MysqlPlatform'." | ||
); | ||
|
||
$this->skipIf(!$schema->getTable('neos_contentrepository_domain_model_nodedata')->hasIndex('IDX_CE6515692D45FE4D') | ||
&& $schema->getTable('neos_contentrepository_domain_model_nodedata')->hasIndex('UNIQ_CE6515692D45FE4D'), | ||
"Skipped index renaming because they are already named properly" | ||
); | ||
|
||
$this->addSql('ALTER TABLE neos_contentrepository_domain_model_nodedata DROP INDEX IDX_CE6515692D45FE4D, ADD UNIQUE INDEX UNIQ_CE6515692D45FE4D (movedto)'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->abortIf( | ||
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MysqlPlatform, | ||
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MysqlPlatform'." | ||
); | ||
|
||
$this->skipIf($schema->getTable('neos_contentrepository_domain_model_nodedata')->hasIndex('IDX_CE6515692D45FE4D') | ||
&& !$schema->getTable('neos_contentrepository_domain_model_nodedata')->hasIndex('UNIQ_CE6515692D45FE4D'), | ||
"Skipped index renaming because they are already named properly" | ||
); | ||
|
||
$this->addSql('ALTER TABLE neos_contentrepository_domain_model_nodedata DROP INDEX UNIQ_CE6515692D45FE4D, ADD INDEX IDX_CE6515692D45FE4D (movedto)'); | ||
} | ||
} |
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,40 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Neos\Flow\Persistence\Doctrine\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Adjust key on Tag domain model to ON DELETE SET NULL | ||
*/ | ||
final class Version20230430183157 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Adjust key on Tag domain model to ON DELETE SET NULL'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->abortIf( | ||
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MysqlPlatform, | ||
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MysqlPlatform'." | ||
); | ||
|
||
$this->addSql('ALTER TABLE neos_media_domain_model_tag DROP FOREIGN KEY FK_CA4889693D8E604F'); | ||
$this->addSql('ALTER TABLE neos_media_domain_model_tag ADD CONSTRAINT FK_CA4889693D8E604F FOREIGN KEY (parent) REFERENCES neos_media_domain_model_tag (persistence_object_identifier) ON DELETE SET NULL'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->abortIf( | ||
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MysqlPlatform, | ||
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MysqlPlatform'." | ||
); | ||
|
||
$this->addSql('ALTER TABLE neos_media_domain_model_tag DROP FOREIGN KEY FK_CA4889693D8E604F'); | ||
$this->addSql('ALTER TABLE neos_media_domain_model_tag ADD CONSTRAINT FK_CA4889693D8E604F FOREIGN KEY (parent) REFERENCES neos_media_domain_model_tag (persistence_object_identifier)'); | ||
} | ||
} |
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
Oops, something went wrong.