Skip to content

Commit

Permalink
- fixed issue with Migration where it was trying to create the order …
Browse files Browse the repository at this point in the history
…table on updating the application while it already exists

- fixed issue with association name in the Enum field being inconsistent between the installer and the migration
- Added additional enum options such as Box and Pallet
  • Loading branch information
24198 committed Jun 17, 2020
1 parent 4a509e5 commit 3baf789
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ class OrderItemProductUnitListener
/**
* @param DoctrineHelper $doctrineHelper
*/
public function __construct(
DoctrineHelper $doctrineHelper
) {
public function __construct(DoctrineHelper $doctrineHelper)
{
$this->doctrineHelper = $doctrineHelper;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function up(Schema $schema, QueryBag $queries)

private function updateOrderTable(Schema $schema)
{
$table = $schema->createTable('marello_order_order');
$table = $schema->getTable('marello_order_order');
$table->addColumn('delivery_date', 'datetime', ['notnull' => false]);
$table->addColumn('order_note', 'text', ['notnull' => false]);
$table->addColumn('po_number', 'string', ['length' => 255, 'notnull' => false]);
Expand All @@ -45,7 +45,7 @@ private function updateOrderItemTable(Schema $schema)
$this->extendExtension->addEnumField(
$schema,
$table,
'status',
'productUnit',
'marello_product_unit',
false,
false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ class LoadProductUnitData extends AbstractFixture
{
const PRODUCT_UNIT_ENUM_CLASS = 'marello_product_unit';

const ITEM = 'item';
const SET = 'set';
const PU_ITEM = 'item';
const PU_BOX = 'box';
const PU_PALLET = 'pallet';

/** @var array */
protected $data = [
self::ITEM => true,
self::SET => false,
self::PU_ITEM => true,
self::PU_BOX => false,
self::PU_PALLET => false
];

/**
Expand Down

0 comments on commit 3baf789

Please sign in to comment.