<?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 Version20210713102153 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 user_password_link (id INT AUTO_INCREMENT NOT NULL, app_user_id INT DEFAULT NULL, end_at DATETIME NOT NULL, token VARCHAR(255) NOT NULL, INDEX IDX_4A7733EA4A3353D8 (app_user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE user_password_link ADD CONSTRAINT FK_4A7733EA4A3353D8 FOREIGN KEY (app_user_id) REFERENCES mc_admin (id)');
$this->addSql('ALTER TABLE password_link DROP created_at');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE user_password_link');
$this->addSql('ALTER TABLE password_link ADD created_at DATETIME DEFAULT NULL');
}
}