Laravel PHPUnit failing on ALTER TABLE using SQLite Laravel PHPUnit failing on ALTER TABLE using SQLite laravel laravel

Laravel PHPUnit failing on ALTER TABLE using SQLite


SQLite only allows you to rename the table or add a column. The ALTER TABLE statement cannot change or remove columns.

In order to change or remove a column in SQLite, you need to create a new table with the desired schema, copy the data from the original table to the new table, delete the original table, and then rename the new table to the original name.

This is all abstracted out for you by Laravel and DBAL, so your best bet may be to get help with figuring out the issue with your enum column (though that would be a separate question).

You can read more about altering tables in the SQLite docs here.