Fix initial migration
This commit is contained in:
parent
58d9f87bd2
commit
bbe1ab7bfd
1 changed files with 4 additions and 3 deletions
|
|
@ -36,7 +36,7 @@ fn m1(tx: &mut Transaction) -> rusqlite::Result<()> {
|
|||
|
||||
-- SessionView
|
||||
user_id TEXT NOT NULL,
|
||||
name TEXT
|
||||
name TEXT,
|
||||
server_id TEXT NOT NULL,
|
||||
server_era TEXT NOT NULL,
|
||||
session_id TEXT NOT NULL,
|
||||
|
|
@ -63,14 +63,15 @@ fn m1(tx: &mut Transaction) -> rusqlite::Result<()> {
|
|||
FROM euph_msgs
|
||||
WHERE parent IS NULL
|
||||
UNION
|
||||
(
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT room, parent
|
||||
FROM euph_msgs
|
||||
WHERE parent IS NOT NULL
|
||||
EXCEPT
|
||||
SELECT room, id
|
||||
FROM euph_msgs
|
||||
)
|
||||
);
|
||||
",
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue