Skip to content

Commit

Permalink
fix: escape table names to avoid the sqlite error: near "-": syntax e…
Browse files Browse the repository at this point in the history
…rror". (#762) (#763)

Co-authored-by: OpenIM-Gordon <[email protected]>
  • Loading branch information
OpenIM-Robot and FGadvancer authored Oct 29, 2024
1 parent 1beb991 commit 4d387f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/db/chat_log_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (d *DataBase) initChatLog(ctx context.Context, conversationID string) error
tableName := utils.GetTableName(conversationID)
if !d.tableChecker.HasTable(tableName) {
createTableSQL := fmt.Sprintf(`
CREATE TABLE %s (
CREATE TABLE "%s" (
client_msg_id CHAR(64),
server_msg_id CHAR(64),
send_id CHAR(64),
Expand Down

0 comments on commit 4d387f3

Please sign in to comment.