Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在laravel中运行迁移函数时出错_Laravel_Laravel 4_Laravel 5_Laravel 5.1 - Fatal编程技术网

在laravel中运行迁移函数时出错

在laravel中运行迁移函数时出错,laravel,laravel-4,laravel-5,laravel-5.1,Laravel,Laravel 4,Laravel 5,Laravel 5.1,到昨天为止,迁移还不错,但当我尝试为新表进行迁移时,它向我显示了此错误 我在使用:php artisan migrate时遇到了这个错误 及 不仅是在迁移时,而且它不允许我执行任何其他与数据库相关的功能,如php artisan migrate:rollback或php artisan migrate:refresh。 有什么想法吗 另外,我正在使用ubuntu。更正对包含SQLite文件的文件的权限。运行迁移的用户无法写入该文件 如果您具有命令行访问权限,本文将帮助您设置SQLite数据库的可

到昨天为止,迁移还不错,但当我尝试为新表进行迁移时,它向我显示了此错误

我在使用:php artisan migrate时遇到了这个错误

不仅是在迁移时,而且它不允许我执行任何其他与数据库相关的功能,如php artisan migrate:rollback或php artisan migrate:refresh。 有什么想法吗


另外,我正在使用ubuntu。

更正对包含SQLite文件的文件的权限。运行迁移的用户无法写入该文件

如果您具有命令行访问权限,本文将帮助您设置SQLite数据库的可读权限。

您使用的是什么DBMS?
验证数据库用户的权限

此表是否已存在于您的数据库中?如果是..手动删除数据库中的所有表,包括迁移表,然后再次运行该命令。。。
[Illuminate\Database\QueryException]
SQLSTATE[HY000]: General error: 8 attempt to write a readonly database
(SQL: create table "answer" ("id" integer not null primary key autoincrement, 
"answer" text not null, "questionId" integer not null, "answerBy" text not null,
"postedAt" datetime not null, "created_at" datetime not null,
"updated_at" datetime not null))
[PDOException]
SQLSTATE[HY000]: General error: 8 attempt to write a readonly database