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.
senzapaura_es/drizzle/0040_me_gusta.sql

10 lines
461 B

-- Likes independientes de las antiguas puntuaciones. Un like por cuenta y canción.
CREATE TABLE "me_gusta" (
"usuario_id" text NOT NULL REFERENCES "usuario"("id") ON DELETE CASCADE,
"cancion_id" text NOT NULL REFERENCES "cancion"("id") ON DELETE CASCADE,
"creado_en" timestamp with time zone DEFAULT now() NOT NULL,
PRIMARY KEY ("usuario_id", "cancion_id")
);
--> statement-breakpoint
CREATE INDEX "idx_me_gusta_cancion" ON "me_gusta" ("cancion_id");

Powered by TurnKey Linux.