Skip to content

Commit

Permalink
Merge pull request #28 from ianmcorvidae/logins-update
Browse files Browse the repository at this point in the history
add migrations to replace user agent with session id column in logins table
  • Loading branch information
ianmcorvidae authored Dec 12, 2024
2 parents 5549c93 + fe18c51 commit 4a39bc8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions migrations/000041_logins_keycloak_update.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
BEGIN;

SET search_path = public, pg_catalog;

ALTER TABLE ONLY logins
DROP COLUMN IF EXISTS session_id,
ADD COLUMN IF NOT EXISTS user_agent text,
ADD COLUMN IF NOT EXISTS logout_time timestamp;

COMMIT;
10 changes: 10 additions & 0 deletions migrations/000041_logins_keycloak_update.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
BEGIN;

SET search_path = public, pg_catalog;

ALTER TABLE ONLY logins
DROP COLUMN IF EXISTS user_agent,
DROP COLUMN IF EXISTS logout_time,
ADD COLUMN IF NOT EXISTS session_id uuid;

COMMIT;

0 comments on commit 4a39bc8

Please sign in to comment.