Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ ".": "1.0.0-rc.1" }
{".":"1.0.0"}
190 changes: 190 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions docs/superpowers/notes/2026-07-14-oi-boolean-rename-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# OI Boolean Column Rename Map (is_/has_) β€” #227

Authoritative old→new SQL-column-name map for the `is_*` / `has_*` boolean
naming normalization. **Only the `integer('<sql_name>', …)` string changes;**
the camelCase JS property (first column) is unchanged, so all consumer code is
untouched. Each row maps to exactly one `ALTER TABLE <table> RENAME COLUMN`
statement in `migrations/0001_boolean_columns_is_has.sql`.

Already-compliant booleans (`is_available`, `is_default`, `is_seed`,
`is_seeded`, `is_amendment`, `is_managed`, …) are omitted β€” no change needed.

| schema file | JS prop | table | old SQL | new SQL |
|---|---|---|---|---|
| commercial-subtypes.ts | disabled | `commercial_subtypes` | `disabled` | `is_disabled` |
| compliance.ts | senderAttached | `messaging_compliance` | `sender_attached` | `has_sender_attached` |
| inspection/automation.ts | active | `automations` | `active` | `is_active` |
| inspection/automation.ts | active | `event_types` | `active` | `is_active` |
| inspection/automation.ts | enabled | `inspection_types` | `enabled` | `is_enabled` |
| inspection/core.ts | paymentRequired | `inspections` | `payment_required` | `is_payment_required` |
| inspection/core.ts | agreementRequired | `inspections` | `agreement_required` | `is_agreement_required` |
| inspection/core.ts | autoSignOnPublish | `inspections` | `auto_sign_on_publish` | `is_auto_sign_on_publish` |
| inspection/core.ts | disableAutomations | `inspections` | `disable_automations` | `is_automations_disabled` |
| inspection/core.ts | teamMode | `inspections` | `team_mode` | `is_team_mode` |
| inspection/defect-category.ts | drivesSummary | `defect_categories` | `drives_summary` | `is_summary_driver` |
| inspection/services.ts | active | `services` | `active` | `is_active` |
| inspection/services.ts | active | `discount_codes` | `active` | `is_active` |
| inspection/template-rating.ts | featured | `templates` | `featured` | `is_featured` |
| marketplace.ts | featured | `marketplace_templates` | `featured` | `is_featured` |
| marketplace.ts | featured | `marketplace_libraries` | `featured` | `is_featured` |
| pca-compliance.ts | dualRole | `report_signoff` | `dual_role` | `is_dual_role` |
| pca-compliance.ts | requested | `document_review_items` | `requested` | `is_requested` |
| pca-compliance.ts | received | `document_review_items` | `received` | `is_received` |
| pca-compliance.ts | reviewed | `document_review_items` | `reviewed` | `is_reviewed` |
| pca-compliance.ts | na | `document_review_items` | `na` | `is_na` |
| qbo.ts | syncEnabled | `qbo_connections` | `sync_enabled` | `is_sync_enabled` |
| qbo.ts | resolved | `qbo_sync_errors` | `resolved` | `is_resolved` |
| tenant/core.ts | pdfShowFooter | `tenant_configs` | `pdf_show_footer` | `is_pdf_footer_shown` |
| tenant/core.ts | pdfShowPageNumbers | `tenant_configs` | `pdf_show_page_numbers` | `is_pdf_page_numbers_shown` |
| tenant/core.ts | pdfShowLicense | `tenant_configs` | `pdf_show_license` | `is_pdf_license_shown` |
| tenant/core.ts | showEstimates | `tenant_configs` | `show_estimates` | `is_estimates_shown` |
| tenant/core.ts | enableRepairList | `tenant_configs` | `enable_repair_list` | `is_repair_list_enabled` |
| tenant/core.ts | enableCustomerRepairExport | `tenant_configs` | `enable_customer_repair_export` | `is_customer_repair_export_enabled` |
| tenant/core.ts | blockUnpaid | `tenant_configs` | `block_unpaid` | `is_unpaid_blocked` |
| tenant/core.ts | blockUnsignedAgreement | `tenant_configs` | `block_unsigned_agreement` | `is_unsigned_agreement_blocked` |
| tenant/core.ts | conciergeReviewRequired | `tenant_configs` | `concierge_review_required` | `is_concierge_review_required` |
| tenant/core.ts | allowInspectorChoice | `tenant_configs` | `allow_inspector_choice` | `is_inspector_choice_allowed` |
| tenant/core.ts | enablePdfPipeline | `tenant_configs` | `enable_pdf_pipeline` | `is_pdf_pipeline_enabled` |
| tenant/core.ts | teamModeDefault | `tenant_configs` | `team_mode_default` | `is_team_mode_default` |
| tenant/core.ts | apprenticeReviewRequired | `tenant_configs` | `apprentice_review_required` | `is_apprentice_review_required` |
| tenant/core.ts | guestInvitesEnabled | `tenant_configs` | `guest_invites_enabled` | `is_guest_invites_enabled` |
| tenant/core.ts | collabEditing | `tenant_configs` | `collab_editing` | `is_collab_editing_enabled` |
| tenant/core.ts | managedEligible | `tenant_configs` | `managed_eligible` | `is_managed_eligible` |
| tenant/core.ts | reserveScheduleEnabled | `tenant_configs` | `reserve_schedule_enabled` | `is_reserve_schedule_enabled` |
| tenant/core.ts | enabled | `email_templates` | `enabled` | `is_enabled` |
| tenant/integration.ts | ok | `integration_test_results` | `ok` | `is_ok` |
| tenant/user.ts | signatureEnabled | `users` | `signature_enabled` | `is_signature_enabled` |
| tenant/user.ts | totpEnabled | `users` | `totp_enabled` | `is_totp_enabled` |
| tenant/user.ts | notifyOnReferral | `users` | `notify_on_referral` | `is_referral_notification_enabled` |
| tenant/user.ts | notifyOnReport | `users` | `notify_on_report` | `is_report_notification_enabled` |
| tenant/user.ts | notifyOnPaid | `users` | `notify_on_paid` | `is_paid_notification_enabled` |

