1.1.3.sql 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. CREATE TABLE IF NOT EXISTS `garage_cars` (
  2. `id` INT(11) NOT NULL AUTO_INCREMENT,
  3. `vendor` VARCHAR(40) NOT NULL,
  4. `model` VARCHAR(40) NOT NULL,
  5. `number` VARCHAR(20) DEFAULT NULL,
  6. `vin` VARCHAR(40) DEFAULT NULL,
  7. `year` INT(11) DEFAULT NULL,
  8. `power` INT(11) DEFAULT NULL,
  9. `engine` INT(11) DEFAULT NULL,
  10. `fuelconsumption` DOUBLE DEFAULT NULL,
  11. `fueltype` VARCHAR(16) DEFAULT NULL,
  12. `gastank` INT(11) DEFAULT NULL,
  13. `weight` INT(11) DEFAULT NULL,
  14. PRIMARY KEY (`id`)
  15. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
  16. CREATE TABLE IF NOT EXISTS `garage_drivers` (
  17. `id` INT(11) NOT NULL AUTO_INCREMENT,
  18. `employeeid` INT(11) NOT NULL,
  19. `carid` INT(11) DEFAULT NULL,
  20. PRIMARY KEY (`id`)
  21. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
  22. CREATE TABLE IF NOT EXISTS `garage_mileage` (
  23. `id` INT(11) NOT NULL AUTO_INCREMENT,
  24. `date` DATETIME NOT NULL,
  25. `carid` INT(11) NOT NULL,
  26. `mileage` INT(11) DEFAULT NULL,
  27. PRIMARY KEY (`id`)
  28. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
  29. CREATE TABLE IF NOT EXISTS `garage_mapon` (
  30. `id` INT(11) NOT NULL AUTO_INCREMENT,
  31. `carid` INT(11) NOT NULL,
  32. `unitid` INT(11) NOT NULL,
  33. PRIMARY KEY (`id`)
  34. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
  35. ALTER TABLE `banksta2_presets` ADD `col_srvidents` varchar(20) DEFAULT '' AFTER `col_contract`;
  36. ALTER TABLE `banksta2_presets` ADD `srvidents_preffered` tinyint(3) DEFAULT 0 AFTER `guess_contract`;
  37. CREATE TABLE IF NOT EXISTS `user_dataexport_allowed` (
  38. `id` int(11) NOT NULL AUTO_INCREMENT,
  39. `login` varchar(100) NOT NULL,
  40. `export_allowed` tinyint(3) DEFAULT 0,
  41. PRIMARY KEY (`id`),
  42. UNIQUE KEY (`login`)
  43. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  44. CREATE TABLE IF NOT EXISTS `contrahens_extinfo` (
  45. `id` int(11) NOT NULL AUTO_INCREMENT,
  46. `agentid` int(11) NOT NULL,
  47. `service_type` varchar(50) NOT NULL DEFAULT '',
  48. `internal_paysys_name` varchar(50) NOT NULL DEFAULT '',
  49. `internal_paysys_id` varchar(50) NOT NULL DEFAULT '',
  50. `internal_paysys_srv_id` varchar(50) NOT NULL DEFAULT '',
  51. PRIMARY KEY (`id`)
  52. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;