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.
20 lines
1.0 KiB
20 lines
1.0 KiB
ALTER TABLE "plan_suscripcion" DROP CONSTRAINT "plan_suscripcion_capacidades_segun_ambito";--> statement-breakpoint
|
|
ALTER TABLE "plan_suscripcion" ADD COLUMN "acceso_jukebox" boolean DEFAULT false NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "plan_suscripcion" ADD CONSTRAINT "plan_suscripcion_capacidades_segun_ambito" CHECK ((
|
|
"plan_suscripcion"."ambito" = 'musica'
|
|
and "plan_suscripcion"."calidad_escucha" is not null
|
|
and not "plan_suscripcion"."acceso_contenido_taller"
|
|
and not "plan_suscripcion"."descarga_material_taller"
|
|
) or (
|
|
"plan_suscripcion"."ambito" = 'taller_letras'
|
|
and "plan_suscripcion"."calidad_escucha" is null
|
|
and not "plan_suscripcion"."incluye_publicidad"
|
|
and "plan_suscripcion"."descargas_incluidas" = 0
|
|
and "plan_suscripcion"."calidad_descarga" is null
|
|
and not "plan_suscripcion"."acceso_versiones"
|
|
and not "plan_suscripcion"."acceso_jukebox"
|
|
));--> statement-breakpoint
|
|
UPDATE "plan_suscripcion"
|
|
SET "acceso_jukebox" = true, "actualizado_en" = CURRENT_TIMESTAMP
|
|
WHERE "codigo" IN ('friend', 'vip');
|