# QB Inventory V2

> This documentation has not established a single upstream repository for “QB Inventory V2”. The label alone does not identify a release, supported API or database migration. Do not replace a working inventory using generic V2 instructions.

## Overview

Ask the supplier for the repository or licensed source, an exact commit or release, and migration instructions for your installed inventory. If you mean the current upstream resource, use [qb-inventory](https://github.com/qbcore-framework/qb-inventory) and the [QBCore inventory API reference](/docs/resources/qb-inventory).

## What's New Compared to `qb-inventory`

No feature comparison is reliable without an identified implementation. Verify metadata serialization, export signatures, event authorization and UI assets in the actual source. A claim of “API compatibility” must cover your callers on the correct execution side, not just matching export names.

## Installation Steps

1. Record your working core/inventory/caller revisions and back up files and database.
2. Identify the candidate revision and read its manifest and source before starting it.
3. Restore a staging copy and review the supplied SQL against existing tables.
4. Migrate callers deliberately; do not assume a folder called `qb-inventory-v2` satisfies calls to `exports['qb-inventory']`.
5. Use the [inventory update acceptance matrix](/docs/troubleshooting/inventory-updates#manual-acceptance-matrix) before considering a production switch.

## Configuration Overview

The candidate's files define its configuration. Do not invent `Config.Metadata`, compatibility toggles, React/Vue components or a `config.items.lua` file. Compare the actual settings with your item definitions, capacity limits, NUI manifest and persistence code.

## Migration Checklist

- **Identity:** repository/source, exact revision and licence are recorded.
- **Callers:** inventory exports, callbacks and events match signatures and client/server sides.
- **Authorization:** item transfers, stash access and purchases are checked on the server.
- **Storage:** table names, keys and metadata formats match a reviewed migration. Preserve legacy data through the recovery window.
- **Assets:** every `ui_page`, image and script referenced by the manifest exists with matching case.
- **Acceptance:** test add/remove/use, transfer, full inventory, stash ownership, reconnect and restart with two staging players.
- **Rollback:** restore matching code and database snapshots; account for writes made after a deployment.

The [resource compatibility checklist](/docs/migration/tools/compatibility-checker) documents static and runtime review separately. Passing static checks does not establish that a resource will run correctly.

## Troubleshooting

| Problem | Evidence to collect |
| --- | --- |
| Missing export | Exact caller line, execution side, provider state and candidate's export definition. |
| Metadata lost after restart | Serialization/save errors, before/after persisted JSON and migration history. |
| UI not loading | Manifest's actual `ui_page`, failed NUI asset requests and JavaScript errors. |
| Empty stashes | Source/target table and identifier mapping; do not rerun SQL without reviewing it. |

## See Also

- [Inventory systems](/resources/inventory): source-based comparison.
- [QBCore inventory](/docs/resources/qb-inventory): upstream reference.
- [LJ Inventory](/resources/inventory/lj-inventory): identified archived implementation.
- [Inventory update troubleshooting](/docs/troubleshooting/inventory-updates): verified APIs and storage diagnostics.

## Resources

Use the identified project's source, README, SQL and issue tracker. If the download supplies no reproducible implementation or migration evidence, retain the working inventory until those questions are resolved.
