diff --git a/domains/store/src/main/sqldelight/app/dapk/db/migration/2.sqm b/domains/store/src/main/sqldelight/app/dapk/db/migration/2.sqm new file mode 100644 index 0000000..f4ee11d --- /dev/null +++ b/domains/store/src/main/sqldelight/app/dapk/db/migration/2.sqm @@ -0,0 +1,5 @@ +CREATE TABLE IF NOT EXISTS dbStRoomMeta ( + room_id TEXT NOT NULL, + is_bubble INTEGER AS Int NOT NULL DEFAULT 0, + PRIMARY KEY (room_id) +); \ No newline at end of file diff --git a/domains/store/src/main/sqldelight/app/dapk/db/model/BubbleRoom.sq b/domains/store/src/main/sqldelight/app/dapk/db/model/BubbleRoom.sq new file mode 100644 index 0000000..b936524 --- /dev/null +++ b/domains/store/src/main/sqldelight/app/dapk/db/model/BubbleRoom.sq @@ -0,0 +1,18 @@ +CREATE TABLE dbStRoomMeta ( + room_id TEXT NOT NULL, + is_bubble INTEGER AS Int NOT NULL DEFAULT 0, + PRIMARY KEY (room_id) +); + +markBubble: +INSERT OR REPLACE INTO dbStRoomMeta(room_id, is_bubble) +VALUES (?,?); + +unmarkBubble: +INSERT OR REPLACE INTO dbStRoomMeta(room_id, is_bubble) +VALUES (?,?); + +select: +SELECT is_bubble +FROM dbStRoomMeta +WHERE room_id = ?;