Renata protected local-only migration draft

Role Set Template Migration Draft Review

Protected, read-only review of a local-only draft artifact for future config-only role-set template tables.

This is a protected, read-only review of a local-only draft migration. It does not run SQL, create tables, write data, enable CRUD, or activate role-set storage.

Purpose

This review records a local-only SQL draft for future config-only role-set template tables while keeping the active app unchanged.

The draft is documentation only. It is outside the active migrations folder and no production table, runtime query, write endpoint, or CRUD workflow uses it.

Draft Status

Status

local-only-draft

local-only-draft

Active

false

inactive

Executable

false

not-executable

Deployment

not-deployed

not-deployed

Draft Artifact Location

docs/architecture/migration-drafts/role-set-template-config-draft.sql.md

Location boundary: outside-active-migrations-folder. The active deployment migration folder is not changed.

Planned Tables

future_role_set_templatesfuture_role_definitionsfuture_role_permission_mappingsfuture_role_set_template_versionsfuture_role_set_template_audit_eventsfuture_role_set_template_status_history

Allowed Fields

idcommunity_idtemplate_idtemplate_slugtemplate_nametemplate_descriptiontemplate_statustemplate_versionrole_idrole_keyrole_labelrole_descriptionpermission_keypermission_grouppermission_statusblocked_permission_reasonstatusversion_numberchange_reasonrollback_source_versiontemplate_snapshot_jsonevent_typeprevious_statusnext_statuscreated_atupdated_atarchived_atactor_ref

actor_ref is conceptual future audit metadata only.

actor_ref must not store email, name, Cloudflare identity, access credential, resident profile data, staff profile data, or identity-bearing values.

actor_ref cannot be connected to live user assignment until identity policy, privacy approval, and audit policy exist.

Prohibited Tables And Fields

Prohibited tables Prohibited fields
users, accounts, residents, staff, identities, emails, names, submissions, pullups, pushups, staff_decisions, morning_sheet_placements, attendance, participation, analytics, scoring, ranking, compliance, clinical, medical, legal, community_notes email, real_name, resident_name, staff_name, cloudflare_identity, access_credential, medical_details, diagnosis_details, legal_details, trauma_details, submission_content, pullup_content, pushup_content, staff_decision, attendance_data, participation_data, participation_analytics, scoring_data, ranking_data, compliance_metrics

Safety Checks

Draft is outside active migrations folder

The artifact lives under docs/architecture/migration-drafts, not migrations/.

ready-for-review

Draft is marked local-only

The artifact says LOCAL-ONLY DRAFT - DO NOT RUN.

ready-for-review

Helper says active false

draftArtifact.active is false.

ready-for-review

Helper says executable false

draftArtifact.executable is false.

ready-for-review

Allowed tables only

Only future_ role-set template config table names are allowed.

ready-for-review

No user/account/resident/staff/identity tables

Identity and profile tables remain prohibited.

ready-for-review

No submission/pullup/pushup/staff-decision tables

Submission and staff-decision tables remain prohibited.

ready-for-review

No tracking/analytics/scoring tables

Attendance, participation, analytics, scoring, ranking, and compliance tables remain prohibited.

ready-for-review

No sensitive fields

Email, name, health, legal, trauma, submission, tracking, analytics, and scoring fields are prohibited.

ready-for-review

No write endpoints

No runtime endpoint or database write path is added.

ready-for-review

No runtime imports from active database code

The helper exports metadata only and does not import D1 or repository code.

ready-for-review

No production activation path

Activation requires a separate future phase and approval gates.

blocked

Activation Blockers

  • draft is reviewed
  • D1 migration naming is approved
  • active migration filename is chosen
  • rollback migration exists
  • seed strategy is approved
  • audit model is approved
  • Cloudflare Access boundary is checked
  • staff/privacy approval is recorded
  • tests for active migration are written
  • local dry-run is performed
  • production deployment plan is approved

Future Activation Requirements

separate future dry-run planseparate future activation phaseno production activation from this draftno write endpoints before approvalno CRUD UI before approvalno user assignment before identity policyno submissions before staff/privacy approvalno attendance trackingno participation trackingno participation analyticsno scoring/ranking/compliance metrics

What Remains Blocked

No active migration file, production SQL file, table creation, runtime query, write endpoint, CRUD UI, role-set storage, user assignment, identity storage, submissions, staff decisions, Morning Sheet placement, 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