Files
e-ticket/migrations/Version20260321250000.php

31 lines
1.0 KiB
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260321250000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add payment details to billet_buyer';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE billet_buyer ADD COLUMN IF NOT EXISTS payment_method VARCHAR(50) DEFAULT NULL');
$this->addSql('ALTER TABLE billet_buyer ADD COLUMN IF NOT EXISTS card_brand VARCHAR(50) DEFAULT NULL');
$this->addSql('ALTER TABLE billet_buyer ADD COLUMN IF NOT EXISTS card_last4 VARCHAR(4) DEFAULT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE billet_buyer DROP COLUMN IF EXISTS payment_method');
$this->addSql('ALTER TABLE billet_buyer DROP COLUMN IF EXISTS card_brand');
$this->addSql('ALTER TABLE billet_buyer DROP COLUMN IF EXISTS card_last4');
}
}