-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename sylius_refund_payment to sylius_refund_refund_payment
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
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,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20200306153205 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Renames sylius_refund_payment table to sylius_refund_refund_payment'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('RENAME TABLE sylius_refund_payment TO sylius_refund_refund_payment'); | ||
$this->addSql('ALTER TABLE sylius_refund_refund_payment DROP INDEX IDX_EFA5A4B25AA1164F, ADD INDEX IDX_EC283EA55AA1164F (payment_method_id)'); | ||
$this->addSql('ALTER TABLE sylius_refund_refund_payment DROP FOREIGN KEY FK_EFA5A4B25AA1164F, ADD CONSTRAINT FK_EC283EA55AA1164F FOREIGN KEY (payment_method_id) REFERENCES sylius_payment_method (id)'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('RENAME TABLE sylius_refund_refund_payment TO sylius_refund_payment'); | ||
$this->addSql('ALTER TABLE sylius_refund_payment DROP INDEX IDX_EC283EA55AA1164F, ADD INDEX IDX_EFA5A4B25AA1164F (payment_method_id)'); | ||
$this->addSql('ALTER TABLE sylius_refund_payment DROP FOREIGN KEY FK_EC283EA55AA1164F, ADD CONSTRAINT FK_EFA5A4B25AA1164F FOREIGN KEY (payment_method_id) REFERENCES sylius_payment_method (id)'); | ||
} | ||
} |
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