CREATE TABLE `adminsettings` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `value` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `username` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `is_admin` varchar(255) NOT NULL DEFAULT '0',
  `kenteken` varchar(255) NOT NULL DEFAULT 'AB-003-C',
  `lastid` varchar(255) NOT NULL DEFAULT '0',
  `lastzip` varchar(255) NOT NULL DEFAULT '1000AB 10',
  `lastkm` varchar(255) NOT NULL DEFAULT '10500',
  `hide_header` varchar(255) NOT NULL DEFAULT '0',
  `menu_scroll` varchar(255) NOT NULL DEFAULT '0',
  `wallpaper` varchar(255) NOT NULL DEFAULT 'def.jpg',
  `homead` varchar(255) NOT NULL DEFAULT '1001AA 10',
  `workad` varchar(255) NOT NULL DEFAULT '2005GG 12'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `settings` (`id`, `username`, `password`, `is_admin`, `kenteken`, `lastid`, `lastzip`, `lastkm`, `hide_header`, `menu_scroll`, `wallpaper`, `homead`, `workad`) VALUES
(1, 'admin', '21232f297a57a5a743894a0e4a801fc3', '1', 'AB-003-C', '0', '1000AB 10', '10500', '0', '0', '1.jpg', '1001AA 10', '2005GG 12');

CREATE TABLE `visits` (
  `id` int(11) NOT NULL,
  `username` varchar(255) NOT NULL DEFAULT '0',
  `kmstart` varchar(255) NOT NULL DEFAULT '0',
  `kmend` varchar(255) NOT NULL DEFAULT '0',
  `zipcode` varchar(255) NOT NULL DEFAULT '0',
  `zipcode0` varchar(255) NOT NULL DEFAULT '0',
  `city` varchar(255) NOT NULL DEFAULT '0',
  `kmnotes` varchar(255) NOT NULL DEFAULT '0',
  `privatekm` varchar(255) NOT NULL DEFAULT '0',
  `carplate` varchar(255) NOT NULL DEFAULT '0',
  `jobtype` varchar(255) NOT NULL DEFAULT '0',
  `jobno` varchar(255) NOT NULL DEFAULT '0',
  `jobmaterials` text NOT NULL DEFAULT '0',
  `jobwork` text NOT NULL DEFAULT '0',
  `jobfinish` text NOT NULL DEFAULT '0',
  `drivedpriv` varchar(255) NOT NULL DEFAULT '0',
  `reg_date` varchar(255) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

ALTER TABLE `adminsettings`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `visits`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `adminsettings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

ALTER TABLE `visits`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;