2
0

install_2-1_mysql.sql 67 KB

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