Files
phylum/server/internal/db/migrations/data/002_users.sql
2024-09-17 11:42:14 +05:30

14 lines
452 B
SQL

CREATE TABLE users(
username TEXT PRIMARY KEY,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
modified TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
display_name TEXT NOT NULL,
password_hash TEXT NOT NULL,
deleted TIMESTAMP,
root uuid NOT NULL REFERENCES resources(id),
home uuid NOT NULL REFERENCES resources(id)
);
---- create above / drop below ----
DROP TABLE users;