Skip to content

Commit a1788df

Browse files
committed
user_agent
1 parent e585f91 commit a1788df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

coderd/database/migrations/000010_audit_logs.up.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ CREATE TABLE audit_logs (
1919
user_id uuid NOT NULL,
2020
organization_id uuid NOT NULL,
2121
ip cidr NOT NULL,
22-
os varchar(64) NOT NULL,
23-
browser varchar(64) NOT NULL,
24-
device varchar(64) NOT NULL,
22+
user_agent varchar(256) NOT NULL,
2523
resource_type resource_type NOT NULL,
2624
resource_id uuid NOT NULL,
25+
-- resource_target is the name of the resource that `resource_id` points to.
26+
-- it's stored here because resources we point to can be deleted.
2727
resource_target text NOT NULL,
2828
action audit_action NOT NULL,
2929
diff jsonb NOT NULL,
30-
status_code integer DEFAULT 0 NOT NULL,
30+
status_code integer NOT NULL,
3131
PRIMARY KEY (id)
3232
);
3333

0 commit comments

Comments
 (0)