-
Notifications
You must be signed in to change notification settings - Fork 349
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 'remotes/dev/1.10' into 1.10
- Loading branch information
Showing
36 changed files
with
1,647 additions
and
1,117 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
19 changes: 19 additions & 0 deletions
19
...Oro/Bundle/CalendarBundle/Migrations/Schema/v1_14_1/RemoveInvitationStatusFieldConfig.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,19 @@ | ||
<?php | ||
|
||
namespace Oro\Bundle\CalendarBundle\Migrations\Schema\v1_14_1; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
use Oro\Bundle\MigrationBundle\Migration\Migration; | ||
use Oro\Bundle\MigrationBundle\Migration\QueryBag; | ||
|
||
class RemoveInvitationStatusFieldConfig implements Migration | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function up(Schema $schema, QueryBag $queries) | ||
{ | ||
$queries->addPostQuery(new RemoveInvitationStatusFieldConfigQuery()); | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
...undle/CalendarBundle/Migrations/Schema/v1_14_1/RemoveInvitationStatusFieldConfigQuery.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,65 @@ | ||
<?php | ||
|
||
namespace Oro\Bundle\CalendarBundle\Migrations\Schema\v1_14_1; | ||
|
||
use Psr\Log\LoggerInterface; | ||
|
||
use Doctrine\DBAL\Connection; | ||
|
||
use Oro\Bundle\MigrationBundle\Migration\ArrayLogger; | ||
use Oro\Bundle\MigrationBundle\Migration\ParametrizedMigrationQuery; | ||
|
||
class RemoveInvitationStatusFieldConfigQuery extends ParametrizedMigrationQuery | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getDescription() | ||
{ | ||
$logger = new ArrayLogger(); | ||
$logger->info( | ||
sprintf( | ||
'Remove outdated field from entity configuration: %s::$%s.', | ||
'Oro\Bundle\CalendarBundle\Entity\CalendarEvent', | ||
'invitationStatus' | ||
) | ||
); | ||
$this->doExecute($logger, true); | ||
|
||
return $logger->getMessages(); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function execute(LoggerInterface $logger) | ||
{ | ||
$this->doExecute($logger); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function doExecute(LoggerInterface $logger, $dryRun = false) | ||
{ | ||
$sql = 'DELETE FROM oro_entity_config_field WHERE field_name = ? '. | ||
'AND entity_id = (SELECT id FROM oro_entity_config WHERE class_name = ? LIMIT 1)'; | ||
|
||
$parameters = ['invitationStatus', 'Oro\Bundle\CalendarBundle\Entity\CalendarEvent']; | ||
$this->connection->executeUpdate($sql, $parameters); | ||
|
||
$this->logQuery($logger, $sql, $parameters); | ||
|
||
if (!$dryRun) { | ||
$this->connection->executeUpdate($sql, $parameters); | ||
} | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function setConnection(Connection $connection) | ||
{ | ||
$this->connection = $connection; | ||
} | ||
} |
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
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.