Database Schema Design & Migrations

VerifiedSafe

Design and manage relational databases with table creation, migrations, and schema modeling. Master normalization, constraints, and indexing for robust and scalable database solutions.

Sby Skills Guide Bot
DevelopmentIntermediate
306/2/2026
Claude CodeCursorWindsurfCopilotCodex
#database#schema-design#migrations#sql

Recommended for

Our review

This skill helps design and manage relational databases, including table creation, migrations, and schema design.

Strengths

  • Generates normalized schemas and reliable migrations
  • Enforces best practices for constraints and indexing
  • Simplifies database maintenance and evolution

Limitations

  • Does not cover NoSQL databases
  • Advanced performance tuning is outside scope
  • May require manual tweaks for highly specific use cases
When to use it

When you need to create or modify a relational database and want structured, safe migrations.

When not to use it

For non-relational databases or when high-level ORM solutions suffice without explicit migration management.

Security analysis

Safe
Quality score80/100

The skill provides non-executable guidance on database schema design and migrations. It does not instruct the AI to use any system tools, network operations, or destructive commands, and contains no obfuscated or malicious content.

No concerns found

Examples

Create users table
Create a users table with id, email, password_hash, created_at, and appropriate constraints.
Add migration for orders
Generate a migration to add an orders table with foreign key to users, including forward and backward steps.
Design schema for e-commerce
Design a relational schema for an e-commerce platform with products, customers, orders, and line items.

name: database-skill description: Design and manage relational databases including table creation, migrations, and schema design. Use for database modeling and maintenance.

Database Skill – Schema Design & Migrations

Instructions

  1. Table Creation

    • Define clear and consistent table structures
    • Use appropriate data types and constraints
    • Apply primary keys and foreign keys correctly
  2. Schema Design

    • Normalize data where appropriate
    • Model relationships explicitly
    • Design for scalability and maintainability
  3. Migrations

    • Create forward and backward migrations
    • Ensure migrations are idempotent and safe
    • Avoid destructive changes without backups
  4. Indexes & Constraints

    • Add indexes for frequently queried columns
    • Enforce uniqueness and referential integrity
    • Use constraints to protect data correctness

Best Practices

  • Use consistent naming conventions
  • Keep schemas simple and well-documented
  • Version control all migrations
  • Test migrations in non-production environments
  • Follow relational database design principles

Example Structure

CREATE TABLE users (
  id UUID PRIMARY KEY,
  email TEXT UNIQUE NOT NULL,
  password_hash TEXT NOT NULL,
  created_at TIMESTAMP DEFAULT NOW()
);
Related skills