# [Usage](../../../usage.md) > Framework remigrate

Use `kfw:remigrate` when framework tables or indices are out of sync and the standard `migrate` reports nothing to run. Unlike `migrate` (skips executed batches), it forces every `*_kfw_*` migration to run again from the first one in filename order.

---

## Method

### `php artisan kfw:remigrate {--force}`

#### Arguments

- **`--force`** *(optional)*  
  Execute without confirmation. Without this flag the command asks to continue because re-running migrations may cause data loss.

#### What it does

- Lists framework migrations in `src/database/migrations/*_kfw_*.php` in sorted order.
- Asks for confirmation unless `--force` is given.
- Calls `up()` on each migration, so missing tables, columns, and `kfw_*` indices are created when absent.
- Records each executed migration name in the `migrations` table when that table exists, so `migrate:status` reflects the enforced state.
- Prints `Migrated:` per file, `Skipped` for non-migration files, and `Failed` with the error message per failure.

Framework migrations are idempotent: existing tables, columns, and indices are detected with `hasTable`, `hasColumn`, and `hasIndex` and left untouched.

---

## Output

Per-migration status lines plus a final success line, or a failure count when one or more migrations fail.

---

## Example

```bash
php artisan kfw:remigrate
php artisan kfw:remigrate --force
```

Confirm the prompt in production. Verify afterwards with `php artisan migrate:status`.

## See also

- [Usage](../../../usage.md)
- [Framework update](kfw_update.md) — standard migration path via `migrate`
- [Clear expired cache](clear_expired_cache.md) — targeted maintenance command
- [Installation](../../../installation.md) — when to enforce migrations
