-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
083d83e
commit bff4b65
Showing
7 changed files
with
85 additions
and
14 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
2 changes: 1 addition & 1 deletion
2
Entity/CronJobRepository.php → Entity/Repository/CronJobRepository.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
2 changes: 1 addition & 1 deletion
2
Entity/CronReportRepository.php → Entity/Repository/CronReportRepository.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
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,71 @@ | ||
<?php | ||
/** | ||
* This file is part of the BrandOriented package. | ||
* | ||
* (c) Brand Oriented sp. z o.o. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @author Dominik Labudzinski <[email protected]> | ||
*/ | ||
|
||
namespace Effiana\CronBundle\Migrations\Schema\v2_0_4; | ||
|
||
use BrandOriented\DatabaseBundle\Migration\Column; | ||
use BrandOriented\DatabaseBundle\Migration\Migration; | ||
use BrandOriented\DatabaseBundle\Migration\QueryBag; | ||
use BrandOriented\DatabaseBundle\Migration\Extension\RenameExtension; | ||
use BrandOriented\DatabaseBundle\Migration\Extension\RenameExtensionAwareInterface; | ||
use BrandOriented\DatabaseBundle\Migration\OrderedMigrationInterface; | ||
use Doctrine\DBAL\Schema\ForeignKeyConstraint; | ||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
class EffianaCronBundle implements Migration, RenameExtensionAwareInterface, OrderedMigrationInterface | ||
{ | ||
/** | ||
* @var RenameExtension | ||
*/ | ||
protected $renameExtension; | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function getOrder() | ||
{ | ||
return 1; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function setRenameExtension(RenameExtension $renameExtension) | ||
{ | ||
$this->renameExtension = $renameExtension; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
* @throws \Doctrine\DBAL\Schema\SchemaException | ||
*/ | ||
public function up(Schema $schema, QueryBag $queries) | ||
{ | ||
if($schema->hasTable('cron_job')) { | ||
$this->renameExtension->renameTable( | ||
$schema, | ||
$queries, | ||
'cron_job', | ||
'effiana_cron_job' | ||
); | ||
} | ||
if($schema->hasTable('cron_report')) { | ||
$this->renameExtension->renameTable( | ||
$schema, | ||
$queries, | ||
'cron_report', | ||
'effiana_cron_report' | ||
); | ||
} | ||
} | ||
|
||
} |