Fix room names and domains being swapped in room list

This commit is contained in:
Joscha 2024-01-01 13:06:48 +01:00
parent 60fdc40a21
commit c094f526a5
2 changed files with 2 additions and 2 deletions

View file

@ -198,7 +198,7 @@ impl Action for GetRooms {
fn run(self, conn: &mut Connection) -> Result<Self::Output, Self::Error> {
conn.prepare(
"
SELECT room, domain
SELECT domain, room
FROM euph_rooms
",
)?

View file

@ -153,7 +153,7 @@ fn m3(tx: &mut Transaction<'_>, nr: usize, total: usize) -> rusqlite::Result<()>
start INT,
end INT,
UNIQUE (room, domain, start, end),
UNIQUE (domain, room, start, end),
FOREIGN KEY (domain, room) REFERENCES euph_rooms (domain, room)
ON DELETE CASCADE,
CHECK (start IS NULL OR end IS NOT NULL)