Skip to content
Skills Library
Programming · Building & coding

archestra-dev-migrations

/archestra-dev-migrations

Use when changing Drizzle schemas, generating migrations, editing migration SQL, creating data-only migrations, diagnosing drizzle-kit check failures, or resolving migration/generated-client conflicts.

Repository
archestra ↗
Licence
MIT
Last repository change
27.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when changing Drizzle schemas, generating migrations, editing migration SQL, creating data-only migrations, diagnosing drizzle-kit check failures, or resolving migration/generated-client conflicts.

Original author description

Use when changing Drizzle schemas, generating migrations, editing migration SQL, creating data-only migrations, diagnosing drizzle-kit check failures, or resolving migration/generated-client conflicts.

How it works

  1. Large / hot tables
  2. Merge/rebase conflicts
  3. Common commands
  4. Schema migrations
  5. Data migration SQL
  6. Custom data-only migrations
  7. Database connection
Original SKILL.md headings · 79 lines, 402 words
SKILL.md preview
---
name: archestra-dev-migrations
description: Use when changing Drizzle schemas, generating migrations, editing migration SQL, creating data-only migrations, diagnosing drizzle-kit check failures, or resolving migration/generated-client conflicts.
---

# Archestra Database Migrations

Use this skill for migration work.

Run commands from `platform/` unless specifically instructed otherwise.

## Large / hot tables

If the migration touches the `interactions` table (or any other very large,
write-hot table), read `archestra-dev-interactions-migrations` first. A blocking
operation on that table stalls the LLM proxy's write path, and its most common
trap — rebuilding an index inside a transactional migration — cannot be made
concurrent. That skill covers safe vs risky operations and a read-only audit of
the staging table.

## Merge/rebase conflicts

When git reports merge/rebase conflicts in Drizzle migration metadata or generated clients, follow `resolve-conflicts.md` instead of the normal migration flow.

That subpage overrides the default working directory rule and runs its procedure from the repo root where needed.

## Common commands

```bash
pnpm db:generate
pnpm --dir backend exec drizzle-kit check
pnpm --dir backend check:migrations
pnpm db:migrate
pnpm db:studio
```

Ask before applying migrations locally if the command will modify database state. Generating migrations and checking consistency are safe.

## Schema migrations

When creating migrations that include schema changes and data migration logic:

1. Update the Drizzle schema files with the schema changes.
2. Run `pnpm db:generate`.
3. Add the data migration SQL to the generated file.
4. Run `pnpm --dir backend exec drizzle-kit check` and `pnpm --dir backend check:migrations`
   to verify consistency and journal ordering.

Drizzle creates a migration with a generated name such as `0119_military_alice.sql`. Use that generated filename. Never create manually named migration files because Drizzle tracks migrations through `backend/src/database/migrations/meta/_journal.json`, which references generated file names.

## Data migration SQL

Data migration SQL can include statements such as `INSERT`, `UPDATE`, and other data-changing statements inside the generated migration file.

Keep schema DDL before data migration statements when the data migration references newly created tables or columns.

Always verify with `pnpm --dir backend exec drizzle-kit check` and
`pnpm --dir backend check:migrations` after editing generated SQL.

## Custom data-only migrations

For pure data migrations with no schema changes, create an empty custom migration tracked by Drizzle:

```bash
pnpm --dir backend exec drizzle-kit generate --custom --name=<descriptive-name>
```

Then add the SQL to the generated file and run:

```bash
pnpm --dir backend exec drizzle-kit check
```

## Database connection

PostgreSQL runs in Kubernetes when managed by Tilt.

```bash
kubectl exec -n archestra-dev postgresql-0 -- env PGPASSWORD=archestra_dev_password psql -U archestra -d archestra_dev
```

Useful read-only inspection commands inside `psql` include `\dt`, `\d table_name`, and `SELECT COUNT(*) FROM drizzle.__drizzle_migrations;`.
Files in this package (2)
  • SKILL.md 3 KB
  • resolve-conflicts.md 7 KB

Versions

The database has no other skills named archestra-dev-migrations.

Database snapshot: 13.11.2026 · package version 0577ab98c637 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100drizzle-kit
    Use when managing Drizzle Kit schema migrations, drizzle.config files, generate, migrate, push, introspect, check, and studio workflows.
  • 90nodejs-drizzle
    Use this skill when working with Drizzle ORM — schema definition, SQL-like queries, migrations, relations, and edge deployment. This skill enforces: schema-first design, explicit SQL patterns, drizzle-kit for migrations, relational query builder, and connection management.…
  • 100migrations
    Run migrations, generate schemas, and manage code generation for Momentum CMS. Use when working with database migrations, Drizzle schema generation, type generation, or Angular schematics.
  • 100drizzle-orm-expert
    Provides Drizzle ORM schema design, query patterns, migrations, and TypeScript integration for SQL databases. Use when working with Drizzle files (schema.ts, drizzle.config.ts) or when the user mentions Drizzle ORM or drizzle-kit.
  • 100drizzle-orm-d1
    | Type-safe ORM for Cloudflare D1 databases using Drizzle. Use when: building D1 database schemas, writing type-safe SQL queries, managing migrations with Drizzle Kit, defining table relations, implementing prepared statements, using D1 batch API, or encountering D1_ERROR,…
  • 100drizzle
    Use this skill when writing or modifying Drizzle ORM schemas, queries, or migrations in this repo — specifically the `@internal/dashboard-agent-db` package (the dashboard agent's conversation datastore). Covers pg-core schema definition, the postgres-js driver, drizzle-kit…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.