Open daily from 9:00 to 20:00Get in touch
NewWe collected answers to the questions people ask most oftenOpen the section →
🍪 Cookies and personal data

We use cookies to keep the site working and make it more convenient, and we process anonymised data about your visit. The details are in our privacy policy.

Migrations: why they all live in one folder and use no raw SQL

31.08.2026 ~1 min read
Migrations: why they all live in one folder and use no raw SQL

Migrations used to be scattered across fourteen folders inside the modules. Half of them never ran at all: only an active module picked them up, and an inactive one left its tables unreliable.

Schema::table("orders", function (Blueprint $table) {
    $table->timestamp("stock_returned_at")->nullable();
});

They are written with the schema builder rather than a raw query: production runs on PostgreSQL, while the tests run on SQLite for speed. A query written for one database will fall over on the other — and it will be noticed at the worst possible moment.

More lessons in this course

Discussion

0

Only signed-in visitors can comment. Sign in to write.

Nobody has spoken up yet. Be the first.

Still have questions?We reply within one business day — write to us whichever way suits you.
Contact us