🛠️Installation
Database Installation
Before you install this, you have on option on config to install the SQL automatic.
CREATE TABLE IF NOT EXISTS `m_used_car_shop` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`shop_name` varchar(50) NOT NULL,
`job` varchar(50) NOT NULL,
`balance` int(11) DEFAULT 0,
`data` text DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `shop_name` (`shop_name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE IF NOT EXISTS `m_used_car_garage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`shop_name` varchar(50) NOT NULL,
`vehicle_model` varchar(100) NOT NULL,
`plate` varchar(20) NOT NULL,
`seller_identifier` varchar(50) NOT NULL,
`price` int(11) DEFAULT 0,
`status` enum('in_stock','exposed','sold') DEFAULT 'in_stock',
`coords` text DEFAULT NULL,
`description` text DEFAULT NULL,
`vehicle_mods` text DEFAULT NULL,
`buyer_identifier` varchar(75) DEFAULT NULL,
`sell_date` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_plate_per_shop` (`shop_name`, `plate`),
KEY `shop_name` (`shop_name`),
CONSTRAINT `m_used_car_garage_ibfk_1` FOREIGN KEY (`shop_name`) REFERENCES `m_used_car_shop` (`shop_name`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
Last updated