dbfiles.php 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. $querys = array();
  3. $querys[] = "CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."chcreaposts` (
  4. `id_chcreaposts` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  5. `post_author` bigint(20) UNSIGNED NOT NULL DEFAULT '0',
  6. `post_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  7. `comment_status` varchar(20) NOT NULL DEFAULT 'open',
  8. `post_password` varchar(20) NOT NULL DEFAULT '',
  9. `post_modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  10. `post_format` varchar(20) NOT NULL DEFAULT 'post',
  11. `post_img` varchar(300) NOT NULL DEFAULT '',
  12. `video` longtext NOT NULL,
  13. `audio` longtext NOT NULL,
  14. `gallery` longtext NOT NULL,
  15. `related_products` longtext NOT NULL,
  16. `comment_count` bigint(20) NOT NULL DEFAULT '0',
  17. `position`int(10) NOT NULL ,
  18. `active` int(10) NOT NULL,
  19. PRIMARY KEY (`id_chcreaposts`)
  20. ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8";
  21. $querys[] = "CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."chcreaposts_lang` (
  22. `id_chcreaposts` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  23. `id_lang` int(10) unsigned NOT NULL,
  24. `post_title` text NOT NULL,
  25. `meta_title` varchar(300) NOT NULL DEFAULT '',
  26. `meta_description` longtext NOT NULL,
  27. `meta_keyword` longtext NOT NULL,
  28. `post_content` longtext NOT NULL,
  29. `post_excerpt` text NOT NULL,
  30. `link_rewrite` varchar(400) NOT NULL DEFAULT '',
  31. PRIMARY KEY (`id_chcreaposts`, `id_lang`)
  32. ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8";
  33. $querys[] = "CREATE TABLE IF NOT EXISTS `" . _DB_PREFIX_ . "chcreaposts_shop` (
  34. `id_chcreaposts` int(11) NOT NULL,
  35. `id_shop` int(11) unsigned NOT NULL,
  36. PRIMARY KEY (`id_chcreaposts`,`id_shop`)
  37. )ENGINE=" . _MYSQL_ENGINE_ . " DEFAULT CHARSET=utf8" ;
  38. $querys[] = "CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."chcrea_images` (
  39. `id_images` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  40. `id_chcreaposts` bigint(20) UNSIGNED NOT NULL DEFAULT '0',
  41. `name` varchar(300) NOT NULL,
  42. `type` varchar(20) NOT NULL DEFAULT 'post',
  43. PRIMARY KEY (`id_images`)
  44. ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8";
  45. $querys[] = "CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."chcrea_image_type`(
  46. `id_image_type` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  47. `name` varchar(100) DEFAULT NULL,
  48. `width` int(11) UNSIGNED NOT NULL DEFAULT '0',
  49. `height` int(11) UNSIGNED NOT NULL DEFAULT '0',
  50. `id_shop` int(11) UNSIGNED NOT NULL DEFAULT '0',
  51. `active` int(11) UNSIGNED NOT NULL DEFAULT '1',
  52. PRIMARY KEY (`id_image_type`)
  53. ) ENGINE=" . _MYSQL_ENGINE_ . " DEFAULT CHARSET=utf8";
  54. $querys[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'chcrea_comments`(
  55. `id_comments` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  56. `name` varchar(256) DEFAULT NULL,
  57. `email` varchar(90) DEFAULT NULL,
  58. `subject` varchar(256) DEFAULT NULL,
  59. `website` varchar(128) DEFAULT NULL,
  60. `content` text,
  61. `id_parent` int(11) DEFAULT NULL,
  62. `id_chcreaposts` int(11) DEFAULT NULL,
  63. `id_customer` int(11) DEFAULT NULL,
  64. `id_guest` int(11) DEFAULT NULL,
  65. `active` int(11) DEFAULT NULL,
  66. `position` int(11) DEFAULT NULL,
  67. `uniqueid` int(11) DEFAULT NULL,
  68. `created` datetime NOT NULL,
  69. `updated` datetime NOT NULL,
  70. PRIMARY KEY (`id_comments`)
  71. ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8' ;
  72. $querys_u = array();
  73. $querys_u[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'chcreaposts`';
  74. $querys_u[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'chcreaposts_lang`';
  75. $querys_u[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'chcreaposts_shop`';
  76. $querys_u[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'chcrea_images`';
  77. $querys_u[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'chcrea_image_type`';
  78. $querys_u[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'chcrea_comments`';