Cannot add a NOT NULL column with default value NULL during Laravel Testing and Using In Memory SQLite

During in memory testing and using SQLite and Laravel you might encounter the following issue:

Cannot add a NOT NULL column with default value NULL

This is painful because it appears your migrations do not work properly and now your whole test suite is failing.

There are a few ways to fix this problem.

See this Stack article:

https://stackoverflow.com/questions/20822159/laravel-migration-with-sqlite-cannot-add-a-not-null-column-with-default-value-n

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top