[api] hopefully fixing 2.4 migrations

Migrations have to be careful not to overuse models as model classes change
and the migrations run with HEAD code on old databases. Unfortunately it's
very hard to verify