Files
matrix-rust-sdk/crates/matrix-sdk-sqlite/migrations/NOTES.md
Ivan Enderlin b4dd17090a doc(sqlite): Fix typo.
Signed-off-by: Ivan Enderlin <ivan@mnt.io>
2026-06-11 15:00:43 +02:00

991 B

Notes about migration scripts

This document aims at listing all errors we made in the past with the migration scripts, with the hope that future us won't replicate these errors.

  1. Identifiers can be delimited by double-quotes, while string literals must be delimited by single-quotes. Even if SQLite has a compile-time configuration to consider double-quotes to be string literals delimiters, this configuration can be disabled, and would create an error.

    The following example is correct:

    CREATE TABLE "foo";
    SELECT id FROM foo WHERE id = 'hello';
    

    But the following example is incorrect:

    CREATE TABLE 'foo';
    SELECT id FROM foo WHERE id = "hello";
    

    See the Double-quoted String Literals Are Accepted Section in the SQLite documentation to learn more.