peewee_migrate icon indicating copy to clipboard operation
peewee_migrate copied to clipboard

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

Open zurek11 opened this issue 7 years ago • 1 comments

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.

zurek11 avatar Sep 21 '18 14:09 zurek11

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.

revolter avatar Nov 07 '18 20:11 revolter