{"enrichment":{"faq":[{"a":"drizzle-migrations guides you through generating and applying migrations using Drizzle ORM. Start by defining your schema in a TypeScript file, then run `drizzle-kit generate sqlite` to create migration files. Execute migrations in your application using `db.run()` or the push workflow. The skill covers schema definition, column types, relations, and production deployment strategies.","q":"How do I create drizzle migrations for SQLite?"},{"a":"drizzle-migrations explains that `db push` applies schema changes directly to your database without creating migration files\u2014ideal for development. The `generate migrate` command creates explicit migration files that you version control and apply later, essential for production. Use `push` for rapid prototyping and `generate migrate` for managed schema evolution across environments.","q":"What's the difference between drizzle db push and generate migrate?"},{"a":"drizzle-migrations teaches you to modify your schema file by adding new table definitions or column properties, then run `drizzle-kit generate sqlite` to create a migration. The generated migration file contains the SQL to add your table or column. Review the migration, commit it to version control, and apply it using your application's migration runner or `db push`.","q":"How do I add a table or column with drizzle-migrations?"},{"a":"drizzle-migrations covers defining relations between SQLite tables using the `relations()` helper and `.references()` on columns. Define a foreign key column with a type matching the referenced table's primary key, then use `.references(() => otherTable.id)`. Relations enable type-safe joins and queries. Generate migrations after defining relations to ensure referential integrity constraints.","q":"How do I set up foreign key relations in drizzle-migrations?"},{"a":"drizzle-migrations recommends versioning all migration files in your repository, testing migrations in a staging environment before production, and using transactions for multi-step changes. Always review generated migrations before applying them. Use explicit migration files rather than `push` in production. Monitor migration execution and maintain rollback procedures for critical deployments.","q":"What are drizzle-migrations production best practices?"},{"a":"drizzle-migrations shows how to add indexes using `.index()` on table definitions, then generate migrations to apply them. For queries, use Drizzle's query builder with `.select()`, `.where()`, `.join()`, and `.groupBy()` for type-safe operations. Aggregations like `.count()` and `.avg()` are built-in. Migrations ensure indexes exist before queries rely on them for performance.","q":"How do I create indexes and write type-safe queries?"}],"shadow_tags":["schema-versioning","orm-tooling","database-automation","sql-generation","type-safe-queries","migration-management","sqlite-specific","dev-to-prod-workflow"],"summary_rewrite":"This skill guides you through Drizzle ORM's migration workflow for SQLite databases, covering schema definition, column types, and common changes like adding tables or indexes. Learn production-ready strategies for generating migrations, applying them in code, and managing relations between tables."},"files":[{"bytes":10224,"path":".claude/skills/drizzle-migrations/SKILL.md","sha256":"e4a1d882cc6212e4e6fbe81ebf015c6437a752a6f0672a569db2df164ab58bd0","url":"https://skillfed.io/files/curiositech/some_claude_skills/drizzle-migrations/82cb1aeb/SKILL.md"}],"id":"curiositech/some_claude_skills/drizzle-migrations","links":{"html":"https://skillfed.io/curiositech/some_claude_skills/drizzle-migrations","md":"https://skillfed.io/curiositech/some_claude_skills/drizzle-migrations.md","repo":"https://github.com/curiositech/some_claude_skills"},"meta":{"agents_supported":["claude-code"],"first_seen":"2026-07-28","forks":27,"language":"TypeScript","last_updated":"2026-07-14","license":"MIT","name":"drizzle-migrations","publisher":"curiositech","stars":164},"relations":{"similar":[{"id":"secondsky/claude-skills/bun-drizzle-integration"},{"id":"alinaqi/maggy/cloudflare-d1"},{"id":"giuseppe-trisciuoglio/developer-kit/drizzle-orm-patterns"},{"id":"bobmatnyc/claude-mpm-skills/drizzle"},{"id":"secondsky/claude-skills/drizzle-orm-d1"},{"id":"Mindrally/skills/drizzle-orm"},{"id":"ccheney/robust-skills/postgres-drizzle"},{"id":"jezweb/claude-skills/d1-drizzle-schema"},{"id":"pedronauck/skills/drizzle-postgres"},{"id":"secondsky/claude-skills/nuxt-server"}]},"slug":{"owner":"curiositech","repo":"some_claude_skills","skill":"drizzle-migrations"},"version":"82cb1aeb"}
