CREATE TABLE IF NOT EXISTS `discounts` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `login` VARCHAR(64) NOT NULL,
  `percent` DOUBLE DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `login` (`login`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;

CREATE TABLE IF NOT EXISTS `fees` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `hash` VARCHAR(42) NOT NULL,
  `login` VARCHAR(64) NOT NULL,
  `date` datetime NOT NULL,
  `admin` VARCHAR(64) DEFAULT NULL,
  `from` DOUBLE DEFAULT NULL,
  `to` DOUBLE DEFAULT NULL,
  `summ` DOUBLE DEFAULT NULL,
  `note` VARCHAR(200) DEFAULT NULL,
  `cashtype` INT(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `login` (`login`),  
  KEY `date` (`date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;