(feat) Server is now running

Added DB schemas that are needed for the basics.

Signed-off-by: Louis Hollingworth <louis@hollingworth.nl>
This commit is contained in:
Louis Hollingworth 2023-10-17 18:20:02 +01:00
parent b330bea46d
commit cf80d4b70d
Signed by: lucxjo
GPG key ID: A11415CB3DC7809B
11 changed files with 111 additions and 24 deletions

View file

@ -6,11 +6,12 @@
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE users (
id SERIAL PRIMARY KEY,
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
username VARCHAR NOT NULL,
epost VARCHAR NOT NULL,
pass VARCHAR NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW()
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
main_fedi TEXT
);
SELECT diesel_manage_updated_at('users');