-
Notifications
You must be signed in to change notification settings - Fork 4
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
Christian Proske
committed
Dec 6, 2021
1 parent
73fc4af
commit 559bc29
Showing
4 changed files
with
40 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright 2021 WebStollen GmbH | ||
* @link https://www.webstollen.de | ||
*/ | ||
|
||
namespace Plugin\ws5_mollie\Migrations; | ||
|
||
use JTL\Plugin\Migration; | ||
use JTL\Update\IMigration; | ||
|
||
class Migration20211206112100 extends Migration implements IMigration | ||
{ | ||
public function up() | ||
{ | ||
|
||
$this->execute('ALTER TABLE `xplugin_ws5_mollie_orders` DROP INDEX `cOrderId`;'); | ||
$this->execute('ALTER TABLE `xplugin_ws5_mollie_orders` DROP INDEX `kBestellung`;'); | ||
$this->execute('ALTER TABLE `xplugin_ws5_mollie_orders` ADD UNIQUE( `kBestellung`, `cOrderId`);'); | ||
|
||
} | ||
|
||
public function down() | ||
{ | ||
$this->execute('ALTER TABLE `xplugin_ws5_mollie_orders` DROP INDEX `kBestellung`;'); | ||
$this->execute('ALTER TABLE `xplugin_ws5_mollie_orders` ADD UNIQUE(`kBestellung`);'); | ||
$this->execute('ALTER TABLE `xplugin_ws5_mollie_orders` ADD UNIQUE(`cOrderId`);'); | ||
|
||
} | ||
|
||
public function getDescription(): string | ||
{ | ||
return 'Fix UNIQUE Index on Orders-Table.'; | ||
} | ||
} |
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