You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
679 B
13 lines
679 B
CREATE TABLE "identidad" (
|
|
"id" text PRIMARY KEY NOT NULL,
|
|
"proveedor" text NOT NULL,
|
|
"sujeto" text NOT NULL,
|
|
"usuario_id" text NOT NULL,
|
|
"email" text,
|
|
"creada_en" timestamp with time zone NOT NULL,
|
|
"ultimo_acceso_en" timestamp with time zone
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "identidad" ADD CONSTRAINT "identidad_usuario_id_usuario_id_fk" FOREIGN KEY ("usuario_id") REFERENCES "public"."usuario"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
CREATE UNIQUE INDEX "identidad_proveedor_sujeto" ON "identidad" USING btree ("proveedor","sujeto");--> statement-breakpoint
|
|
CREATE INDEX "identidad_usuario" ON "identidad" USING btree ("usuario_id"); |