Files
zpan/migrations/0064_download-task-events-soft-delete.sql
T
saltbo e55ee53496 refactor(stats): unify audit and fact pipelines
Centralize request audit recording, preserve immutable download-task history, and derive hourly statistics and backfills from the same authoritative sources. Add durable user registration facts so admin deletion no longer destroys signup history.
2026-07-21 23:02:52 -04:00

3 lines
284 B
SQL

ALTER TABLE `download_tasks` ADD `events` text DEFAULT '[]' NOT NULL;--> statement-breakpoint
ALTER TABLE `download_tasks` ADD `deleted_at` integer;--> statement-breakpoint
CREATE INDEX `download_tasks_org_deleted_created_idx` ON `download_tasks` (`org_id`,`deleted_at`,`created_at`);