MySQL

Sunday 9th July 2023

How to add an index in a Laravel migration

Adding an index in a Laravel migration is a one-liner. Choosing the right type of index is where it gets more interesting, and where MySQL can quietly ignore what you asked for.

Read

Saturday 22nd May 2021

Using MySQL error messages to ensure randomly generated strings are unique

For my home project GoStatic each deployment has a unique, randomly generated URL. Example: https://er34oltia2yqkyvl.gostatic.app The URL is generated using Laravel's Str::random()...

Read