database-migration

Generate Supabase schema migrations with UUID defaults, timestamps, and RLS policies.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/nizarghribi/hounii-monorepo-first --skill database-migration-nizarghribi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migration
Source: https://github.com/nizarghribi/hounii-monorepo-first/tree/main/.claude/skills/database-migration
Command: npx skills add https://github.com/nizarghribi/hounii-monorepo-first --skill database-migration-nizarghribi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually managing Supabase database schemas, migrations, Row Level Security (RLS) policies, and PostGIS features can be complex, error-prone, and time-consuming. This Skill automates best practices, ensuring security, consistency, and efficiency in your database operations.

Core Features & Use Cases

  • Secure Schema Management: Enforces UUID primary keys, created_at/updated_at timestamps, and proper foreign key relationships, reducing common database pitfalls.
  • Automated RLS Policies: Guides the creation and enforcement of robust Row Level Security policies, protecting your data from unauthorized access.
  • PostGIS Integration: Streamlines the implementation of location-based features with PostGIS, including spatial indexes and distance queries.
  • Use Case: Quickly set up a new posts table with all required audit columns, RLS policies for user ownership, and a spatial index for location-based searching, all while adhering to security best practices.

Quick Start

Use the database-migration skill to create a new 'events' table in Supabase, ensuring it has UUIDs, timestamps, and basic RLS policies for authenticated users.

Frequently Asked Questions about database-migration

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

FAQPage Schema
How do I set up safe database migrations for Supabase with UUID and timestamp enforcement?

Database migrations for Supabase enforce UUID primary keys, created_at/updated_at audit columns, and foreign key relationships by default. Use this Skill to structure schema changes with built-in security best practices, ensuring consistency across development, staging, and production environments without manual repetition.

How do I create Row Level Security policies in Supabase to protect user data?

Row Level Security policies restrict data access based on user identity and roles. This Skill automates RLS policy creation and enforcement, guiding you to define policies for authenticated users and service roles, ensuring unauthorized access is prevented across your tables.

Can I use PostGIS with Supabase for location-based features?

PostGIS extends Supabase with spatial data types and functions for location queries. This Skill streamlines PostGIS implementation, including spatial index creation and distance queries, so you can quickly add location-based searching without manual configuration.

What's the best way to organize database migrations across multiple environments?

Structured migration organization groups changes by type—tables, views, functions, triggers, policies, indexes—ensuring predictable, repeatable deployments. This Skill enforces organization standards so migrations stay consistent and safe when moving from development through production.

Do I need to manually configure service role usage and RLS policies for each table?

Manual configuration is error-prone and time-consuming. This Skill enforces safe service role usage patterns and automates RLS policy setup, reducing common security pitfalls and ensuring every table adheres to best practices without redundant setup.

Related Skills