[database] Cleanup handling of schema version

This way beat/beat.core> doesn't depend on updating the
is_v1 flag.
2 jobs for 20_cleanup_database_version_handling in 8 minutes and 43 seconds (queued for 7 seconds)