Changed database from sqlite to postgresql