Fix Postgres and SQLite upgraders

Signed-off-by: Shitiz Garg <mail@dragooon.net>
Merge pull request #1701 from Dragooon/quick-fix

Fix Postgres and SQLite upgraders