Black Friday: the Laravel testing course is $149 instead of $249, through Dec 7. See the course →
logo

Something to know before reordering columns in a migration

Especially if not on MySQL 8

Joel Clermont
Joel Clermont
2025-04-17

From our daily Laravel tips email. Get the next one in your inbox.

I love keeping my tables nice and tidy over the life of a project. It might not make the code run any differently, but it makes me feel better working in it each day.

While MySQL allows us to create new columns in a specific position in an existing table, there is a performance issue to be aware of when deploying it on certain versions of MySQL, especially for larger tables.

In today's video, I'll show you what to watch out for and how it works under the hood. Plus, how do you add a column as the first column in a table?

Watch Now (4 min)

And after watching, don't forget to subscribe to our YouTube channel, so you don't miss future videos.

Here to help,

Joel

P.S. Imagine how many tiny, but impactful, insights you could pick up from the Mastering Laravel community!

Want a tip like this in your inbox every weekday?

Each one takes less than 2 minutes to read. Join 4,000+ Laravel developers who already get them.

email
No spam. Only real-world advice.
Toss a coin in the jar if you found this helpful.