Added IF NOT EXISTS to postgres tables