core/tests
Erik Montnemery b7bbc938d3
Drop violating rows before adding foreign constraints in DB schema 44 migration (#123454)
* Drop violating rows before adding foreign constraints

* Don't delete rows with null-references

* Only delete rows when integrityerror is caught

* Move restore of dropped foreign key constraints to a separate migration step

* Use aliases for tables

* Update homeassistant/components/recorder/migration.py

* Update test

* Don't use alias for table we're deleting from, improve test

* Fix MySQL

* Update instead of deleting in case of self references

* Improve log messages

* Batch updates

* Add workaround for unsupported LIMIT in PostgreSQL

* Simplify

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-08-14 09:31:37 +02:00
..
auth Update import locations in tests (#122216) 2024-07-20 11:16:04 +02:00
components Drop violating rows before adding foreign constraints in DB schema 44 migration (#123454) 2024-08-14 09:31:37 +02:00
fixtures
hassfest
helpers Remove unnecessary assignment of Template.hass from event helper (#123777) 2024-08-13 12:09:30 +02:00
non_packaged_scripts
pylint
resources
script
scripts
snapshots Add created_at/modified_at to config entries (#122456) 2024-07-29 22:08:46 +02:00
test_util Improve contextmanager typing (#122250) 2024-07-20 14:09:37 +02:00
testing_config
util Relocate code to get scheduled TimerHandles (#123546) 2024-08-12 09:15:33 +02:00
__init__.py
common.py Relocate code to get scheduled TimerHandles (#123546) 2024-08-12 09:15:33 +02:00
conftest.py Relocate code to get scheduled TimerHandles (#123546) 2024-08-12 09:15:33 +02:00
ignore_uncaught_exceptions.py
patch_recorder.py Fail tests if recorder creates nested sessions (#122579) 2024-07-25 21:18:55 +02:00
patch_time.py Improve tests/patch_time.py (#122017) 2024-07-16 14:22:22 +02:00
ruff.toml
syrupy.py Add created_at/modified_at to config entries (#122456) 2024-07-29 22:08:46 +02:00
test_backports.py
test_block_async_io.py Detect blocking ssl context creation in the event loop (#123240) 2024-08-06 16:00:37 +02:00
test_bootstrap.py Split recorder and frontend bootstrap steps (#122420) 2024-07-22 23:07:49 +02:00
test_circular_imports.py
test_config.py Use HOMEASSISTANT_DOMAIN alias for core DOMAIN in tests (#122762) 2024-07-29 12:51:12 +02:00
test_config_entries.py Replace pylint broad-exception-raised rule with ruff (#123021) 2024-08-02 12:24:03 +02:00
test_const.py Fix missing type[..] annotation in tests (#122217) 2024-07-20 11:11:16 +02:00
test_core.py Replace pylint broad-exception-raised rule with ruff (#123021) 2024-08-02 12:24:03 +02:00
test_data_entry_flow.py
test_exceptions.py
test_loader.py
test_main.py
test_requirements.py Remove recorder from websocket_api after dependencies (#122422) 2024-07-22 16:50:05 -05:00
test_runner.py Replace pylint broad-exception-raised rule with ruff (#123021) 2024-08-02 12:24:03 +02:00
test_setup.py Do not raise repair issue about missing integration in safe mode (#123066) 2024-08-02 13:38:56 +02:00
test_test_fixtures.py
typing.py