refactor: database queries

This commit is contained in:
Andyyy7666
2023-07-12 04:51:04 +02:00
parent d5d3de98bf
commit af7d893164
3 changed files with 22 additions and 15 deletions

12
database/vehicles.sql Normal file
View File

@@ -0,0 +1,12 @@
CREATE TABLE IF NOT EXISTS `nd_vehicles` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`owner` INT(11) DEFAULT NULL,
`plate` VARCHAR(255) DEFAULT NULL,
`glovebox` LONGTEXT DEFAULT '[]',
`trunk` LONGTEXT DEFAULT '[]',
`properties` LONGTEXT DEFAULT '[]',
`stored` INT(11) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `owner` (`owner`) USING BTREE,
CONSTRAINT `vehowner` FOREIGN KEY (`owner`) REFERENCES `nd_characters` (`charid`) ON UPDATE CASCADE ON DELETE CASCADE
);