-- --------------------------------------------------------
-- Server OS:                    Win64
-- HeidiSQL Version:             12.6.0.6765
-- --------------------------------------------------------


-- Dumping structure for table car_registration.cars
CREATE TABLE IF NOT EXISTS `cars` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `make` varchar(50) DEFAULT NULL,
  `model` varchar(50) DEFAULT NULL,
  `year` int(11) DEFAULT NULL,
  `color` varchar(20) DEFAULT NULL,
  `fuel` varchar(20) DEFAULT NULL,
  `registration_number` varchar(20) DEFAULT NULL,
  `vin` varchar(17) DEFAULT NULL,
  `photo` blob DEFAULT NULL,
  `price` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `vin` (`vin`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `cars_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Dumping data for table car_registration.cars: ~2 rows (approximately)
INSERT INTO `cars` (`id`, `user_id`, `make`, `model`, `year`, `color`, `fuel`, `registration_number`, `vin`, `photo`, `price`) VALUES
	(41, NULL, 'BMW', '550i', 2003, 'White', 'Gasoline', 'MJ-265', 'wwrr4500000554yeg', _binary 0x2e2e2f70686f746f2f6c656a757069656cc48164c49374202832292e6a706567, NULL),
	(42, NULL, 'BMW', '550i', 2023, 'Blue', 'Gasoline', 'MJ-265', 'wwrr4500003554yeg', _binary 0x2e2e2f70686f746f2f6c656a757069656cc48164c49374202831292e6a706567, NULL),
	(43, NULL, 'Toyota', 'avensis', 2003, 'Brown', 'Diesel', 'GZ-2772', 'wwrr45335errrrrrr', _binary 0x2e2e2f70686f746f2f7374617469632d6173736574732d75706c6f6164333538313133393238323738383936353039322e77656270, '2000 euri');

-- Dumping structure for table car_registration.color
CREATE TABLE IF NOT EXISTS `color` (
  `color_id` int(11) NOT NULL AUTO_INCREMENT,
  `color` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`color_id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Dumping data for table car_registration.color: ~20 rows (approximately)
INSERT INTO `color` (`color_id`, `color`) VALUES
	(1, 'Red'),
	(2, 'Blue'),
	(3, 'Black'),
	(4, 'White'),
	(5, 'Silver'),
	(6, 'Green'),
	(7, 'Yellow'),
	(8, 'Orange'),
	(9, 'Purple'),
	(10, 'Pink'),
	(11, 'Brown'),
	(12, 'Gray'),
	(13, 'Gold'),
	(14, 'Cyan'),
	(15, 'Magenta'),
	(16, 'Lime'),
	(17, 'Maroon'),
	(18, 'Navy'),
	(19, 'Olive'),
	(20, 'Teal');

-- Dumping structure for table car_registration.make_brand
CREATE TABLE IF NOT EXISTS `make_brand` (
  `make_id` int(11) NOT NULL AUTO_INCREMENT,
  `make` varchar(70) DEFAULT NULL,
  PRIMARY KEY (`make_id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Dumping data for table car_registration.make_brand: ~18 rows (approximately)
INSERT INTO `make_brand` (`make_id`, `make`) VALUES
	(1, 'Toyota'),
	(2, 'Ford'),
	(3, 'Honda'),
	(4, 'Chevrolet'),
	(5, 'BMW'),
	(6, 'Volvo'),
	(7, 'Mazda'),
	(8, 'Cupra'),
	(9, 'Audi'),
	(10, 'Mercedes-Benz'),
	(11, 'Nissan'),
	(12, 'Hyundai'),
	(13, 'Kia'),
	(14, 'Volkswagen'),
	(15, 'Subaru'),
	(16, 'Jaguar'),
	(17, 'Porsche'),
	(18, 'Saab');

