libsql / sqld

LibSQL with extended capabilities like HTTP protocol, replication, and more.
https://libsql.org
903 stars 38 forks source link

`turso dev` breaks for newer sqld versions #767

Open avinassh opened 1 year ago

avinassh commented 1 year ago

To reproduce:

turso dev -p 4001 -f ./root

Above command starts the sqld as expected. But when you stop and start again, it breaks with following error:

turso dev -p 4001 -f ./root

2023-10-12T15:43:18.487661Z  INFO sqld: listening for incoming user HTTP connection on 0.0.0.0:4001
2023-10-12T15:43:18.487954Z  INFO sqld::migration: version < 0.18.0 detected, performing migration
Error: File exists (os error 17)

When I downgraded the sqld version to 0.17.0 it works. I am guessing this is the broken method https://github.com/libsql/sqld/blob/6eafdcc5/sqld/src/migration.rs#L35-L34