mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-09 01:56:08 +00:00

* chore: ai type * chore: use patch to fix version issue * chore: update * chore: update * chore: integrate client api * chore: add schema * chore: setup event * chore: add event test * chore: add test * chore: update test * chore: load chat message * chore: load chat message * chore: chat ui * chore: disable create chat * chore: update client api * chore: disable chat * chore: ui theme * chore: ui theme * chore: copy message * chore: fix test * chore: show error * chore: update bloc * chore: update test * chore: lint * chore: icon * chore: hover * chore: show unsupported page * chore: adjust mobile ui * chore: adjust view title bar * chore: return related question * chore: error page * chore: error page * chore: code format * chore: prompt * chore: fix test * chore: ui adjust * chore: disable create chat * chore: add loading page * chore: fix test * chore: disable chat action * chore: add maximum text limit
21 lines
695 B
SQL
21 lines
695 B
SQL
-- Create table for chat documents
|
|
CREATE TABLE chat_table
|
|
(
|
|
chat_id TEXT PRIMARY KEY NOT NULL,
|
|
created_at BIGINT NOT NULL,
|
|
name TEXT NOT NULL DEFAULT ''
|
|
);
|
|
|
|
-- Create table for chat messages
|
|
CREATE TABLE chat_message_table
|
|
(
|
|
message_id BIGINT PRIMARY KEY NOT NULL,
|
|
chat_id TEXT NOT NULL,
|
|
content TEXT NOT NULL,
|
|
created_at BIGINT NOT NULL,
|
|
author_type BIGINT NOT NULL,
|
|
author_id TEXT NOT NULL,
|
|
reply_message_id BIGINT
|
|
);
|
|
CREATE INDEX idx_chat_messages_chat_id_message_id ON chat_message_table (chat_id, message_id);
|