new-migration

Generate Drizzle ORM schema tables with SQL migrations and RLS policies.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/wordshepherd/colophony --skill new-migration-wordshepherd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-migration
Source: https://github.com/wordshepherd/colophony/tree/main/.claude/skills/new-migration
Command: npx skills add https://github.com/wordshepherd/colophony --skill new-migration-wordshepherd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of new database tables, including their schema definition, migration scripts, and Row Level Security (RLS) policies, streamlining database development.

Core Features & Use Cases

  • Automated Schema Creation: Generates TypeScript files for new Drizzle ORM schema tables.
  • Migration Generation: Creates SQL migration files for database schema changes.
  • RLS Policy Implementation: Automatically adds necessary RLS policies for organization or user-scoped tables.
  • Use Case: When adding a new feature that requires a new data table (e.g., 'user_preferences'), this Skill can generate all the necessary files and configurations with a single command.

Quick Start

Use the new-migration skill to add a new table named 'products' with fields 'name:text' and 'price:integer'.

Frequently Asked Questions about new-migration

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

FAQPage Schema
How do I generate Drizzle ORM schema and SQL migrations with Row Level Security?

To generate Drizzle ORM schema and SQL migrations with Row Level Security, use this Skill to create TypeScript schema tables, output associated migration scripts, and automatically configure RLS policies via pgPolicy for organization or user-scoped access control.

What is the best way to add organization-scoped RLS policies to a new Postgres table?

Adding organization-scoped RLS policies to a new Postgres table involves defining the schema and applying pgPolicy configurations. This Skill automates that process by generating the Drizzle schema and attaching the necessary Row Level Security rules based on your specified table scope.

Can I create custom fields like text and integer when generating a new database schema?

Yes, you can create custom fields like text and integer when generating a new database schema. This Skill supports specifying custom field types and names during schema generation, producing TypeScript files that accurately define your Drizzle ORM table structure.

Does this migration generator support global tables or only user and organization-scoped tables?

This migration generator supports global tables in addition to user-scoped and organization-scoped tables. It automatically adjusts the Row Level Security configuration, applying pgPolicy only where necessary, ensuring global tables remain accessible without restrictive tenant-level policies.

How do I handle migration journal updates when the TUI blocks during schema generation?

When the TUI blocks during schema generation, you can use the manual fallback to handle migration journal updates. This Skill detects TUI blocking conditions and provides a manual pathway to ensure your Drizzle migration journal remains accurately synchronized.

Why do I need separate SQL migration files when adding a new feature table to my database?

You need separate SQL migration files when adding a new feature table to track database schema changes incrementally. This Skill generates these distinct migration scripts alongside your Drizzle schema, ensuring your Postgres database structure remains version-controlled and reproducible.