
CREATE TABLE tcg.public.TCG_User_Relationship (
	  relationship_id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY
    , follower_user_id INT NOT NULL
    , CONSTRAINT FK_TCG_MTG_Game_Session_Member_follower_user_id
        FOREIGN KEY (follower_user_id)
        REFERENCES tcg.public.TCG_User(user_id)
	, following_user_id INT NOT NULL
    , CONSTRAINT FK_TCG_MTG_Game_Session_Member_following_user_id
        FOREIGN KEY (following_user_id)
        REFERENCES tcg.public.TCG_User(user_id)
    , is_following BOOLEAN NOT NULL DEFAULT TRUE
    , is_blocked BOOLEAN NOT NULL DEFAULT FALSE
    , active BOOLEAN NOT NULL DEFAULT TRUE
	, created_on TIMESTAMP NOT NULL
	, created_by_user_id INT NOT NULL
    , CONSTRAINT FK_TCG_MTG_Game_Session_Member_created_by_user_id
        FOREIGN KEY (created_by_user_id)
        REFERENCES tcg.public.TCG_User(user_id)
	, updated_last_on TIMESTAMP NOT NULL
	, updated_last_by_user_id INT NOT NULL
    , CONSTRAINT FK_TCG_MTG_Game_Session_Member_updated_last_by_user_id
        FOREIGN KEY (updated_last_by_user_id)
        REFERENCES tcg.public.TCG_User(user_id)
    , change_set_id INT NOT NULL
    , CONSTRAINT FK_TCG_MTG_Game_Session_Member_change_set_id
		FOREIGN KEY (change_set_id)
        REFERENCES tcg.public.TCG_Change_Set(change_set_id)
);
