Switched bd from sqlite to pg