**47 renames.** The last 10 (`dual_role`, `requested`/`received`/`reviewed`/`na`,
`team_mode_default`, `guest_invites_enabled`, `reserve_schedule_enabled`,
`notify_on_report`, `notify_on_paid`) were added by the commercial-PCA epic
after the original Plan-2 draft; they follow the same convention (simple
prefix, or `_enabled`/`_shown`/`_disabled` state-oriented phrasing to match the
sibling columns already in the plan's map).
52 changes: 52 additions & 0 deletions migrations/0001_boolean_columns_is_has.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
-- Boolean column naming normalization (#227): every boolean SQL column is
-- renamed to the is_/has_ predicate convention. Data-preserving native SQLite
-- RENAME COLUMN (no table rebuild, no FK-drop risk on D1). The Drizzle JS
-- property names are unchanged, so no consumer code moves with this migration.
-- Old→new map: docs/superpowers/notes/2026-07-14-oi-boolean-rename-map.md
ALTER TABLE `commercial_subtypes` RENAME COLUMN `disabled` TO `is_disabled`;
ALTER TABLE `messaging_compliance` RENAME COLUMN `sender_attached` TO `has_sender_attached`;
ALTER TABLE `automations` RENAME COLUMN `active` TO `is_active`;
ALTER TABLE `event_types` RENAME COLUMN `active` TO `is_active`;
ALTER TABLE `inspection_types` RENAME COLUMN `enabled` TO `is_enabled`;
ALTER TABLE `inspections` RENAME COLUMN `payment_required` TO `is_payment_required`;
ALTER TABLE `inspections` RENAME COLUMN `agreement_required` TO `is_agreement_required`;
ALTER TABLE `inspections` RENAME COLUMN `auto_sign_on_publish` TO `is_auto_sign_on_publish`;
ALTER TABLE `inspections` RENAME COLUMN `disable_automations` TO `is_automations_disabled`;
ALTER TABLE `inspections` RENAME COLUMN `team_mode` TO `is_team_mode`;
ALTER TABLE `defect_categories` RENAME COLUMN `drives_summary` TO `is_summary_driver`;
ALTER TABLE `services` RENAME COLUMN `active` TO `is_active`;
ALTER TABLE `discount_codes` RENAME COLUMN `active` TO `is_active`;
ALTER TABLE `templates` RENAME COLUMN `featured` TO `is_featured`;
ALTER TABLE `marketplace_templates` RENAME COLUMN `featured` TO `is_featured`;
ALTER TABLE `marketplace_libraries` RENAME COLUMN `featured` TO `is_featured`;
ALTER TABLE `report_signoff` RENAME COLUMN `dual_role` TO `is_dual_role`;
ALTER TABLE `document_review_items` RENAME COLUMN `requested` TO `is_requested`;
ALTER TABLE `document_review_items` RENAME COLUMN `received` TO `is_received`;
ALTER TABLE `document_review_items` RENAME COLUMN `reviewed` TO `is_reviewed`;
ALTER TABLE `document_review_items` RENAME COLUMN `na` TO `is_na`;
ALTER TABLE `qbo_connections` RENAME COLUMN `sync_enabled` TO `is_sync_enabled`;
ALTER TABLE `qbo_sync_errors` RENAME COLUMN `resolved` TO `is_resolved`;
ALTER TABLE `tenant_configs` RENAME COLUMN `pdf_show_footer` TO `is_pdf_footer_shown`;
ALTER TABLE `tenant_configs` RENAME COLUMN `pdf_show_page_numbers` TO `is_pdf_page_numbers_shown`;
ALTER TABLE `tenant_configs` RENAME COLUMN `pdf_show_license` TO `is_pdf_license_shown`;
ALTER TABLE `tenant_configs` RENAME COLUMN `show_estimates` TO `is_estimates_shown`;
ALTER TABLE `tenant_configs` RENAME COLUMN `enable_repair_list` TO `is_repair_list_enabled`;
ALTER TABLE `tenant_configs` RENAME COLUMN `enable_customer_repair_export` TO `is_customer_repair_export_enabled`;
ALTER TABLE `tenant_configs` RENAME COLUMN `block_unpaid` TO `is_unpaid_blocked`;
ALTER TABLE `tenant_configs` RENAME COLUMN `block_unsigned_agreement` TO `is_unsigned_agreement_blocked`;
ALTER TABLE `tenant_configs` RENAME COLUMN `concierge_review_required` TO `is_concierge_review_required`;
ALTER TABLE `tenant_configs` RENAME COLUMN `allow_inspector_choice` TO `is_inspector_choice_allowed`;
ALTER TABLE `tenant_configs` RENAME COLUMN `enable_pdf_pipeline` TO `is_pdf_pipeline_enabled`;
ALTER TABLE `tenant_configs` RENAME COLUMN `team_mode_default` TO `is_team_mode_default`;
ALTER TABLE `tenant_configs` RENAME COLUMN `apprentice_review_required` TO `is_apprentice_review_required`;
ALTER TABLE `tenant_configs` RENAME COLUMN `guest_invites_enabled` TO `is_guest_invites_enabled`;
ALTER TABLE `tenant_configs` RENAME COLUMN `collab_editing` TO `is_collab_editing_enabled`;
ALTER TABLE `tenant_configs` RENAME COLUMN `managed_eligible` TO `is_managed_eligible`;
ALTER TABLE `tenant_configs` RENAME COLUMN `reserve_schedule_enabled` TO `is_reserve_schedule_enabled`;
ALTER TABLE `email_templates` RENAME COLUMN `enabled` TO `is_enabled`;
ALTER TABLE `integration_test_results` RENAME COLUMN `ok` TO `is_ok`;
ALTER TABLE `users` RENAME COLUMN `signature_enabled` TO `is_signature_enabled`;
ALTER TABLE `users` RENAME COLUMN `totp_enabled` TO `is_totp_enabled`;
ALTER TABLE `users` RENAME COLUMN `notify_on_referral` TO `is_referral_notification_enabled`;
ALTER TABLE `users` RENAME COLUMN `notify_on_report` TO `is_report_notification_enabled`;
ALTER TABLE `users` RENAME COLUMN `notify_on_paid` TO `is_paid_notification_enabled`;
Loading