based update
Some checks failed
ci/woodpecker/push/deploy Pipeline failed

This commit is contained in:
JMARyA 2024-12-27 04:04:54 +01:00
parent 7eb2b7d00d
commit 6051aaa985
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
3 changed files with 21 additions and 8 deletions

View file

@ -0,0 +1,13 @@
CREATE TYPE session_kind AS ENUM ('api', 'user');
ALTER TABLE user_session
ADD COLUMN IF NOT EXISTS "created" timestamptz NOT NULL DEFAULT NOW(),
ADD COLUMN IF NOT EXISTS "csrf" UUID NOT NULL DEFAULT gen_random_uuid(),
ADD COLUMN IF NOT EXISTS "name" VARCHAR(255),
ADD COLUMN IF NOT EXISTS kind session_kind NOT NULL DEFAULT 'user';
CREATE TABLE IF NOT EXISTS user_profile_pic (
username VARCHAR(255) NOT NULL PRIMARY KEY,
"image" bytea NOT NULL,
FOREIGN KEY (username) REFERENCES users(username)
);