0.9.6.sql 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. CREATE TABLE IF NOT EXISTS `ddt_options` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `tariffname` varchar(40) NOT NULL,
  4. `period` varchar(10) NOT NULL,
  5. `startnow` tinyint(4) NOT NULL,
  6. `duration` int(11) NOT NULL,
  7. `chargefee` tinyint(4) NOT NULL,
  8. `chargeuntilday` int(11) DEFAULT NULL,
  9. `tariffmove` varchar(40) NOT NULL,
  10. PRIMARY KEY (`id`)
  11. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  12. CREATE TABLE IF NOT EXISTS `ddt_users` (
  13. `id` int(11) NOT NULL AUTO_INCREMENT,
  14. `login` varchar(32) NOT NULL,
  15. `active` tinyint(4) NOT NULL,
  16. `startdate` datetime NOT NULL,
  17. `curtariff` varchar(40) NOT NULL,
  18. `enddate` date NOT NULL,
  19. `nexttariff` varchar(40) NOT NULL,
  20. `dwiid` int(11) NOT NULL,
  21. PRIMARY KEY (`id`)
  22. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  23. CREATE TABLE IF NOT EXISTS `switch_groups` (
  24. `id` int(11) NOT NULL AUTO_INCREMENT,
  25. `groupname` varchar(255) NOT NULL,
  26. `groupdescr` varchar(500) NOT NULL DEFAULT '',
  27. PRIMARY KEY (`id`),
  28. UNIQUE KEY (`groupname`)
  29. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  30. CREATE TABLE IF NOT EXISTS `switch_groups_relations` (
  31. `id` int(11) NOT NULL AUTO_INCREMENT,
  32. `switch_id` int(11) NOT NULL,
  33. `sw_group_id` int(11) NOT NULL,
  34. PRIMARY KEY (`id`),
  35. UNIQUE KEY (`switch_id`)
  36. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;