<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220627050109 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE credit_card_details DROP FOREIGN KEY FK_3C99BB6491FE933');
$this->addSql('DROP INDEX UNIQ_3C99BB6491FE933 ON credit_card_details');
$this->addSql('ALTER TABLE credit_card_details DROP cardholder_id, DROP th_login, DROP th_password');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE credit_card_details ADD cardholder_id INT NOT NULL, ADD th_login VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, ADD th_password VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE credit_card_details ADD CONSTRAINT FK_3C99BB6491FE933 FOREIGN KEY (cardholder_id) REFERENCES user (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_3C99BB6491FE933 ON credit_card_details (cardholder_id)');
}
}