db-schema-change
/db-schema-change
Use whenever adding, renaming or removing a database table or column (Drizzle schema in `server/db/pg/schema/` or `server/db/sqlite/schema/`), when migrations or migration notes come up, when choosing column types for dates, JSON, enums or booleans, or when storing secrets, API keys, tokens or credentials in the database.
- Author
- fosrl ↗
- Repository
- pangolin ↗
- Licence
- AGPL-3.0
- Last repository change
- 12.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 12.11.2026, without references to retired models or APIs.
AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.
What it does and when to use it
Use whenever adding, renaming or removing a database table or column (Drizzle schema in `server/db/pg/schema/` or `server/db/sqlite/schema/`), when migrations or migration notes come up, when choosing column types for dates, JSON, enums or booleans, or when storing secrets, API keys, tokens or credentials in the database.
Original author description
Use whenever adding, renaming or removing a database table or column (Drizzle schema in `server/db/pg/schema/` or `server/db/sqlite/schema/`), when migrations or migration notes come up, when choosing column types for dates, JSON, enums or booleans, or when storing secrets, API keys, tokens or credentials in the database.
How it works
SKILL.md has no level-two headings · 29 lines, 218 words
SKILL.md preview
---
name: db-schema-change
description: Use whenever adding, renaming or removing a database table or column (Drizzle schema in `server/db/pg/schema/` or `server/db/sqlite/schema/`), when migrations or migration notes come up, when choosing column types for dates, JSON, enums or booleans, or when storing secrets, API keys, tokens or credentials in the database.
---
Read `docs/database.md` before editing a schema. Key rules:
- Pangolin runs on **SQLite or Postgres**. Make every change in **both**
`server/db/pg/schema/<file>.ts` and `server/db/sqlite/schema/<file>.ts`
(`schema.ts`, or `privateSchema.ts` for enterprise-only tables) with matching
names, nullability, defaults and FKs.
- **Portable types only.** No `timestamp`/`date`, `json`/`jsonb`, `pgEnum`,
arrays, `uuid` type, or `defaultNow()`. Times are epoch numbers
(`bigint({mode:"number"})` ↔ `integer`) or ISO strings (`varchar` ↔ `text`).
JSON goes in `text`. Enums are `varchar/text().$type<...>()`. Booleans are
`boolean` ↔ `integer({mode:"boolean"})`. Copy the pattern of a neighbouring
column.
- **Never write migration scripts or SQL** (`server/setup/scriptsPg|scriptsSqlite/`,
`migrations*.ts`). They're generated for each release with drizzle. Instead,
write or update `server/setup/migrationNotes/<version>.md`, where `<version>`
is the next untagged release. If a notes file newer than the latest
`git tag --sort=-v:refname | head -1` already exists, append to it. Otherwise
create the next minor and tell the user. Record only what drizzle can't do:
data copies, generated values for existing rows, renames, NOT NULL backfills,
encryption of existing data, config-key moves, SQLite/Postgres differences.
The template is in `docs/database.md` § Migration notes.
- **Encrypt sensitive values** you need to read back with
`encrypt(value, config.getRawConfig().server.secret!)` /
`decrypt(...)` from `@server/lib/crypto`. Hash values you only need to verify
(`hashPassword` from `@server/auth/password`).
- If the column backs a resource or site resource setting, also load the
`resource-changes` skill (the blueprint must be updated too).
Versions
The database has no other skills named db-schema-change.
Database snapshot: 13.11.2026 · package version aa4796e12d60 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Similar skills
- 100drizzle-migrations
Manage database schema with Drizzle ORM and SQLite migrations. Use when adding tables, modifying columns, creating indexes, or running migrations. Activates for database schema changes, migration generation, and Drizzle query patterns. - 100db-migration
Database schema changes and migration workflow — safe, reversible, tested. Use when: migration, schema, database, alter table, add column, rename column, DB change. - 90Create database migration
Create a database migration to add a table, add columns to an existing table, add a setting, or otherwise change the schema of Ghost's MySQL database. Use this skill whenever the task involves modifying Ghost's database schema — including adding, removing, or renaming columns or… - 95db-migration
Rules for database schema changes. Use for any new table, column, index, constraint, enum or trigger, any data backfill, and any migration file. - 100manage-sqlite-migrations
Create and validate Rudder's Drizzle-backed local SQLite migrations. Use when changing src/db/schema.ts, generating or reviewing files under drizzle/, adding or altering database tables, columns, constraints, or indexes, writing data backfills, or troubleshooting migration failures in rudder.db. - 85Drizzle ORM
Expert guidance for Drizzle ORM including schema definition, queries, relations, migrations, TypeScript integration with SQLite/PostgreSQL, and Drizzle Studio. Use this when working with type-safe database operations, schema management, or ORM queries.