Skip to content

Feature: refactor/db-drop-retired to dev - #613

Merged
aamoghS merged 3 commits into
devfrom
refactor/db-drop-retired
Nov 14, 2026
Merged

aamoghS merged 3 commits into
devfrom
refactor/db-drop-retired

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Automated PR tracking changes from refactor/db-drop-retired into dev.


Note

High Risk
Irreversible production DROPs must run in the documented order before deploy; a mistake can block all future drizzle-kit push or remove historical legacy judging/bootcamp data.

Overview
Removes retired schema from Drizzle and ships a one-shot production script so deploys can stay push-only without blocking on interactive DROP prompts.

Schema removed from declarations: stored counters event.current_check_ins, hackathon.current_participants, hackathon_team.current_members; event.members_only; hackathon.judging_backend; the legacy bootcamp_material table; and pool-judging judge_queue (relations in judge.ts go away too). @query/db no longer exports bootcampMaterials.

Operational DDL: packages/db/sql/2026-11-drop-retired.sql must run on production before this deploy; docs in packages/db.md spell out that order. A read-only preflight-2026-11-constraints.sql is added to count rows that would break a future constraint push.

API/docs alignment: Feature docs now state counts come only from derived-counts and that check-in is open to all signed-in users. events.create returns currentCheckIns: 0 for the QR UI; hackathon list/getById types include derived currentParticipants. Integration tests no longer seed fake counter columns.

Reviewed by Cursor Bugbot for commit 0411338. Bugbot is set up for automated code reviews on this repo. Configure here.

aamoghS and others added 2 commits November 14, 2026 14:24
Nothing reads or writes event.current_check_ins, event.members_only,
hackathon_team.current_members, hackathon.current_participants,
hackathon.judging_backend, bootcamp_material or judge_queue any more.
The schema stops declaring them, and packages/db/sql/2026-11-drop-retired.sql
drops them. That file must run against production before this deploys:
push cannot drop in a deploy, and an undeclared-but-present column stops
every later push at the data-loss prompt. docs/packages/db.md describes the
order.

Also types the derived counts on hackathon list/getById and events.create,
which still declared the raw row.
@github-actions
github-actions Bot requested a review from aamoghS as a code owner November 14, 2026 22:38
@aamoghS
aamoghS marked this pull request as draft November 14, 2026 22:38
@aamoghS aamoghS closed this Nov 14, 2026
@aamoghS aamoghS reopened this Nov 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Counts the rows that would break each proposed constraint (unique email,
same-edition composite FKs, range CHECKs), so the next change adds only the
ones with zero violations. Runs in a read-only transaction.
@github-actions

Copy link
Copy Markdown
Contributor Author

Visit the preview URL for this PR (updated for commit 0411338):

https://hacklyticss2026--pr-613-szdeyapc.web.app

(expires Sat, 21 Nov 2026 22:42:37 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 5d238be33273095766c18a8339b7b0c47de8a950

@github-actions

Copy link
Copy Markdown
Contributor Author

Visit the preview URL for this PR (updated for commit 0411338):

https://hacklytics2027--pr-613-d3f7alqu.web.app

(expires Sat, 21 Nov 2026 22:42:38 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c48ba34db61581e25fe2978355160b5eefe0e83f

@aamoghS
aamoghS marked this pull request as ready for review November 14, 2026 22:43
@aamoghS
aamoghS merged commit b90911f into dev Nov 14, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant