eloquent-driver
eloquent-driver copied to clipboard
Uuid model database migration does not place unique constraint on id column
As the title says. Ironically enough, the migration does not make the first id column unique, which means multiple entries could exist with the same Uuid. In most cases, that wouldn't be an issue as the same Uuid wouldn't be generated twice, but I stumbled upon it while browsing the database in phpMyAdmin. The following warning is shown there:
I cannot edit any entries directly in the database browser, because there is no single column uniquely identifying the entry.
Simple fix would be to add ->primary(); at the end of the id column definition in the UuidEntryModel migration, although that will not fix existing installations.