Migrated database_factory to INIT/METHOD macros