adding db migration and postgres support