Skip to content

fix: drop the users.suspended column - #150

Merged
ndbroadbent merged 1 commit into
mainfrom
nathan/drop-users-suspended
Oct 13, 2026
Merged

ndbroadbent merged 1 commit into
mainfrom
nathan/drop-users-suspended

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Fixes #147.

v0.1.11 removed every read and write of users.suspended but kept the column, because v0.1.10 tasks still select it while a rack rolls out. This PR adds a migration that drops it.

The upgrade docs get a release note: upgrade through v0.1.11 first, and don't roll back past v0.1.11 after migrating. v0.1.10 and earlier can't load users without the column.

Testing

  • The db and handler tests pass against a template database migrated through the new migration (206 tests).
  • I confirmed the migrated schema has no suspended column.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added upgrade guidance for v0.1.12: upgrade through v0.1.11 before proceeding, as earlier versions may not work after the migration.
    • After migrating to v0.1.12, do not roll back to versions earlier than v0.1.11.

Fixes #147.

Nothing has read or written users.suspended since v0.1.11, which kept the column so v0.1.10 could keep running
during that rollout. The release note says to upgrade through v0.1.11 first and not to roll back past it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 2c4cbf43-5a99-4c12-a3b5-4818ce9fd724
📥 Commits

Reviewing files that changed from the base of the PR and between 6b63548 and 2b4ac35.

📒 Files selected for processing (2)
  • docs/src/content/docs/operations/upgrades.mdx
  • internal/gateway/db/migrations/20261016000000_drop_users_suspended.sql

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Walkthrough

The v0.1.12 migration drops the users.suspended column if it exists. Upgrade guidance states that v0.1.10 and earlier cannot load users after the migration and documents the required upgrade and rollback boundaries.

Changes

Column removal

Layer / File(s) Summary
Column removal and upgrade guidance
internal/gateway/db/migrations/20261016000000_drop_users_suspended.sql, docs/src/content/docs/operations/upgrades.mdx
The migration comments describe account disabling and the column’s usage history, then drop users.suspended if it exists. The upgrade guide directs operators to upgrade through v0.1.11 first and not roll back past that version after migration.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 2b4ac

The upgrade guide documents the required version sequence and rollback boundary for removing this column. No actionable merge-blocking risk is established.

Pre-merge checks · Passed 5
Passed Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the main change: dropping the unused users.suspended column.
Linked Issues check Passed Issue #147 requires dropping users.suspended after releases without column reads run. The PR adds 20261016000000_drop_users_suspended.sql, which executes `ALTER TABLE users DROP COLUMN IF EXISTS s…
Out of Scope Changes check Passed The migration and the v0.1.12 upgrade note directly support issue #147. The note documents the required rollout and rollback constraint caused by dropping the column. No unrelated change is shown in t…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit read the upgrade note,
Then watched the migration drop a column.
“Through v0.1.11,” the rabbit said,
“And do not hop back past that mark.”
It tucked the guide beside its burrow.

Comment @coderabbitai help to get the list of available commands.

@deepsource-io

deepsource-io Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 6b63548...2b4ac35 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Oct 13, 2026 3:28a.m. Review ↗
Go Oct 13, 2026 3:28a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@ndbroadbent
ndbroadbent merged commit e814bd8 into main Oct 13, 2026
14 checks passed
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.

Drop the users.suspended column

1 participant