Jesse Schutt 1 minute read
July 14, 2020

Renaming a Column with a Foreign Key in Laravel

This database originally used "customer_id" as the column name for the owner of each row, however the actual model being referenced was a "User". Here's how I changed the name of the column (which happened to have a foreign key on it) via Laravel migration: