What problem does it solve?
Managing database schemas, applying changes, and ensuring data integrity across different environments can be complex and error-prone without a robust migration system. This skill provides a reliable way to evolve your database.
Core Features & Use Cases
- Drizzle ORM Schema Definition: Define type-safe database schemas using Drizzle ORM, including relationships, enums, and JSONB fields, reducing schema-related errors.
- Automated Migrations: Generate and apply database migrations to evolve your schema reliably and consistently across all environments.
- PostgreSQL Client (
postgres): Understand and utilize the postgres client library for efficient and safe database interactions, preventing SQL injection.
- Use Case: Add a new table to store user preferences. You'll define the schema using Drizzle, generate a migration, review the SQL, and then apply it to your development database, ensuring a smooth and error-free schema update.
Quick Start
Add a new last_login_at timestamp column to the app_users table, generate a migration, and apply it to the database.