-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
schema.sql, 025.sql: make style consistent
Mainly adapt spacing and character case to be consistent with the rest. Also do the CREATE EXTENSION at the top of the schema file, it may be used elsewhere in the future as well. One functional change: rename the primary key constraint to be consistent with pk_${table_name} used in the rest of the file.
- Loading branch information
1 parent
1204ecc
commit b6b4a75
Showing
2 changed files
with
16 additions
and
26 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 |
---|---|---|
@@ -1,17 +1,12 @@ | ||
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), | ||
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) | ||
CONSTRAINT pk_browser_session PRIMARY KEY (php_session_id, username, user_agent) | ||
); | ||
|
||
CREATE INDEX browser_session_authenticated_at_idx | ||
ON browser_session ( | ||
authenticated_at | ||
) | ||
; | ||
CREATE INDEX browser_session_authenticated_at_idx ON browser_session (authenticated_at); |