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
706 B
13 lines
706 B
|
3 weeks ago
|
CREATE TABLE "artista_seguido" (
|
||
|
|
"usuario_id" text NOT NULL,
|
||
|
|
"artista_id" text NOT NULL,
|
||
|
|
"seguido_en" timestamp with time zone DEFAULT now() NOT NULL,
|
||
|
|
CONSTRAINT "artista_seguido_usuario_id_artista_id_pk" PRIMARY KEY("usuario_id", "artista_id"),
|
||
|
|
CONSTRAINT "artista_seguido_usuario_fk" FOREIGN KEY ("usuario_id") REFERENCES "usuario"("id") ON DELETE cascade,
|
||
|
|
CONSTRAINT "artista_seguido_artista_fk" FOREIGN KEY ("artista_id") REFERENCES "artista"("id") ON DELETE cascade
|
||
|
|
);
|
||
|
|
--> statement-breakpoint
|
||
|
|
CREATE INDEX "artista_seguido_usuario" ON "artista_seguido" USING btree ("usuario_id");
|
||
|
|
--> statement-breakpoint
|
||
|
|
CREATE INDEX "artista_seguido_artista" ON "artista_seguido" USING btree ("artista_id");
|