Guest User

Untitled

a guest
Jul 17th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.88 KB | None | 0 0
  1. detect_relations: true
  2.  
  3. article:
  4. actAs: TimestampBehavior
  5. options:
  6. type: INNODB
  7. columns:
  8. topic: string
  9. preview: string
  10. content: string
  11.  
  12. article_link:
  13. options:
  14. type: INNODB
  15. columns:
  16. article_id: integer(10)
  17. label: string
  18. url: string
  19.  
  20. article_view:
  21. options:
  22. type: INNODB
  23. columns:
  24. article_id: integer
  25. article: integer(10)
  26. date: date
  27. count: integer(10)
  28.  
  29. news:
  30. actAs: TimestampBehavior
  31. options:
  32. type: INNODB
  33. columns:
  34. kind: integer(1)
  35. topic: string
  36. preview: string
  37. content: string
  38.  
  39. news_comment:
  40. actAs: TimestampBehavior
  41. options:
  42. type: INNODB
  43. columns:
  44. news_id: integer(10)
  45. comment_relation: integer(10)
  46. impression: integer(1)
  47. email: string
  48. topic: string
  49. content: string
  50.  
  51. news_link:
  52. options:
  53. type: INNODB
  54. columns:
  55. news_id: integer(10)
  56. label: string
  57. url: string
  58.  
  59. news_view:
  60. options:
  61. type: INNODB
  62. columns:
  63. news_id: integer(10)
  64. date: date
  65. count: integer(10)
  66.  
  67.  
  68. SET time_zone = '+1:00';
  69.  
  70. USE mguytrunk;
  71.  
  72. CREATE TABLE `articles` (
  73. `article_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  74. `article_creation` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  75. `article_last_edit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  76. `article_topic` tinytext NOT NULL,
  77. `article_preview` text NOT NULL,
  78. `article_content` mediumtext NOT NULL,
  79. PRIMARY KEY (`article_id`),
  80. UNIQUE KEY `creation` (`article_creation`)
  81. ) ENGINE=InnoDB COLLATE utf8_unicode_ci DEFAULT CHARSET utf8;
  82.  
  83. CREATE TABLE `articles_links` (
  84. `link_article` int(10) unsigned NOT NULL,
  85. `link_label` tinytext NOT NULL,
  86. `link_url` tinytext NOT NULL,
  87. KEY `link_article` (`link_article`)
  88. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  89.  
  90. CREATE TABLE `articles_views` (
  91. `view_article` int(10) unsigned NOT NULL,
  92. `view_date` date NOT NULL,
  93. `view_count` int(10) unsigned NOT NULL,
  94. UNIQUE KEY `view_article_2` (`view_article`,`view_date`),
  95. KEY `view_article` (`view_article`)
  96. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  97.  
  98. CREATE TABLE `eh_blob` (
  99. `eh` int(11) unsigned NOT NULL AUTO_INCREMENT,
  100. `eh_blob` blob NOT NULL,
  101. PRIMARY KEY (`eh`)
  102. ) ENGINE=InnoDB COLLATE utf8_unicode_ci DEFAULT CHARSET utf8;
  103.  
  104. CREATE TABLE `news` (
  105. `news_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  106. `news_kind` INTEGER(1) unsigned NOT NULL DEFAULT 0,
  107. `news_creation` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  108. `news_lastedit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  109. `news_topic` tinytext NOT NULL,
  110. `news_preview` text NOT NULL,
  111. `news_content` mediumtext NOT NULL,
  112. PRIMARY KEY (`news_id`)
  113. ) ENGINE=InnoDB COLLATE utf8_unicode_ci DEFAULT CHARSET utf8;
  114.  
  115. CREATE TABLE `news_comments` (
  116. `comment_news` int(10) unsigned NOT NULL,
  117. `comment_creation` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  118. `comment_relation` int(10) unsigned NOT NULL,
  119. `comment_impression` int(1) unsigned DEFAULT 0 NOT NULL,
  120. `comment_email` tinytext NOT NULL,
  121. `comment_topic` tinytext NOT NULL,
  122. `comment_content` text NOT NULL,
  123. KEY `comment_article` (`comment_news`),
  124. KEY `comment_creation` (`comment_creation`)
  125. ) ENGINE=InnoDB COLLATE utf8_unicode_ci DEFAULT CHARSET utf8;
  126.  
  127. CREATE TABLE `news_links` (
  128. `link_news` int(10) unsigned NOT NULL,
  129. `link_label` tinytext NOT NULL,
  130. `link_url` tinytext NOT NULL,
  131. KEY `link_news` (`link_news`)
  132. ) ENGINE=InnoDB COLLATE utf8_unicode_ci DEFAULT CHARSET utf8;
  133.  
  134. CREATE TABLE `news_views` (
  135. `view_news` int(10) unsigned NOT NULL,
  136. `view_date` date NOT NULL,
  137. `view_count` int(10) unsigned NOT NULL,
  138. UNIQUE KEY `view_article_2` (`view_news`,`view_date`),
  139. KEY `view_article` (`view_news`)
  140. ) ENGINE=InnoDB COLLATE utf8_unicode_ci DEFAULT CHARSET utf8;
Add Comment
Please, Sign In to add comment