     created BIGINT DEFAULT now_as_millis(),
     UNIQUE (zinvite)
 );
+CREATE INDEX zinvites_zid_idx ON zinvites USING btree (zid);
 
 -- TODO flush regularly
 CREATE TABLE password_reset_tokens (

    created BIGINT DEFAULT now_as_millis(),
    UNIQUE (owner, xid)
);

-- Single Use Invites
-- These records should contain enough to populate a record in the xids table (in conjunction with creating a user, which provides a uid)

    UNIQUE(zid, txt),    --issued this: ALTER TABLE comments ADD CONSTRAINT comments_txt_unique_constraint UNIQUE (zid, txt);
    FOREIGN KEY (zid, pid) REFERENCES participants (zid, pid)
);
CREATE INDEX comments_zid_idx ON comments USING btree (zid);


CREATE OR REPLACE FUNCTION tid_auto()
    RETURNS trigger AS $$
