> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talosjs.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 the module's `bin/migration/up.ts` and `bin/migration/down.ts` runners are created if they do not already exist.

## Usage

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

## Examples

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

```bash theme={null}
talos 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 `@talosjs/migrations`.

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

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