Role Set Template Migration Dry-Run Plan
Purpose
This page defines how a future local-only dry run could be scoped, checked, verified, stopped, and rolled back before any SQL is actually run.
This is planning only. It adds no dry-run script, command, runtime query, migration control, table creation, write path, or CRUD surface.
Why Dry-Run Planning Comes Before Dry-Run Execution
Renata needs a dry-run procedure that protects production data, preview data, packet-history data, identities, submissions, and staff decisions before anyone creates a harness or runs a local migration draft.
Dry-Run Status
Status
planning-only
planning-onlyActive
false
inactiveExecutable
false
not-executableSQL Executed
false
not-executedTable Creation
false
disabledDry-Run Scope
Draft artifact under review: docs/architecture/migration-drafts/role-set-template-config-draft.sql.md
Pre-Dry-Run Checklist
- draft artifact remains outside active migrations folder
- active migrations folder unchanged
- draft file reviewed for prohibited table names
- draft file reviewed for prohibited sensitive fields
- rollback strategy written
- disposable local database target identified
- production database explicitly excluded
- preview database explicitly excluded
- no app runtime imports the draft
- no package script executes the draft
- no wrangler execution script exists
- tests check prohibited names and fields
- staff/privacy review still required before activation
Local-Only Target Requirements
Draft Artifact Review
The future dry-run harness may only consider the local-only draft artifact after prohibited table names, sensitive fields, runtime imports, package scripts, wrangler execution wrappers, and target database boundaries are reviewed.
No command is documented here as already executed. No SQL execution output is produced in this phase.
Expected Dry-Run Verification Outputs
- local-only execution log
- created table list
- schema introspection result
- prohibited table scan result
- prohibited field scan result
- rollback dry-run result
- test summary
- final decision: keep draft, revise draft, or reject draft
These are expected future outputs only. Phase 7.9 does not generate them.
Failure Modes And Stop Conditions
| Failure modes | Stop conditions |
|---|---|
| draft appears in active migrations folder; draft contains prohibited table name; draft contains prohibited sensitive field; SQL targets production or preview D1; SQL contains user/account/submission/staff-decision tables; SQL contains attendance/participation/analytics/scoring/ranking/compliance fields; rollback path missing; tests fail; app runtime imports draft migration; write endpoint appears | any prohibited table appears; any identity field appears; any submission/staff-decision field appears; any tracking/scoring field appears; active migrations folder changes unexpectedly; any production/preview D1 command appears; any runtime endpoint writes to D1 |
Rollback Dry-Run Requirements
- all future role-set template tables can be dropped in local-only target
- rollback does not affect packet-history tables
- rollback does not reference users, identities, submissions, or staff decisions
- rollback remains local-only
- rollback output is reviewed before any activation phase
- no actual rollback script is added in this phase
Safety Checks
Dry-run status is planning-only
No SQL is executed and no local target is touched.
ready-for-reviewHelper says active false
dryRunPlanStatus.active is false.
ready-for-reviewHelper says executable false
dryRunPlanStatus.executable is false.
ready-for-reviewHelper says SQL executed false
dryRunPlanStatus.sqlExecuted is false.
ready-for-reviewTable creation disabled
dryRunPlanStatus.tableCreationEnabled is false.
ready-for-reviewNo production or preview D1 target
Production and preview D1 targets are explicitly excluded.
ready-for-reviewNo package script executes the draft
No npm script is added for running the draft artifact.
ready-for-reviewNo wrangler execution script exists
No wrangler execution wrapper is added.
ready-for-reviewNo runtime query path
No app runtime imports the draft or dry-run plan to query D1.
ready-for-reviewNo write endpoints
No D1 write endpoint is added.
ready-for-reviewNo tracking, analytics, or scoring
Attendance, participation, analytics, scoring, ranking, and compliance remain excluded.
ready-for-reviewActivation remains blocked
Activation requires a separate future phase and approvals.
blockedWhat Remains Blocked
No SQL execution, migration execution, executable dry-run script, active migration, table creation, runtime query, data-write path, write endpoint, CRUD UI, role-set storage, user assignment, identity storage, submissions, staff decisions, tracking, analytics, or scoring are active.
Recommended Next Phase
Phase 7.12 - Role Set Template Migration Activation Review, Planning Only
Boundaries: future phase only; no production activation yet; no preview D1 targeting yet; no active migration until explicit approval; no write endpoints; no CRUD UI; no user assignment; no submissions.
future-only