aboutsummaryrefslogtreecommitdiff
path: root/roomserver/storage/postgres/deltas
AgeCommit message (Collapse)Author
2024-11-14Fix lintingTill Faelligen
2024-10-18Update the license headers to mention the commercial licenseQuentin Gliech
2024-10-17Rename the go packageQuentin Gliech
github.com/matrix-org/dendrite to github.com/element-hq/dendrite
2024-10-17Update the copyright headers in all filesQuentin Gliech
2023-05-30Add tests for the `UpDropEventReferenceSHAPrevEvents` migration (#3087)Till
... as they could fail if there are duplicate events in `roomserver_previous_events`. This fixes the migration by trying to combine the `event_nids` if possible (same room) as mentioned by @kegsay in https://github.com/matrix-org/dendrite/pull/3083#discussion_r1195508963
2023-05-24Drop `reference_sha` column (#3083)Till
Companion PR to https://github.com/matrix-org/gomatrixserverlib/pull/383
2023-02-01Roomserver published pkey migration (#2960)devonh
Adds a missed migration to update the primary key on the roomserver_published table in postgres. Primary key was changed in #2836.
2022-10-27Fix upgrade appservicesTill Faelligen
2022-10-27Add AS specific public room list endpoints (#2836)Till
Adds `PUT /_matrix/client/v3/directory/list/appservice/{networkId}/{roomId}` and `DELTE /_matrix/client/v3/directory/list/appservice/{networkId}/{roomId}` support, as well as the ability to filter `/publicRooms` on networkID and including all networks.
2022-07-25Update database migrations, remove goose (#2264)Till
* Add new db migration * Update migrations Remove goose * Add possibility to test direct upgrades * Try to fix WASM test * Add checks for specific migrations * Remove AddMigration Use WithTransaction Add Dendrite version to table * Fix linter issues * Update tests * Update comments, outdent if * Namespace migrations * Add direct upgrade tests, skipping over one version * Split migrations * Update go version in CI * Fix copy&paste mistake * Use contexts in migrations Co-authored-by: kegsay <kegan@matrix.org> Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-02-21Reset invalid state snapshots for events during state storage refactor ↵Neil Alexander
migration (#2209) This should help with #2204. We can't do this for rooms, only events.
2021-09-07Add more logs (#2005)kegsay
* Add more logs To help debug the migration issue in #1924 along with manual data-loss-inducing fixes. Also log the origin server on processed txns to help debug buggy server origins. * Fix query
2021-08-04Ensure all create events have a snapshot NID of 0 (#1961)kegsay
Fixes #1924 for postgres users, though the underlying cause of why they aren't 0 in the first place is unresolved.
2021-07-26Not finding the snapshot is not fatal (#1940)kegsay
2021-07-07db migration: handle create events with no state blocks from v0.1.0 (#1904)kegsay
2021-06-29db migration: fix #1844 and add additional assertions (#1889)kegsay
* db migration: fix #1844 and add additional assertions - Migration scripts will now check to see if there are any unconverted snapshot IDs and fail the migration if there are any. This should prevent people from getting a corrupt database in the event the root cause is still unknown. - Add an ORDER BY clause when doing batch queries in the postgres migration. LIMIT and OFFSET without ORDER BY are undefined and must not be relied upon to produce a deterministic ordering (e.g row order). See https://www.postgresql.org/docs/current/queries-limit.html * Linting Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2021-04-26State storage refactor (#1839)Neil Alexander
* Hash-deduplicated state storage (and migrations) for PostgreSQL and SQLite * Refactor droomserver database setup for migrations * Fix conflict statements * Update migration names * Set a boundary for old to new block/snapshot IDs so we don't rewrite them more than once accidentally * Create sequence if not exists * Fix boundary queries * Fix boundary queries * Use Query * Break out queries a bit * More sequence tweaks * Query parameters are not playing the game * Injection escaping may not work for CREATE SEQUENCE after all * Fix snapshot sequence name * Use boundaried IDs in SQLite too * Use IFNULL for SQLite * Use COALESCE in PostgreSQL * Review comments @Kegsay
2020-11-05Implement forgetting about rooms (#1572)S7evinK
* Add basic storage methods * Add internal api handler * Add check for forgotten room * Add /rooms/{roomID}/forget endpoint * Add missing rsAPI method * Remove unused parameters * Add passing tests Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add missing file * Add postgres migration * Add sqlite migration * Use Forgetter to forget room * Remove empty line * Update HTTP status codes It looks like the spec calls for these to be 400, rather than 403: https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-rooms-roomid-forget Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>