refreshtoken.sql 616 B

123456789101112
  1. CREATE TABLE IF NOT EXISTS vote.refreshtoken
  2. (
  3. id integer NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
  4. numero_participant integer NOT NULL,
  5. token character varying(4000) NOT NULL COLLATE pg_catalog."default",
  6. expiry_date timestamp without time zone NOT NULL,
  7. CONSTRAINT fk_numeroParticipantRefreshtoken FOREIGN KEY(numero_participant) REFERENCES vote.participants(numero_participant)
  8. )
  9. TABLESPACE vote;
  10. ALTER TABLE IF EXISTS vote.refreshtoken OWNER to vote;
  11. CREATE INDEX IF NOT EXISTS ix_numeroParticipantRefreshtoken ON vote.refreshtoken USING btree (numero_participant) TABLESPACE vote;