ALTER TABLE "media" ADD COLUMN "path" text NOT NULL;--> statement-breakpoint
ALTER TABLE "media" ADD COLUMN "variant_error" text;--> statement-breakpoint
ALTER TABLE "media" ADD COLUMN "uploaded_by" text;--> statement-breakpoint
ALTER TABLE "media" ADD CONSTRAINT "media_uploaded_by_user_id_fk" FOREIGN KEY ("uploaded_by") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "media_project_created" ON "media" USING btree ("project_id","created_at");