mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-07-03 12:55:34 +00:00
Add tests for room create/read and fix incorrect foreign keys
This commit is contained in:
parent
c5263c607c
commit
ff5b7e60a7
6 changed files with 224 additions and 28 deletions
|
@ -17,8 +17,8 @@ CREATE TABLE IF NOT EXISTS `room_member` (
|
|||
`rid` INTEGER NOT NULL REFERENCES `room` ON DELETE CASCADE,
|
||||
`uid` INTEGER NOT NULL REFERENCES `user` ON DELETE RESTRICT,
|
||||
`permission` INTEGER NOT NULL,
|
||||
`last_seen_cid` INTEGER NOT NULL REFERENCES `room_item` (`cid`) ON DELETE NO ACTION
|
||||
DEFAULT 0,
|
||||
-- Optionally references `room_item`(`cid`).
|
||||
`last_seen_cid` INTEGER NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`rid`, `uid`)
|
||||
) STRICT;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue