ND-Framework / ND_Core

ND Framework core
https://discord.gg/nC82d8zvjM
GNU General Public License v3.0
53 stars 37 forks source link

Glovebox issue with ox inventory and ND Core #37

Closed Legacy-TacticalGamingInteractive closed 1 year ago

Legacy-TacticalGamingInteractive commented 1 year ago

[[Describe the bug

[ script:ox_inventory] [info] Saving 5 inventories to the database
[ script:ox_inventory] SCRIPT ERROR: @ox_inventory/modules/inventory/server.lua:613: ox_inventory was unable to execute a query!
[ script:ox_inventory] Unknown column 'id' in 'where clause'
[ script:ox_inventory] SELECT plate, glovebox FROM `vehicles` WHERE `id` = ?
[ script:ox_inventory] > callbackResponse (@ox_lib/callback/server.lua:60)
[ script:ox_inventory] > handler (@ox_lib/callback/server.lua:76)
[ script:ox_inventory] > <unknown> (@oxmysql/dist/build.js:22495)
[ script:ox_inventory] > processTicksAndRejections (node:internal/process/task_queues:96)
[ script:ox_inventory] 

To Reproduce Steps to reproduce the behavior: Started noticing these logs from players on the server recently as of the latest versions of oxlib, oxmysql, ox_target and ox_inventory

Additional context Add any other context about the problem here. https://github.com/overextended/ox_inventory/issues/1191

Legacy-TacticalGamingInteractive commented 1 year ago
CREATE TABLE `vehicles` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `owner` INT(11) NULL DEFAULT NULL,
    `plate` VARCHAR(255) NULL DEFAULT NULL,
    `glovebox` LONGTEXT NULL DEFAULT '[]',
    `trunk` LONGTEXT NULL DEFAULT '[]',
    `properties` LONGTEXT NULL DEFAULT '[]',
    `stored` INT(11) NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    INDEX `owner` (`owner`) USING BTREE,
    CONSTRAINT `vehowner` FOREIGN KEY (`owner`) REFERENCES `characters` (`character_id`) ON UPDATE CASCADE ON DELETE CASCADE
);