Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion default.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ iss_realm = "meventure"
access_key = "minioadmin"
storage_url = "http://localhost:9000"
secret_key = "minioadmin"
bucket_name = "meventure"
bucket_name = "mv-rooms"

[kafka_config]
bootstrap_host = "localhost"
Expand Down
7 changes: 5 additions & 2 deletions migrations/20251026141354_create_initial_tables.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ create table app_user
friends_count bigint not null,
last_modified_at timestamp(6) with time zone,
profile_picture varchar(255),
raw_name varchar(255)
street_credits bigint not null,
raw_name varchar(255),
role varchar(255) not null
);

alter table app_user
Expand Down Expand Up @@ -73,4 +75,5 @@ create index idx_participants_user_room_id
on chat_room_participant (user_id, room_id);

create index idx_participants_room_id_membership
on chat_room_participant (room_id, participant_state);
on chat_room_participant (room_id, participant_state);

1 change: 1 addition & 0 deletions migrations/20251206120035_create_user_relation.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS user_relationship;
25 changes: 25 additions & 0 deletions migrations/20251206120035_create_user_relation.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
create table user_relationship
(
user_a_id uuid not null
constraint fkph3o17werngwyisq1y6vlf25r
references app_user,
user_b_id uuid not null
constraint fkpk2xkm3f30twy5prqu8pp4wkj
references app_user,
state varchar(255) not null
constraint user_relationship_state_check
check ((state)::text = ANY
((ARRAY ['A_BLOCKED'::character varying, 'B_BLOCKED'::character varying, 'ALL_BLOCKED'::character varying, 'FRIEND'::character varying, 'A_INVITED'::character varying, 'B_INVITED'::character varying])::text[])),
relationship_change_timestamp timestamp with time zone default now() not null,
primary key (user_a_id, user_b_id),
constraint uk_user_relationship_users
unique (user_a_id, user_b_id),
constraint ck_user_relationship_ids_not_equal
check (user_a_id <> user_b_id)
);

create index idx_user_relationship_users
on user_relationship (user_a_id, user_b_id);

create index idx_user_relationship_state
on user_relationship (state);
Loading