QBCore database · SQL

QBCore SQL Table Missing? Fix Database Import Errors

If QBCore says a table or column is missing, do not guess. Match the script version to its SQL file, check the database name and import only the required migration.

Updated September 2026 · 7 min read · Stellar AI
Use this prompt in Stellar AI:

“My QBCore script says a SQL table or column is missing. Here is the error, SQL file, database name and resource version. Diagnose the most likely cause first, then give me the smallest safe patch and a test checklist.”

Fix this with Stellar AI →

Back up before touching schema

Missing table and unknown column errors are database problems, so start with a backup. A quick SQL import can fix the issue, but a wrong import can also damage live player data. Export the affected database before adding tables, altering columns or importing a script's schema. If your hosting panel has one-click backup, use it. If not, export through your database tool and keep the file somewhere safe before continuing.

Copy the exact error first. The wording usually tells you whether a table is missing, a column is missing, a JSON field is invalid, or the query is being sent to the wrong database. A QBCore script that says player_vehicles does not exist needs a different fix from one that says column garage does not exist. Do not import every SQL file you can find. Import the migration that matches the resource version and error.

error text:
missing table or column:
resource version:
SQL file included:
database name in connection string:
backup completed: yes/no

Verify the database name

A common mistake is importing SQL into one database while the FiveM server connects to another. Your host may create multiple databases with similar names. Check the database name in the connection string, then check where you imported the SQL. If those names do not match, the script will still report missing tables after a successful import. This can be confusing because the table really exists, just not in the database your server uses.

Also confirm the MySQL user has permission for that database. Access problems can look like missing data if a resource cannot read or write what it expects. If several resources fail at once, fix the database connection first before importing more schema.

Match resource version and SQL

Scripts evolve. A garage, housing, phone or inventory resource may add columns across releases. If your code is from one version and the SQL file is from another, you can get missing column errors even after importing. Compare the resource README, release notes and SQL file. If there are incremental migrations, run them in order. If a script includes a full install SQL and a migration SQL, do not blindly run both without understanding whether tables already exist.

Test safely after import

After importing, restart the database-dependent resource and watch the console. Then test one feature that uses the table. If the script is a garage, spawn and store one vehicle. If it is money, change one small value and reconnect. If it is inventory, give one test item. Keep the test small so you know exactly what changed. If the first error disappears but a new column error appears, continue schema matching rather than rewriting gameplay code.

Stellar AI can compare the error, SQL file and resource version. Ask it for a minimal migration plan and a rollback note. A strong answer should protect existing data and avoid unsupported destructive SQL.

Fix the schema safely

Paste the exact SQL error, resource version and migration file into Stellar AI. Ask for a backup-first plan and one-feature test.

Open Stellar AI free →