Merge branch 'master' of git@gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot.git
This commit is contained in:
commit
171ccf6350
|
@ -447,20 +447,46 @@ ALTER TABLE ONLY "DatasetService"
|
||||||
ADD CONSTRAINT "DatasetServiceServiceReference" FOREIGN KEY ("Service") REFERENCES "Service"("ID");
|
ADD CONSTRAINT "DatasetServiceServiceReference" FOREIGN KEY ("Service") REFERENCES "Service"("ID");
|
||||||
|
|
||||||
|
|
||||||
|
DROP table if exists "UserInfo";
|
||||||
|
|
||||||
CREATE TABLE "UserInfo" (
|
CREATE TABLE "UserInfo" (
|
||||||
"autoid" uuid DEFAULT uuid_generate_v4() NOT NULL,
|
"autoid" uuid DEFAULT uuid_generate_v4() NOT NULL,
|
||||||
"id" character varying(500),
|
"identification" character varying(500) NOT NULL,
|
||||||
"email" character varying(250),
|
"email" character varying(250) NOT NULL,
|
||||||
"emailIsVerified" boolean,
|
"authorization_level" smallint NOT NULL,
|
||||||
|
"usertype" smallint NOT NULL,
|
||||||
|
"authentication" uuid,
|
||||||
|
"verified_email" boolean,
|
||||||
"name" character varying(250),
|
"name" character varying(250),
|
||||||
"pictureUrl" character varying(500),
|
"created" timestamp,
|
||||||
"locale" character varying(50),
|
"lastloggedin" timestamp,
|
||||||
"familyName" character varying(250),
|
|
||||||
"givenName" character varying(250),
|
|
||||||
"additionalinfo" xml,
|
"additionalinfo" xml,
|
||||||
PRIMARY KEY (id, email)
|
PRIMARY KEY (identification, email)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
COMMENT ON COLUMN "UserInfo"."authorization_level" IS 'This stores the authorization level of the user: 0 admin, 1 user, being able to be extended furthermore';
|
||||||
|
COMMENT ON COLUMN "UserInfo"."usertype" IS 'This stores the type of user: 0 -> internal, 1 external';
|
||||||
|
|
||||||
|
|
||||||
|
DROP table if exists "UserAuth";
|
||||||
|
|
||||||
|
CREATE TABLE "UserAuth" (
|
||||||
|
"id" uuid DEFAULT uuid_generate_v4() NOT NULL UNIQUE,
|
||||||
|
"username" character varying(200) NOT NULL,
|
||||||
|
"password" character varying(250) NOT NULL,
|
||||||
|
PRIMARY KEY (username)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE INDEX idx_userauth_username ON "UserAuth"(username);
|
||||||
|
|
||||||
|
ALTER TABLE "UserInfo" ADD CONSTRAINT fkey_userinfo_userauth FOREIGN KEY ("authentication") REFERENCES "UserAuth"(id);
|
||||||
|
|
||||||
|
COMMENT ON COLUMN "UserAuth"."password" IS 'This field stores a password hash';
|
||||||
|
|
||||||
|
ALTER TABLE "UserInfo" OWNER TO dmptool;
|
||||||
|
ALTER TABLE "UserAuth" OWNER TO dmptool;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
REVOKE ALL ON SCHEMA public FROM PUBLIC;
|
REVOKE ALL ON SCHEMA public FROM PUBLIC;
|
||||||
REVOKE ALL ON SCHEMA public FROM postgres;
|
REVOKE ALL ON SCHEMA public FROM postgres;
|
||||||
|
|
Loading…
Reference in New Issue