<?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 Version20250116232915 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('CREATE TABLE bank_identification (id INT AUTO_INCREMENT NOT NULL, organisation_id INT NOT NULL, detected_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', location LONGTEXT NOT NULL, fragment LONGTEXT NOT NULL, network VARCHAR(255) NOT NULL, bin VARCHAR(255) DEFAULT NULL, ccn VARCHAR(255) NOT NULL, cvv VARCHAR(255) NOT NULL, exp_date VARCHAR(255) DEFAULT NULL, hash VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_DEBF0ED49E6B1585 (organisation_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE bank_identification ADD CONSTRAINT FK_DEBF0ED49E6B1585 FOREIGN KEY (organisation_id) REFERENCES organisation (id)');
$this->addSql('DROP TABLE notifications_log');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE notifications_log (id INT AUTO_INCREMENT NOT NULL, type VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_general_ci`, record_id INT DEFAULT NULL, domain_id INT DEFAULT NULL, processed TINYINT(1) DEFAULT 0, created_at DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_general_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE bank_identification DROP FOREIGN KEY FK_DEBF0ED49E6B1585');
$this->addSql('DROP TABLE bank_identification');
}
}