ALTER TABLE "business_segments" ALTER COLUMN "category_id" DROP NOT NULL;--> statement-breakpoint
ALTER TABLE "business_segments" ADD COLUMN "source" text DEFAULT 'manual' NOT NULL;--> statement-breakpoint
ALTER TABLE "business_segments" ADD COLUMN "form_origin" text;--> statement-breakpoint
ALTER TABLE "business_segments" ADD COLUMN "created_by_id" integer;--> statement-breakpoint
ALTER TABLE "business_segments" ADD COLUMN "usage_count" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
ALTER TABLE "event_participants" ADD COLUMN "cpf" text;--> statement-breakpoint
ALTER TABLE "business_segments" ADD CONSTRAINT "business_segments_created_by_id_users_id_fk" FOREIGN KEY ("created_by_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;