Skip to content
Snippets Groups Projects
  1. Jun 15, 2022
    • Richard van der Hoff's avatar
      Clean up schema for `event_edges` (#12893) · 75fb10ee
      Richard van der Hoff authored
      * 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.
      Unverified
      75fb10ee
    • David Robertson's avatar
  2. Jun 14, 2022
  3. Jun 13, 2022
  4. Jun 12, 2022
  5. Jun 10, 2022
  6. Jun 09, 2022
  7. Jun 08, 2022
Loading