bump and rewrite all database access to macros