database-schema-migrations

Designs PostgreSQL schemas and generates Sequelize migrations for backend projects.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/addval/finishd-platform --skill database-schema-migrations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-schema-migrations
Source: https://github.com/addval/finishd-platform/tree/main/.claude/skills/database-schema-migrations
Command: npx skills add https://github.com/addval/finishd-platform --skill database-schema-migrations

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Designing robust PostgreSQL schemas, generating deterministic Sequelize migrations, and implementing well-structured models and associations is error-prone and time-consuming. This Skill provides a structured approach to manage schema changes, enforce naming conventions, and keep migrations, seeds, and models in sync across teams.

Core Features & Use Cases

  • Schema design guidance: best practices for tables, types, constraints, indexing, and naming conventions.
  • Migration workflows: creating, applying, testing, and rolling back migrations using Sequelize CLI.
  • Model & association patterns: standard approaches for hasMany, belongsTo, and many-to-many with join tables.
  • Use Case: when adding a new feature requiring new tables and foreign keys, scaffold migrations and models consistently.

Quick Start

Run the generator script to scaffold a new model and its migration, then apply the migration to update the database.

Frequently Asked Questions about database-schema-migrations

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

FAQPage Schema
How do I design a PostgreSQL schema with Sequelize migrations?

PostgreSQL schema design with Sequelize involves creating migrations that define tables, relationships, and constraints. Use Sequelize CLI to generate migrations, define models with associations (hasMany, belongsTo, many-to-many), and apply migrations to enforce your data structure across environments.

What's the best way to manage database migrations in a Node.js project?

Create and version migrations using Sequelize CLI, applying them sequentially to keep your database schema in sync with your codebase. Store migrations in a dedicated directory, test rollbacks, and keep models synchronized with migration definitions to maintain consistency across teams.

How do I set up foreign keys and relationships in Sequelize?

Define associations in your Sequelize models using hasMany, belongsTo, and many-to-many patterns with join tables. Migrations enforce these relationships through foreign key constraints, ensuring referential integrity and maintaining data consistency across related tables.

Can I seed a PostgreSQL database with Sequelize?

Yes, Sequelize supports seeding through seeders that populate tables with initial or test data. Use Sequelize CLI to generate and run seeders in a controlled sequence, enabling reproducible database states for development and testing.

What naming conventions should I follow for PostgreSQL tables and migrations?

Follow standard conventions: snake_case for table and column names, descriptive migration names with timestamps, and consistent pluralization for table names. This maintains readability, prevents conflicts, and makes migrations portable across team members and environments.

Do I need to manually write migrations or can they be generated?

Sequelize CLI can scaffold migrations and models programmatically, generating boilerplate for tables and associations. You then customize them with constraints, indexes, and validation logic specific to your data model and business requirements.