Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 authored and github-actions[bot] committed Feb 23, 2023
1 parent aad0f58 commit 2e28515
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bundles/CoreBundle/Migrations/Version20210531125102.php
Expand Up @@ -32,7 +32,7 @@ public function getDescription(): string

public function up(Schema $schema): void
{
if(!$schema->getTable('sites')->hasColumn('localizedErrorDocuments')) {
if (!$schema->getTable('sites')->hasColumn('localizedErrorDocuments')) {
$this->addSql('ALTER TABLE `sites` ADD COLUMN `localizedErrorDocuments` text;');
}
}
Expand Down
3 changes: 1 addition & 2 deletions bundles/CoreBundle/Migrations/Version20210624085031.php
Expand Up @@ -32,10 +32,9 @@ public function getDescription(): string

public function up(Schema $schema): void
{
if(!$schema->getTable('email_log')->hasColumn('error')) {
if (!$schema->getTable('email_log')->hasColumn('error')) {
$this->addSql('ALTER TABLE email_log ADD error TEXT NULL');
}

}

public function down(Schema $schema): void
Expand Down
2 changes: 1 addition & 1 deletion bundles/CoreBundle/Migrations/Version20211221152344.php
Expand Up @@ -34,7 +34,7 @@ public function up(Schema $schema): void

$this->addSql('ALTER TABLE `assets_metadata` CHANGE `cid` `cid` int(11) unsigned NOT NULL;');

if(!$schema->getTable('assets_metadata')->hasForeignKey('fk_assets_metadata_assets')) {
if (!$schema->getTable('assets_metadata')->hasForeignKey('fk_assets_metadata_assets')) {
$this->addSql(
'ALTER TABLE `assets_metadata`
ADD CONSTRAINT `fk_assets_metadata_assets`
Expand Down
2 changes: 1 addition & 1 deletion bundles/CoreBundle/Migrations/Version20220119082511.php
Expand Up @@ -34,7 +34,7 @@ public function up(Schema $schema): void

$this->addSql('ALTER TABLE `gridconfig_favourites` CHANGE `gridConfigId` `gridConfigId` int(11) NOT NULL;');

if(!$schema->getTable('gridconfig_favourites')->hasIndex('grid_config_id')) {
if (!$schema->getTable('gridconfig_favourites')->hasIndex('grid_config_id')) {
$this->addSql('ALTER TABLE `gridconfig_favourites` ADD INDEX `grid_config_id` (`gridConfigId`);');
}

Expand Down
2 changes: 1 addition & 1 deletion bundles/CoreBundle/Migrations/Version20220120121803.php
Expand Up @@ -32,7 +32,7 @@ public function up(Schema $schema): void
//disable foreign key checks
$this->addSql('SET foreign_key_checks = 0');

foreach(['documents_hardlink', 'documents_link', 'documents_page', 'documents_snippet', 'documents_printpage', 'documents_email', 'documents_newsletter', 'documents_translations'] as $table) {
foreach (['documents_hardlink', 'documents_link', 'documents_page', 'documents_snippet', 'documents_printpage', 'documents_email', 'documents_newsletter', 'documents_translations'] as $table) {
if (!$schema->getTable($table)->hasForeignKey('fk_'.$table.'_documents')) {
$this->addSql(
'ALTER TABLE `'.$table.'`
Expand Down
4 changes: 1 addition & 3 deletions bundles/CoreBundle/Migrations/Version20220120162621.php
Expand Up @@ -61,7 +61,6 @@ public function up(Schema $schema): void
);
}


if (!$schema->getTable('users_workspaces_document')->hasForeignKey('fk_users_workspaces_document_documents')) {
$this->addSql(
'ALTER TABLE `users_workspaces_document`
Expand All @@ -88,7 +87,6 @@ public function up(Schema $schema): void
);
}


if (!$schema->getTable('users_workspaces_object')->hasForeignKey('fk_users_workspaces_object_objects')) {
$this->addSql(
'ALTER TABLE `users_workspaces_object`
Expand Down Expand Up @@ -121,7 +119,7 @@ public function up(Schema $schema): void

public function down(Schema $schema): void
{
foreach(['asset', 'document', 'object'] as $elementType) {
foreach (['asset', 'document', 'object'] as $elementType) {
if ($schema->getTable('users_workspaces_'.$elementType)->hasForeignKey('fk_users_workspaces_'.$elementType.'_'.$elementType.'s')) {
$this->addSql('ALTER TABLE `users_workspaces_'.$elementType.'` DROP FOREIGN KEY IF EXISTS `fk_users_workspaces_'.$elementType.'_'.$elementType.'s`');
}
Expand Down
2 changes: 1 addition & 1 deletion bundles/CoreBundle/Migrations/Version20220425082914.php
Expand Up @@ -29,7 +29,7 @@ public function getDescription(): string

public function up(Schema $schema): void
{
if($schema->getTable('objects')->hasIndex('type')) {
if ($schema->getTable('objects')->hasIndex('type')) {
$this->addSql('ALTER TABLE `objects` DROP INDEX `type`');
}

Expand Down
2 changes: 1 addition & 1 deletion bundles/CoreBundle/Migrations/Version20220718162200.php
Expand Up @@ -29,7 +29,7 @@ public function getDescription(): string

public function up(Schema $schema): void
{
if(!$schema->getTable('object_url_slugs')->hasIndex('fieldname_ownertype_position_objectId')) {
if (!$schema->getTable('object_url_slugs')->hasIndex('fieldname_ownertype_position_objectId')) {
$this->addSql('ALTER TABLE `object_url_slugs` ADD INDEX `fieldname_ownertype_position_objectId` (`fieldname`,`ownertype`,`position`,`objectId`)');
}
}
Expand Down

0 comments on commit 2e28515

Please sign in to comment.