0

Not sure what I'm doing wrong but in my app/config/database.php file I've changed the default driver to sqlite.

First off I got this error.

SQLSTATE[HY000]: General error: 8 attempt to write a readonly database (SQL: create table "migrations" ("migration" varchar null, "batch" integer null)) (Bindings: array ( ))

So I made app/database/production.sqlite writable.

Now I get this error.

SQLSTATE[HY000]: General error: 14 unable to open database file (SQL: create table "migrations" ("migration" varchar null, "batch" integer null)) (Bindings: array ( ))

Anyone know why this would be?

1
  • 1
    Wouldn't it make more sense to put the sqlite file in app/storage which is already writeable? Commented Apr 14, 2014 at 21:07

2 Answers 2

1

Did you check the folder that holds the db-file? Must be writeable.

Sign up to request clarification or add additional context in comments.

Comments

0

I just ran into this issue, and got around it by running the migrate command using the owner of the current file, like so:

sudo -u username php artisan migrate

So, as Rob Gordijn suggested, this is a permissions related issue.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.