forked-synapse/synapse
Richard van der Hoff 75fb10ee45
Clean up schema for event_edges (#12893)
* Remove redundant references to `event_edges.room_id`

We don't need to care about the room_id here, because we are already checking
the event id.

* Clean up the event_edges table

We make a number of changes to `event_edges`:

 * We give the `room_id` and `is_state` columns defaults (null and false
   respectively) so that we can stop populating them.
 * We drop any rows that have `is_state` set true - they should no longer
   exist.
 * We drop any rows that do not exist in `events` - these should not exist
   either.
 * We drop the old unique constraint on all the colums, which wasn't much use.
 * We create a new unique index on `(event_id, prev_event_id)`.
 * We add a foreign key constraint to `events`.

These happen rather differently depending on whether we are on Postgres or
SQLite. For SQLite, we just rebuild the whole table, copying only the rows we
want to keep. For Postgres, we try to do things in the background as much as
possible.

* Stop populating `event_edges.room_id` and `is_state`

We can just rely on the defaults.
2022-06-15 12:29:42 +01:00
..
_scripts Replace noop background updates with DELETE. (#12954) 2022-06-13 14:06:27 -04:00
api Move the "email unsubscribe" resource, refactor the macaroon generator & simplify the access token verification logic. (#12986) 2022-06-14 09:12:08 -04:00
app Refactor entry points so that they all have a main function. (#13052) 2022-06-14 17:41:06 +00:00
appservice
config Remove code generating comments in configuration file (#12941) 2022-06-14 07:53:42 -07:00
crypto Fix typechecker problems exposed by signedjson 1.1.2 (#12326) 2022-03-29 21:37:50 +00:00
events Uniformize spam-checker API, part 4: port other spam-checker callbacks to return Union[Allow, Codes]. (#12857) 2022-06-13 18:16:16 +00:00
federation Stop depending on room_id to be returned for children state in the hierarchy response. (#12991) 2022-06-10 07:15:51 -04:00
handlers Move the "email unsubscribe" resource, refactor the macaroon generator & simplify the access token verification logic. (#12986) 2022-06-14 09:12:08 -04:00
http Fix destination_is errors seen in sentry. (#13041) 2022-06-14 18:28:26 +01:00
logging
metrics Fix Synapse git info missing in version strings (#12973) 2022-06-07 15:24:11 +01:00
module_api Uniformize spam-checker API, part 4: port other spam-checker callbacks to return Union[Allow, Codes]. (#12857) 2022-06-13 18:16:16 +00:00
push Move the "email unsubscribe" resource, refactor the macaroon generator & simplify the access token verification logic. (#12986) 2022-06-14 09:12:08 -04:00
replication
res
rest Fix destination_is errors seen in sentry. (#13041) 2022-06-14 18:28:26 +01:00
server_notices Decouple synapse.api.auth_blocking.AuthBlocking from synapse.api.auth.Auth. (#13021) 2022-06-14 09:51:15 +01:00
spam_checker_api
state Merge branch 'rav/simplify_event_auth_interface' into develop 2022-06-13 11:34:59 +01:00
static
storage Clean up schema for event_edges (#12893) 2022-06-15 12:29:42 +01:00
streams
util Move the "email unsubscribe" resource, refactor the macaroon generator & simplify the access token verification logic. (#12986) 2022-06-14 09:12:08 -04:00
__init__.py Fix Synapse git info missing in version strings (#12973) 2022-06-07 15:24:11 +01:00
event_auth.py Remove room_version param from check_auth_rules_for_event 2022-06-12 23:13:10 +01:00
notifier.py
py.typed
server.py Move the "email unsubscribe" resource, refactor the macaroon generator & simplify the access token verification logic. (#12986) 2022-06-14 09:12:08 -04:00
types.py Fix destination_is errors seen in sentry. (#13041) 2022-06-14 18:28:26 +01:00
visibility.py