mirror of
https://github.com/originalmk/skrytka-app.git
synced 2024-11-20 10:28:50 +00:00
Added missing table to create SQL script
This commit is contained in:
parent
7bba0ac404
commit
e3b918550d
1
app.js
1
app.js
@ -10,6 +10,7 @@ require('dotenv').config();
|
||||
|
||||
const app = express();
|
||||
const db = pgp(`postgres://${process.env.DB_USER}:${process.env.DB_PASS}@${process.env.DB_HOST}:${process.env.DB_PORT}/${process.env.DB_NAME}`);
|
||||
|
||||
const port = 5000;
|
||||
|
||||
class Point {
|
||||
|
@ -87,3 +87,15 @@ CREATE TABLE event (
|
||||
account_nickname VARCHAR(32) REFERENCES account ON DELETE SET NULL ON UPDATE CASCADE,
|
||||
osp_unit_id INTEGER REFERENCES osp_unit ON DELETE CASCADE ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS user_session CASCADE;
|
||||
CREATE TABLE user_session (
|
||||
"sid" varchar NOT NULL COLLATE "default",
|
||||
"sess" json NOT NULL,
|
||||
"expire" timestamp(6) NOT NULL
|
||||
)
|
||||
WITH (OIDS=FALSE);
|
||||
|
||||
ALTER TABLE user_session ADD CONSTRAINT "session_pkey" PRIMARY KEY ("sid") NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
|
||||
CREATE INDEX "IDX_session_expire" ON user_session ("expire");
|
||||
|
Loading…
Reference in New Issue
Block a user