> For the complete documentation index, see [llms.txt](https://docs.otherplanet.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherplanet.dev/scripts/op-clothing/migrations.md).

# Migrations

Integrations & Migrations

{% hint style="danger" %}
**Back up your database before running any migration.** Migrations only read from the source tables, but a backup is always the safe move.
{% endhint %}

op-clothing is a drop-in replacement for the most popular clothing scripts. It **provides** their resource names and forwards their exports/events, so other resources keep working without changes - and it ships console commands to migrate existing player skins and outfits into op-clothing.

## Supported integrations

These resource names are provided by op-clothing. Do **not** start the original resource alongside it.

| Script                  | Skins | Outfits | Notes        |
| ----------------------- | :---: | :-----: | ------------ |
| illenium-appearance     |  yes  |   yes   | ESX + QBCore |
| fivem-appearance        |  yes  |   yes   | ESX          |
| skinchanger / esx\_skin |  yes  |    -    | ESX          |
| qb-clothing             |  yes  |   yes   | QBCore       |
| rcore\_clothing         |  yes  |   yes   | ESX + QBCore |

Compatibility is controlled in `config/MainConfig.lua` under `Config.Compat` (`Enabled`, `LegacyProvides`, `IlleniumExports`, `SkinchangerEvents`, `QbClothingEvents`, `RcoreEvents`, `NormalizeOnLoad`).

{% hint style="info" %}
Migration commands are **server-console only** (admin-restricted) and take no arguments unless noted. Run them once, then remove the old resource.
{% endhint %}

## op\_clothing\_migrate\_illenium\_esx

Migrates illenium-appearance on **ESX**: skins from `users.skin` and outfits from `player_outfits`.

```
op_clothing_migrate_illenium_esx
```

***

## op\_clothing\_migrate\_illenium\_qb

Migrates illenium-appearance on **QBCore**: skins from `playerskins` and outfits from `player_outfits`.

```
op_clothing_migrate_illenium_qb
```

***

## op\_clothing\_migrate\_skinchanger\_esx

Migrates skinchanger / esx\_skin skins from the ESX `users.skin` column.

```
op_clothing_migrate_skinchanger_esx
```

***

## op\_clothing\_migrate\_fivem\_appearance\_esx

Migrates fivem-appearance on **ESX**: skins from `users.skin` and outfits from the `outfits` table.

```
op_clothing_migrate_fivem_appearance_esx
```

***

## op\_clothing\_migrate\_rcore

Migrates rcore\_clothing: active skins from `rcore_clothing_current` and saved outfits from `rcore_clothing_outfits`.

```
op_clothing_migrate_rcore
```

***

## op\_clothing\_migrate\_rcore\_outfits\_only

Migrates only the saved outfits from `rcore_clothing_outfits` (skips active skins).

```
op_clothing_migrate_rcore_outfits_only
```

***

## op\_clothing\_migrate\_outfits\_only

Migrates only saved outfits. Pass `illenium` (default) or `fivem` to pick the source table.

```
op_clothing_migrate_outfits_only illenium
op_clothing_migrate_outfits_only fivem
```

***

## Where migrated data goes

| Data          | Destination                                    |
| ------------- | ---------------------------------------------- |
| Player skins  | Framework table (`users.skin` / `playerskins`) |
| Saved outfits | `op_clothing_outfits`                          |

## Notes & limitations

* Migrations are **read-only** on the source tables - your old data is untouched.
* Tattoos are not carried over from formats that don't store them (e.g. rcore\_clothing).
* Non-freemode ped models fall back to a freemode model when the source only stores a model hash.
* Re-running a migration may create duplicate outfits - run each command once.
