Ecto Migrator for Openclaw

A specialized tool for generating Elixir Ecto migrations from natural language descriptions or schema definitions.

gchapim
v1.0.0
Feb 3, 2026
1
2.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install ecto-migrator

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install ecto-migrator using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Ecto Migrator?

Ecto Migrator is a professional-grade tool designed to assist Elixir developers in managing database evolution through the Openclaw Skills ecosystem. By allowing developers to convert simple descriptions into complex migration files, it streamlines the development lifecycle. The skill handles everything from table creation and column alteration to the implementation of advanced constraints and partitioning. It focuses on modern Elixir standards, such as utilizing binary_id for primary keys and maintaining microsecond precision for all timestamps, ensuring your database schema is both robust and scalable.

Ecto Migrator Use Cases

  • Rapidly generating table structures from natural language descriptions like "create users table with email".
  • Adding indexes to existing columns to optimize database query performance.
  • Implementing multi-tenant architecture by adding tenant_id columns and composite indexes across all tables.
  • Creating reversible migrations for changing column types using the latest Phoenix and Ecto features.
  • Managing data backfills safely by separating data logic from schema-level transitions.

How Ecto Migrator Works

  1. The developer provides a prompt describing the desired database change to the Openclaw Skills interface.
  2. The engine analyzes the prompt to determine the appropriate Ecto migration actions such as create, alter, or rename.
  3. A standardized migration name is suggested based on the intended action, following conventions like add_column_to_table.
  4. The skill generates a complete Elixir migration file, incorporating best practices for column types, foreign keys, and indexing.
  5. The generated file is ready to be placed in the project directory for execution via the standard mix CLI.

Ecto Migrator Setup

To leverage this Openclaw Skills capability, ensure your Elixir and Phoenix environment is correctly configured. You can trigger migration generation via your coding agent which will then utilize the following command structure:

mix ecto.gen.migration <migration_name>

The resulting migration files will be populated in your priv/repo/migrations/ directory based on the logic provided by the skill.

Ecto Migrator Data Schema & Taxonomy

Feature Specification Implementation
IDs binary_id Uses UUIDs for better distributed system support
Money integer/decimal Stored as cents or decimals to avoid floating point precision issues
Timestamps utc_datetime_usec Implements high precision UTC timestamps by default
Multi-tenancy tenant_id Automatically adds and indexes tenant identifiers for data isolation
JSON Storage map Maps directly to PostgreSQL jsonb types for flexible data structures

Ecto Migrator Advanced Features

  • Support for concurrent index creation to prevent table locking in production environments.
  • Automated inclusion of PostgreSQL extensions such as citext, pgcrypto, and pg_trgm.
  • Native support for GIN indexes on JSONB and array columns for optimized searching.
  • Smart handling of reversible versus irreversible migrations to ensure safe database rollbacks.
  • Integration with Ecto.Enum for application-level type safety while maintaining string columns in the database.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*