initial_setup.sql 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. CREATE DATABASE altpath;
  2. USE altpath;
  3. CREATE TABLE `templates` (
  4. `template_id` int(11) NOT NULL AUTO_INCREMENT,
  5. `filename` varchar(255) DEFAULT NULL,
  6. PRIMARY KEY (`template_id`)
  7. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  8. CREATE TABLE `offers` (
  9. `offer_id` int(11) NOT NULL AUTO_INCREMENT,
  10. `name` varchar(255) DEFAULT NULL,
  11. `display_title` varchar(255) DEFAULT NULL,
  12. `disclaimer` text DEFAULT NULL,
  13. PRIMARY KEY (`offer_id`)
  14. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  15. CREATE TABLE `paths` (
  16. `path_id` int(11) NOT NULL AUTO_INCREMENT,
  17. `name` varchar(255) DEFAULT NULL,
  18. PRIMARY KEY (`path_id`)
  19. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  20. CREATE TABLE `offer_paths` (
  21. `offer_id` int(11) NOT NULL DEFAULT 0,
  22. `path_id` int(11) DEFAULT 0,
  23. UNIQUE KEY `offer_path_id` (`offer_id`,`path_id`)
  24. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  25. CREATE TABLE `path_templates` (
  26. `path_id` int(11) NOT NULL,
  27. `template_id` int(11) NOT NULL,
  28. `sequence` int(11) DEFAULT 0,
  29. UNIQUE KEY `path_template_id` (`path_id`,`template_id`)
  30. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;