Laravel php artisan not working

When I try to use "php artisan migrate" in Laravel, I get 2 errors:

[Illuminate \ Database \ QueryException] SQLSTATE [HY000]: general error: 26 files are encrypted or not a database (SQL: select * from sqlite_master, where type = 'table' and name = migrations)

[PDOException] SQLSTATE [HY000]: general error: 26 files are encrypted or not a database

I created the storage / database.sqlite file before trying to migrate. I also edited config / database.php by creating default=sqlite. I use windows and installed sqlite3.

Has anyone come across this / knew how to get past it?

+4
source share
1 answer

I had the same results, in my case the file was /database/database.sqlitenot empty.

I deleted the reran content php artisan migrateand the migration table was successfully created.

+6
source

Source: https://habr.com/ru/post/1608307/


All Articles