You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Version20210616135128.php 1.3KB

3 years ago
12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7. * Auto-generated Migration: Please modify to your needs!
  8. */
  9. final class Version20210616135128 extends AbstractMigration
  10. {
  11. public function getDescription(): string
  12. {
  13. return '';
  14. }
  15. public function up(Schema $schema): void
  16. {
  17. // this up() migration is auto-generated, please modify it to your needs
  18. $this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA36796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  19. $this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3BB6C6D96 FOREIGN KEY (order_shop_id) REFERENCES order_shop (id)');
  20. $this->addSql('CREATE INDEX IDX_97A0ADA36796D554 ON ticket (merchant_id)');
  21. $this->addSql('CREATE INDEX IDX_97A0ADA3BB6C6D96 ON ticket (order_shop_id)');
  22. }
  23. public function down(Schema $schema): void
  24. {
  25. // this down() migration is auto-generated, please modify it to your needs
  26. $this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA36796D554');
  27. $this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA3BB6C6D96');
  28. $this->addSql('DROP INDEX IDX_97A0ADA36796D554 ON ticket');
  29. $this->addSql('DROP INDEX IDX_97A0ADA3BB6C6D96 ON ticket');
  30. }
  31. }