-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(desktop-notifications): changed browser identifier, introduc…
…ed proper case-insensitive type
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
CREATE EXTENSION IF NOT EXISTS citext; | ||
|
||
CREATE TABLE browser_session | ||
( | ||
php_session_id VARCHAR(256) NOT NULL, | ||
username CITEXT NOT NULL, | ||
user_agent TEXT NOT NULL, | ||
authenticated_at bigint NOT NULL DEFAULT (EXTRACT(EPOCH FROM CURRENT_TIMESTAMP) * 1000), | ||
|
||
CONSTRAINT pk_session PRIMARY KEY (php_session_id, username, user_agent) | ||
); | ||
|
||
CREATE INDEX browser_session_authenticated_at_idx | ||
ON browser_session ( | ||
authenticated_at | ||
) | ||
; |