Create users table

This commit is contained in:
2026-06-26 18:05:56 -04:00
parent fb3afaf31c
commit 773d8dffd1
3 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
DROP INDEX users_username_idx;
DROP TABLE users;

View File

@@ -0,0 +1,8 @@
CREATE TABLE users (
id INTEGER PRIMARY KEY UNIQUE NOT NULL GENERATED ALWAYS AS IDENTITY,
username VARCHAR UNIQUE NOT NULL,
hashed_password VARCHAR NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE UNIQUE INDEX users_username_idx ON users(username);

View File

@@ -1 +1,10 @@
// @generated automatically by Diesel CLI.
diesel::table! {
users (id) {
id -> Int4,
username -> Varchar,
hashed_password -> Varchar,
created_at -> Timestamptz,
}
}