From e48fceaa9e2c5a7be7e0b6663a49e44fce7b5fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Chru=C5=9Bciel?= Date: Thu, 29 Oct 2020 12:43:03 +0100 Subject: [PATCH] [Migration] Add nullable for product price --- src/Migrations/Version20200916093101.php | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/Migrations/Version20200916093101.php diff --git a/src/Migrations/Version20200916093101.php b/src/Migrations/Version20200916093101.php new file mode 100644 index 0000000000..eb7bb3b92a --- /dev/null +++ b/src/Migrations/Version20200916093101.php @@ -0,0 +1,32 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE sylius_channel_pricing CHANGE price price INT DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE sylius_channel_pricing CHANGE price price INT NOT NULL'); + } +}