> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ooneex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# migration:create

> Generate a new migration file.

Generate a new migration file with its test file inside a module. The migration is named automatically from a timestamp version, the `migrations.ts` export file is regenerated, and `bin/migration/up.ts` is created for the module if it does not already exist.

## Usage

```bash theme={null}
ooneex migration:create [options]
```

## Examples

```bash theme={null}
ooneex migration:create
```

```bash theme={null}
ooneex migration:create --module=blog
```

## Options

| Option     | Description                         | Default  |
| ---------- | ----------------------------------- | -------- |
| `--module` | Module the migration is created in. | `shared` |

## AI Skill

This command ships a matching `migration:create` skill. It teaches your AI agent to generate a migration file and its test, then complete the `up()` and `down()` implementations for the schema change using `@ooneex/migrations`.

<Tabs>
  <Tab title="Claude">
    ```bash theme={null}
    ooneex claude:init
    ```
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    ooneex codex:init
    ```
  </Tab>
</Tabs>
