5JDEJ6A4R5CHYKOT5UXOFZBQ7C7HRMGT6H5JYIXUBRQSNTAP6DAQC
-- Create table to store preferences of playmates
-- Not attached to games, universal table
CREATE TABLE IF NOT EXISTS auth.teamship (
player_name CITEXT REFERENCES auth.users(player_name),
other_player_name CITEXT REFERENCES auth.users(player_name),
relationship BOOLEAN NOT NULL,
CONSTRAINT pk_teamship PRIMARY KEY (player_name, other_player_name),
CONSTRAINT chk_teamship CHECK (player_name <> other_player_name)
);