addSql('ALTER TABLE user ADD COLUMN access_token VARCHAR(255) DEFAULT NULL'); $this->addSql('ALTER TABLE user ADD COLUMN refresh_token VARCHAR(255) DEFAULT NULL'); $this->addSql('ALTER TABLE user ADD COLUMN token_expires_at VARCHAR(255) DEFAULT NULL'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('CREATE TEMPORARY TABLE __temp__user AS SELECT id, discord_id, username, email FROM user'); $this->addSql('DROP TABLE user'); $this->addSql('CREATE TABLE user (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, discord_id VARCHAR(255) NOT NULL, username VARCHAR(255) NOT NULL, email VARCHAR(255) DEFAULT NULL)'); $this->addSql('INSERT INTO user (id, discord_id, username, email) SELECT id, discord_id, username, email FROM __temp__user'); $this->addSql('DROP TABLE __temp__user'); $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D64943349DE ON user (discord_id)'); } }