CREATE TABLE user_logins (
    login_type text NOT NULL,
    login_id text NOT NULL,
    device_id text NOT NULL,
    user_id uuid NOT NULL,

    PRIMARY KEY(login_type, login_id, device_id),
    FOREIGN KEY(user_id) REFERENCES "user"(id)
);
