<?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 Version20220706092146 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 user_permissions CHANGE user_id userId INT NOT NULL');
$this->addSql('ALTER TABLE user_permissions ADD CONSTRAINT FK_84F605FA64B64DCC FOREIGN KEY (userId) REFERENCES `user` (id)');
$this->addSql('CREATE INDEX IDX_84F605FA64B64DCC ON user_permissions (userId)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE user_permissions DROP FOREIGN KEY FK_84F605FA64B64DCC');
$this->addSql('DROP INDEX IDX_84F605FA64B64DCC ON user_permissions');
$this->addSql('ALTER TABLE user_permissions CHANGE userid user_id INT NOT NULL');
}
}