Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite migrate [peewee.OperationalError: unable to open database file] #104

Open
zurek11 opened this issue Sep 21, 2018 · 1 comment
Open

Comments

@zurek11
Copy link

zurek11 commented Sep 21, 2018

I made init migration file and i tried to run migrate on it but there was error: peewee.OperationalError: unable to open database file.

I used this command: pw_migrate migrate --name=001_mymigration.py --database=sqlite:C:\Users\zurek\Documents\BackBone\Alto\afs\data\database.db --directory=C:\Users\zurek\Documents\BackBone\Alto\afs\data\migrations

where --name is name of migration file, database is directory to database.db sqlite file and directory where migrations are. I use windows 10. Do you know where the problem might be? Some proposals? Thank you very much.

@revolter
Copy link

revolter commented Nov 7, 2018

As seen on this page, you're supposed to pass the URL like sqlite:///path/to/database.sqlite, so I guess it's something like sqlite:\\\C:\Users\zurek\Documents\BackBone\Alto\afs\data\database.db in your case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants