diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-08-26 03:17:02 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-08-26 18:05:00 -0400 |
| commit | 1e0493f079d011df56fe2ec93c44a0fea38f0531 (patch) | |
| tree | 0936a24c2fd2078249f21d06a80cbba984c79e74 /.sqlx | |
| parent | ca4ac1d0f12532c38d4041aba6ae50ae4093ae13 (diff) | |
Store `Message` instances using their events.
I found a test bug! The tests for deleting previously-deleted or previously-expired tests were using the wrong user to try to delete those messages. The tests happened to pass anyways because the message authorship check was done after the message lifecycle check. They would have no longer passed; the tests are fixed to use the sender, instead.
Diffstat (limited to '.sqlx')
4 files changed, 24 insertions, 70 deletions
diff --git a/.sqlx/query-427a530f68282ba586c1e2d980b7f8cbc8a8339377814ca5f889860da99b1561.json b/.sqlx/query-427a530f68282ba586c1e2d980b7f8cbc8a8339377814ca5f889860da99b1561.json deleted file mode 100644 index 82db559..0000000 --- a/.sqlx/query-427a530f68282ba586c1e2d980b7f8cbc8a8339377814ca5f889860da99b1561.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "db_name": "SQLite", - "query": "\n insert into message\n (id, conversation, sender, sent_at, sent_sequence, body, last_sequence)\n values ($1, $2, $3, $4, $5, $6, $7)\n returning\n id as \"id: Id\",\n conversation as \"conversation: conversation::Id\",\n sender as \"sender: user::Id\",\n sent_at as \"sent_at: DateTime\",\n sent_sequence as \"sent_sequence: Sequence\",\n body as \"body: Body\"\n ", - "describe": { - "columns": [ - { - "name": "id: Id", - "ordinal": 0, - "type_info": "Text" - }, - { - "name": "conversation: conversation::Id", - "ordinal": 1, - "type_info": "Text" - }, - { - "name": "sender: user::Id", - "ordinal": 2, - "type_info": "Text" - }, - { - "name": "sent_at: DateTime", - "ordinal": 3, - "type_info": "Text" - }, - { - "name": "sent_sequence: Sequence", - "ordinal": 4, - "type_info": "Integer" - }, - { - "name": "body: Body", - "ordinal": 5, - "type_info": "Text" - } - ], - "parameters": { - "Right": 7 - }, - "nullable": [ - false, - false, - false, - false, - false, - true - ] - }, - "hash": "427a530f68282ba586c1e2d980b7f8cbc8a8339377814ca5f889860da99b1561" -} diff --git a/.sqlx/query-47bf3a66c20225f28c6c7f2d5ee0e8b184e5269874b17715e2fa2f1f520bd83f.json b/.sqlx/query-47bf3a66c20225f28c6c7f2d5ee0e8b184e5269874b17715e2fa2f1f520bd83f.json new file mode 100644 index 0000000..ce70fcd --- /dev/null +++ b/.sqlx/query-47bf3a66c20225f28c6c7f2d5ee0e8b184e5269874b17715e2fa2f1f520bd83f.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "\n update message\n set body = '', last_sequence = max(last_sequence, $1)\n where id = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "47bf3a66c20225f28c6c7f2d5ee0e8b184e5269874b17715e2fa2f1f520bd83f" +} diff --git a/.sqlx/query-53c5c19f2e284b45b50fe3b5acc118678830ae380dbed94542e85e294b3d9ace.json b/.sqlx/query-53c5c19f2e284b45b50fe3b5acc118678830ae380dbed94542e85e294b3d9ace.json new file mode 100644 index 0000000..85e43c8 --- /dev/null +++ b/.sqlx/query-53c5c19f2e284b45b50fe3b5acc118678830ae380dbed94542e85e294b3d9ace.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "\n insert into message\n (id, conversation, sender, body, sent_at, sent_sequence, last_sequence)\n values ($1, $2, $3, $4, $5, $6, $6)\n ", + "describe": { + "columns": [], + "parameters": { + "Right": 6 + }, + "nullable": [] + }, + "hash": "53c5c19f2e284b45b50fe3b5acc118678830ae380dbed94542e85e294b3d9ace" +} diff --git a/.sqlx/query-64fb9bad4505c144578e393a7c0c7e8cf92e5ee6e3900fe9f94c75b5f8c9bfc4.json b/.sqlx/query-64fb9bad4505c144578e393a7c0c7e8cf92e5ee6e3900fe9f94c75b5f8c9bfc4.json deleted file mode 100644 index 5179e74..0000000 --- a/.sqlx/query-64fb9bad4505c144578e393a7c0c7e8cf92e5ee6e3900fe9f94c75b5f8c9bfc4.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "SQLite", - "query": "\n update message\n set body = '', last_sequence = max(last_sequence, $1)\n where id = $2\n returning id as \"id: Id\"\n ", - "describe": { - "columns": [ - { - "name": "id: Id", - "ordinal": 0, - "type_info": "Text" - } - ], - "parameters": { - "Right": 2 - }, - "nullable": [ - false - ] - }, - "hash": "64fb9bad4505c144578e393a7c0c7e8cf92e5ee6e3900fe9f94c75b5f8c9bfc4" -} |
