forked from lavina/lavina
1
0
Fork 0
lavina/crates/lavina-core/migrations/3_dialogs.sql

15 lines
425 B
MySQL
Raw Normal View History

2024-04-21 19:01:29 +00:00
create table dialogs(
participant_1 integer not null,
participant_2 integer not null,
created_at timestamp not null,
message_count integer not null default 0,
primary key (participant_1, participant_2)
);
create table dialog_messages(
dialog_id integer not null,
id integer not null, -- unique per dialog, sequential in one dialog
content string not null,
primary key (dialog_id, id)
);