Skip to content

Commit

Permalink
Schema: don't limit browser_session.user_agent to 4096 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
Al2Klimov authored and julianbrost committed Jul 22, 2024
1 parent e9ae2de commit 5492d74
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion schema/mysql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ CREATE INDEX idx_incident_history_time_type ON incident_history(time, type) COMM
CREATE TABLE browser_session (
php_session_id varchar(256) NOT NULL,
username varchar(254) NOT NULL COLLATE utf8mb4_unicode_ci,
user_agent varchar(4096) NOT NULL,
user_agent text NOT NULL,
authenticated_at bigint NOT NULL,

CONSTRAINT pk_browser_session PRIMARY KEY (php_session_id)
Expand Down
1 change: 1 addition & 0 deletions schema/mysql/upgrades/035.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE browser_session MODIFY COLUMN user_agent text NOT NULL;
2 changes: 1 addition & 1 deletion schema/pgsql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ COMMENT ON INDEX idx_incident_history_time_type IS 'Incident History ordered by
CREATE TABLE browser_session (
php_session_id varchar(256) NOT NULL,
username citext NOT NULL,
user_agent varchar(4096) NOT NULL,
user_agent text NOT NULL,
authenticated_at bigint NOT NULL,

CONSTRAINT pk_browser_session PRIMARY KEY (php_session_id),
Expand Down
1 change: 1 addition & 0 deletions schema/pgsql/upgrades/035.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE browser_session ALTER COLUMN user_agent TYPE text;

0 comments on commit 5492d74

Please sign in to comment.