I Want To Heal 2 build v1.0.2

This commit is contained in:
Warren H
2026-06-24 11:51:44 -04:00
parent de0a892484
commit 8abb44ea02
15 changed files with 897 additions and 36 deletions
+22
View File
@@ -12,12 +12,32 @@ try {
id uuid primary key default gen_random_uuid(),
auth_issuer text not null,
auth_subject text not null,
username text,
password_hash text,
password_salt text,
display_name text not null default 'Healer',
created_at timestamptz not null default now(),
updated_at timestamptz not null default now(),
unique (auth_issuer, auth_subject)
);
alter table app_users add column if not exists username text;
alter table app_users add column if not exists password_hash text;
alter table app_users add column if not exists password_salt text;
create unique index if not exists app_users_username_lower_idx
on app_users (lower(username))
where username is not null;
create table if not exists sessions (
id uuid primary key default gen_random_uuid(),
user_id uuid not null references app_users(id) on delete cascade,
token_hash text not null unique,
expires_at timestamptz not null,
created_ip text not null,
created_at timestamptz not null default now()
);
create table if not exists save_slots (
id uuid primary key default gen_random_uuid(),
user_id uuid not null references app_users(id) on delete cascade,
@@ -64,6 +84,8 @@ try {
);
create index if not exists save_slots_user_id_idx on save_slots(user_id);
create index if not exists sessions_token_hash_idx on sessions(token_hash);
create index if not exists sessions_expires_at_idx on sessions(expires_at);
create index if not exists pvp_queue_mode_status_idx on pvp_queue(mode, status, queued_at);
create index if not exists pvp_matches_player_one_idx on pvp_matches(player_one_id);
create index if not exists pvp_matches_player_two_idx on pvp_matches(player_two_id);