execute('ALTER TABLE api_tokens ADD COLUMN role VARCHAR(32) NULL'); } public function down(): void { // SQLite cannot DROP COLUMN reliably across all supported versions, // so for rollback we recreate the table without the column. In // practice this migration won't be rolled back in production. if ($this->isMysql()) { $this->execute('ALTER TABLE api_tokens DROP COLUMN role'); return; } // SQLite >= 3.35 supports DROP COLUMN; the runtime in our images is // newer than that. Fall back to a hard error on older SQLite. $this->execute('ALTER TABLE api_tokens DROP COLUMN role'); } }