Skip to content

feat(prisma-postgres-setup): trigger on deploying or sharing an app with no hosted database - #42

Merged
gregory-boch-prisma merged 2 commits into
mainfrom
feat/postgres-setup-deploy-or-share
Nov 26, 2026
Merged

gregory-boch-prisma merged 2 commits into
mainfrom
feat/postgres-setup-deploy-or-share

Conversation

@gregory-boch-prisma

@gregory-boch-prisma gregory-boch-prisma commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

prisma-postgres-setup gets an app a Prisma Postgres database. It triggered when the user asked for a database, but not when the user was about to deploy, host or share an app that has no hosted database yet, which is when an app first needs one that keeps running.

Changes

  • description: adds the trigger "is about to deploy, host, publish or share an app that has no hosted database yet ("deploy my app", "put it online", "share it with a friend")". 667 characters.
  • Decision table, new row "Deploying or sharing an app with no hosted database": offer npx create-db@latest (no account, no card) and set its connection string as DATABASE_URL on the host. Before the app goes live, give the user the claim URL and the deletion time and ask them to claim it, since an unclaimed database is deleted and the deployed app stops working. On a Prisma 8 project that deploys to Prisma Compute, the Composer module declares the database instead; see prisma-compute.
  • metadata.version: 2.3.1 → 2.4.0 (new trigger and table row).
  • README: the skill's "Use when" line lists the same trigger.

Sources checked 2026-11-25

Checks

  • The Validate Skills workflow script, run locally: all 11 SKILL.md files pass.

72-hour lifetime (added 2026-11-25)

Commit 970d328 changes the skill and references/provisioning.md from 24 to 72 hours, matching prisma/create-db#92 and #93, and bumps metadata.version to 2.4.1. That makes this PR part of the copy step below, so it merges after the create-db CLI release.

Ship order

Unclaimed create-db databases move from 24 to 72 hours across several repositories. Merge in this order:

  1. feat(create-db-worker): keep unclaimed databases for 72 hours create-db#92, workers. Merge, then confirm the create-db worker deploy actually landed: Workers Builds deploys from main have failed before without anyone noticing. A quick check: a create request with a 48-hour TTL succeeds instead of returning 400.
  2. feat(create-db): unclaimed databases last 72 hours; --ttl up to 72h create-db#93, CLI 1.4.0. Release to npm only after step 1. Released earlier, --ttl above 24h gets a 400 from the old worker, and the CLI prints a deletion time 48 hours later than the real one.
  3. Copy, after the release: docs: create-db databases last 72 hours unclaimed web#8928, docs(orm v7 deploy): create-db option where each deploy guide asks for a hosted Postgres web#8926, docs(create-db): deploy-or-share section; title covers first deploys web#8927, feat(prisma-postgres-setup): trigger on deploying or sharing an app with no hosted database #42, docs(skills): create-db databases last 72 hours unclaimed prisma-cli#406, docs(prisma-postgres): create-db databases last 72 hours unclaimed codex-plugin#2.

Older CLIs keep printing a 24-hour deletion time after step 1, while the database lives 72 hours. That understates the lifetime; nothing breaks.

🤖 Generated with Claude Code

gregory-boch-prisma and others added 2 commits November 25, 2026 12:35
…ith no hosted database

The skill triggered on "I need a database" but not when a user is about to
deploy, host, publish or share an app that has no hosted database. Its
description now covers that moment, and the decision table gains a row: offer
`npx create-db@latest`, set the connection string as DATABASE_URL on the host,
and give the user the claim URL and deletion time before the app goes live; on
a Prisma 8 project deploying to Prisma Compute, the module declares the
database instead. Version 2.4.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
create-db keeps an unclaimed database for 72 hours, up from 24. The skill's
decision table and create-db guidance say 72 hours. Version 2.4.1.

Merge after the create-db CLI release with the 72-hour lifetime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gregory-boch-prisma
gregory-boch-prisma merged commit 5d0a228 into main Nov 26, 2026
5 checks passed
gregory-boch-prisma added a commit to prisma/prisma-cli that referenced this pull request Nov 26, 2026
The `prisma-platform-core-concepts` skill describes `create-db` for
agents. It said an unclaimed database is deleted after 24 hours; once
prisma/create-db#92 and #93 ship, it is 72 hours.

## Changes

- `skills/prisma-platform-core-concepts/SKILL.md`: the create-db
sentence says an unclaimed database is deleted after 72 hours.

## Ship order

Unclaimed create-db databases move from 24 to 72 hours across several
repositories. Merge in this order:

1. **prisma/create-db#92, workers.** Merge, then confirm the create-db
worker deploy actually landed: Workers Builds deploys from `main` have
failed before without anyone noticing. A quick check: a create request
with a 48-hour TTL succeeds instead of returning 400.
2. **prisma/create-db#93, CLI 1.4.0.** Release to npm only after step 1.
Released earlier, `--ttl` above 24h gets a 400 from the old worker, and
the CLI prints a deletion time 48 hours later than the real one.
3. **Copy, after the release:** prisma/web#8928, prisma/web#8926,
prisma/web#8927, prisma/skills#42, #406,
prisma/codex-plugin#2.

Older CLIs keep printing a 24-hour deletion time after step 1, while the
database lives 72 hours. That understates the lifetime; nothing breaks.

## Checks

- One-line Markdown change in a skill file.
- `scripts/check-skill-packaging.mjs` runs `pnpm pack` with the full
prepack build, which needs a complete install, so it was not run
locally; CI covers it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants