PSF-BotServer/server/src/main/resources/db/migration/V005__Acquaintances.sql
Fate-JH 190a897dd5
Enemies (No Friends) (#1008)
* database, transfer objects and storage objects for lists of good friends, and of friends that you want to ignore

* friends and ignored players get added to lists, to the database, load in appropriate states, and update at basic appropriate times

* ignoring players and being ignored by players cuases loss of communication avenues, especially tells, and visibility

* modified the [friend list, ignored player list] x avatar query for better performance as the sizes of the results increases using joins and using targeted column selection

* obligatory fixes to tests that come with every update
2022-09-20 13:05:05 -04:00

11 lines
354 B
SQL

CREATE TABLE IF NOT EXISTS "friend" (
"id" SERIAL PRIMARY KEY NOT NULL,
"avatar_id" INT NOT NULL REFERENCES avatar (id),
"char_id" INT NOT NULL REFERENCES avatar (id)
);
CREATE TABLE IF NOT EXISTS "ignored" (
"id" SERIAL PRIMARY KEY NOT NULL,
"avatar_id" INT NOT NULL REFERENCES avatar (id),
"char_id" INT NOT NULL REFERENCES avatar (id)
);