Skip to content

Commit dc4eaf7

Browse files
committed
feat[db]: SPRING_AI_CHAT_MEMORY 테이블 생성 (MySQL)
1 parent 8a81963 commit dc4eaf7

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
-- MySQL 용
2+
CREATE TABLE IF NOT EXISTS SPRING_AI_CHAT_MEMORY (
3+
`conversation_id` VARCHAR(36) NOT NULL,
4+
`content` TEXT NOT NULL,
5+
`type` ENUM('USER', 'ASSISTANT', 'SYSTEM', 'TOOL') NOT NULL,
6+
`timestamp` TIMESTAMP NOT NULL,
7+
8+
INDEX `SPRING_AI_CHAT_MEMORY_CONVERSATION_ID_TIMESTAMP_IDX` (`conversation_id`, `timestamp`)
9+
);
10+
11+
/*-- H2 용
12+
CREATE TABLE IF NOT EXISTS SPRING_AI_CHAT_MEMORY
13+
(
14+
conversation_id
15+
VARCHAR
16+
(
17+
36
18+
) NOT NULL,
19+
content TEXT NOT NULL,
20+
type VARCHAR
21+
(
22+
10
23+
) NOT NULL,
24+
"timestamp" TIMESTAMP NOT NULL,
25+
PRIMARY KEY
26+
(
27+
conversation_id,
28+
"timestamp"
29+
)
30+
);
31+
32+
CREATE INDEX IF NOT EXISTS SPRING_AI_CHAT_MEMORY_CONVERSATION_ID_TIMESTAMP_IDX
33+
ON SPRING_AI_CHAT_MEMORY(conversation_id, "timestamp");*/

0 commit comments

Comments
 (0)