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/0030_orange_legion.sql

8 lines
1.1 KiB

ALTER TABLE "artista" ADD COLUMN "nombre_visual" text DEFAULT 'texto' NOT NULL;--> statement-breakpoint
ALTER TABLE "artista" ADD COLUMN "logotipo_id" text;--> statement-breakpoint
ALTER TABLE "artista" ADD COLUMN "logotipo_claro_id" text;--> statement-breakpoint
ALTER TABLE "artista" ADD COLUMN "logotipo_oscuro_id" text;--> statement-breakpoint
ALTER TABLE "artista" ADD CONSTRAINT "artista_logotipo_id_medio_id_fk" FOREIGN KEY ("logotipo_id") REFERENCES "public"."medio"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "artista" ADD CONSTRAINT "artista_logotipo_claro_id_medio_id_fk" FOREIGN KEY ("logotipo_claro_id") REFERENCES "public"."medio"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "artista" ADD CONSTRAINT "artista_logotipo_oscuro_id_medio_id_fk" FOREIGN KEY ("logotipo_oscuro_id") REFERENCES "public"."medio"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "artista" ADD CONSTRAINT "artista_nombre_visual_conocido" CHECK ("artista"."nombre_visual" in ('texto', 'logotipo'));

Powered by TurnKey Linux.