mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-16 06:39:01 +02:00
Bundles the MUL-3404 disk-usage feature with the two Preflight BLOCK fixes. - feat(daemon): `disk-usage --all-profiles` aggregates across every workspace root (default + each ~/.multica/profiles/* root, incl. the Desktop app's), with a per-root breakdown and combined grand total; the cross-root hint now also fires when the current root is non-empty. - fix(db): drop DB-level foreign keys/cascades from the new autopilot_subscriber and comment.source_task_id migrations (resolved in the app layer — autopilot delete now removes subscribers in a transaction); the autopilot_subscriber down-migration relabels reason='autopilot' to 'manual' instead of deleting. - fix(server): readiness verifies every required migration is applied, not just the lexically-last one, so an out-of-order migration can't be masked. MUL-3404.
15 lines
854 B
SQL
15 lines
854 B
SQL
-- Rows still carrying reason='autopilot' would violate the restored CHECK
|
|
-- constraint. Relabel them to 'manual' (a value the restored CHECK still
|
|
-- allows) instead of deleting them, so rolling back narrows the reason taxonomy
|
|
-- without silently dropping who is subscribed. The reason column is not part of
|
|
-- issue_subscriber's PK (issue_id, user_type, user_id), so this UPDATE can never
|
|
-- collide with an existing row for the same subscriber.
|
|
UPDATE issue_subscriber SET reason = 'manual' WHERE reason = 'autopilot';
|
|
|
|
ALTER TABLE issue_subscriber DROP CONSTRAINT issue_subscriber_reason_check;
|
|
ALTER TABLE issue_subscriber ADD CONSTRAINT issue_subscriber_reason_check
|
|
CHECK (reason IN ('creator', 'assignee', 'commenter', 'mentioned', 'manual'));
|
|
|
|
DROP INDEX IF EXISTS idx_autopilot_subscriber_user;
|
|
DROP TABLE IF EXISTS autopilot_subscriber;
|