SQLite and multiple renaming or dropColumn ‘s error in laravel 5.0 aritsan migrate

So #HTH

One of my migration scripts in Laravel 5 has 3 dropColumn requests in and 1 rename column. This all works fine with laravel migrations on MySQL and MariaDB, as you would expect.

However once you try to run those same migrations on a mysqlite / sqlite database you may start seeing errors like so

SQLSTATE[HY000]: General error: 1 no such column: XXX (SQL: CREATE TEMPORARY TABLE

Now following up the issue on Github it is related to this, https://github.com/laravel/framework/issues/2979 but Taylor doesn’t believe it’s a bug, saying,

I would do them in two separate operations.

 The work around unfortunately is to split EACH drop Column and rename into 1 separate migration file each…

Crazy, but tbh. if that’s the worst bug I come across with Laravel 5, I’ll take it.

By Dan Course

Senior Instructional Designer. Partnerships, people, products, delivery, agile tech and online edu. Naturally curious, innovative and willing to challenge the status quo.

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: