Search code examples
laravellaravel-sanctum

Laravel 9 Sanctum: how to modify the built-in migration for table personal_access_tokens


I'd like to use UUID's for my user table and therefore have to modify the personal_access_tokens table to be able to handle it (uuidMorphs() insteand of morphs()).

Problem is, the migration for this table is delivered with Sanctum inside the vendor folder (2019_12_14_000001_create_personal_access_tokens_table.php). Is there a way to modify/overwrite it?


Solution

  • I found the solution in the Laravel Sanctum docs:

    https://laravel.com/docs/9.x/sanctum#migration-customization