|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Auto-generated Migration: Please modify to your needs! |
|
|
* Auto-generated Migration: Please modify to your needs! |
|
|
*/ |
|
|
*/ |
|
|
final class Version20210616135128 extends AbstractMigration |
|
|
|
|
|
|
|
|
final class Version20210616151017 extends AbstractMigration |
|
|
{ |
|
|
{ |
|
|
public function getDescription(): string |
|
|
public function getDescription(): string |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
public function up(Schema $schema): void |
|
|
public function up(Schema $schema): void |
|
|
{ |
|
|
{ |
|
|
// this up() migration is auto-generated, please modify it to your needs |
|
|
// this up() migration is auto-generated, please modify it to your needs |
|
|
|
|
|
$this->addSql('ALTER TABLE ticket ADD merchant_id INT NOT NULL, ADD order_shop_id INT DEFAULT NULL'); |
|
|
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA36796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)'); |
|
|
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA36796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)'); |
|
|
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3BB6C6D96 FOREIGN KEY (order_shop_id) REFERENCES order_shop (id)'); |
|
|
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3BB6C6D96 FOREIGN KEY (order_shop_id) REFERENCES order_shop (id)'); |
|
|
$this->addSql('CREATE INDEX IDX_97A0ADA36796D554 ON ticket (merchant_id)'); |
|
|
$this->addSql('CREATE INDEX IDX_97A0ADA36796D554 ON ticket (merchant_id)'); |
|
|
|
|
|
|
|
|
$this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA3BB6C6D96'); |
|
|
$this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA3BB6C6D96'); |
|
|
$this->addSql('DROP INDEX IDX_97A0ADA36796D554 ON ticket'); |
|
|
$this->addSql('DROP INDEX IDX_97A0ADA36796D554 ON ticket'); |
|
|
$this->addSql('DROP INDEX IDX_97A0ADA3BB6C6D96 ON ticket'); |
|
|
$this->addSql('DROP INDEX IDX_97A0ADA3BB6C6D96 ON ticket'); |
|
|
|
|
|
$this->addSql('ALTER TABLE ticket DROP merchant_id, DROP order_shop_id'); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |