We're upgrading our church from Rock 16.13 to 17.0.43 on a staging copy of production (RockDB-staging). The files deploy fine, but Rock won't finish starting — it dies during database migrations.

WHAT WE'RE SEEING
After we deploy 17.0.43 and hit the site, we get a generic Runtime Error. The real error is in the Windows Application log:

Cannot insert the value NULL into column 'AttributeId', table 'RockDB-staging.dbo.AttributeValue'

Stack points to:
- RockApplicationStartupHelper.MigrateDatabase
- DbMigrator.ApplyMigration
- Application_Start

OUR SETUP
Rock version (files): 17.0.43 (McKinley)
Database version (schema): 16.13 (staging clone of prod)
Database: Azure SQL — RockDB-staging
SQL compatibility: 160 (also failed on 150)
Web server: Windows Server 2022, IIS, .NET 4.8

WHERE MIGRATIONS STOP

Last successful migration in __MigrationHistory:
202412172356239_LearningHubImage

No 17.0 migrations have applied yet.

We believe the first pending migration is:
202412181755297_Rollup_20241218

MigrationLog.csv never logs that name — we assume the migration crashes before it completes.

WHAT WE'VE ALREADY CHECKED

We ran read-only SQL checks on staging. Everything came back 0:

- Orphaned AttributeValue rows
- AttributeValue rows with NULL AttributeId
- Duplicate Attribute definitions
- Page rows missing SiteId
- Registration rows missing RegistrationTemplateId
- AttributeMatrixItem rows missing AttributeMatrixTemplateId

So we don't see obvious bad data — but the rollup still tries to insert an AttributeValue with a NULL AttributeId.

Note: Our DB has a long history with older plugins (Pastoral Care, Protect My Ministry, etc.). Not sure if that's related, but wanted to mention it.

WHAT WE'RE HOPING TO LEARN

1. Is this a known issue with Rollup_20241218 when upgrading from 16.13?
2. Is there a sanctioned pre-upgrade script or workaround from Spark?
3. Any extra diagnostics you'd recommend to pinpoint which Attribute/GUID the migration is failing on?
4. Would jumping to a newer 17.x build (e.g. 17.7) help, or would we hit the same migration?

We're not planning to hand-edit Attribute / AttributeValue unless Rock/Spark gives us an explicit fix.

Thanks in advance for any pointers.