abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE user CHANGE role role VARCHAR(255) DEFAULT \'user\' NOT NULL'); $this->addSql('ALTER TABLE endpoint ADD channelName VARCHAR(255) NOT NULL, CHANGE stream_id stream_id INT DEFAULT NULL'); } public function down(Schema $schema) : void { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE endpoint DROP channelName, CHANGE stream_id stream_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE user CHANGE role role VARCHAR(255) DEFAULT \'\'user\'\' NOT NULL COLLATE utf8mb4_unicode_ci'); } }