<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20211116083857 extends AbstractMigration
{
public function getDescription(): string
{
return 'Payment';
}
public function up(Schema $schema): void
{
$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');
$this->addSql('ALTER TABLE payment ADD CONSTRAINT FK_6D28840D3AE90763 FOREIGN KEY (search_match_id) REFERENCES search_match (id)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE payment');
}
public function isTransactional(): bool
{
return false;
}
}