Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Snapshot schema 72 #13873

Merged
merged 10 commits into from
Sep 26, 2022
Merged

Snapshot schema 72 #13873

merged 10 commits into from
Sep 26, 2022

Commits on Sep 23, 2022

  1. Make DB engines generic over cursors too

    David Robertson committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    9acc220 View commit details
    Browse the repository at this point in the history
  2. Add executescript to DB engines

    So we can feed in a big SQL file to sql and sqlite without having to
    worry about parsing it. Motivation: our handwritten sort=of-parser
    doesn't like the CREATE TRIGGER statements (or at least the quoting it
    uses) in the upcoming schema dump.
    
    Irritatingly the `cursor` that the DB engines get isn't a raw cursor but
    a `LoggingTransaction`. That is, the annotations I wrote on the DB
    engine are wrong. Maybe we can make `LoggingTransaction` generic over a
    cursor type in the future.
    David Robertson committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    7343f23 View commit details
    Browse the repository at this point in the history
  3. Schema dumper: full_schema -> full_schemas

    David Robertson committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    8fbea9e View commit details
    Browse the repository at this point in the history
  4. Fix SQLite dumps: don't use --indent

    `--indent` is prettier, but it seems to cause SQLite to produce duff
    output when processing single quotes in comments.
    David Robertson committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    736cf30 View commit details
    Browse the repository at this point in the history
  5. Postgres dump: don't omit SELECT setval(...)

    Because these can alter the next `nextval`.
    David Robertson committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    5686864 View commit details
    Browse the repository at this point in the history
  6. Warn to use old postgres versions

    Postgres 11 introduces uses the syntax `CREATE FUNCTION` in a trigger
    definition, and uses that syntax when invoking `pg_dump`. But Postgres
    10 doesn't recognise this and needs the spelling `CREATE PROCEDURE`.
    David Robertson committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    f3b826c View commit details
    Browse the repository at this point in the history
  7. Temporarily remove 73-series migrations

    So they don't end up in full schema 72
    David Robertson committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    fc0dcd2 View commit details
    Browse the repository at this point in the history
  8. Generate dumps of schema 72

    ```shell
    docker run --rm -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -e POSTGRES_DB=synapse -p 5432:5432 postgres:10-alpine
    echo postgres | scripts-dev/make_full_schema.sh -p synapse_user -n 72 -o synapse/storage/schema
    ```
    David Robertson committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    e426cd4 View commit details
    Browse the repository at this point in the history
  9. Revert "Temporarily remove 73-series migrations"

    David Robertson committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    29990a9 View commit details
    Browse the repository at this point in the history
  10. Changelog

    David Robertson committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    f6b4ba0 View commit details
    Browse the repository at this point in the history