migrations/Version20211116083857.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. final class Version20211116083857 extends AbstractMigration
  7. {
  8.     public function getDescription(): string
  9.     {
  10.         return 'Payment';
  11.     }
  12.     public function up(Schema $schema): void
  13.     {
  14.         $this->addSql('CREATE TABLE payment (id INT AUTO_INCREMENT NOT NULL, search_match_id INT DEFAULT NULL, external_id VARCHAR(255) DEFAULT NULL, refunded TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_6D28840D3AE90763 (search_match_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  15.         $this->addSql('ALTER TABLE payment ADD CONSTRAINT FK_6D28840D3AE90763 FOREIGN KEY (search_match_id) REFERENCES search_match (id)');
  16.     }
  17.     public function down(Schema $schema): void
  18.     {
  19.         $this->addSql('DROP TABLE payment');
  20.     }
  21.     public function isTransactional(): bool
  22.     {
  23.         return false;
  24.     }
  25. }