Skip to content

Commit c3bf03b

Browse files
authored
Add migration: make stripe_charge_id nullable, add manual_payment_id to earlybird purchases (#788)
## Summary - Makes the `stripe_charge_id` column on `kiloclaw_earlybird_purchases` nullable (was `NOT NULL`) - Adds a new nullable `manual_payment_id` column (`text`, `UNIQUE`) to support non-Stripe payment tracking ## Details This migration allows earlybird purchases to be recorded via manual payment in addition to Stripe. Both `stripe_charge_id` and `manual_payment_id` are nullable with unique constraints, so each purchase can be identified by either payment method. ### Files changed - `packages/db/src/schema.ts` — updated Drizzle schema definition - `packages/db/src/migrations/0041_earlybird_manual_payment.sql` — migration SQL - `packages/db/src/migrations/meta/0041_snapshot.json` — Drizzle snapshot - `packages/db/src/migrations/meta/_journal.json` — journal entry for migration 0041 Built for [Brendan](https://kilo-code.slack.com/archives/C0AD0MJGANT/p1772575540426059?thread_ts=1772575090.171619&cid=C0AD0MJGANT) by [Kilo for Slack](https://kilo.ai/features/slack-integration)
2 parents 3276266 + fb81815 commit c3bf03b

4 files changed

Lines changed: 13765 additions & 1 deletion

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALTER TABLE "kiloclaw_earlybird_purchases" ALTER COLUMN "stripe_charge_id" DROP NOT NULL;--> statement-breakpoint
2+
ALTER TABLE "kiloclaw_earlybird_purchases" ADD COLUMN "manual_payment_id" text;--> statement-breakpoint
3+
ALTER TABLE "kiloclaw_earlybird_purchases" ADD CONSTRAINT "kiloclaw_earlybird_purchases_manual_payment_id_unique" UNIQUE("manual_payment_id");

0 commit comments

Comments
 (0)