melodee
melodee copied to clipboard
Migrate from SQLite to DecentDB
Let's migrate SQLite usage to DecentDB usage.
SQLite is currently used in three places:
- ArtistSearchEngine
- SQLiteMusicBrainzRepository
- Testing using Microsoft.EntityFrameworkCore.Sqlite
Here is what I did to convert my ArtistSearchEngine.db (SQLite) to DecentDB file:
I cloned the DecentDB repo locally
cd ~/source/decentdb
PYTHONPATH="$PWD/bindings/python" python3 -m decentdb.tools.sqlite_import {path_to_sqlite_db_file}/artistSearchEngine.db {path_to_decentdb_directory}/artistSearchEngine.ddb --overwrite --detect-uuid --preserve-case
./decentdb checkpoint -d {path_to_decentdb_directory}/artistSearchEngine.ddb
I decided to completely rewrite DecentDB from Nim to Rust so this has taken way longer than expected, but DecentDB v2.0.0 was cut today, so back on track! If you are curious check out why I ditched Nim for Rust on my blog -> https://www.shildreth.com/rewriting-my-sqlite-killer-why-im-moving-decentdb-from-nim-to-rust
Done