Stellar AI

Errors

FiveM oxmysql: 'Unknown column ... in field list' – Fix

The error

[oxmysql] Unknown column 'metadata' in 'field list'

What it means

The query names a column that does not exist in that table. The script is fine; the database is out of date. Common causes: the resource's .sql file was never imported, you updated a resource but not its tables, or the script was written for a different framework schema (for example ESX users versus QBCore players).

The fix

  1. Open the resource folder and find its .sql file (often in the root or an sql/ folder).
  2. Back up your database first.
  3. Import the file in HeidiSQL, phpMyAdmin or your host's database tool, or add the single missing column:
-- example only: check the resource's own SQL for the right type
ALTER TABLE `players` ADD COLUMN `metadata` LONGTEXT NULL;

Then restart the resource. If the column name looks like it belongs to a different framework, you need a version of the script made for your framework.

Related errors

Related tools: FiveM script generator · Fix a FiveM Lua error · all script generators