summary refs log tree commit diff
path: root/tests/storage/test_database.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Correctly mention previous copyright (#16820)Erik Johnston2024-01-231-0/+1
| | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them.
* Update license headersPatrick Cloke2023-11-211-10/+16
|
* Revert "Add a Postgres `REPLICA IDENTITY` to tables that do not have an ↵Erik Johnston2023-11-161-84/+1
| | | | | implicit one. This should allow use of Postgres logical replication. (#16456)" (#16651) This reverts commit 69afe3f7a0d89f3422ddbd3aa16bc9bbc01056eb.
* Fix test not detecting tables with missing primary keys and missing replica ↵reivilibre2023-11-161-3/+4
| | | | | | | | | | | | | | | identities, then add more replica identities. (#16647) * Fix the CI query that did not detect all cases of missing primary keys * Add more missing REPLICA IDENTITY entries * Newsfile Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org> --------- Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
* Use full GitHub links instead of bare issue numbers. (#16637)Patrick Cloke2023-11-151-2/+3
|
* Add a Postgres `REPLICA IDENTITY` to tables that do not have an implicit ↵reivilibre2023-11-131-1/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | one. This should allow use of Postgres logical replication. (#16456) * Add Postgres replica identities to tables that don't have an implicit one Fixes #16224 * Newsfile Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org> * Move the delta to version 83 as we missed the boat for 82 * Add a test that all tables have a REPLICA IDENTITY * Extend the test to include when indices are deleted * isort * black * Fully qualify `oid` as it is a 'hidden attribute' in Postgres 11 * Update tests/storage/test_database.py Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> * Add missed tables --------- Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org> Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* Make sqlite database migrations transactional again, part two (#14926)Sean Quah2023-01-311-0/+96
| | | | | | | | | | | | | | | | #14910 fixed the regression introduced by #13873 where sqlite database migrations would no longer run inside a transaction. However, it committed the transaction before Synapse updated its bookkeeping of which migrations have been run, which means that migrations may be run again after they have completed successfully. Leave the transaction open at the end of `executescript`, to restore the old, correct behaviour. Also make the PostgreSQL behaviour consistent with SQLite. Fixes #14909. Signed-off-by: Sean Quah <seanq@matrix.org>
* Require types in tests.storage. (#14646)Patrick Cloke2022-12-091-1/+1
| | | | Adds missing type hints to `tests.storage` package and does not allow untyped definitions.
* Handle cancellation in `DatabasePool.runInteraction()` (#12199)Sean Quah2022-03-161-0/+58
| | | | | | | | | | | | To handle cancellation, we ensure that `after_callback`s and `exception_callback`s are always run, since the transaction will complete on another thread regardless of cancellation. We also wait until everything is done before releasing the `CancelledError`, so that logging contexts won't get used after they have been finished. Signed-off-by: Sean Quah <seanq@element.io>
* Add tests for database transaction callbacks (#12198)Sean Quah2022-03-151-1/+103
| | | | Signed-off-by: Sean Quah <seanq@element.io>
* Remove dead code in `tests/storage/test_database.py` (#12197)Sean Quah2022-03-091-16/+0
| | | Signed-off-by: Sean Quah <seanq@element.io>
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* remove unused param on `make_tuple_comparison_clause`Richard van der Hoff2021-04-081-2/+1
|
* Drop support for sqlite<3.22 as wellRichard van der Hoff2021-04-081-11/+1
|
* bg update to clear out duplicate outbound_device_list_pokes (#7193)Richard van der Hoff2020-04-071-0/+52
We seem to have some duplicates, which could do with being cleared out.