Fix Postgres and SQLite upgraders

Signed-off-by: Shitiz Garg <mail@dragooon.net>