| 
					
				 | 
			
			
				@@ -0,0 +1,34 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<?php declare(strict_types = 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+namespace DoctrineMigrations; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+use Doctrine\DBAL\Migrations\AbstractMigration; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+use Doctrine\DBAL\Schema\Schema; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * Auto-generated Migration: Please modify to your needs! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+class Version20180103085203 extends AbstractMigration 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public function up(Schema $schema) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // this up() 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('CREATE TABLE category (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $this->addSql('ALTER TABLE product ADD category_id INT DEFAULT NULL'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04AD12469DE2 FOREIGN KEY (category_id) REFERENCES category (id)'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $this->addSql('CREATE INDEX IDX_D34A04AD12469DE2 ON product (category_id)'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public function down(Schema $schema) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 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 product DROP FOREIGN KEY FK_D34A04AD12469DE2'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $this->addSql('DROP TABLE category'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $this->addSql('DROP INDEX IDX_D34A04AD12469DE2 ON product'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $this->addSql('ALTER TABLE product DROP category_id'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 |