Skip to content

Rename boolean SQL columns to is_/has_ convention (#227)#41

Merged
important-new merged 4 commits into
mainfrom
feat/schema-naming-booleans
Jul 14, 2026
Merged

Rename boolean SQL columns to is_/has_ convention (#227)#41
important-new merged 4 commits into
mainfrom
feat/schema-naming-booleans

Conversation

@important-new

Copy link
Copy Markdown
Owner

Renames every boolean SQL column in the schema to the is_* / has_* predicate convention (InspectorHub#227), via native ALTER TABLE … RENAME COLUMN (no table rebuild, no D1 FK-drop risk), and adds a lint:naming gate.

Zero code ripple

Only the integer('<sql_name>', …) string changes; the camelCase Drizzle JS property names are unchanged, so services/API/frontend are untouched. The only consumers touched are hand-written SQL test fixtures + schema-.name assertions.

What changed

  • 47 boolean columns renamed across 13 schema files (e.g. activeis_active, pdf_show_footeris_pdf_footer_shown, sender_attachedhas_sender_attached, notify_on_referralis_referral_notification_enabled).
  • migrations/0001_boolean_columns_is_has.sql — one RENAME COLUMN per column; drizzle snapshot/journal chained (db:generate reports "No schema changes").
  • scripts/check-naming.mjs + unit test — lint:naming gate wired into lint.
  • docs/superpowers/notes/2026-07-14-oi-boolean-rename-map.md — authoritative old→new map.
  • 6 test files updated: hand-written tenant_configs/users DDL fixtures + .name assertions.

Verification

  • lint (incl. lint:naming) ✓ · db:check no drift ✓ · test:unit 3091 passed ✓ · test:workers
  • Data-preserving: RENAME COLUMN keeps all data (verified on remote apply).

@important-new
important-new merged commit 88c3935 into main Jul 14, 2026
5 checks passed
@important-new
important-new deleted the feat/schema-naming-booleans branch July 14, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant