Files
loki/drizzle/0121_client_allowance.sql
CatoandClaude Opus 5.5 50d632f21a feat(projects): a client's seat — builds on a monthly allowance, live on their word (#1336)
* feat(projects): a client's seat — builds on a monthly allowance, live on their word

The client is the person a site is for. Their asks used to wait for the
owner; the only other seat was Builder, which builds without limit and ships
without anyone looking. Now:

- The owner picks a client's changes a month on the People panel (Ask me /
  5 / 20 / 50), on the invite and per client later.
- Within it, the client's ask builds at once on the owner's builder. The
  agent opens a DRAFT pull request; it merges only after the client taps
  Make it live (their project page and My feedback), which lifts the draft
  and merges once green. Auto-ship OFF still means the owner merges.
- Past it, or with Ask me, the owner decides, and the night never builds it
  unasked. A build that did not start is not counted.
- The client is told what happened in plain words, with changes left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(projects): a client's change stays a draft until their yes; the inbox names it as theirs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* chore(db): format the migration snapshot

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(db): drizzle comparisons for the allowance count

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 23:35:44 +02:00

6 lines
692 B
SQL

ALTER TABLE "project_invitations" ADD COLUMN "monthly_changes" integer;--> statement-breakpoint
ALTER TABLE "project_memberships" ADD COLUMN "monthly_changes" integer;--> statement-breakpoint
ALTER TABLE "site_feedback" ADD COLUMN "on_allowance" boolean DEFAULT false NOT NULL;--> statement-breakpoint
ALTER TABLE "site_feedback" ADD COLUMN "live_approved_at" timestamp with time zone;--> statement-breakpoint
ALTER TABLE "site_feedback" ADD COLUMN "live_approved_by" uuid;--> statement-breakpoint
ALTER TABLE "site_feedback" ADD CONSTRAINT "site_feedback_live_approved_by_users_id_fk" FOREIGN KEY ("live_approved_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;