Updated views and migrated database to postgres