Ver Fonte

dev en cours

rajah há 8 meses atrás
pai
commit
55fcff6cfb
2 ficheiros alterados com 13 adições e 5 exclusões
  1. 1 5
      postgresql/base.sql
  2. 12 0
      postgresql/tables/refreshtoken.sql

+ 1 - 5
postgresql/base.sql

@@ -35,14 +35,10 @@ CREATE SCHEMA IF NOT EXISTS vote AUTHORIZATION vote;
 \ir ./tables/roles.sql
 \ir ./tables/participants.sql
 \ir ./tables/participants_roles.sql
+\ir ./tables/refreshtoken.sql
 \ir ./tables/messages.sql
 \ir ./tables/preferences.sql
 \ir ./tables/categories.sql
 \ir ./tables/productions.sql
 \ir ./tables/presentations.sql
 \ir ./tables/bulletins.sql
-
-\ir ./contenu/variables.sql
-\ir ./contenu/evenements.sql
-\ir ./contenu/roles.sql
-\ir ./contenu/privileges.sql

+ 12 - 0
postgresql/tables/refreshtoken.sql

@@ -0,0 +1,12 @@
+CREATE TABLE IF NOT EXISTS vote.refreshtoken
+(
+    id integer NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
+    numero_participant integer NOT NULL,
+    token character varying(4000) NOT NULL COLLATE pg_catalog."default",
+    expiry_date timestamp without time zone NOT NULL,
+    CONSTRAINT fk_numeroParticipantRefreshtoken FOREIGN KEY(numero_participant) REFERENCES vote.participants(numero_participant)
+)
+TABLESPACE vote;
+ALTER TABLE IF EXISTS vote.refreshtoken OWNER to vote;
+
+CREATE INDEX IF NOT EXISTS ix_numeroParticipantRefreshtoken ON vote.refreshtoken USING btree (numero_participant) TABLESPACE vote;