選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

78 行
3.3 KiB

  1. # Copyright 2021 The Matrix.org Foundation C.I.C.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. SCHEMA_VERSION = 69 # remember to update the list below when updating
  15. """Represents the expectations made by the codebase about the database schema
  16. This should be incremented whenever the codebase changes its requirements on the
  17. shape of the database schema (even if those requirements are backwards-compatible with
  18. older versions of Synapse).
  19. See https://matrix-org.github.io/synapse/develop/development/database_schema.html
  20. for more information on how this works.
  21. Changes in SCHEMA_VERSION = 61:
  22. - The `user_stats_historical` and `room_stats_historical` tables are not written and
  23. are not read (previously, they were written but not read).
  24. - MSC2716: Add `insertion_events` and `insertion_event_edges` tables to keep track
  25. of insertion events in order to navigate historical chunks of messages.
  26. - MSC2716: Add `chunk_events` table to track how the chunk is labeled and
  27. determines which insertion event it points to.
  28. Changes in SCHEMA_VERSION = 62:
  29. - MSC2716: Add `insertion_event_extremities` table that keeps track of which
  30. insertion events need to be backfilled.
  31. Changes in SCHEMA_VERSION = 63:
  32. - The `public_room_list_stream` table is not written nor read to
  33. (previously, it was written and read to, but not for any significant purpose).
  34. https://github.com/matrix-org/synapse/pull/10565
  35. Changes in SCHEMA_VERSION = 64:
  36. - MSC2716: Rename related tables and columns from "chunks" to "batches".
  37. Changes in SCHEMA_VERSION = 65:
  38. - MSC2716: Remove unique event_id constraint from insertion_event_edges
  39. because an insertion event can have multiple edges.
  40. - Remove unused tables `user_stats_historical` and `room_stats_historical`.
  41. Changes in SCHEMA_VERSION = 66:
  42. - Queries on state_key columns are now disambiguated (ie, the codebase can handle
  43. the `events` table having a `state_key` column).
  44. Changes in SCHEMA_VERSION = 67:
  45. - state_events.prev_state is no longer written to.
  46. Changes in SCHEMA_VERSION = 68:
  47. - event_reference_hashes is no longer read.
  48. - `events` has `state_key` and `rejection_reason` columns, which are populated for
  49. new events.
  50. Changes in SCHEMA_VERSION = 69:
  51. - We now write to `device_lists_changes_in_room` table.
  52. - Use sequence to generate future `application_services_txns.txn_id`s
  53. """
  54. SCHEMA_COMPAT_VERSION = (
  55. # We now assume that `device_lists_changes_in_room` has been filled out for
  56. # recent device_list_updates.
  57. 69
  58. )
  59. """Limit on how far the synapse codebase can be rolled back without breaking db compat
  60. This value is stored in the database, and checked on startup. If the value in the
  61. database is greater than SCHEMA_VERSION, then Synapse will refuse to start.
  62. """