create-migration — Hasura database migration create-migration, eduhub, eduhub-org, community, Hasura database migration, ai agent skill, ide skills, agent automation, EduHub database schema, create-migration skill, database migration tools, AI agent skills

v1.0.0
GitHub

About this Skill

Perfect for Database Management Agents needing automated schema migration capabilities for Hasura databases. Create-migration is a skill that generates Hasura database migrations for EduHub

Features

Generate migration timestamps
Add new database tables
Modify constraints or indexes
Support for GNU/Linux and macOS/BSD systems
Use with EduHub for seamless database schema changes

# Core Topics

eduhub-org eduhub-org
[12]
[8]
Updated: 2/28/2026

Quality Score

Top 5%
57
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
> npx killer-skills add eduhub-org/eduhub/create-migration
Supports 19+ Platforms
Cursor
Windsurf
VS Code
Trae
Claude
OpenClaw
+12 more

Agent Capability Analysis

The create-migration skill by eduhub-org is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for Hasura database migration, EduHub database schema, create-migration skill.

Ideal Agent Persona

Perfect for Database Management Agents needing automated schema migration capabilities for Hasura databases.

Core Value

Empowers agents to generate and manage database migrations using timestamped migration files, supporting schema changes such as adding or removing tables, columns, constraints, and indexes, leveraging GNU/Linux and macOS/BSD compatible commands.

Capabilities Granted for create-migration

Automating database schema updates
Generating migration scripts for new table additions
Modifying existing table constraints and indexes

! Prerequisites & Limits

  • Requires GNU/Linux or macOS/BSD system for command execution
  • Hasura database setup necessary
  • Schema changes require careful planning to avoid data loss
Project
SKILL.md
3.3 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8
SKILL.md
Readonly

Create Hasura Database Migration

When to Use

Use this skill when:

  • Adding new database tables
  • Adding or removing columns
  • Modifying constraints or indexes
  • Any database schema change is required

Step 1: Generate Migration Timestamp

GNU/Linux:

bash
1date +%s%3N

macOS/BSD (alternative):

bash
1python3 -c "import time; print(int(time.time() * 1000))"

Note: The date +%s%3N command works on GNU/Linux systems but not on macOS/BSD due to differences in the date command. macOS users should use the Python one-liner instead.

Example output: 1753957404053

Step 2: Create Migration Directory

Create the migration folder with the timestamp:

bash
1mkdir -p backend/migrations/default/{timestamp}_{action}_{description}

Replace:

  • {timestamp} with the generated timestamp
  • {action} with the action type (e.g., add_column, remove_column, create_table)
  • {description} with a snake_case description (e.g., scheduled_at_to_mail_log)

Step 3: Create up.sql

Create up.sql with the schema changes:

Adding a Column

sql
1ALTER TABLE "public"."TableName" ADD COLUMN "columnName" text;

Removing a Column

sql
1ALTER TABLE "public"."TableName" DROP COLUMN "columnName";

Creating a Table

sql
1CREATE TABLE "public"."TableName" ( 2 "id" serial NOT NULL, 3 "name" text NOT NULL, 4 "created_at" timestamptz NOT NULL DEFAULT now(), 5 "updated_at" timestamptz NOT NULL DEFAULT now(), 6 PRIMARY KEY ("id") 7); 8COMMENT ON TABLE "public"."TableName" IS 'Brief description of the table purpose';

Note: Always include a COMMENT ON TABLE statement to document the table's purpose. This helps maintain database documentation and makes the schema more understandable for future developers.

Step 4: Create down.sql

Create down.sql to reverse the changes:

If up.sql adds a column

sql
1ALTER TABLE "public"."TableName" DROP COLUMN "columnName";

If up.sql removes a column

sql
1ALTER TABLE "public"."TableName" ADD COLUMN "columnName" text;

If up.sql creates a table

sql
1DROP TABLE "public"."TableName";

Step 5: Update Hasura Metadata (If Needed)

For new tables or relationships, create/update metadata files in: backend/metadata/databases/default/tables/

See the database-table-creation.md rule for metadata templates.

Step 6: Regenerate TypeScript Types (MANDATORY)

After ANY schema change that affects GraphQL, regenerate types using the regenerate-types skill.

Note: Hasura must be running at http://localhost:8080/v1/graphql for this to work. See the regenerate-types skill for the complete command and troubleshooting steps.

Naming Conventions

  • Tables: PascalCase (UserProfile, CourseEnrollment)
  • Columns: camelCase (firstName, organizationId)
  • Timestamps: snake_case (created_at, updated_at)
  • Foreign keys: {tableName}Id (userId, courseId)
  • Migration folders: {timestamp}_{action}_{description} (1753957404053_add_column_status_to_mail_log)

Checklist

Before considering a schema-change task complete:

  • Migration up.sql created with correct SQL
  • Migration down.sql created to reverse changes
  • Hasura metadata updated (if adding tables/relationships)
  • TypeScript types regenerated
  • GraphQL queries updated (if field names changed)

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is create-migration?

Perfect for Database Management Agents needing automated schema migration capabilities for Hasura databases. Create-migration is a skill that generates Hasura database migrations for EduHub

How do I install create-migration?

Run the command: npx killer-skills add eduhub-org/eduhub/create-migration. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for create-migration?

Key use cases include: Automating database schema updates, Generating migration scripts for new table additions, Modifying existing table constraints and indexes.

Which IDEs are compatible with create-migration?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for create-migration?

Requires GNU/Linux or macOS/BSD system for command execution. Hasura database setup necessary. Schema changes require careful planning to avoid data loss.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add eduhub-org/eduhub/create-migration. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use create-migration immediately in the current project.

Related Skills

Looking for an alternative to create-migration or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
Design

linear

Logo of lobehub
lobehub

Linear issue management. MUST USE when: (1) user mentions LOBE-xxx issue IDs (e.g. LOBE-4540), (2) user says linear, linear issue, link linear, (3) creating PRs that reference Linear issues. Provides

73.4k
0
Communication

testing

Logo of lobehub
lobehub

Testing guide using Vitest. Use when writing tests (.test.ts, .test.tsx), fixing failing tests, improving test coverage, or debugging test issues. Triggers on test creation, test debugging, mock setup

73.3k
0
Communication

zustand

Logo of lobehub
lobehub

Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.

72.8k
0
Communication