1
0
Files
nir/migrations/20240423082838_user_table.sql
2025-04-03 03:27:45 +03:00

9 lines
296 B
SQL

CREATE TABLE IF NOT EXISTS "user" (
"id" SERIAL PRIMARY KEY,
"avatar" VARCHAR,
"username" VARCHAR UNIQUE NOT NULL,
"password_hash" VARCHAR NOT NULL,
"last_seen" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
"created_at" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
);