install_2-1_mysql.sql 67 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168
  1. #### ATTENTION: You do not need to run or use this file! The install.php script does everything for you!
  2. #### Install script for MySQL 4.0.18+
  3. #
  4. # Table structure for table `admin_info_files`
  5. #
  6. CREATE TABLE {$db_prefix}admin_info_files (
  7. id_file tinyint(4) unsigned NOT NULL auto_increment,
  8. filename varchar(255) NOT NULL default '',
  9. path varchar(255) NOT NULL default '',
  10. parameters varchar(255) NOT NULL default '',
  11. data text NOT NULL,
  12. filetype varchar(255) NOT NULL default '',
  13. PRIMARY KEY (id_file),
  14. KEY filename (filename(30))
  15. ) ENGINE=MyISAM;
  16. #
  17. # Dumping data for table `admin_info_files`
  18. #
  19. INSERT INTO {$db_prefix}admin_info_files
  20. (id_file, filename, path, parameters, data, filetype)
  21. VALUES
  22. (1, 'current-version.js', '/smf/', 'version=%3$s', '', 'text/javascript'),
  23. (2, 'detailed-version.js', '/smf/', 'language=%1$s&version=%3$s', '', 'text/javascript'),
  24. (3, 'latest-news.js', '/smf/', 'language=%1$s&format=%2$s', '', 'text/javascript'),
  25. (4, 'latest-smileys.js', '/smf/', 'language=%1$s&version=%3$s', '', 'text/javascript'),
  26. (5, 'latest-versions.txt', '/smf/', 'version=%3$s', '', 'text/plain');
  27. # --------------------------------------------------------
  28. #
  29. # Table structure for table `approval_queue`
  30. #
  31. CREATE TABLE {$db_prefix}approval_queue (
  32. id_msg int(10) unsigned NOT NULL default '0',
  33. id_attach int(10) unsigned NOT NULL default '0',
  34. id_event smallint(5) unsigned NOT NULL default '0'
  35. ) ENGINE=MyISAM;
  36. #
  37. # Table structure for table `attachments`
  38. #
  39. CREATE TABLE {$db_prefix}attachments (
  40. id_attach int(10) unsigned NOT NULL auto_increment,
  41. id_thumb int(10) unsigned NOT NULL default '0',
  42. id_msg int(10) unsigned NOT NULL default '0',
  43. id_member mediumint(8) unsigned NOT NULL default '0',
  44. id_folder tinyint(3) NOT NULL default '1',
  45. attachment_type tinyint(3) unsigned NOT NULL default '0',
  46. filename varchar(255) NOT NULL default '',
  47. file_hash varchar(40) NOT NULL default '',
  48. fileext varchar(8) NOT NULL default '',
  49. size int(10) unsigned NOT NULL default '0',
  50. downloads mediumint(8) unsigned NOT NULL default '0',
  51. width mediumint(8) unsigned NOT NULL default '0',
  52. height mediumint(8) unsigned NOT NULL default '0',
  53. mime_type varchar(20) NOT NULL default '',
  54. approved tinyint(3) NOT NULL default '1',
  55. PRIMARY KEY (id_attach),
  56. UNIQUE id_member (id_member, id_attach),
  57. KEY id_msg (id_msg),
  58. KEY attachment_type (attachment_type)
  59. ) ENGINE=MyISAM;
  60. #
  61. # Table structure for table `background_tasks`
  62. #
  63. CREATE TABLE {$db_prefix}background_tasks (
  64. id_task int(10) unsigned NOT NULL auto_increment,
  65. task_file varchar(255) NOT NULL default '',
  66. task_class varchar(255) NOT NULL default '',
  67. task_data mediumtext NOT NULL,
  68. claimed_time int(10) unsigned NOT NULL default '0',
  69. PRIMARY KEY (id_task)
  70. ) ENGINE=MyISAM;
  71. #
  72. # Table structure for table `ban_groups`
  73. #
  74. CREATE TABLE {$db_prefix}ban_groups (
  75. id_ban_group mediumint(8) unsigned NOT NULL auto_increment,
  76. name varchar(20) NOT NULL default '',
  77. ban_time int(10) unsigned NOT NULL default '0',
  78. expire_time int(10) unsigned,
  79. cannot_access tinyint(3) unsigned NOT NULL default '0',
  80. cannot_register tinyint(3) unsigned NOT NULL default '0',
  81. cannot_post tinyint(3) unsigned NOT NULL default '0',
  82. cannot_login tinyint(3) unsigned NOT NULL default '0',
  83. reason varchar(255) NOT NULL default '',
  84. notes text NOT NULL,
  85. PRIMARY KEY (id_ban_group)
  86. ) ENGINE=MyISAM;
  87. #
  88. # Table structure for table `ban_items`
  89. #
  90. CREATE TABLE {$db_prefix}ban_items (
  91. id_ban mediumint(8) unsigned NOT NULL auto_increment,
  92. id_ban_group smallint(5) unsigned NOT NULL default '0',
  93. ip_low1 smallint(255) unsigned NOT NULL default '0',
  94. ip_high1 smallint(255) unsigned NOT NULL default '0',
  95. ip_low2 smallint(255) unsigned NOT NULL default '0',
  96. ip_high2 smallint(255) unsigned NOT NULL default '0',
  97. ip_low3 smallint(255) unsigned NOT NULL default '0',
  98. ip_high3 smallint(255) unsigned NOT NULL default '0',
  99. ip_low4 smallint(255) unsigned NOT NULL default '0',
  100. ip_high4 smallint(255) unsigned NOT NULL default '0',
  101. ip_low5 smallint(255) unsigned NOT NULL default '0',
  102. ip_high5 smallint(255) unsigned NOT NULL default '0',
  103. ip_low6 smallint(255) unsigned NOT NULL default '0',
  104. ip_high6 smallint(255) unsigned NOT NULL default '0',
  105. ip_low7 smallint(255) unsigned NOT NULL default '0',
  106. ip_high7 smallint(255) unsigned NOT NULL default '0',
  107. ip_low8 smallint(255) unsigned NOT NULL default '0',
  108. ip_high8 smallint(255) unsigned NOT NULL default '0',
  109. hostname varchar(255) NOT NULL default '',
  110. email_address varchar(255) NOT NULL default '',
  111. id_member mediumint(8) unsigned NOT NULL default '0',
  112. hits mediumint(8) unsigned NOT NULL default '0',
  113. PRIMARY KEY (id_ban),
  114. KEY id_ban_group (id_ban_group)
  115. ) ENGINE=MyISAM;
  116. #
  117. # Table structure for table `board_permissions`
  118. #
  119. CREATE TABLE {$db_prefix}board_permissions (
  120. id_group smallint(5) NOT NULL default '0',
  121. id_profile smallint(5) unsigned NOT NULL default '0',
  122. permission varchar(30) NOT NULL default '',
  123. add_deny tinyint(4) NOT NULL default '1',
  124. PRIMARY KEY (id_group, id_profile, permission)
  125. ) ENGINE=MyISAM;
  126. #
  127. # Dumping data for table `board_permissions`
  128. #
  129. INSERT INTO {$db_prefix}board_permissions
  130. (id_group, id_profile, permission)
  131. VALUES (-1, 1, 'poll_view'),
  132. (0, 1, 'remove_own'),
  133. (0, 1, 'lock_own'),
  134. (0, 1, 'modify_own'),
  135. (0, 1, 'poll_add_own'),
  136. (0, 1, 'poll_edit_own'),
  137. (0, 1, 'poll_lock_own'),
  138. (0, 1, 'poll_post'),
  139. (0, 1, 'poll_view'),
  140. (0, 1, 'poll_vote'),
  141. (0, 1, 'post_attachment'),
  142. (0, 1, 'post_new'),
  143. (0, 1, 'post_draft'),
  144. (0, 1, 'post_autosave_draft'),
  145. (0, 1, 'post_reply_any'),
  146. (0, 1, 'post_reply_own'),
  147. (0, 1, 'post_unapproved_topics'),
  148. (0, 1, 'post_unapproved_replies_any'),
  149. (0, 1, 'post_unapproved_replies_own'),
  150. (0, 1, 'post_unapproved_attachments'),
  151. (0, 1, 'delete_own'),
  152. (0, 1, 'report_any'),
  153. (0, 1, 'view_attachments'),
  154. (2, 1, 'moderate_board'),
  155. (2, 1, 'post_new'),
  156. (2, 1, 'post_draft'),
  157. (2, 1, 'post_autosave_draft'),
  158. (2, 1, 'post_reply_own'),
  159. (2, 1, 'post_reply_any'),
  160. (2, 1, 'post_unapproved_topics'),
  161. (2, 1, 'post_unapproved_replies_any'),
  162. (2, 1, 'post_unapproved_replies_own'),
  163. (2, 1, 'post_unapproved_attachments'),
  164. (2, 1, 'poll_post'),
  165. (2, 1, 'poll_add_any'),
  166. (2, 1, 'poll_remove_any'),
  167. (2, 1, 'poll_view'),
  168. (2, 1, 'poll_vote'),
  169. (2, 1, 'poll_lock_any'),
  170. (2, 1, 'poll_edit_any'),
  171. (2, 1, 'report_any'),
  172. (2, 1, 'lock_own'),
  173. (2, 1, 'delete_own'),
  174. (2, 1, 'modify_own'),
  175. (2, 1, 'make_sticky'),
  176. (2, 1, 'lock_any'),
  177. (2, 1, 'remove_any'),
  178. (2, 1, 'move_any'),
  179. (2, 1, 'merge_any'),
  180. (2, 1, 'split_any'),
  181. (2, 1, 'delete_any'),
  182. (2, 1, 'modify_any'),
  183. (2, 1, 'approve_posts'),
  184. (2, 1, 'post_attachment'),
  185. (2, 1, 'view_attachments'),
  186. (3, 1, 'moderate_board'),
  187. (3, 1, 'post_new'),
  188. (3, 1, 'post_draft'),
  189. (3, 1, 'post_autosave_draft'),
  190. (3, 1, 'post_reply_own'),
  191. (3, 1, 'post_reply_any'),
  192. (3, 1, 'post_unapproved_topics'),
  193. (3, 1, 'post_unapproved_replies_any'),
  194. (3, 1, 'post_unapproved_replies_own'),
  195. (3, 1, 'post_unapproved_attachments'),
  196. (3, 1, 'poll_post'),
  197. (3, 1, 'poll_add_any'),
  198. (3, 1, 'poll_remove_any'),
  199. (3, 1, 'poll_view'),
  200. (3, 1, 'poll_vote'),
  201. (3, 1, 'poll_lock_any'),
  202. (3, 1, 'poll_edit_any'),
  203. (3, 1, 'report_any'),
  204. (3, 1, 'lock_own'),
  205. (3, 1, 'delete_own'),
  206. (3, 1, 'modify_own'),
  207. (3, 1, 'make_sticky'),
  208. (3, 1, 'lock_any'),
  209. (3, 1, 'remove_any'),
  210. (3, 1, 'move_any'),
  211. (3, 1, 'merge_any'),
  212. (3, 1, 'split_any'),
  213. (3, 1, 'delete_any'),
  214. (3, 1, 'modify_any'),
  215. (3, 1, 'approve_posts'),
  216. (3, 1, 'post_attachment'),
  217. (3, 1, 'view_attachments'),
  218. (-1, 2, 'poll_view'),
  219. (0, 2, 'remove_own'),
  220. (0, 2, 'lock_own'),
  221. (0, 2, 'modify_own'),
  222. (0, 2, 'poll_view'),
  223. (0, 2, 'poll_vote'),
  224. (0, 2, 'post_attachment'),
  225. (0, 2, 'post_new'),
  226. (0, 2, 'post_draft'),
  227. (0, 2, 'post_autosave_draft'),
  228. (0, 2, 'post_reply_any'),
  229. (0, 2, 'post_reply_own'),
  230. (0, 2, 'post_unapproved_topics'),
  231. (0, 2, 'post_unapproved_replies_any'),
  232. (0, 2, 'post_unapproved_replies_own'),
  233. (0, 2, 'post_unapproved_attachments'),
  234. (0, 2, 'delete_own'),
  235. (0, 2, 'report_any'),
  236. (0, 2, 'view_attachments'),
  237. (2, 2, 'moderate_board'),
  238. (2, 2, 'post_new'),
  239. (2, 2, 'post_draft'),
  240. (2, 2, 'post_autosave_draft'),
  241. (2, 2, 'post_reply_own'),
  242. (2, 2, 'post_reply_any'),
  243. (2, 2, 'post_unapproved_topics'),
  244. (2, 2, 'post_unapproved_replies_any'),
  245. (2, 2, 'post_unapproved_replies_own'),
  246. (2, 2, 'post_unapproved_attachments'),
  247. (2, 2, 'poll_post'),
  248. (2, 2, 'poll_add_any'),
  249. (2, 2, 'poll_remove_any'),
  250. (2, 2, 'poll_view'),
  251. (2, 2, 'poll_vote'),
  252. (2, 2, 'poll_lock_any'),
  253. (2, 2, 'poll_edit_any'),
  254. (2, 2, 'report_any'),
  255. (2, 2, 'lock_own'),
  256. (2, 2, 'delete_own'),
  257. (2, 2, 'modify_own'),
  258. (2, 2, 'make_sticky'),
  259. (2, 2, 'lock_any'),
  260. (2, 2, 'remove_any'),
  261. (2, 2, 'move_any'),
  262. (2, 2, 'merge_any'),
  263. (2, 2, 'split_any'),
  264. (2, 2, 'delete_any'),
  265. (2, 2, 'modify_any'),
  266. (2, 2, 'approve_posts'),
  267. (2, 2, 'post_attachment'),
  268. (2, 2, 'view_attachments'),
  269. (3, 2, 'moderate_board'),
  270. (3, 2, 'post_new'),
  271. (3, 2, 'post_draft'),
  272. (3, 2, 'post_autosave_draft'),
  273. (3, 2, 'post_reply_own'),
  274. (3, 2, 'post_reply_any'),
  275. (3, 2, 'post_unapproved_topics'),
  276. (3, 2, 'post_unapproved_replies_any'),
  277. (3, 2, 'post_unapproved_replies_own'),
  278. (3, 2, 'post_unapproved_attachments'),
  279. (3, 2, 'poll_post'),
  280. (3, 2, 'poll_add_any'),
  281. (3, 2, 'poll_remove_any'),
  282. (3, 2, 'poll_view'),
  283. (3, 2, 'poll_vote'),
  284. (3, 2, 'poll_lock_any'),
  285. (3, 2, 'poll_edit_any'),
  286. (3, 2, 'report_any'),
  287. (3, 2, 'lock_own'),
  288. (3, 2, 'delete_own'),
  289. (3, 2, 'modify_own'),
  290. (3, 2, 'make_sticky'),
  291. (3, 2, 'lock_any'),
  292. (3, 2, 'remove_any'),
  293. (3, 2, 'move_any'),
  294. (3, 2, 'merge_any'),
  295. (3, 2, 'split_any'),
  296. (3, 2, 'delete_any'),
  297. (3, 2, 'modify_any'),
  298. (3, 2, 'approve_posts'),
  299. (3, 2, 'post_attachment'),
  300. (3, 2, 'view_attachments'),
  301. (-1, 3, 'poll_view'),
  302. (0, 3, 'remove_own'),
  303. (0, 3, 'lock_own'),
  304. (0, 3, 'modify_own'),
  305. (0, 3, 'poll_view'),
  306. (0, 3, 'poll_vote'),
  307. (0, 3, 'post_attachment'),
  308. (0, 3, 'post_reply_any'),
  309. (0, 3, 'post_reply_own'),
  310. (0, 3, 'post_unapproved_replies_any'),
  311. (0, 3, 'post_unapproved_replies_own'),
  312. (0, 3, 'post_unapproved_attachments'),
  313. (0, 3, 'delete_own'),
  314. (0, 3, 'report_any'),
  315. (0, 3, 'view_attachments'),
  316. (2, 3, 'moderate_board'),
  317. (2, 3, 'post_new'),
  318. (2, 3, 'post_draft'),
  319. (2, 3, 'post_autosave_draft'),
  320. (2, 3, 'post_reply_own'),
  321. (2, 3, 'post_reply_any'),
  322. (2, 3, 'post_unapproved_topics'),
  323. (2, 3, 'post_unapproved_replies_any'),
  324. (2, 3, 'post_unapproved_replies_own'),
  325. (2, 3, 'post_unapproved_attachments'),
  326. (2, 3, 'poll_post'),
  327. (2, 3, 'poll_add_any'),
  328. (2, 3, 'poll_remove_any'),
  329. (2, 3, 'poll_view'),
  330. (2, 3, 'poll_vote'),
  331. (2, 3, 'poll_lock_any'),
  332. (2, 3, 'poll_edit_any'),
  333. (2, 3, 'report_any'),
  334. (2, 3, 'lock_own'),
  335. (2, 3, 'delete_own'),
  336. (2, 3, 'modify_own'),
  337. (2, 3, 'make_sticky'),
  338. (2, 3, 'lock_any'),
  339. (2, 3, 'remove_any'),
  340. (2, 3, 'move_any'),
  341. (2, 3, 'merge_any'),
  342. (2, 3, 'split_any'),
  343. (2, 3, 'delete_any'),
  344. (2, 3, 'modify_any'),
  345. (2, 3, 'approve_posts'),
  346. (2, 3, 'post_attachment'),
  347. (2, 3, 'view_attachments'),
  348. (3, 3, 'moderate_board'),
  349. (3, 3, 'post_new'),
  350. (3, 3, 'post_draft'),
  351. (3, 3, 'post_autosave_draft'),
  352. (3, 3, 'post_reply_own'),
  353. (3, 3, 'post_reply_any'),
  354. (3, 3, 'post_unapproved_topics'),
  355. (3, 3, 'post_unapproved_replies_any'),
  356. (3, 3, 'post_unapproved_replies_own'),
  357. (3, 3, 'post_unapproved_attachments'),
  358. (3, 3, 'poll_post'),
  359. (3, 3, 'poll_add_any'),
  360. (3, 3, 'poll_remove_any'),
  361. (3, 3, 'poll_view'),
  362. (3, 3, 'poll_vote'),
  363. (3, 3, 'poll_lock_any'),
  364. (3, 3, 'poll_edit_any'),
  365. (3, 3, 'report_any'),
  366. (3, 3, 'lock_own'),
  367. (3, 3, 'delete_own'),
  368. (3, 3, 'modify_own'),
  369. (3, 3, 'make_sticky'),
  370. (3, 3, 'lock_any'),
  371. (3, 3, 'remove_any'),
  372. (3, 3, 'move_any'),
  373. (3, 3, 'merge_any'),
  374. (3, 3, 'split_any'),
  375. (3, 3, 'delete_any'),
  376. (3, 3, 'modify_any'),
  377. (3, 3, 'approve_posts'),
  378. (3, 3, 'post_attachment'),
  379. (3, 3, 'view_attachments'),
  380. (-1, 4, 'poll_view'),
  381. (0, 4, 'poll_view'),
  382. (0, 4, 'poll_vote'),
  383. (0, 4, 'report_any'),
  384. (0, 4, 'view_attachments'),
  385. (2, 4, 'moderate_board'),
  386. (2, 4, 'post_new'),
  387. (2, 4, 'post_draft'),
  388. (2, 4, 'post_autosave_draft'),
  389. (2, 4, 'post_reply_own'),
  390. (2, 4, 'post_reply_any'),
  391. (2, 4, 'post_unapproved_topics'),
  392. (2, 4, 'post_unapproved_replies_any'),
  393. (2, 4, 'post_unapproved_replies_own'),
  394. (2, 4, 'post_unapproved_attachments'),
  395. (2, 4, 'poll_post'),
  396. (2, 4, 'poll_add_any'),
  397. (2, 4, 'poll_remove_any'),
  398. (2, 4, 'poll_view'),
  399. (2, 4, 'poll_vote'),
  400. (2, 4, 'poll_lock_any'),
  401. (2, 4, 'poll_edit_any'),
  402. (2, 4, 'report_any'),
  403. (2, 4, 'lock_own'),
  404. (2, 4, 'delete_own'),
  405. (2, 4, 'modify_own'),
  406. (2, 4, 'make_sticky'),
  407. (2, 4, 'lock_any'),
  408. (2, 4, 'remove_any'),
  409. (2, 4, 'move_any'),
  410. (2, 4, 'merge_any'),
  411. (2, 4, 'split_any'),
  412. (2, 4, 'delete_any'),
  413. (2, 4, 'modify_any'),
  414. (2, 4, 'approve_posts'),
  415. (2, 4, 'post_attachment'),
  416. (2, 4, 'view_attachments'),
  417. (3, 4, 'moderate_board'),
  418. (3, 4, 'post_new'),
  419. (3, 4, 'post_draft'),
  420. (3, 4, 'post_autosave_draft'),
  421. (3, 4, 'post_reply_own'),
  422. (3, 4, 'post_reply_any'),
  423. (3, 4, 'post_unapproved_topics'),
  424. (3, 4, 'post_unapproved_replies_any'),
  425. (3, 4, 'post_unapproved_replies_own'),
  426. (3, 4, 'post_unapproved_attachments'),
  427. (3, 4, 'poll_post'),
  428. (3, 4, 'poll_add_any'),
  429. (3, 4, 'poll_remove_any'),
  430. (3, 4, 'poll_view'),
  431. (3, 4, 'poll_vote'),
  432. (3, 4, 'poll_lock_any'),
  433. (3, 4, 'poll_edit_any'),
  434. (3, 4, 'report_any'),
  435. (3, 4, 'lock_own'),
  436. (3, 4, 'delete_own'),
  437. (3, 4, 'modify_own'),
  438. (3, 4, 'make_sticky'),
  439. (3, 4, 'lock_any'),
  440. (3, 4, 'remove_any'),
  441. (3, 4, 'move_any'),
  442. (3, 4, 'merge_any'),
  443. (3, 4, 'split_any'),
  444. (3, 4, 'delete_any'),
  445. (3, 4, 'modify_any'),
  446. (3, 4, 'approve_posts'),
  447. (3, 4, 'post_attachment'),
  448. (3, 4, 'view_attachments');
  449. # --------------------------------------------------------
  450. #
  451. # Table structure for table `boards`
  452. #
  453. CREATE TABLE {$db_prefix}boards (
  454. id_board smallint(5) unsigned NOT NULL auto_increment,
  455. id_cat tinyint(4) unsigned NOT NULL default '0',
  456. child_level tinyint(4) unsigned NOT NULL default '0',
  457. id_parent smallint(5) unsigned NOT NULL default '0',
  458. board_order smallint(5) NOT NULL default '0',
  459. id_last_msg int(10) unsigned NOT NULL default '0',
  460. id_msg_updated int(10) unsigned NOT NULL default '0',
  461. member_groups varchar(255) NOT NULL default '-1,0',
  462. id_profile smallint(5) unsigned NOT NULL default '1',
  463. name varchar(255) NOT NULL default '',
  464. description text NOT NULL,
  465. num_topics mediumint(8) unsigned NOT NULL default '0',
  466. num_posts mediumint(8) unsigned NOT NULL default '0',
  467. count_posts tinyint(4) NOT NULL default '0',
  468. id_theme tinyint(4) unsigned NOT NULL default '0',
  469. override_theme tinyint(4) unsigned NOT NULL default '0',
  470. unapproved_posts smallint(5) NOT NULL default '0',
  471. unapproved_topics smallint(5) NOT NULL default '0',
  472. redirect varchar(255) NOT NULL default '',
  473. deny_member_groups varchar(255) NOT NULL default '',
  474. PRIMARY KEY (id_board),
  475. UNIQUE categories (id_cat, id_board),
  476. KEY id_parent (id_parent),
  477. KEY id_msg_updated (id_msg_updated),
  478. KEY member_groups (member_groups(48))
  479. ) ENGINE=MyISAM;
  480. #
  481. # Dumping data for table `boards`
  482. #
  483. INSERT INTO {$db_prefix}boards
  484. (id_board, id_cat, board_order, id_last_msg, id_msg_updated, name, description, num_topics, num_posts, member_groups)
  485. VALUES (1, 1, 1, 1, 1, '{$default_board_name}', '{$default_board_description}', 1, 1, '-1,0,2');
  486. # --------------------------------------------------------
  487. #
  488. # Table structure for table `calendar`
  489. #
  490. CREATE TABLE {$db_prefix}calendar (
  491. id_event smallint(5) unsigned NOT NULL auto_increment,
  492. start_date date NOT NULL default '0001-01-01',
  493. end_date date NOT NULL default '0001-01-01',
  494. id_board smallint(5) unsigned NOT NULL default '0',
  495. id_topic mediumint(8) unsigned NOT NULL default '0',
  496. title varchar(255) NOT NULL default '',
  497. id_member mediumint(8) unsigned NOT NULL default '0',
  498. PRIMARY KEY (id_event),
  499. KEY start_date (start_date),
  500. KEY end_date (end_date),
  501. KEY topic (id_topic, id_member)
  502. ) ENGINE=MyISAM;
  503. #
  504. # Table structure for table `calendar_holidays`
  505. #
  506. CREATE TABLE {$db_prefix}calendar_holidays (
  507. id_holiday smallint(5) unsigned NOT NULL auto_increment,
  508. event_date date NOT NULL default '0001-01-01',
  509. title varchar(255) NOT NULL default '',
  510. PRIMARY KEY (id_holiday),
  511. KEY event_date (event_date)
  512. ) ENGINE=MyISAM;
  513. #
  514. # Dumping data for table `calendar_holidays`
  515. #
  516. INSERT INTO {$db_prefix}calendar_holidays
  517. (title, event_date)
  518. VALUES ('New Year\'s', '0004-01-01'),
  519. ('Christmas', '0004-12-25'),
  520. ('Valentine\'s Day', '0004-02-14'),
  521. ('St. Patrick\'s Day', '0004-03-17'),
  522. ('April Fools', '0004-04-01'),
  523. ('Earth Day', '0004-04-22'),
  524. ('United Nations Day', '0004-10-24'),
  525. ('Halloween', '0004-10-31'),
  526. ('Mother\'s Day', '2010-05-09'),
  527. ('Mother\'s Day', '2011-05-08'),
  528. ('Mother\'s Day', '2012-05-13'),
  529. ('Mother\'s Day', '2013-05-12'),
  530. ('Mother\'s Day', '2014-05-11'),
  531. ('Mother\'s Day', '2015-05-10'),
  532. ('Mother\'s Day', '2016-05-08'),
  533. ('Mother\'s Day', '2017-05-14'),
  534. ('Mother\'s Day', '2018-05-13'),
  535. ('Mother\'s Day', '2019-05-12'),
  536. ('Mother\'s Day', '2020-05-10'),
  537. ('Father\'s Day', '2008-06-15'),
  538. ('Father\'s Day', '2009-06-21'),
  539. ('Father\'s Day', '2010-06-20'),
  540. ('Father\'s Day', '2011-06-19'),
  541. ('Father\'s Day', '2012-06-17'),
  542. ('Father\'s Day', '2013-06-16'),
  543. ('Father\'s Day', '2014-06-15'),
  544. ('Father\'s Day', '2015-06-21'),
  545. ('Father\'s Day', '2016-06-19'),
  546. ('Father\'s Day', '2017-06-18'),
  547. ('Father\'s Day', '2018-06-17'),
  548. ('Father\'s Day', '2019-06-16'),
  549. ('Father\'s Day', '2020-06-21'),
  550. ('Summer Solstice', '2010-06-21'),
  551. ('Summer Solstice', '2011-06-21'),
  552. ('Summer Solstice', '2012-06-20'),
  553. ('Summer Solstice', '2013-06-21'),
  554. ('Summer Solstice', '2014-06-21'),
  555. ('Summer Solstice', '2015-06-21'),
  556. ('Summer Solstice', '2016-06-20'),
  557. ('Summer Solstice', '2017-06-20'),
  558. ('Summer Solstice', '2018-06-21'),
  559. ('Summer Solstice', '2019-06-21'),
  560. ('Summer Solstice', '2020-06-20'),
  561. ('Vernal Equinox', '2010-03-20'),
  562. ('Vernal Equinox', '2011-03-20'),
  563. ('Vernal Equinox', '2012-03-20'),
  564. ('Vernal Equinox', '2013-03-20'),
  565. ('Vernal Equinox', '2014-03-20'),
  566. ('Vernal Equinox', '2015-03-20'),
  567. ('Vernal Equinox', '2016-03-19'),
  568. ('Vernal Equinox', '2017-03-20'),
  569. ('Vernal Equinox', '2018-03-20'),
  570. ('Vernal Equinox', '2019-03-20'),
  571. ('Vernal Equinox', '2020-03-19'),
  572. ('Winter Solstice', '2010-12-21'),
  573. ('Winter Solstice', '2011-12-22'),
  574. ('Winter Solstice', '2012-12-21'),
  575. ('Winter Solstice', '2013-12-21'),
  576. ('Winter Solstice', '2014-12-21'),
  577. ('Winter Solstice', '2015-12-21'),
  578. ('Winter Solstice', '2016-12-21'),
  579. ('Winter Solstice', '2017-12-21'),
  580. ('Winter Solstice', '2018-12-21'),
  581. ('Winter Solstice', '2019-12-21'),
  582. ('Winter Solstice', '2020-12-21'),
  583. ('Autumnal Equinox', '2010-09-22'),
  584. ('Autumnal Equinox', '2011-09-23'),
  585. ('Autumnal Equinox', '2012-09-22'),
  586. ('Autumnal Equinox', '2013-09-22'),
  587. ('Autumnal Equinox', '2014-09-22'),
  588. ('Autumnal Equinox', '2015-09-23'),
  589. ('Autumnal Equinox', '2016-09-22'),
  590. ('Autumnal Equinox', '2017-09-22'),
  591. ('Autumnal Equinox', '2018-09-22'),
  592. ('Autumnal Equinox', '2019-09-23'),
  593. ('Autumnal Equinox', '2020-09-22');
  594. INSERT INTO {$db_prefix}calendar_holidays
  595. (title, event_date)
  596. VALUES ('Independence Day', '0004-07-04'),
  597. ('Cinco de Mayo', '0004-05-05'),
  598. ('Flag Day', '0004-06-14'),
  599. ('Veterans Day', '0004-11-11'),
  600. ('Groundhog Day', '0004-02-02'),
  601. ('Thanksgiving', '2010-11-25'),
  602. ('Thanksgiving', '2011-11-24'),
  603. ('Thanksgiving', '2012-11-22'),
  604. ('Thanksgiving', '2013-11-28'),
  605. ('Thanksgiving', '2014-11-27'),
  606. ('Thanksgiving', '2015-11-26'),
  607. ('Thanksgiving', '2016-11-24'),
  608. ('Thanksgiving', '2017-11-23'),
  609. ('Thanksgiving', '2018-11-22'),
  610. ('Thanksgiving', '2019-11-28'),
  611. ('Thanksgiving', '2020-11-26'),
  612. ('Memorial Day', '2010-05-31'),
  613. ('Memorial Day', '2011-05-30'),
  614. ('Memorial Day', '2012-05-28'),
  615. ('Memorial Day', '2013-05-27'),
  616. ('Memorial Day', '2014-05-26'),
  617. ('Memorial Day', '2015-05-25'),
  618. ('Memorial Day', '2016-05-30'),
  619. ('Memorial Day', '2017-05-29'),
  620. ('Memorial Day', '2018-05-28'),
  621. ('Memorial Day', '2019-05-27'),
  622. ('Memorial Day', '2020-05-25'),
  623. ('Labor Day', '2010-09-06'),
  624. ('Labor Day', '2011-09-05'),
  625. ('Labor Day', '2012-09-03'),
  626. ('Labor Day', '2013-09-02'),
  627. ('Labor Day', '2014-09-01'),
  628. ('Labor Day', '2015-09-07'),
  629. ('Labor Day', '2016-09-05'),
  630. ('Labor Day', '2017-09-04'),
  631. ('Labor Day', '2018-09-03'),
  632. ('Labor Day', '2019-09-02'),
  633. ('Labor Day', '2020-09-07'),
  634. ('D-Day', '0004-06-06');
  635. # --------------------------------------------------------
  636. #
  637. # Table structure for table `categories`
  638. #
  639. CREATE TABLE {$db_prefix}categories (
  640. id_cat tinyint(4) unsigned NOT NULL auto_increment,
  641. cat_order tinyint(4) NOT NULL default '0',
  642. name varchar(255) NOT NULL default '',
  643. description text NOT NULL,
  644. can_collapse tinyint(1) NOT NULL default '1',
  645. PRIMARY KEY (id_cat)
  646. ) ENGINE=MyISAM;
  647. #
  648. # Dumping data for table `categories`
  649. #
  650. INSERT INTO {$db_prefix}categories
  651. VALUES (1, 0, '{$default_category_name}', '', 1);
  652. # --------------------------------------------------------
  653. #
  654. # Table structure for table `collapsed_categories`
  655. #
  656. CREATE TABLE {$db_prefix}collapsed_categories (
  657. id_cat tinyint(4) unsigned NOT NULL default '0',
  658. id_member mediumint(8) unsigned NOT NULL default '0',
  659. PRIMARY KEY (id_cat, id_member)
  660. ) ENGINE=MyISAM;
  661. #
  662. # Table structure for table `custom_fields`
  663. #
  664. CREATE TABLE {$db_prefix}custom_fields (
  665. id_field smallint(5) NOT NULL auto_increment,
  666. col_name varchar(12) NOT NULL default '',
  667. field_name varchar(40) NOT NULL default '',
  668. field_desc varchar(255) NOT NULL default '',
  669. field_type varchar(8) NOT NULL default 'text',
  670. field_length smallint(5) NOT NULL default '255',
  671. field_options text NOT NULL,
  672. mask varchar(255) NOT NULL default '',
  673. show_reg tinyint(3) NOT NULL default '0',
  674. show_display tinyint(3) NOT NULL default '0',
  675. show_profile varchar(20) NOT NULL default 'forumprofile',
  676. private tinyint(3) NOT NULL default '0',
  677. active tinyint(3) NOT NULL default '1',
  678. bbc tinyint(3) NOT NULL default '0',
  679. can_search tinyint(3) NOT NULL default '0',
  680. default_value varchar(255) NOT NULL default '',
  681. enclose text NOT NULL,
  682. placement tinyint(3) NOT NULL default '0',
  683. PRIMARY KEY (id_field),
  684. UNIQUE col_name (col_name)
  685. ) ENGINE=MyISAM;
  686. #
  687. # Table structure for table `group_moderators`
  688. #
  689. CREATE TABLE {$db_prefix}group_moderators (
  690. id_group smallint(5) unsigned NOT NULL default '0',
  691. id_member mediumint(8) unsigned NOT NULL default '0',
  692. PRIMARY KEY (id_group, id_member)
  693. ) ENGINE=MyISAM;
  694. #
  695. # Table structure for table `log_actions`
  696. #
  697. CREATE TABLE {$db_prefix}log_actions (
  698. id_action int(10) unsigned NOT NULL auto_increment,
  699. id_log tinyint(3) unsigned NOT NULL default '1',
  700. log_time int(10) unsigned NOT NULL default '0',
  701. id_member mediumint(8) unsigned NOT NULL default '0',
  702. ip char(16) NOT NULL default ' ',
  703. action varchar(30) NOT NULL default '',
  704. id_board smallint(5) unsigned NOT NULL default '0',
  705. id_topic mediumint(8) unsigned NOT NULL default '0',
  706. id_msg int(10) unsigned NOT NULL default '0',
  707. extra text NOT NULL,
  708. PRIMARY KEY (id_action),
  709. KEY id_log (id_log),
  710. KEY log_time (log_time),
  711. KEY id_member (id_member),
  712. KEY id_board (id_board),
  713. KEY id_msg (id_msg),
  714. KEY id_topic_id_log (id_topic, id_log)
  715. ) ENGINE=MyISAM;
  716. #
  717. # Table structure for table `log_activity`
  718. #
  719. CREATE TABLE {$db_prefix}log_activity (
  720. date date NOT NULL default '0001-01-01',
  721. hits mediumint(8) unsigned NOT NULL default '0',
  722. topics smallint(5) unsigned NOT NULL default '0',
  723. posts smallint(5) unsigned NOT NULL default '0',
  724. registers smallint(5) unsigned NOT NULL default '0',
  725. most_on smallint(5) unsigned NOT NULL default '0',
  726. PRIMARY KEY (date)
  727. ) ENGINE=MyISAM;
  728. #
  729. # Table structure for table `log_banned`
  730. #
  731. CREATE TABLE {$db_prefix}log_banned (
  732. id_ban_log mediumint(8) unsigned NOT NULL auto_increment,
  733. id_member mediumint(8) unsigned NOT NULL default '0',
  734. ip char(16) NOT NULL default ' ',
  735. email varchar(255) NOT NULL default '',
  736. log_time int(10) unsigned NOT NULL default '0',
  737. PRIMARY KEY (id_ban_log),
  738. KEY log_time (log_time)
  739. ) ENGINE=MyISAM;
  740. #
  741. # Table structure for table `log_boards`
  742. #
  743. CREATE TABLE {$db_prefix}log_boards (
  744. id_member mediumint(8) unsigned NOT NULL default '0',
  745. id_board smallint(5) unsigned NOT NULL default '0',
  746. id_msg int(10) unsigned NOT NULL default '0',
  747. PRIMARY KEY (id_member, id_board)
  748. ) ENGINE=MyISAM;
  749. #
  750. # Table structure for table `log_comments`
  751. #
  752. CREATE TABLE {$db_prefix}log_comments (
  753. id_comment mediumint(8) unsigned NOT NULL auto_increment,
  754. id_member mediumint(8) unsigned NOT NULL default '0',
  755. member_name varchar(80) NOT NULL default '',
  756. comment_type varchar(8) NOT NULL default 'warning',
  757. id_recipient mediumint(8) unsigned NOT NULL default '0',
  758. recipient_name varchar(255) NOT NULL default '',
  759. log_time int(10) NOT NULL default '0',
  760. id_notice mediumint(8) unsigned NOT NULL default '0',
  761. counter tinyint(3) NOT NULL default '0',
  762. body text NOT NULL,
  763. PRIMARY KEY (id_comment),
  764. KEY id_recipient (id_recipient),
  765. KEY log_time (log_time),
  766. KEY comment_type (comment_type(8))
  767. ) ENGINE=MyISAM;
  768. #
  769. # Table structure for table `log_digest`
  770. #
  771. CREATE TABLE {$db_prefix}log_digest (
  772. id_topic mediumint(8) unsigned NOT NULL,
  773. id_msg int(10) unsigned NOT NULL,
  774. note_type varchar(10) NOT NULL default 'post',
  775. daily tinyint(3) unsigned NOT NULL default '0',
  776. exclude mediumint(8) unsigned NOT NULL default '0'
  777. ) ENGINE=MyISAM;
  778. #
  779. # Table structure for table `log_errors`
  780. #
  781. CREATE TABLE {$db_prefix}log_errors (
  782. id_error mediumint(8) unsigned NOT NULL auto_increment,
  783. log_time int(10) unsigned NOT NULL default '0',
  784. id_member mediumint(8) unsigned NOT NULL default '0',
  785. ip char(16) NOT NULL default ' ',
  786. url text NOT NULL,
  787. message text NOT NULL,
  788. session char(64) NOT NULL default ' ',
  789. error_type char(15) NOT NULL default 'general',
  790. file varchar(255) NOT NULL default '',
  791. line mediumint(8) unsigned NOT NULL default '0',
  792. PRIMARY KEY (id_error),
  793. KEY log_time (log_time),
  794. KEY id_member (id_member),
  795. KEY ip (ip(16))
  796. ) ENGINE=MyISAM;
  797. #
  798. # Table structure for table `log_floodcontrol`
  799. #
  800. CREATE TABLE {$db_prefix}log_floodcontrol (
  801. ip char(16) NOT NULL default ' ',
  802. log_time int(10) unsigned NOT NULL default '0',
  803. log_type varchar(8) NOT NULL default 'post',
  804. PRIMARY KEY (ip(16), log_type(8))
  805. ) ENGINE=MyISAM;
  806. #
  807. # Table structure for table `log_group_requests`
  808. #
  809. CREATE TABLE {$db_prefix}log_group_requests (
  810. id_request mediumint(8) unsigned NOT NULL auto_increment,
  811. id_member mediumint(8) unsigned NOT NULL default '0',
  812. id_group smallint(5) unsigned NOT NULL default '0',
  813. time_applied int(10) unsigned NOT NULL default '0',
  814. reason text NOT NULL,
  815. status tinyint(3) unsigned NOT NULL default '0',
  816. id_member_acted mediumint(8) unsigned NOT NULL default '0',
  817. member_name_acted varchar(255) NOT NULL default '',
  818. time_acted int(10) unsigned NOT NULL default '0',
  819. act_reason text NOT NULL,
  820. PRIMARY KEY (id_request),
  821. KEY id_member (id_member, id_group)
  822. ) ENGINE=MyISAM;
  823. #
  824. # Table structure for table `log_karma`
  825. #
  826. CREATE TABLE {$db_prefix}log_karma (
  827. id_target mediumint(8) unsigned NOT NULL default '0',
  828. id_executor mediumint(8) unsigned NOT NULL default '0',
  829. log_time int(10) unsigned NOT NULL default '0',
  830. action tinyint(4) NOT NULL default '0',
  831. PRIMARY KEY (id_target, id_executor),
  832. KEY log_time (log_time)
  833. ) ENGINE=MyISAM;
  834. #
  835. # Table structure for table `log_mark_read`
  836. #
  837. CREATE TABLE {$db_prefix}log_mark_read (
  838. id_member mediumint(8) unsigned NOT NULL default '0',
  839. id_board smallint(5) unsigned NOT NULL default '0',
  840. id_msg int(10) unsigned NOT NULL default '0',
  841. PRIMARY KEY (id_member, id_board)
  842. ) ENGINE=MyISAM;
  843. #
  844. # Table structure for table `log_member_notices`
  845. #
  846. CREATE TABLE {$db_prefix}log_member_notices (
  847. id_notice mediumint(8) unsigned NOT NULL auto_increment,
  848. subject varchar(255) NOT NULL default '',
  849. body text NOT NULL,
  850. PRIMARY KEY (id_notice)
  851. ) ENGINE=MyISAM;
  852. #
  853. # Table structure for table `log_notify`
  854. #
  855. CREATE TABLE {$db_prefix}log_notify (
  856. id_member mediumint(8) unsigned NOT NULL default '0',
  857. id_topic mediumint(8) unsigned NOT NULL default '0',
  858. id_board smallint(5) unsigned NOT NULL default '0',
  859. sent tinyint(1) unsigned NOT NULL default '0',
  860. PRIMARY KEY (id_member, id_topic, id_board),
  861. KEY id_topic (id_topic, id_member)
  862. ) ENGINE=MyISAM;
  863. #
  864. # Table structure for table `log_online`
  865. #
  866. CREATE TABLE {$db_prefix}log_online (
  867. session varchar(64) NOT NULL default '',
  868. log_time int(10) NOT NULL default '0',
  869. id_member mediumint(8) unsigned NOT NULL default '0',
  870. id_spider smallint(5) unsigned NOT NULL default '0',
  871. ip int(10) unsigned NOT NULL default '0',
  872. url text NOT NULL,
  873. PRIMARY KEY (session),
  874. KEY log_time (log_time),
  875. KEY id_member (id_member)
  876. ) ENGINE=MyISAM;
  877. #
  878. # Table structure for table `log_packages`
  879. #
  880. CREATE TABLE {$db_prefix}log_packages (
  881. id_install int(10) NOT NULL auto_increment,
  882. filename varchar(255) NOT NULL default '',
  883. package_id varchar(255) NOT NULL default '',
  884. name varchar(255) NOT NULL default '',
  885. version varchar(255) NOT NULL default '',
  886. id_member_installed mediumint(8) NOT NULL default '0',
  887. member_installed varchar(255) NOT NULL default '',
  888. time_installed int(10) NOT NULL default '0',
  889. id_member_removed mediumint(8) NOT NULL default '0',
  890. member_removed varchar(255) NOT NULL default '',
  891. time_removed int(10) NOT NULL default '0',
  892. install_state tinyint(3) NOT NULL default '1',
  893. failed_steps text NOT NULL,
  894. themes_installed varchar(255) NOT NULL default '',
  895. db_changes text NOT NULL,
  896. credits varchar(255) NOT NULL default '',
  897. PRIMARY KEY (id_install),
  898. KEY filename (filename(15))
  899. ) ENGINE=MyISAM;
  900. #
  901. # Table structure for table `log_polls`
  902. #
  903. CREATE TABLE {$db_prefix}log_polls (
  904. id_poll mediumint(8) unsigned NOT NULL default '0',
  905. id_member mediumint(8) unsigned NOT NULL default '0',
  906. id_choice tinyint(3) unsigned NOT NULL default '0',
  907. KEY id_poll (id_poll, id_member, id_choice)
  908. ) ENGINE=MyISAM;
  909. #
  910. # Table structure for table `log_reported`
  911. #
  912. CREATE TABLE {$db_prefix}log_reported (
  913. id_report mediumint(8) unsigned NOT NULL auto_increment,
  914. id_msg int(10) unsigned NOT NULL default '0',
  915. id_topic mediumint(8) unsigned NOT NULL default '0',
  916. id_board smallint(5) unsigned NOT NULL default '0',
  917. id_member mediumint(8) unsigned NOT NULL default '0',
  918. membername varchar(255) NOT NULL default '',
  919. subject varchar(255) NOT NULL default '',
  920. body mediumtext NOT NULL,
  921. time_started int(10) NOT NULL default '0',
  922. time_updated int(10) NOT NULL default '0',
  923. num_reports mediumint(6) NOT NULL default '0',
  924. closed tinyint(3) NOT NULL default '0',
  925. ignore_all tinyint(3) NOT NULL default '0',
  926. PRIMARY KEY (id_report),
  927. KEY id_member (id_member),
  928. KEY id_topic (id_topic),
  929. KEY closed (closed),
  930. KEY time_started (time_started),
  931. KEY id_msg (id_msg)
  932. ) ENGINE=MyISAM;
  933. #
  934. # Table structure for table `log_reported_comments`
  935. #
  936. CREATE TABLE {$db_prefix}log_reported_comments (
  937. id_comment mediumint(8) unsigned NOT NULL auto_increment,
  938. id_report mediumint(8) NOT NULL default '0',
  939. id_member mediumint(8) NOT NULL,
  940. membername varchar(255) NOT NULL default '',
  941. email_address varchar(255) NOT NULL default '',
  942. member_ip varchar(255) NOT NULL default '',
  943. comment varchar(255) NOT NULL default '',
  944. time_sent int(10) NOT NULL,
  945. PRIMARY KEY (id_comment),
  946. KEY id_report (id_report),
  947. KEY id_member (id_member),
  948. KEY time_sent (time_sent)
  949. ) ENGINE=MyISAM;
  950. #
  951. # Table structure for table `log_scheduled_tasks`
  952. #
  953. CREATE TABLE {$db_prefix}log_scheduled_tasks (
  954. id_log mediumint(8) NOT NULL auto_increment,
  955. id_task smallint(5) NOT NULL default '0',
  956. time_run int(10) NOT NULL default '0',
  957. time_taken float NOT NULL default '0',
  958. PRIMARY KEY (id_log)
  959. ) ENGINE=MyISAM;
  960. #
  961. # Table structure for table `log_search_messages`
  962. #
  963. CREATE TABLE {$db_prefix}log_search_messages (
  964. id_search tinyint(3) unsigned NOT NULL default '0',
  965. id_msg int(10) unsigned NOT NULL default '0',
  966. PRIMARY KEY (id_search, id_msg)
  967. ) ENGINE=MyISAM;
  968. #
  969. # Table structure for table `log_search_results`
  970. #
  971. CREATE TABLE {$db_prefix}log_search_results (
  972. id_search tinyint(3) unsigned NOT NULL default '0',
  973. id_topic mediumint(8) unsigned NOT NULL default '0',
  974. id_msg int(10) unsigned NOT NULL default '0',
  975. relevance smallint(5) unsigned NOT NULL default '0',
  976. num_matches smallint(5) unsigned NOT NULL default '0',
  977. PRIMARY KEY (id_search, id_topic)
  978. ) ENGINE=MyISAM;
  979. #
  980. # Table structure for table `log_search_subjects`
  981. #
  982. CREATE TABLE {$db_prefix}log_search_subjects (
  983. word varchar(20) NOT NULL default '',
  984. id_topic mediumint(8) unsigned NOT NULL default '0',
  985. PRIMARY KEY (word, id_topic),
  986. KEY id_topic (id_topic)
  987. ) ENGINE=MyISAM;
  988. #
  989. # Table structure for table `log_search_topics`
  990. #
  991. CREATE TABLE {$db_prefix}log_search_topics (
  992. id_search tinyint(3) unsigned NOT NULL default '0',
  993. id_topic mediumint(8) unsigned NOT NULL default '0',
  994. PRIMARY KEY (id_search, id_topic)
  995. ) ENGINE=MyISAM;
  996. #
  997. # Table structure for table `log_spider_hits`
  998. #
  999. CREATE TABLE {$db_prefix}log_spider_hits (
  1000. id_hit int(10) unsigned NOT NULL auto_increment,
  1001. id_spider smallint(5) unsigned NOT NULL default '0',
  1002. log_time int(10) unsigned NOT NULL default '0',
  1003. url varchar(255) NOT NULL default '',
  1004. processed tinyint(3) NOT NULL default '0',
  1005. PRIMARY KEY (id_hit),
  1006. KEY id_spider(id_spider),
  1007. KEY log_time(log_time),
  1008. KEY processed (processed)
  1009. ) ENGINE=MyISAM;
  1010. #
  1011. # Table structure for table `log_spider_stats`
  1012. #
  1013. CREATE TABLE {$db_prefix}log_spider_stats (
  1014. id_spider smallint(5) unsigned NOT NULL default '0',
  1015. page_hits smallint(5) unsigned NOT NULL default '0',
  1016. last_seen int(10) unsigned NOT NULL default '0',
  1017. stat_date date NOT NULL default '0001-01-01',
  1018. PRIMARY KEY (stat_date, id_spider)
  1019. ) ENGINE=MyISAM;
  1020. #
  1021. # Table structure for table `log_subscribed`
  1022. #
  1023. CREATE TABLE {$db_prefix}log_subscribed (
  1024. id_sublog int(10) unsigned NOT NULL auto_increment,
  1025. id_subscribe mediumint(8) unsigned NOT NULL default '0',
  1026. id_member int(10) NOT NULL default '0',
  1027. old_id_group smallint(5) NOT NULL default '0',
  1028. start_time int(10) NOT NULL default '0',
  1029. end_time int(10) NOT NULL default '0',
  1030. status tinyint(3) NOT NULL default '0',
  1031. payments_pending tinyint(3) NOT NULL default '0',
  1032. pending_details text NOT NULL,
  1033. reminder_sent tinyint(3) NOT NULL default '0',
  1034. vendor_ref varchar(255) NOT NULL default '',
  1035. PRIMARY KEY (id_sublog),
  1036. UNIQUE KEY id_subscribe (id_subscribe, id_member),
  1037. KEY end_time (end_time),
  1038. KEY reminder_sent (reminder_sent),
  1039. KEY payments_pending (payments_pending),
  1040. KEY status (status),
  1041. KEY id_member (id_member)
  1042. ) ENGINE=MyISAM;
  1043. #
  1044. # Table structure for table `log_topics`
  1045. #
  1046. CREATE TABLE {$db_prefix}log_topics (
  1047. id_member mediumint(8) unsigned NOT NULL default '0',
  1048. id_topic mediumint(8) unsigned NOT NULL default '0',
  1049. id_msg int(10) unsigned NOT NULL default '0',
  1050. unwatched tinyint(3) NOT NULL default '0',
  1051. PRIMARY KEY (id_member, id_topic),
  1052. KEY id_topic (id_topic)
  1053. ) ENGINE=MyISAM;
  1054. #
  1055. # Table structure for table `mail_queue`
  1056. #
  1057. CREATE TABLE {$db_prefix}mail_queue (
  1058. id_mail int(10) unsigned NOT NULL auto_increment,
  1059. time_sent int(10) NOT NULL default '0',
  1060. recipient varchar(255) NOT NULL default '',
  1061. body mediumtext NOT NULL,
  1062. subject varchar(255) NOT NULL default '',
  1063. headers text NOT NULL,
  1064. send_html tinyint(3) NOT NULL default '0',
  1065. priority tinyint(3) NOT NULL default '1',
  1066. private tinyint(1) NOT NULL default '0',
  1067. PRIMARY KEY (id_mail),
  1068. KEY time_sent (time_sent),
  1069. KEY mail_priority (priority, id_mail)
  1070. ) ENGINE=MyISAM;
  1071. #
  1072. # Table structure for table `membergroups`
  1073. #
  1074. CREATE TABLE {$db_prefix}membergroups (
  1075. id_group smallint(5) unsigned NOT NULL auto_increment,
  1076. group_name varchar(80) NOT NULL default '',
  1077. description text NOT NULL,
  1078. online_color varchar(20) NOT NULL default '',
  1079. min_posts mediumint(9) NOT NULL default '-1',
  1080. max_messages smallint(5) unsigned NOT NULL default '0',
  1081. icons varchar(255) NOT NULL default '',
  1082. group_type tinyint(3) NOT NULL default '0',
  1083. hidden tinyint(3) NOT NULL default '0',
  1084. id_parent smallint(5) NOT NULL default '-2',
  1085. PRIMARY KEY (id_group),
  1086. KEY min_posts (min_posts)
  1087. ) ENGINE=MyISAM;
  1088. #
  1089. # Dumping data for table `membergroups`
  1090. #
  1091. INSERT INTO {$db_prefix}membergroups
  1092. (id_group, group_name, description, online_color, min_posts, icons, group_type)
  1093. VALUES (1, '{$default_administrator_group}', '', '#FF0000', -1, '5#iconadmin.png', 1),
  1094. (2, '{$default_global_moderator_group}', '', '#0000FF', -1, '5#icongmod.png', 0),
  1095. (3, '{$default_moderator_group}', '', '', -1, '5#iconmod.png', 0),
  1096. (4, '{$default_newbie_group}', '', '', 0, '1#icon.png', 0),
  1097. (5, '{$default_junior_group}', '', '', 50, '2#icon.png', 0),
  1098. (6, '{$default_full_group}', '', '', 100, '3#icon.png', 0),
  1099. (7, '{$default_senior_group}', '', '', 250, '4#icon.png', 0),
  1100. (8, '{$default_hero_group}', '', '', 500, '5#icon.png', 0);
  1101. # --------------------------------------------------------
  1102. #
  1103. # Table structure for table `members`
  1104. #
  1105. CREATE TABLE {$db_prefix}members (
  1106. id_member mediumint(8) unsigned NOT NULL auto_increment,
  1107. member_name varchar(80) NOT NULL default '',
  1108. date_registered int(10) unsigned NOT NULL default '0',
  1109. posts mediumint(8) unsigned NOT NULL default '0',
  1110. id_group smallint(5) unsigned NOT NULL default '0',
  1111. lngfile varchar(255) NOT NULL default '',
  1112. last_login int(10) unsigned NOT NULL default '0',
  1113. real_name varchar(255) NOT NULL default '',
  1114. instant_messages smallint(5) NOT NULL default 0,
  1115. unread_messages smallint(5) NOT NULL default 0,
  1116. new_pm tinyint(3) unsigned NOT NULL default '0',
  1117. alerts int(10) unsigned NOT NULL default '0',
  1118. buddy_list text NOT NULL,
  1119. pm_ignore_list varchar(255) NOT NULL default '',
  1120. pm_prefs mediumint(8) NOT NULL default '0',
  1121. mod_prefs varchar(20) NOT NULL default '',
  1122. passwd varchar(64) NOT NULL default '',
  1123. openid_uri text NOT NULL,
  1124. email_address varchar(255) NOT NULL default '',
  1125. personal_text varchar(255) NOT NULL default '',
  1126. birthdate date NOT NULL default '0001-01-01',
  1127. website_title varchar(255) NOT NULL default '',
  1128. website_url varchar(255) NOT NULL default '',
  1129. hide_email tinyint(4) NOT NULL default '0',
  1130. show_online tinyint(4) NOT NULL default '1',
  1131. time_format varchar(80) NOT NULL default '',
  1132. signature text NOT NULL,
  1133. time_offset float NOT NULL default '0',
  1134. avatar varchar(255) NOT NULL default '',
  1135. pm_email_notify tinyint(4) NOT NULL default '0',
  1136. karma_bad smallint(5) unsigned NOT NULL default '0',
  1137. karma_good smallint(5) unsigned NOT NULL default '0',
  1138. usertitle varchar(255) NOT NULL default '',
  1139. notify_announcements tinyint(4) NOT NULL default '1',
  1140. notify_regularity tinyint(4) NOT NULL default '1',
  1141. notify_send_body tinyint(4) NOT NULL default '0',
  1142. notify_types tinyint(4) NOT NULL default '2',
  1143. member_ip varchar(255) NOT NULL default '',
  1144. member_ip2 varchar(255) NOT NULL default '',
  1145. secret_question varchar(255) NOT NULL default '',
  1146. secret_answer varchar(64) NOT NULL default '',
  1147. id_theme tinyint(4) unsigned NOT NULL default '0',
  1148. is_activated tinyint(3) unsigned NOT NULL default '1',
  1149. validation_code varchar(10) NOT NULL default '',
  1150. id_msg_last_visit int(10) unsigned NOT NULL default '0',
  1151. additional_groups varchar(255) NOT NULL default '',
  1152. smiley_set varchar(48) NOT NULL default '',
  1153. id_post_group smallint(5) unsigned NOT NULL default '0',
  1154. total_time_logged_in int(10) unsigned NOT NULL default '0',
  1155. password_salt varchar(255) NOT NULL default '',
  1156. ignore_boards text NOT NULL,
  1157. warning tinyint(4) NOT NULL default '0',
  1158. passwd_flood varchar(12) NOT NULL default '',
  1159. pm_receive_from tinyint(4) unsigned NOT NULL default '1',
  1160. PRIMARY KEY (id_member),
  1161. KEY member_name (member_name),
  1162. KEY real_name (real_name),
  1163. KEY email_address (email_address),
  1164. KEY date_registered (date_registered),
  1165. KEY id_group (id_group),
  1166. KEY birthdate (birthdate),
  1167. KEY posts (posts),
  1168. KEY last_login (last_login),
  1169. KEY lngfile (lngfile(30)),
  1170. KEY id_post_group (id_post_group),
  1171. KEY warning (warning),
  1172. KEY total_time_logged_in (total_time_logged_in),
  1173. KEY id_theme (id_theme)
  1174. ) ENGINE=MyISAM;
  1175. #
  1176. # Table structure for table `member_logins`
  1177. #
  1178. CREATE TABLE {$db_prefix}member_logins (
  1179. id_login int(10) NOT NULL auto_increment,
  1180. id_member mediumint(8) NOT NULL default '0',
  1181. time int(10) NOT NULL default '0',
  1182. ip varchar(255) NOT NULL default '0',
  1183. ip2 varchar(255) NOT NULL default '0',
  1184. PRIMARY KEY (id_login),
  1185. KEY id_member (id_member),
  1186. KEY time (time)
  1187. ) ENGINE=MyISAM;
  1188. #
  1189. # Table structure for table `message_icons`
  1190. #
  1191. CREATE TABLE {$db_prefix}message_icons (
  1192. id_icon smallint(5) unsigned NOT NULL auto_increment,
  1193. title varchar(80) NOT NULL default '',
  1194. filename varchar(80) NOT NULL default '',
  1195. id_board smallint(5) unsigned NOT NULL default '0',
  1196. icon_order smallint(5) unsigned NOT NULL default '0',
  1197. PRIMARY KEY (id_icon),
  1198. KEY id_board (id_board)
  1199. ) ENGINE=MyISAM;
  1200. #
  1201. # Dumping data for table `message_icons`
  1202. #
  1203. # // @todo i18n
  1204. INSERT INTO {$db_prefix}message_icons
  1205. (filename, title, icon_order)
  1206. VALUES ('xx', 'Standard', '0'),
  1207. ('thumbup', 'Thumb Up', '1'),
  1208. ('thumbdown', 'Thumb Down', '2'),
  1209. ('exclamation', 'Exclamation point', '3'),
  1210. ('question', 'Question mark', '4'),
  1211. ('lamp', 'Lamp', '5'),
  1212. ('smiley', 'Smiley', '6'),
  1213. ('angry', 'Angry', '7'),
  1214. ('cheesy', 'Cheesy', '8'),
  1215. ('grin', 'Grin', '9'),
  1216. ('sad', 'Sad', '10'),
  1217. ('wink', 'Wink', '11'),
  1218. ('poll', 'Poll', '12');
  1219. # --------------------------------------------------------
  1220. #
  1221. # Table structure for table `messages`
  1222. #
  1223. CREATE TABLE {$db_prefix}messages (
  1224. id_msg int(10) unsigned NOT NULL auto_increment,
  1225. id_topic mediumint(8) unsigned NOT NULL default '0',
  1226. id_board smallint(5) unsigned NOT NULL default '0',
  1227. poster_time int(10) unsigned NOT NULL default '0',
  1228. id_member mediumint(8) unsigned NOT NULL default '0',
  1229. id_msg_modified int(10) unsigned NOT NULL default '0',
  1230. subject varchar(255) NOT NULL default '',
  1231. poster_name varchar(255) NOT NULL default '',
  1232. poster_email varchar(255) NOT NULL default '',
  1233. poster_ip varchar(255) NOT NULL default '',
  1234. smileys_enabled tinyint(4) NOT NULL default '1',
  1235. modified_time int(10) unsigned NOT NULL default '0',
  1236. modified_name varchar(255) NOT NULL default '',
  1237. modified_reason varchar(255) NOT NULL default '',
  1238. body text NOT NULL,
  1239. icon varchar(16) NOT NULL default 'xx',
  1240. approved tinyint(3) NOT NULL default '1',
  1241. likes smallint(5) unsigned NOT NULL default '0',
  1242. PRIMARY KEY (id_msg),
  1243. UNIQUE topic (id_topic, id_msg),
  1244. UNIQUE id_board (id_board, id_msg),
  1245. UNIQUE id_member (id_member, id_msg),
  1246. KEY approved (approved),
  1247. KEY ip_index (poster_ip(15), id_topic),
  1248. KEY participation (id_member, id_topic),
  1249. KEY show_posts (id_member, id_board),
  1250. KEY id_topic (id_topic),
  1251. KEY id_member_msg (id_member, approved, id_msg),
  1252. KEY current_topic (id_topic, id_msg, id_member, approved),
  1253. KEY related_ip (id_member, poster_ip, id_msg)
  1254. ) ENGINE=MyISAM;
  1255. #
  1256. # Dumping data for table `messages`
  1257. #
  1258. INSERT INTO {$db_prefix}messages
  1259. (id_msg, id_msg_modified, id_topic, id_board, poster_time, subject, poster_name, poster_email, poster_ip, modified_name, body, icon)
  1260. VALUES (1, 1, 1, 1, UNIX_TIMESTAMP(), '{$default_topic_subject}', 'Simple Machines', '[email protected]', '127.0.0.1', '', '{$default_topic_message}', 'xx');
  1261. # --------------------------------------------------------
  1262. #
  1263. # Table structure for table `moderators`
  1264. #
  1265. CREATE TABLE {$db_prefix}moderators (
  1266. id_board smallint(5) unsigned NOT NULL default '0',
  1267. id_member mediumint(8) unsigned NOT NULL default '0',
  1268. PRIMARY KEY (id_board, id_member)
  1269. ) ENGINE=MyISAM;
  1270. #
  1271. # Table structure for table `moderator_groups`
  1272. #
  1273. CREATE TABLE {$db_prefix}moderator_groups (
  1274. id_board smallint(5) unsigned NOT NULL default '0',
  1275. id_group smallint(5) unsigned NOT NULL default '0',
  1276. PRIMARY KEY (id_board, id_group)
  1277. ) ENGINE=MyISAM;
  1278. #
  1279. # Table structure for table `openid_assoc`
  1280. #
  1281. CREATE TABLE {$db_prefix}openid_assoc (
  1282. server_url text NOT NULL,
  1283. handle varchar(255) NOT NULL default '',
  1284. secret text NOT NULL,
  1285. issued int(10) NOT NULL default '0',
  1286. expires int(10) NOT NULL default '0',
  1287. assoc_type varchar(64) NOT NULL,
  1288. PRIMARY KEY (server_url(125), handle(125)),
  1289. KEY expires (expires)
  1290. ) ENGINE=MyISAM;
  1291. #
  1292. # Table structure for table `package_servers`
  1293. #
  1294. CREATE TABLE {$db_prefix}package_servers (
  1295. id_server smallint(5) unsigned NOT NULL auto_increment,
  1296. name varchar(255) NOT NULL default '',
  1297. url varchar(255) NOT NULL default '',
  1298. PRIMARY KEY (id_server)
  1299. ) ENGINE=MyISAM;
  1300. #
  1301. # Dumping data for table `package_servers`
  1302. #
  1303. INSERT INTO {$db_prefix}package_servers
  1304. (name, url)
  1305. VALUES ('Simple Machines Third-party Mod Site', 'http://custom.simplemachines.org/packages/mods');
  1306. # --------------------------------------------------------
  1307. #
  1308. # Table structure for table `permission_profiles`
  1309. #
  1310. CREATE TABLE {$db_prefix}permission_profiles (
  1311. id_profile smallint(5) NOT NULL auto_increment,
  1312. profile_name varchar(255) NOT NULL default '',
  1313. PRIMARY KEY (id_profile)
  1314. ) ENGINE=MyISAM;
  1315. #
  1316. # Dumping data for table `permission_profiles`
  1317. #
  1318. INSERT INTO {$db_prefix}permission_profiles
  1319. (id_profile, profile_name)
  1320. VALUES (1, 'default'), (2, 'no_polls'), (3, 'reply_only'), (4, 'read_only');
  1321. # --------------------------------------------------------
  1322. #
  1323. # Table structure for table `permissions`
  1324. #
  1325. CREATE TABLE {$db_prefix}permissions (
  1326. id_group smallint(5) NOT NULL default '0',
  1327. permission varchar(30) NOT NULL default '',
  1328. add_deny tinyint(4) NOT NULL default '1',
  1329. PRIMARY KEY (id_group, permission)
  1330. ) ENGINE=MyISAM;
  1331. #
  1332. # Dumping data for table `permissions`
  1333. #
  1334. INSERT INTO {$db_prefix}permissions
  1335. (id_group, permission)
  1336. VALUES (-1, 'search_posts'),
  1337. (-1, 'calendar_view'),
  1338. (-1, 'view_stats'),
  1339. (0, 'view_mlist'),
  1340. (0, 'search_posts'),
  1341. (0, 'profile_view'),
  1342. (0, 'pm_read'),
  1343. (0, 'pm_send'),
  1344. (0, 'pm_draft'),
  1345. (0, 'pm_autosave_draft'),
  1346. (0, 'calendar_view'),
  1347. (0, 'view_stats'),
  1348. (0, 'who_view'),
  1349. (0, 'profile_identity_own'),
  1350. (0, 'profile_password_own'),
  1351. (0, 'profile_blurb_own'),
  1352. (0, 'profile_displayed_name_own'),
  1353. (0, 'profile_signature_own'),
  1354. (0, 'profile_other_own'),
  1355. (0, 'profile_forum_own'),
  1356. (0, 'profile_extra_own'),
  1357. (0, 'profile_remove_own'),
  1358. (0, 'profile_server_avatar'),
  1359. (0, 'profile_upload_avatar'),
  1360. (0, 'profile_remote_avatar'),
  1361. (0, 'send_email_to_members'),
  1362. (0, 'karma_edit'),
  1363. (2, 'view_mlist'),
  1364. (2, 'search_posts'),
  1365. (2, 'profile_view'),
  1366. (2, 'pm_read'),
  1367. (2, 'pm_send'),
  1368. (2, 'pm_draft'),
  1369. (2, 'pm_autosave_draft'),
  1370. (2, 'calendar_view'),
  1371. (2, 'view_stats'),
  1372. (2, 'who_view'),
  1373. (2, 'profile_identity_own'),
  1374. (2, 'profile_password_own'),
  1375. (2, 'profile_blurb_own'),
  1376. (2, 'profile_displayed_name_own'),
  1377. (2, 'profile_signature_own'),
  1378. (2, 'profile_other_own'),
  1379. (2, 'profile_forum_own'),
  1380. (2, 'profile_extra_own'),
  1381. (2, 'profile_remove_own'),
  1382. (2, 'profile_server_avatar'),
  1383. (2, 'profile_upload_avatar'),
  1384. (2, 'profile_remote_avatar'),
  1385. (2, 'send_email_to_members'),
  1386. (2, 'profile_title_own'),
  1387. (2, 'calendar_post'),
  1388. (2, 'calendar_edit_any'),
  1389. (2, 'karma_edit'),
  1390. (2, 'access_mod_center');
  1391. # --------------------------------------------------------
  1392. #
  1393. # Table structure for table `personal_messages`
  1394. #
  1395. CREATE TABLE {$db_prefix}personal_messages (
  1396. id_pm int(10) unsigned NOT NULL auto_increment,
  1397. id_pm_head int(10) unsigned NOT NULL default '0',
  1398. id_member_from mediumint(8) unsigned NOT NULL default '0',
  1399. deleted_by_sender tinyint(3) unsigned NOT NULL default '0',
  1400. from_name varchar(255) NOT NULL default '',
  1401. msgtime int(10) unsigned NOT NULL default '0',
  1402. subject varchar(255) NOT NULL default '',
  1403. body text NOT NULL,
  1404. PRIMARY KEY (id_pm),
  1405. KEY id_member (id_member_from, deleted_by_sender),
  1406. KEY msgtime (msgtime),
  1407. KEY id_pm_head (id_pm_head)
  1408. ) ENGINE=MyISAM;
  1409. #
  1410. # Table structure for table `pm_labels`
  1411. #
  1412. CREATE TABLE {$db_prefix}pm_labels (
  1413. id_label int(10) unsigned NOT NULL auto_increment,
  1414. id_member mediumint(8) unsigned NOT NULL default '0',
  1415. name varchar(30) NOT NULL default '',
  1416. PRIMARY KEY (id_label)
  1417. ) ENGINE=MyISAM;
  1418. #
  1419. # Table structure for table `pm_labeled_messages`
  1420. #
  1421. CREATE TABLE {$db_prefix}pm_labeled_messages (
  1422. id_label int(10) unsigned NOT NULL default '0',
  1423. id_pm int(10) unsigned NOT NULL default '0',
  1424. PRIMARY KEY (id_label, id_pm)
  1425. ) ENGINE=MyISAM;
  1426. #
  1427. # Table structure for table `pm_recipients`
  1428. #
  1429. CREATE TABLE {$db_prefix}pm_recipients (
  1430. id_pm int(10) unsigned NOT NULL default '0',
  1431. id_member mediumint(8) unsigned NOT NULL default '0',
  1432. bcc tinyint(3) unsigned NOT NULL default '0',
  1433. is_read tinyint(3) unsigned NOT NULL default '0',
  1434. is_new tinyint(3) unsigned NOT NULL default '0',
  1435. deleted tinyint(3) unsigned NOT NULL default '0',
  1436. in_inbox tinyint(3) unsigned NOT NULL default '1',
  1437. PRIMARY KEY (id_pm, id_member),
  1438. UNIQUE id_member (id_member, deleted, id_pm)
  1439. ) ENGINE=MyISAM;
  1440. #
  1441. # Table structure for table `pm_rules`
  1442. #
  1443. CREATE TABLE {$db_prefix}pm_rules (
  1444. id_rule int(10) unsigned NOT NULL auto_increment,
  1445. id_member int(10) unsigned NOT NULL default '0',
  1446. rule_name varchar(60) NOT NULL,
  1447. criteria text NOT NULL,
  1448. actions text NOT NULL,
  1449. delete_pm tinyint(3) unsigned NOT NULL default '0',
  1450. is_or tinyint(3) unsigned NOT NULL default '0',
  1451. PRIMARY KEY (id_rule),
  1452. KEY id_member (id_member),
  1453. KEY delete_pm (delete_pm)
  1454. ) ENGINE=MyISAM;
  1455. #
  1456. # Table structure for table `polls`
  1457. #
  1458. CREATE TABLE {$db_prefix}polls (
  1459. id_poll mediumint(8) unsigned NOT NULL auto_increment,
  1460. question varchar(255) NOT NULL default '',
  1461. voting_locked tinyint(1) NOT NULL default '0',
  1462. max_votes tinyint(3) unsigned NOT NULL default '1',
  1463. expire_time int(10) unsigned NOT NULL default '0',
  1464. hide_results tinyint(3) unsigned NOT NULL default '0',
  1465. change_vote tinyint(3) unsigned NOT NULL default '0',
  1466. guest_vote tinyint(3) unsigned NOT NULL default '0',
  1467. num_guest_voters int(10) unsigned NOT NULL default '0',
  1468. reset_poll int(10) unsigned NOT NULL default '0',
  1469. id_member mediumint(8) NOT NULL default '0',
  1470. poster_name varchar(255) NOT NULL default '',
  1471. PRIMARY KEY (id_poll)
  1472. ) ENGINE=MyISAM;
  1473. #
  1474. # Table structure for table `poll_choices`
  1475. #
  1476. CREATE TABLE {$db_prefix}poll_choices (
  1477. id_poll mediumint(8) unsigned NOT NULL default '0',
  1478. id_choice tinyint(3) unsigned NOT NULL default '0',
  1479. label varchar(255) NOT NULL default '',
  1480. votes smallint(5) unsigned NOT NULL default '0',
  1481. PRIMARY KEY (id_poll, id_choice)
  1482. ) ENGINE=MyISAM;
  1483. #
  1484. # Table structure for table `qanda`
  1485. #
  1486. CREATE TABLE {$db_prefix}qanda (
  1487. id_question smallint(5) unsigned NOT NULL auto_increment,
  1488. lngfile varchar(255) NOT NULL default '',
  1489. question varchar(255) NOT NULL default '',
  1490. answers text NOT NULL,
  1491. PRIMARY KEY (id_question),
  1492. KEY lngfile (lngfile)
  1493. ) ENGINE=MyISAM;
  1494. #
  1495. # Table structure for table `scheduled_tasks`
  1496. #
  1497. CREATE TABLE {$db_prefix}scheduled_tasks (
  1498. id_task smallint(5) NOT NULL auto_increment,
  1499. next_time int(10) NOT NULL default '0',
  1500. time_offset int(10) NOT NULL default '0',
  1501. time_regularity smallint(5) NOT NULL default '0',
  1502. time_unit varchar(1) NOT NULL default 'h',
  1503. disabled tinyint(3) NOT NULL default '0',
  1504. task varchar(24) NOT NULL default '',
  1505. PRIMARY KEY (id_task),
  1506. KEY next_time (next_time),
  1507. KEY disabled (disabled),
  1508. UNIQUE task (task)
  1509. ) ENGINE=MyISAM;
  1510. #
  1511. # Dumping data for table `scheduled_tasks`
  1512. #
  1513. INSERT INTO {$db_prefix}scheduled_tasks
  1514. (id_task, next_time, time_offset, time_regularity, time_unit, disabled, task)
  1515. VALUES
  1516. (1, 0, 0, 2, 'h', 0, 'approval_notification'),
  1517. (2, 0, 0, 7, 'd', 0, 'auto_optimize'),
  1518. (3, 0, 60, 1, 'd', 0, 'daily_maintenance'),
  1519. (5, 0, 0, 1, 'd', 0, 'daily_digest'),
  1520. (6, 0, 0, 1, 'w', 0, 'weekly_digest'),
  1521. (7, 0, {$sched_task_offset}, 1, 'd', 0, 'fetchSMfiles'),
  1522. (8, 0, 0, 1, 'd', 1, 'birthdayemails'),
  1523. (9, 0, 0, 1, 'w', 0, 'weekly_maintenance'),
  1524. (10, 0, 120, 1, 'd', 1, 'paid_subscriptions'),
  1525. (11, 0, 120, 1, 'd', 0, 'remove_temp_attachments'),
  1526. (12, 0, 180, 1, 'd', 0, 'remove_topic_redirect'),
  1527. (13, 0, 240, 1, 'd', 0, 'remove_old_drafts');
  1528. # --------------------------------------------------------
  1529. #
  1530. # Table structure for table `settings`
  1531. #
  1532. CREATE TABLE {$db_prefix}settings (
  1533. variable varchar(255) NOT NULL default '',
  1534. value text NOT NULL,
  1535. PRIMARY KEY (variable(30))
  1536. ) ENGINE=MyISAM;
  1537. #
  1538. # Dumping data for table `settings`
  1539. #
  1540. INSERT INTO {$db_prefix}settings
  1541. (variable, value)
  1542. VALUES ('smfVersion', '{$smf_version}'),
  1543. ('news', '{$default_news}'),
  1544. ('compactTopicPagesContiguous', '5'),
  1545. ('compactTopicPagesEnable', '1'),
  1546. ('todayMod', '1'),
  1547. ('karmaMode', '0'),
  1548. ('karmaTimeRestrictAdmins', '1'),
  1549. ('enablePreviousNext', '1'),
  1550. ('pollMode', '1'),
  1551. ('enableCompressedOutput', '{$enableCompressedOutput}'),
  1552. ('karmaWaitTime', '1'),
  1553. ('karmaMinPosts', '0'),
  1554. ('karmaLabel', '{$default_karmaLabel}'),
  1555. ('karmaSmiteLabel', '{$default_karmaSmiteLabel}'),
  1556. ('karmaApplaudLabel', '{$default_karmaApplaudLabel}'),
  1557. ('attachmentSizeLimit', '128'),
  1558. ('attachmentPostLimit', '192'),
  1559. ('attachmentNumPerPostLimit', '4'),
  1560. ('attachmentDirSizeLimit', '10240'),
  1561. ('attachmentDirFileLimit', '1000'),
  1562. ('attachmentUploadDir', '{$boarddir}/attachments'),
  1563. ('attachmentExtensions', 'doc,gif,jpg,mpg,pdf,png,txt,zip'),
  1564. ('attachmentCheckExtensions', '0'),
  1565. ('attachmentShowImages', '1'),
  1566. ('attachmentEnable', '1'),
  1567. ('attachmentThumbnails', '1'),
  1568. ('attachmentThumbWidth', '150'),
  1569. ('attachmentThumbHeight', '150'),
  1570. ('use_subdirectories_for_attachments', '1'),
  1571. ('censorIgnoreCase', '1'),
  1572. ('mostOnline', '1'),
  1573. ('mostOnlineToday', '1'),
  1574. ('mostDate', UNIX_TIMESTAMP()),
  1575. ('allow_disableAnnounce', '1'),
  1576. ('trackStats', '1'),
  1577. ('userLanguage', '1'),
  1578. ('titlesEnable', '1'),
  1579. ('topicSummaryPosts', '15'),
  1580. ('enableErrorLogging', '1'),
  1581. ('log_ban_hits', '1'),
  1582. ('max_image_width', '0'),
  1583. ('max_image_height', '0'),
  1584. ('onlineEnable', '0'),
  1585. ('cal_enabled', '0'),
  1586. ('cal_showInTopic', '1'),
  1587. ('cal_maxyear', '2020'),
  1588. ('cal_minyear', '2008'),
  1589. ('cal_daysaslink', '0'),
  1590. ('cal_defaultboard', ''),
  1591. ('cal_showholidays', '1'),
  1592. ('cal_showbdays', '1'),
  1593. ('cal_showevents', '1'),
  1594. ('cal_maxspan', '7'),
  1595. ('cal_highlight_events', '3'),
  1596. ('cal_highlight_holidays', '3'),
  1597. ('cal_highlight_birthdays', '3'),
  1598. ('cal_disable_prev_next', '0'),
  1599. ('cal_display_type', '0'),
  1600. ('cal_week_links', '2'),
  1601. ('cal_prev_next_links', '1'),
  1602. ('cal_short_days', '0'),
  1603. ('cal_short_months', '0'),
  1604. ('smtp_host', ''),
  1605. ('smtp_port', '25'),
  1606. ('smtp_username', ''),
  1607. ('smtp_password', ''),
  1608. ('mail_type', '0'),
  1609. ('timeLoadPageEnable', '0'),
  1610. ('totalMembers', '0'),
  1611. ('totalTopics', '1'),
  1612. ('totalMessages', '1'),
  1613. ('censor_vulgar', ''),
  1614. ('censor_proper', ''),
  1615. ('enablePostHTML', '0'),
  1616. ('theme_allow', '1'),
  1617. ('theme_default', '1'),
  1618. ('theme_guests', '1'),
  1619. ('enableEmbeddedFlash', '0'),
  1620. ('xmlnews_enable', '1'),
  1621. ('xmlnews_maxlen', '255'),
  1622. ('registration_method', '{$registration_method}'),
  1623. ('send_validation_onChange', '0'),
  1624. ('send_welcomeEmail', '1'),
  1625. ('allow_editDisplayName', '1'),
  1626. ('allow_hideOnline', '1'),
  1627. ('spamWaitTime', '5'),
  1628. ('pm_spam_settings', '10,5,20'),
  1629. ('reserveWord', '0'),
  1630. ('reserveCase', '1'),
  1631. ('reserveUser', '1'),
  1632. ('reserveName', '1'),
  1633. ('reserveNames', '{$default_reserved_names}'),
  1634. ('autoLinkUrls', '1'),
  1635. ('banLastUpdated', '0'),
  1636. ('smileys_dir', '{$boarddir}/Smileys'),
  1637. ('smileys_url', '{$boardurl}/Smileys'),
  1638. ('custom_avatar_dir', '{$boarddir}/custom_avatar'),
  1639. ('custom_avatar_url', '{$boardurl}/custom_avatar'),
  1640. ('avatar_directory', '{$boarddir}/avatars'),
  1641. ('avatar_url', '{$boardurl}/avatars'),
  1642. ('avatar_max_height_external', '65'),
  1643. ('avatar_max_width_external', '65'),
  1644. ('avatar_action_too_large', 'option_css_resize'),
  1645. ('avatar_max_height_upload', '65'),
  1646. ('avatar_max_width_upload', '65'),
  1647. ('avatar_resize_upload', '1'),
  1648. ('avatar_download_png', '1'),
  1649. ('failed_login_threshold', '3'),
  1650. ('oldTopicDays', '120'),
  1651. ('edit_wait_time', '90'),
  1652. ('edit_disable_time', '0'),
  1653. ('autoFixDatabase', '1'),
  1654. ('allow_guestAccess', '1'),
  1655. ('time_format', '{$default_time_format}'),
  1656. ('number_format', '1234.00'),
  1657. ('enableBBC', '1'),
  1658. ('max_messageLength', '20000'),
  1659. ('signature_settings', '1,300,0,0,0,0,0,0:'),
  1660. ('autoOptMaxOnline', '0'),
  1661. ('defaultMaxMessages', '15'),
  1662. ('defaultMaxTopics', '20'),
  1663. ('defaultMaxMembers', '30'),
  1664. ('enableParticipation', '1'),
  1665. ('recycle_enable', '0'),
  1666. ('recycle_board', '0'),
  1667. ('maxMsgID', '1'),
  1668. ('enableAllMessages', '0'),
  1669. ('knownThemes', '1'),
  1670. ('enableThemes', '1'),
  1671. ('who_enabled', '1'),
  1672. ('time_offset', '0'),
  1673. ('cookieTime', '60'),
  1674. ('lastActive', '15'),
  1675. ('smiley_sets_known', 'default,aaron,akyhne,fugue'),
  1676. ('smiley_sets_names', '{$default_smileyset_name}\n{$default_aaron_smileyset_name}\n{$default_akyhne_smileyset_name}\n{$default_fugue_smileyset_name}'),
  1677. ('smiley_sets_default', 'default'),
  1678. ('cal_days_for_index', '7'),
  1679. ('requireAgreement', '1'),
  1680. ('unapprovedMembers', '0'),
  1681. ('default_personal_text', ''),
  1682. ('package_make_backups', '1'),
  1683. ('databaseSession_enable', '{$databaseSession_enable}'),
  1684. ('databaseSession_loose', '1'),
  1685. ('databaseSession_lifetime', '2880'),
  1686. ('search_cache_size', '50'),
  1687. ('search_results_per_page', '30'),
  1688. ('search_weight_frequency', '30'),
  1689. ('search_weight_age', '25'),
  1690. ('search_weight_length', '20'),
  1691. ('search_weight_subject', '15'),
  1692. ('search_weight_first_message', '10'),
  1693. ('search_max_results', '1200'),
  1694. ('search_floodcontrol_time', '5'),
  1695. ('permission_enable_deny', '0'),
  1696. ('permission_enable_postgroups', '0'),
  1697. ('mail_next_send', '0'),
  1698. ('mail_recent', '0000000000|0'),
  1699. ('settings_updated', '0'),
  1700. ('next_task_time', '1'),
  1701. ('warning_settings', '1,20,0'),
  1702. ('warning_watch', '10'),
  1703. ('warning_moderate', '35'),
  1704. ('warning_mute', '60'),
  1705. ('last_mod_report_action', '0'),
  1706. ('pruningOptions', '30,180,180,180,30,0'),
  1707. ('modlog_enabled', '1'),
  1708. ('adminlog_enabled', '1'),
  1709. ('cache_enable', '1'),
  1710. ('reg_verification', '1'),
  1711. ('visual_verification_type', '3'),
  1712. ('enable_buddylist', '1'),
  1713. ('birthday_email', 'happy_birthday'),
  1714. ('dont_repeat_theme_core', '1'),
  1715. ('dont_repeat_smileys_20', '1'),
  1716. ('dont_repeat_buddylists', '1'),
  1717. ('attachment_image_reencode', '1'),
  1718. ('attachment_image_paranoid', '0'),
  1719. ('attachment_thumb_png', '1'),
  1720. ('avatar_reencode', '1'),
  1721. ('avatar_paranoid', '0'),
  1722. ('enable_unwatch', '0'),
  1723. ('drafts_post_enabled', '1'),
  1724. ('drafts_pm_enabled', '1'),
  1725. ('drafts_autosave_enabled', '1'),
  1726. ('drafts_show_saved_enabled', '1'),
  1727. ('drafts_keep_days', '7'),
  1728. ('topic_move_any', '0'),
  1729. ('browser_cache', '?alph21'),
  1730. ('mail_limit', '5'),
  1731. ('mail_quantity', '5');
  1732. # --------------------------------------------------------
  1733. #
  1734. # Table structure for table `sessions`
  1735. #
  1736. CREATE TABLE {$db_prefix}sessions (
  1737. session_id char(64) NOT NULL,
  1738. last_update int(10) unsigned NOT NULL,
  1739. data text NOT NULL,
  1740. PRIMARY KEY (session_id)
  1741. ) ENGINE=MyISAM;
  1742. #
  1743. # Table structure for table `smileys`
  1744. #
  1745. CREATE TABLE {$db_prefix}smileys (
  1746. id_smiley smallint(5) unsigned NOT NULL auto_increment,
  1747. code varchar(30) NOT NULL default '',
  1748. filename varchar(48) NOT NULL default '',
  1749. description varchar(80) NOT NULL default '',
  1750. smiley_row tinyint(4) unsigned NOT NULL default '0',
  1751. smiley_order smallint(5) unsigned NOT NULL default '0',
  1752. hidden tinyint(4) unsigned NOT NULL default '0',
  1753. PRIMARY KEY (id_smiley)
  1754. ) ENGINE=MyISAM;
  1755. #
  1756. # Dumping data for table `smileys`
  1757. #
  1758. INSERT INTO {$db_prefix}smileys
  1759. (code, filename, description, smiley_order, hidden)
  1760. VALUES (':)', 'smiley.gif', '{$default_smiley_smiley}', 0, 0),
  1761. (';)', 'wink.gif', '{$default_wink_smiley}', 1, 0),
  1762. (':D', 'cheesy.gif', '{$default_cheesy_smiley}', 2, 0),
  1763. (';D', 'grin.gif', '{$default_grin_smiley}', 3, 0),
  1764. ('>:(', 'angry.gif', '{$default_angry_smiley}', 4, 0),
  1765. (':(', 'sad.gif', '{$default_sad_smiley}', 5, 0),
  1766. (':o', 'shocked.gif', '{$default_shocked_smiley}', 6, 0),
  1767. ('8)', 'cool.gif', '{$default_cool_smiley}', 7, 0),
  1768. ('???', 'huh.gif', '{$default_huh_smiley}', 8, 0),
  1769. ('::)', 'rolleyes.gif', '{$default_roll_eyes_smiley}', 9, 0),
  1770. (':P', 'tongue.gif', '{$default_tongue_smiley}', 10, 0),
  1771. (':-[', 'embarrassed.gif', '{$default_embarrassed_smiley}', 11, 0),
  1772. (':-X', 'lipsrsealed.gif', '{$default_lips_sealed_smiley}', 12, 0),
  1773. (':-\\', 'undecided.gif', '{$default_undecided_smiley}', 13, 0),
  1774. (':-*', 'kiss.gif', '{$default_kiss_smiley}', 14, 0),
  1775. (':\'(', 'cry.gif', '{$default_cry_smiley}', 15, 0),
  1776. ('>:D', 'evil.gif', '{$default_evil_smiley}', 16, 1),
  1777. ('^-^', 'azn.gif', '{$default_azn_smiley}', 17, 1),
  1778. ('O0', 'afro.gif', '{$default_afro_smiley}', 18, 1),
  1779. (':))', 'laugh.gif', '{$default_laugh_smiley}', 19, 1),
  1780. ('C:-)', 'police.gif', '{$default_police_smiley}', 20, 1),
  1781. ('O:-)', 'angel.gif', '{$default_angel_smiley}', 21, 1);
  1782. # --------------------------------------------------------
  1783. #
  1784. # Table structure for table `spiders`
  1785. #
  1786. CREATE TABLE {$db_prefix}spiders (
  1787. id_spider smallint(5) unsigned NOT NULL auto_increment,
  1788. spider_name varchar(255) NOT NULL default '',
  1789. user_agent varchar(255) NOT NULL default '',
  1790. ip_info varchar(255) NOT NULL default '',
  1791. PRIMARY KEY id_spider(id_spider)
  1792. ) ENGINE=MyISAM;
  1793. #
  1794. # Dumping data for table `spiders`
  1795. #
  1796. INSERT INTO {$db_prefix}spiders
  1797. (id_spider, spider_name, user_agent, ip_info)
  1798. VALUES (1, 'Google', 'googlebot', ''),
  1799. (2, 'Yahoo!', 'slurp', ''),
  1800. (3, 'MSN', 'msnbot', ''),
  1801. (4, 'Google (Mobile)', 'Googlebot-Mobile', ''),
  1802. (5, 'Google (Image)', 'Googlebot-Image', ''),
  1803. (6, 'Google (AdSense)', 'Mediapartners-Google', ''),
  1804. (7, 'Google (Adwords)', 'AdsBot-Google', ''),
  1805. (8, 'Yahoo! (Mobile)', 'YahooSeeker/M1A1-R2D2', ''),
  1806. (9, 'Yahoo! (Image)', 'Yahoo-MMCrawler', ''),
  1807. (10, 'MSN (Mobile)', 'MSNBOT_Mobile', ''),
  1808. (11, 'MSN (Media)', 'msnbot-media', ''),
  1809. (12, 'Cuil', 'twiceler', ''),
  1810. (13, 'Ask', 'Teoma', ''),
  1811. (14, 'Baidu', 'Baiduspider', ''),
  1812. (15, 'Gigablast', 'Gigabot', ''),
  1813. (16, 'InternetArchive', 'ia_archiver-web.archive.org', ''),
  1814. (17, 'Alexa', 'ia_archiver', ''),
  1815. (18, 'Omgili', 'omgilibot', ''),
  1816. (19, 'EntireWeb', 'Speedy Spider', ''),
  1817. (20, 'Yandex', 'yandex', '');
  1818. #
  1819. # Table structure for table `subscriptions`
  1820. #
  1821. CREATE TABLE {$db_prefix}subscriptions(
  1822. id_subscribe mediumint(8) unsigned NOT NULL auto_increment,
  1823. name varchar(60) NOT NULL default '',
  1824. description varchar(255) NOT NULL default '',
  1825. cost text NOT NULL,
  1826. length varchar(6) NOT NULL default '',
  1827. id_group smallint(5) NOT NULL default '0',
  1828. add_groups varchar(40) NOT NULL default '',
  1829. active tinyint(3) NOT NULL default '1',
  1830. repeatable tinyint(3) NOT NULL default '0',
  1831. allow_partial tinyint(3) NOT NULL default '0',
  1832. reminder tinyint(3) NOT NULL default '0',
  1833. email_complete text NOT NULL,
  1834. PRIMARY KEY (id_subscribe),
  1835. KEY active (active)
  1836. ) ENGINE=MyISAM;
  1837. #
  1838. # Table structure for table `themes`
  1839. #
  1840. CREATE TABLE {$db_prefix}themes (
  1841. id_member mediumint(8) NOT NULL default '0',
  1842. id_theme tinyint(4) unsigned NOT NULL default '1',
  1843. variable varchar(255) NOT NULL default '',
  1844. value text NOT NULL,
  1845. PRIMARY KEY (id_theme, id_member, variable(30)),
  1846. KEY id_member (id_member)
  1847. ) ENGINE=MyISAM;
  1848. #
  1849. # Dumping data for table `themes`
  1850. #
  1851. INSERT INTO {$db_prefix}themes
  1852. (id_theme, variable, value)
  1853. VALUES (1, 'name', '{$default_theme_name}'),
  1854. (1, 'theme_url', '{$boardurl}/Themes/default'),
  1855. (1, 'images_url', '{$boardurl}/Themes/default/images'),
  1856. (1, 'theme_dir', '{$boarddir}/Themes/default'),
  1857. (1, 'show_bbc', '1'),
  1858. (1, 'show_latest_member', '1'),
  1859. (1, 'show_modify', '1'),
  1860. (1, 'show_user_images', '1'),
  1861. (1, 'show_blurb', '1'),
  1862. (1, 'show_newsfader', '0'),
  1863. (1, 'number_recent_posts', '0'),
  1864. (1, 'show_profile_buttons', '1'),
  1865. (1, 'show_stats_index', '1'),
  1866. (1, 'newsfader_time', '5000'),
  1867. (1, 'additional_options_collapsable', '1'),
  1868. (1, 'use_image_buttons', '1'),
  1869. (1, 'enable_news', '1'),
  1870. (1, 'forum_width', '90%'),
  1871. (1, 'drafts_autosave_enabled', '1'),
  1872. (1, 'drafts_show_saved_enabled', '1');
  1873. INSERT INTO {$db_prefix}themes (id_member, id_theme, variable, value) VALUES (-1, 1, 'posts_apply_ignore_list', '1');
  1874. INSERT INTO {$db_prefix}themes (id_member, id_theme, variable, value) VALUES (-1, 1, 'return_to_post', '1');
  1875. # --------------------------------------------------------
  1876. #
  1877. # Table structure for table `topics`
  1878. #
  1879. CREATE TABLE {$db_prefix}topics (
  1880. id_topic mediumint(8) unsigned NOT NULL auto_increment,
  1881. is_sticky tinyint(4) NOT NULL default '0',
  1882. id_board smallint(5) unsigned NOT NULL default '0',
  1883. id_first_msg int(10) unsigned NOT NULL default '0',
  1884. id_last_msg int(10) unsigned NOT NULL default '0',
  1885. id_member_started mediumint(8) unsigned NOT NULL default '0',
  1886. id_member_updated mediumint(8) unsigned NOT NULL default '0',
  1887. id_poll mediumint(8) unsigned NOT NULL default '0',
  1888. id_previous_board smallint(5) NOT NULL default '0',
  1889. id_previous_topic mediumint(8) NOT NULL default '0',
  1890. num_replies int(10) unsigned NOT NULL default '0',
  1891. num_views int(10) unsigned NOT NULL default '0',
  1892. locked tinyint(4) NOT NULL default '0',
  1893. redirect_expires int(10) unsigned NOT NULL default '0',
  1894. id_redirect_topic mediumint(8) unsigned NOT NULL default '0',
  1895. unapproved_posts smallint(5) NOT NULL default '0',
  1896. approved tinyint(3) NOT NULL default '1',
  1897. PRIMARY KEY (id_topic),
  1898. UNIQUE last_message (id_last_msg, id_board),
  1899. UNIQUE first_message (id_first_msg, id_board),
  1900. UNIQUE poll (id_poll, id_topic),
  1901. KEY is_sticky (is_sticky),
  1902. KEY approved (approved),
  1903. KEY id_board (id_board),
  1904. KEY member_started (id_member_started, id_board),
  1905. KEY last_message_sticky (id_board, is_sticky, id_last_msg),
  1906. KEY board_news (id_board, id_first_msg)
  1907. ) ENGINE=MyISAM;
  1908. #
  1909. # Dumping data for table `topics`
  1910. #
  1911. INSERT INTO {$db_prefix}topics
  1912. (id_topic, id_board, id_first_msg, id_last_msg, id_member_started, id_member_updated)
  1913. VALUES (1, 1, 1, 1, 0, 0);
  1914. # --------------------------------------------------------
  1915. #
  1916. # Table structure for table `user_alerts`
  1917. #
  1918. CREATE TABLE {$db_prefix}user_alerts (
  1919. id_alert int(10) unsigned NOT NULL auto_increment,
  1920. alert_time int(10) unsigned NOT NULL default '0',
  1921. id_member mediumint(10) unsigned NOT NULL default '0',
  1922. id_member_started mediumint(10) unsigned NOT NULL default '0',
  1923. member_name varchar(255) NOT NULL default '',
  1924. content_type varchar(255) NOT NULL default '',
  1925. content_id int(10) unsigned NOT NULL default '0',
  1926. content_action varchar(255) NOT NULL default '',
  1927. is_read int(10) unsigned NOT NULL default '0',
  1928. extra text NOT NULL,
  1929. PRIMARY KEY (id_alert),
  1930. KEY id_member (id_member),
  1931. KEY alert_time (alert_time)
  1932. ) ENGINE=MyISAM;
  1933. #
  1934. # Table structure for table `user_alerts_prefs`
  1935. #
  1936. CREATE TABLE {$db_prefix}user_alerts_prefs (
  1937. id_member mediumint(8) unsigned NOT NULL default '0',
  1938. alert_pref varchar(32) NOT NULL default '',
  1939. alert_value tinyint(3) NOT NULL default '0',
  1940. PRIMARY KEY (id_member, alert_pref)
  1941. ) ENGINE=MyISAM;
  1942. #
  1943. # Dumping data for table `user_alerts_prefs`
  1944. #
  1945. INSERT INTO {$db_prefix}user_alerts_prefs
  1946. (id_member, alert_pref, alert_value)
  1947. VALUES (0, 'member_group_request', 1),
  1948. (0, 'member_register', 1),
  1949. (0, 'msg_like', 1),
  1950. (0, 'msg_report', 1),
  1951. (0, 'msg_report_reply', 1);
  1952. # --------------------------------------------------------
  1953. #
  1954. # Table structure for table `user_drafts`
  1955. #
  1956. CREATE TABLE {$db_prefix}user_drafts (
  1957. id_draft int(10) unsigned NOT NULL auto_increment,
  1958. id_topic mediumint(8) unsigned NOT NULL default '0',
  1959. id_board smallint(5) unsigned NOT NULL default '0',
  1960. id_reply int(10) unsigned NOT NULL default '0',
  1961. type tinyint(4) NOT NULL default '0',
  1962. poster_time int(10) unsigned NOT NULL default '0',
  1963. id_member mediumint(8) unsigned NOT NULL default '0',
  1964. subject varchar(255) NOT NULL default '',
  1965. smileys_enabled tinyint(4) NOT NULL default '1',
  1966. body mediumtext NOT NULL,
  1967. icon varchar(16) NOT NULL default 'xx',
  1968. locked tinyint(4) NOT NULL default '0',
  1969. is_sticky tinyint(4) NOT NULL default '0',
  1970. to_list varchar(255) NOT NULL default '',
  1971. PRIMARY KEY (id_draft),
  1972. UNIQUE id_member (id_member, id_draft, type)
  1973. ) ENGINE=MyISAM;
  1974. #
  1975. # Table structure for table `user_likes`
  1976. #
  1977. CREATE TABLE {$db_prefix}user_likes (
  1978. id_member mediumint(8) unsigned NOT NULL default '0',
  1979. content_type char(6) default '',
  1980. content_id int(10) unsigned NOT NULL default '0',
  1981. like_time int(10) unsigned NOT NULL default '0',
  1982. PRIMARY KEY (content_id, content_type, id_member),
  1983. INDEX content (content_id, content_type),
  1984. INDEX liker (id_member)
  1985. ) ENGINE=MyISAM;