Use a custom db format rather than ::VERSION

Otherwise version bumps that don't change the db format will break.