-
-
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.
bug #170 Various fixes including doctrine mapping exception (loevgaard)
This PR was merged into the 1.0-dev branch. Discussion ---------- Fixes #169 Commits ------- 6219b1e Be explicit about column names de7f8da Be consistent about column names in credit memo c23b38e Be consistent about column names in refund f62c4e2 Fixed error: Root image path not resolvable "/path/to/project/public/media/image" 258be3c Added migration
- Loading branch information
Showing
4 changed files
with
36 additions
and
5 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,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20191217075815 extends AbstractMigration | ||
{ | ||
public function up(Schema $schema) : void | ||
{ | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('DROP INDEX IDX_5C4F3331989A8203 ON sylius_refund_credit_memo'); | ||
$this->addSql('ALTER TABLE sylius_refund_credit_memo CHANGE orderNumber order_number VARCHAR(255) NOT NULL, CHANGE currencyCode currency_code VARCHAR(255) NOT NULL, CHANGE localeCode locale_code VARCHAR(255) NOT NULL'); | ||
$this->addSql('CREATE INDEX IDX_5C4F3331551F0F81 ON sylius_refund_credit_memo (order_number)'); | ||
$this->addSql('ALTER TABLE sylius_refund_refund CHANGE ordernumber order_number VARCHAR(255) NOT NULL'); | ||
} | ||
|
||
public function down(Schema $schema) : void | ||
{ | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('DROP INDEX IDX_5C4F3331551F0F81 ON sylius_refund_credit_memo'); | ||
$this->addSql('ALTER TABLE sylius_refund_credit_memo CHANGE order_number orderNumber VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, CHANGE currency_code currencyCode VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, CHANGE locale_code localeCode VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`'); | ||
$this->addSql('CREATE INDEX IDX_5C4F3331989A8203 ON sylius_refund_credit_memo (orderNumber)'); | ||
$this->addSql('ALTER TABLE sylius_refund_refund CHANGE order_number orderNumber VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`'); | ||
} | ||
} |
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
Empty file.