Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
removeColumn example
private
IdsCollection
$ids
;
protected
function
setUp
(
)
: void
{
parent::
setUp
(
)
;
$this
->connection =
$this
->
getContainer
(
)
->
get
(
Connection::
class
)
;
$this
->ids =
new
IdsCollection
(
)
;
}
public
function
testMigrationColumn
(
)
: void
{
$this
->
removeColumn
(
)
;
static
::
assertFalse
(
$this
->
hasColumn
(
'order_line_item', 'promotion_id'
)
)
;
$migration
=
new
Migration1648031611AddOrderLineItemPromotionId
(
)
;
$migration
->
update
(
$this
->connection
)
;
$migration
->
update
(
$this
->connection
)
;
static
::
assertTrue
(
$this
->
hasColumn
(
'order_line_item', 'promotion_id'
)
)
;
}
/** * @dataProvider dataProviderPromotion */