kordophone-db: switch to diesel for more features
This commit is contained in:
0
kordophone-db/migrations/.keep
Normal file
0
kordophone-db/migrations/.keep
Normal file
@@ -0,0 +1,4 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
DROP TABLE IF EXISTS `participants`;
|
||||
DROP TABLE IF EXISTS `conversation_participants`;
|
||||
DROP TABLE IF EXISTS `conversations`;
|
||||
@@ -0,0 +1,20 @@
|
||||
-- Your SQL goes here
|
||||
CREATE TABLE `participants`(
|
||||
`id` INTEGER NOT NULL PRIMARY KEY,
|
||||
`display_name` TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE `conversation_participants`(
|
||||
`conversation_id` TEXT NOT NULL,
|
||||
`participant_id` INTEGER NOT NULL,
|
||||
PRIMARY KEY(`conversation_id`, `participant_id`)
|
||||
);
|
||||
|
||||
CREATE TABLE `conversations`(
|
||||
`id` TEXT NOT NULL PRIMARY KEY,
|
||||
`unread_count` BIGINT NOT NULL,
|
||||
`display_name` TEXT,
|
||||
`last_message_preview` TEXT,
|
||||
`date` TIMESTAMP NOT NULL
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user