cleanup: remove assigned_agent_id column from csat responses table.

This commit is contained in:
Abhinav Raut
2025-02-02 18:46:43 +05:30
parent 7fa3df1eba
commit d7ac76824f
3 changed files with 2 additions and 6 deletions

View File

@@ -14,7 +14,6 @@ type CSATResponse struct {
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
ConversationID int `db:"conversation_id"`
AssignedAgentID int `db:"assigned_agent_id"`
Score int `db:"rating"`
Feedback null.String `db:"feedback"`
ResponseTimestamp null.Time `db:"response_timestamp"`

View File

@@ -1,9 +1,8 @@
-- name: insert
INSERT INTO csat_responses (
conversation_id,
assigned_agent_id
conversation_id
)
VALUES ($1, $2)
VALUES ($1)
RETURNING uuid;
-- name: get
@@ -12,7 +11,6 @@ SELECT id,
created_at,
updated_at,
conversation_id,
assigned_agent_id,
rating,
feedback,
response_timestamp

View File

@@ -379,7 +379,6 @@ CREATE TABLE csat_responses (
-- Keep CSAT responses even if the conversation or agent is deleted.
conversation_id BIGINT REFERENCES conversations(id) ON DELETE SET NULL ON UPDATE CASCADE NOT NULL,
assigned_agent_id BIGINT REFERENCES users(id) ON DELETE SET NULL ON UPDATE CASCADE NOT NULL,
rating INT DEFAULT 0 NOT NULL,
feedback TEXT NULL,