db-migration

Generate SQL migrations for ent framework schema changes on PostgreSQL.

2.2k|199|Updated Jun 6, 2023
One-click install
npx skills add https://github.com/openmeterio/openmeter --skill db-migration-openmeterio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-migration
Source: https://github.com/openmeterio/openmeter/tree/main/.agents/skills/db-migration
Command: npx skills add https://github.com/openmeterio/openmeter --skill db-migration-openmeterio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill streamlines the process of modifying database schemas and generating necessary migration files, ensuring database integrity and consistency.

Core Features & Use Cases

  • Schema Modification: Allows for direct editing of database schema definitions.
  • Migration Generation: Automatically creates SQL migration scripts based on schema changes.
  • Use Case: When adding a new feature that requires a new database table, use this Skill to define the table schema and generate the corresponding SQL migration to apply it to the database.

Quick Start

Use the db-migration skill to add a new user table to the database schema.

Frequently Asked Questions about db-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate SQL migrations for ent framework schema changes?

To generate SQL migrations for ent schema changes, you modify the schema definitions and use Atlas migration diffing to automatically create version-controlled SQL migration scripts for PostgreSQL databases.

What is the best way to manage database schema evolution in PostgreSQL?

Managing database schema evolution involves updating schema definitions, regenerating ent code, and using Atlas to diff changes, which ensures database integrity through version-controlled migration files.

Can I use Atlas migration diffing with ent for PostgreSQL databases?

Yes, Atlas migration diffing works with ent for PostgreSQL databases to calculate schema differences and generate the necessary SQL migration scripts required for database updates.

How do I add a new database table using ent and generate the migration?

To add a new database table, you define the new table schema within ent, regenerate the ent code, and then generate the corresponding SQL migration to apply the changes to the database.

Do I need to manually write SQL scripts when updating ent schema definitions?

No, you do not need to manually write SQL scripts when updating ent schema definitions because the system automatically creates SQL migration scripts based on the detected schema changes.