<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20221013104710 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE news_article CHANGE id id INT AUTO_INCREMENT NOT NULL');
$this->addSql('ALTER TABLE user CHANGE id id INT AUTO_INCREMENT NOT NULL');
}
public function getDescription(): string
{
return 'Change the id fields to unsigned.';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE news_article CHANGE id id INT UNSIGNED AUTO_INCREMENT NOT NULL');
$this->addSql('ALTER TABLE user CHANGE id id INT UNSIGNED AUTO_INCREMENT NOT NULL');
}
}