- removed: api-service
- removed: session-service - updated: moved health check out of consul registration - updated: get service info to pull the service from the default namespace for the service account - updated: the rest of the services to be able to handle the new database tables
This commit is contained in:
@@ -1,35 +1,3 @@
|
||||
create table users
|
||||
(
|
||||
id serial
|
||||
primary key,
|
||||
username varchar(50) not null
|
||||
unique,
|
||||
email varchar(100) not null
|
||||
unique,
|
||||
hashed_password text not null,
|
||||
roles text[],
|
||||
created_at timestamp default CURRENT_TIMESTAMP not null,
|
||||
updated_at timestamp default CURRENT_TIMESTAMP not null
|
||||
);
|
||||
|
||||
alter table users
|
||||
owner to osirose;
|
||||
|
||||
create table refresh_tokens
|
||||
(
|
||||
id serial
|
||||
primary key,
|
||||
user_id integer not null
|
||||
references users
|
||||
on delete cascade,
|
||||
token text not null,
|
||||
created_at timestamp default CURRENT_TIMESTAMP,
|
||||
expires_at timestamp not null
|
||||
);
|
||||
|
||||
alter table refresh_tokens
|
||||
owner to osirose;
|
||||
|
||||
create table characters
|
||||
(
|
||||
id serial
|
||||
@@ -52,57 +20,3 @@ create table characters
|
||||
|
||||
alter table characters
|
||||
owner to osirose;
|
||||
|
||||
create table items
|
||||
(
|
||||
id serial
|
||||
primary key,
|
||||
name varchar(50) not null,
|
||||
description text,
|
||||
rarity varchar(20),
|
||||
stats jsonb default '{}'::jsonb
|
||||
);
|
||||
|
||||
alter table items
|
||||
owner to osirose;
|
||||
|
||||
create table character_items
|
||||
(
|
||||
id serial
|
||||
primary key,
|
||||
character_id integer not null
|
||||
references characters
|
||||
on delete cascade,
|
||||
item_id integer not null
|
||||
references items
|
||||
on delete cascade,
|
||||
quantity integer default 1
|
||||
);
|
||||
|
||||
alter table character_items
|
||||
owner to osirose;
|
||||
|
||||
create table events
|
||||
(
|
||||
id serial
|
||||
primary key,
|
||||
event_type varchar(50) not null,
|
||||
event_data jsonb not null,
|
||||
created_at timestamp default CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
alter table events
|
||||
owner to osirose;
|
||||
|
||||
create table password_resets
|
||||
(
|
||||
id serial
|
||||
primary key,
|
||||
email text not null,
|
||||
reset_token text not null,
|
||||
expires_at timestamp not null
|
||||
);
|
||||
|
||||
alter table password_resets
|
||||
owner to osirose;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user