Add comment clarifying recorder migration to schema version 16 (#123902)

This commit is contained in:
Erik Montnemery 2024-08-14 21:22:06 +02:00 committed by GitHub
parent 0790611b93
commit 9c4677a3c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1116,6 +1116,10 @@ class _SchemaVersion16Migrator(_SchemaVersionMigrator, target_version=16):
SupportedDialect.MYSQL,
SupportedDialect.POSTGRESQL,
):
# Version 16 changes settings for the foreign key constraint on
# states.old_state_id. Dropping the constraint is not really correct
# we should have recreated it instead. Recreating the constraint now
# happens in the migration to schema version 45.
_drop_foreign_key_constraints(
self.session_maker, self.engine, TABLE_STATES, "old_state_id"
)