database-schema-changes

Guide for making database schema changes in Platypus using Drizzle ORM — editing the schema, pushing to a dev database, and generating the migration that ships.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/willdady/platypus/database-schema-changes
Any agent
npx skills add willdady/platypus --skill database-schema-changes
Clone the repo
git clone --depth 1 https://github.com/willdady/platypus

Made for: Claude Code, Codex.

Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 493 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00037 $0.00493
Opus 5 $0.00018 $0.00246
Sonnet 5 $0.00007 $0.00099
Haiku 4.5 $0.00004 $0.00049

Measured today against content hash 8ace1c0a7d7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

database-schema-changes scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/database-schema-changes/SKILL.md · 60 lines

What it actually says

Database Schema Changes

Push is for your machine; generate is what ships. Both, every time. A push with no generate leaves a dev database that works and a production deploy that never receives the change — and nothing local tells you, because your own database is already correct.

Steps

  1. Edit the schema — the backend's Drizzle schema module, where the tables are declared.

  2. Push it to your dev database. Needs pnpm dev up, since the push talks to a live Postgres:

    pnpm drizzle-kit-push
    
  3. Generate the migration. Production applies numbered .sql migrations, not your schema file, so this is the step that carries the change out of your machine:

    pnpm drizzle-kit-generate
    

Done when git status shows three new or modified artefacts beside your schema edit: a numbered .sql migration, its snapshot, and an appended journal entry. All of them are committed, in the same commit as the schema change.

Data changes

Generate writes DDL — it reads your schema and diffs it. A backfill, a re-shaping of existing rows, or anything else that needs to reason about data is yours to write into the generated migration by hand.

Dev never runs it: the push flow applies DDL only and skips migration files entirely, so a hand-written backfill is invisible until production. Apply the equivalent change to your own database by hand and say so on the PR.

Auth tables

better-auth owns the auth tables — do not hand-edit that generated schema. When you change the auth configuration, regenerate it, then treat the result as a normal schema change and continue from step 2:

pnpm --dir apps/backend dlx @better-auth/cli@latest generate \
  --config ./src/auth.ts --output ./src/db/auth-schema.ts --yes

(The paths inside that command are arguments the CLI needs, not references to look up.)

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 60 lines · 37 tokens per session scan A 8ace1c0a7d7e

Subscribe to this mod's changes

database-schema-changes is a skill published in the GitHub repository willdady/platypus (69 stars, last pushed today), licensed MIT. It adds 37 tokens to every session and 493 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.