mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: make database.Chat auditable (#24485)
Wire database.Chat into the audit system so chat lifecycle events
(creation, patches, etc.) produce audit log entries.
Part of CODAGT-200.
> 🤖
This commit is contained in:
Generated
+2
-1
@@ -525,7 +525,8 @@ CREATE TYPE resource_type AS ENUM (
|
||||
'workspace_app',
|
||||
'prebuilds_settings',
|
||||
'task',
|
||||
'ai_seat'
|
||||
'ai_seat',
|
||||
'chat'
|
||||
);
|
||||
|
||||
CREATE TYPE shareable_workspace_owners AS ENUM (
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
-- Postgres does not support removing enum values, so down is a
|
||||
-- no-op. Rolling back past this migration is not reversible at
|
||||
-- the schema level.
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TYPE resource_type ADD VALUE IF NOT EXISTS 'chat';
|
||||
@@ -3205,6 +3205,7 @@ const (
|
||||
ResourceTypePrebuildsSettings ResourceType = "prebuilds_settings"
|
||||
ResourceTypeTask ResourceType = "task"
|
||||
ResourceTypeAiSeat ResourceType = "ai_seat"
|
||||
ResourceTypeChat ResourceType = "chat"
|
||||
)
|
||||
|
||||
func (e *ResourceType) Scan(src interface{}) error {
|
||||
@@ -3270,7 +3271,8 @@ func (e ResourceType) Valid() bool {
|
||||
ResourceTypeWorkspaceApp,
|
||||
ResourceTypePrebuildsSettings,
|
||||
ResourceTypeTask,
|
||||
ResourceTypeAiSeat:
|
||||
ResourceTypeAiSeat,
|
||||
ResourceTypeChat:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@@ -3305,6 +3307,7 @@ func AllResourceTypeValues() []ResourceType {
|
||||
ResourceTypePrebuildsSettings,
|
||||
ResourceTypeTask,
|
||||
ResourceTypeAiSeat,
|
||||
ResourceTypeChat,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user