migrations/Version20230706063124.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;/*** Auto-generated Migration: Please modify to your needs!*/final class Version20230706063124 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 attachment ADD user_id INT DEFAULT NULL, ADD entity_id INT DEFAULT NULL, ADD entity_name VARCHAR(255) DEFAULT NULL, ADD allow_for_roles LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', ADD allow_for_users LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\'');$this->addSql('ALTER TABLE attachment ADD CONSTRAINT FK_795FD9BBA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');$this->addSql('CREATE INDEX IDX_795FD9BBA76ED395 ON attachment (user_id)');$this->addSql('ALTER TABLE user ADD verification_status VARCHAR(255) DEFAULT NULL, CHANGE birthday birthday DATE DEFAULT NULL COMMENT \'(DC2Type:date_immutable)\'');}public function down(Schema $schema): void{// this down() migration is auto-generated, please modify it to your needs$this->addSql('ALTER TABLE attachment DROP FOREIGN KEY FK_795FD9BBA76ED395');$this->addSql('DROP INDEX IDX_795FD9BBA76ED395 ON attachment');$this->addSql('ALTER TABLE attachment DROP user_id, DROP entity_id, DROP entity_name, DROP allow_for_roles, DROP allow_for_users');$this->addSql('ALTER TABLE user DROP verification_status, CHANGE birthday birthday DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\'');}}