-
Notifications
You must be signed in to change notification settings - Fork 18
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
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
...arello/Bundle/PurchaseOrderBundle/Migrations/Schema/v1_3_2/MarelloPurchaseOrderBundle.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,35 @@ | ||
<?php | ||
|
||
namespace Marello\Bundle\PurchaseOrderBundle\Migrations\Schema\v1_3_2; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
use Oro\Bundle\MigrationBundle\Migration\Migration; | ||
use Oro\Bundle\MigrationBundle\Migration\QueryBag; | ||
|
||
/** | ||
* @SuppressWarnings(PHPMD.TooManyMethods) | ||
* @SuppressWarnings(PHPMD.ExcessiveClassLength) | ||
*/ | ||
class MarelloPurchaseOrderBundle implements Migration | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function up(Schema $schema, QueryBag $queries) | ||
{ | ||
$this->updatePurchaseOrderTable($schema); | ||
} | ||
|
||
/** | ||
* @param Schema $schema | ||
* @throws \Doctrine\DBAL\Schema\SchemaException | ||
*/ | ||
protected function updatePurchaseOrderTable(Schema $schema) | ||
{ | ||
$table = $schema->getTable('marello_purchase_order'); | ||
if (!$table->hasColumn('data')) { | ||
$table->addColumn('data', 'json_array', ['notnull' => false, 'comment' => '(DC2Type:json_array)']); | ||
} | ||
} | ||
} |