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.
16 lines
521 B
16 lines
521 B
DROP VIEW "cancion_principal";
|
|
--> statement-breakpoint
|
|
ALTER TABLE "cancion" DROP CONSTRAINT "cancion_muestra_id_medio_id_fk";
|
|
--> statement-breakpoint
|
|
ALTER TABLE "cancion" DROP COLUMN "muestra_id";
|
|
--> statement-breakpoint
|
|
CREATE VIEW "cancion_principal" AS
|
|
SELECT * FROM "cancion" WHERE "version_de_id" IS NULL;
|
|
--> statement-breakpoint
|
|
DELETE FROM "medio" AS m
|
|
WHERE m."clase" = 'muestra'
|
|
AND m."clave" LIKE 'muestras/%'
|
|
AND NOT EXISTS (
|
|
SELECT 1 FROM "instrumento" AS i WHERE i."muestra_id" = m."id"
|
|
);
|