mirror of
https://github.com/home-assistant/core.git
synced 2025-07-31 19:25:12 +02:00
Add comment clarifying recorder migration to schema version 16 (#123902)
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
Reference in New Issue
Block a user