From 2075e76015cc684b8f96f60035260ab78c29de5f Mon Sep 17 00:00:00 2001 From: James Elliott Date: Thu, 2 Dec 2021 11:36:04 +1100 Subject: [PATCH] fix(storage): new auth log schema request method length (#2656) This is a fix to the authentication_logs schema that prevents the VARCHAR from being insufficient for HTTP request methods such as PATCH, DELETE, OPTIONS, CONNECT. --- internal/storage/migrations/V0001.Initial_Schema.mysql.up.sql | 2 +- .../storage/migrations/V0001.Initial_Schema.postgres.up.sql | 2 +- internal/storage/migrations/V0001.Initial_Schema.sqlite.up.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/storage/migrations/V0001.Initial_Schema.mysql.up.sql b/internal/storage/migrations/V0001.Initial_Schema.mysql.up.sql index 8ab76a85..93102a50 100644 --- a/internal/storage/migrations/V0001.Initial_Schema.mysql.up.sql +++ b/internal/storage/migrations/V0001.Initial_Schema.mysql.up.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS authentication_logs ( auth_type VARCHAR(5) NOT NULL DEFAULT '1FA', remote_ip VARCHAR(47) NULL DEFAULT NULL, request_uri TEXT NOT NULL, - request_method VARCHAR(4) NOT NULL DEFAULT '', + request_method VARCHAR(8) NOT NULL DEFAULT '', PRIMARY KEY (id) ); diff --git a/internal/storage/migrations/V0001.Initial_Schema.postgres.up.sql b/internal/storage/migrations/V0001.Initial_Schema.postgres.up.sql index da58a18a..4cf1f075 100644 --- a/internal/storage/migrations/V0001.Initial_Schema.postgres.up.sql +++ b/internal/storage/migrations/V0001.Initial_Schema.postgres.up.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS authentication_logs ( auth_type VARCHAR(5) NOT NULL DEFAULT '1FA', remote_ip VARCHAR(47) NULL DEFAULT NULL, request_uri TEXT, - request_method VARCHAR(4) NOT NULL DEFAULT '', + request_method VARCHAR(8) NOT NULL DEFAULT '', PRIMARY KEY (id) ); diff --git a/internal/storage/migrations/V0001.Initial_Schema.sqlite.up.sql b/internal/storage/migrations/V0001.Initial_Schema.sqlite.up.sql index a93c45ef..a731aacc 100644 --- a/internal/storage/migrations/V0001.Initial_Schema.sqlite.up.sql +++ b/internal/storage/migrations/V0001.Initial_Schema.sqlite.up.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS authentication_logs ( auth_type VARCHAR(5) NOT NULL DEFAULT '1FA', remote_ip VARCHAR(47) NULL DEFAULT NULL, request_uri TEXT, - request_method VARCHAR(4) NOT NULL DEFAULT '', + request_method VARCHAR(8) NOT NULL DEFAULT '', PRIMARY KEY (id) );