Renata protected migration planning

Role Set Template Migration Dry-Run Plan

Protected, read-only plan for a future local-only dry run of the role-set template migration draft.

This is a protected, read-only dry-run plan. It does not run SQL, create tables, execute migrations, write data, enable CRUD, or activate role-set storage.

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-only

Active

false

inactive

Executable

false

not-executable

SQL Executed

false

not-executed

Table Creation

false

disabled

Dry-Run Scope

local-onlyconfig-onlyrole-set template tables onlydisposable database target onlyno production D1no preview D1no runtime app dependencyno user/account/submission/staff-decision tablesno write endpointsno CRUD UIno live role assignmentno identity linkage

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

disposablelocal-onlyresettablenot productionnot previewnot connected to packet history production datanot connected to Cloudflare Access identitynot connected to users, submissions, or staff review data

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-review

Helper says active false

dryRunPlanStatus.active is false.

ready-for-review

Helper says executable false

dryRunPlanStatus.executable is false.

ready-for-review

Helper says SQL executed false

dryRunPlanStatus.sqlExecuted is false.

ready-for-review

Table creation disabled

dryRunPlanStatus.tableCreationEnabled is false.

ready-for-review

No production or preview D1 target

Production and preview D1 targets are explicitly excluded.

ready-for-review

No package script executes the draft

No npm script is added for running the draft artifact.

ready-for-review

No wrangler execution script exists

No wrangler execution wrapper is added.

ready-for-review

No runtime query path

No app runtime imports the draft or dry-run plan to query D1.

ready-for-review

No write endpoints

No D1 write endpoint is added.

ready-for-review

No tracking, analytics, or scoring

Attendance, participation, analytics, scoring, ranking, and compliance remain excluded.

ready-for-review

Activation remains blocked

Activation requires a separate future phase and approvals.

blocked

What 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