skipAssertion(function (Schema $schema) { return $schema->getTable("{$this->prefix}roles")->hasColumn('uuid'); }, sprintf('Column %s already exists', 'uuid')); } public function up(Schema $schema): void { $statements = []; $statements[] = "ALTER TABLE `{$this->prefix}roles` ADD COLUMN `uuid` char(36) default NULL;"; $statements[] = "UPDATE `{$this->prefix}roles` SET `uuid` = UUID() WHERE `uuid` IS NULL;"; $batchSql = implode(' ', $statements); $this->addSql($batchSql); } }