Migration based on feature, not version

This commit is contained in:
kexkey
2019-02-02 11:51:11 -05:00
committed by kexkey
parent b4f6c65531
commit 3b912da52d

View File

@@ -1,10 +1,11 @@
#!/bin/sh
echo "Checking for full LN support in DB..."
exists=$(sqlite3 db/proxydb "SELECT value FROM cyphernode_props WHERE property='pay_index'")
if [ -z "${exists}" ]; then
# pay_index not found, let's migrate
echo "Migrating database from v0.1 to v0.2..."
echo "Migrating database for full LN support..."
cat sqlmigrate20190104_0.1-0.2.sql | sqlite3 $DB_FILE
else
echo "Database v0.1 to v0.2 migration already done, skipping!"
echo "Database full LN support migration already done, skipping!"
fi