<?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 Version20261126140851 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 mobile_two_factor_challenge (id VARCHAR(36) NOT NULL, user_id INT NOT NULL, purpose VARCHAR(16) NOT NULL, code_hash VARCHAR(64) NOT NULL, attempts SMALLINT DEFAULT 0 NOT NULL, sends SMALLINT DEFAULT 1 NOT NULL, device_id VARCHAR(64) DEFAULT NULL, device_name VARCHAR(120) DEFAULT NULL, platform VARCHAR(16) DEFAULT NULL, app_version VARCHAR(32) DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', last_sent_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', expires_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', consumed_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX idx_mobile_2fa_challenge_user (user_id), INDEX idx_mobile_2fa_challenge_expires_at (expires_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE mobile_two_factor_challenge ADD CONSTRAINT FK_52D2E0CFA76ED395 FOREIGN KEY (user_id) REFERENCES User (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE OrderLine CHANGE error error LONGTEXT DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE mobile_two_factor_challenge DROP FOREIGN KEY FK_52D2E0CFA76ED395');
$this->addSql('DROP TABLE mobile_two_factor_challenge');
$this->addSql('ALTER TABLE OrderLine CHANGE error error VARCHAR(255) DEFAULT NULL');
}
}