Skip to content
Back to skills

Db Migration

ASecurity

Drizzle schema change workflow for the main-process SQLite - edit schema, generate migration, hand-add CHECK/triggers, update seed/fixtures, test forward + rollback, keep audit table append-only.

  • 31 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 8, 2026
ai-agentsbashsql

Security analysis

A100/100

Scanned October 8, 2026

npx -y skills add NicholasFlemmer/styx-app --skill db-migration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Db Migration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Db Migration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nicholasflemmer-db-migration/badge)](https://www.skillsdirectory.com/skills/nicholasflemmer-db-migration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: db-migration
description: Drizzle schema change workflow for the main-process SQLite - edit schema, generate migration, hand-add CHECK/triggers, update seed/fixtures, test forward + rollback, keep audit table append-only.
argument-hint: '<change summary>'
allowed-tools: Read, Edit, Write, Bash(pnpm:*), Bash(sqlite3:*)
---

# DB migration: $ARGUMENTS

1. Edit `apps/desktop/src/main/db/schema.ts`.
2. `pnpm db:generate` → review SQL in `apps/desktop/src/main/db/migrations/`; add `CHECK` constraints and triggers by hand (drizzle-kit does not emit them for SQLite).
3. `audit_entries`: additive changes only; the `RAISE(ABORT)` triggers stay.
4. Update zod row schemas / mappers in core, `packages/core/src/fixtures/demo.ts`, and `scripts/seed.ts`.
5. Test: migrate a fresh DB; migrate a DB seeded at the previous version; verify data. Reversible changes get a down migration + test.
6. Column-name review: any `token|secret|password|key` column that could hold a secret is rejected (only `credential_ref`).
7. `pnpm test -F @styx/desktop`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.