Adds the three proposal fields (proposed_target_date, proposed_by,
proposed_at) to the cards collection with a partial index that backs
the 'pending proposals' query, plus two new ActivityAction values
(date_proposed, date_proposal_resolved) and column_changed for
return-to-scheduled.
New server actions under src/app/actions/:
- client-proposal.ts: client-manager drag creates a proposal (not
a target_date write); 404 (not 403) on cross-tenant failures and
Done-column cards, matching the rest of /api/client/*.
- owner-plan.ts: accept and dismiss clear the three proposal
fields together and emit the audit rows; returnToScheduledAction
moves a Done card back to the first working column.
Server-side Done-column guards added to:
- src/app/actions/reschedule.ts (was UI-only)
- src/app/api/client/cards/[id]/route.ts (was UI-only)
Both pass through the new writeCardWithAudit helper at
src/lib/cards/write-with-audit.ts — single source of truth for
'patch card + emit activity rows', replacing the inline copies in
the PATCH route and rescheduleCardAction.
Adds src/lib/roadmap/slot-date.ts (slot <-> target_date mapping)
consumed by Pixel's puzzle UI; named SlotId API rather than the
plan's numeric indices for self-documenting callers.
CLIENT_EDITABLE_CARD_FIELDS stays at priority + target_date per
the brief; proposals go through the dedicated action so they get
their own audit row type.
|
||
|---|---|---|
| .. | ||
| 1789600100_created_clients.js | ||
| 1789600200_created_projects.js | ||
| 1789600300_extended_users.js | ||
| 1789600400_created_columns.js | ||
| 1789600500_created_cards.js | ||
| 1789600600_created_subtasks_comments.js | ||
| 1789600700_created_activity.js | ||
| 1789600800_created_settings.js | ||
| 1789600900_applied_api_rules.js | ||
| 1789601000_locked_user_rules.js | ||
| 1789601100_added_user_active.js | ||
| 1789601200_added_card_proposals.js | ||
| README.md | ||
These migrations never run
PocketBase applies files in pb_migrations/ when its own server starts.
This project does not start a PocketBase server — it uses one hosted instance
on Coolify, and the schema is applied to it over the admin API by
scripts/setup-remote.ts.
So every file in this directory is reference only. Editing one changes nothing, anywhere.
To change the schema, edit scripts/setup-remote.ts and run
npm run setup-remote.
These files are kept because they are the most readable statement of the
schema and its reasoning, and because they are what you would mount into the
container if this project ever moves to PocketBase's native migration flow. If
you update setup-remote.ts, update these too — but understand that doing so
is documentation, not deployment.