Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1078 lines
30 KiB

  1. -- phpMyAdmin SQL Dump
  2. -- version 3.3.10.4
  3. -- http://www.phpmyadmin.net
  4. --
  5. SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
  6. -- --------------------------------------------------------
  7. --
  8. -- Table structure for table `addon`
  9. --
  10. CREATE TABLE IF NOT EXISTS `addon` (
  11. `id` int(11) NOT NULL AUTO_INCREMENT,
  12. `name` char(255) NOT NULL,
  13. `version` char(255) NOT NULL,
  14. `installed` tinyint(1) NOT NULL DEFAULT '0',
  15. `hidden` tinyint(1) NOT NULL DEFAULT '0',
  16. `timestamp` bigint(20) NOT NULL DEFAULT '0',
  17. `plugin_admin` tinyint(1) NOT NULL DEFAULT '0',
  18. PRIMARY KEY (`id`),
  19. KEY `hidden` (`hidden`)
  20. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  21. -- --------------------------------------------------------
  22. --
  23. -- Table structure for table `attach`
  24. --
  25. CREATE TABLE IF NOT EXISTS `attach` (
  26. `id` int(11) NOT NULL AUTO_INCREMENT,
  27. `uid` int(11) NOT NULL,
  28. `hash` char(64) NOT NULL,
  29. `filename` char(255) NOT NULL,
  30. `filetype` char(64) NOT NULL,
  31. `filesize` int(11) NOT NULL,
  32. `data` longblob NOT NULL,
  33. `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  34. `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  35. `allow_cid` mediumtext NOT NULL,
  36. `allow_gid` mediumtext NOT NULL,
  37. `deny_cid` mediumtext NOT NULL,
  38. `deny_gid` mediumtext NOT NULL,
  39. PRIMARY KEY (`id`)
  40. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  41. -- --------------------------------------------------------
  42. --
  43. -- Table structure for table `auth_codes`
  44. --
  45. CREATE TABLE IF NOT EXISTS `auth_codes` (
  46. `id` varchar(40) NOT NULL,
  47. `client_id` varchar(20) NOT NULL,
  48. `redirect_uri` varchar(200) NOT NULL,
  49. `expires` int(11) NOT NULL,
  50. `scope` varchar(250) NOT NULL,
  51. PRIMARY KEY (`id`)
  52. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  53. -- --------------------------------------------------------
  54. --
  55. -- Table structure for table `cache`
  56. --
  57. CREATE TABLE IF NOT EXISTS `cache` (
  58. `k` char(255) NOT NULL,
  59. `v` text NOT NULL,
  60. `updated` datetime NOT NULL,
  61. PRIMARY KEY (`k`)
  62. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  63. -- --------------------------------------------------------
  64. --
  65. -- Table structure for table `challenge`
  66. --
  67. CREATE TABLE IF NOT EXISTS `challenge` (
  68. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  69. `challenge` char(255) NOT NULL,
  70. `dfrn-id` char(255) NOT NULL,
  71. `expire` int(11) NOT NULL,
  72. `type` char(255) NOT NULL,
  73. `last_update` char(255) NOT NULL,
  74. PRIMARY KEY (`id`)
  75. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  76. -- --------------------------------------------------------
  77. --
  78. -- Table structure for table `clients`
  79. --
  80. CREATE TABLE IF NOT EXISTS `clients` (
  81. `client_id` varchar(20) NOT NULL,
  82. `pw` varchar(20) NOT NULL,
  83. `redirect_uri` varchar(200) NOT NULL,
  84. `name` text,
  85. `icon` text,
  86. `uid` int(11) NOT NULL DEFAULT '0',
  87. PRIMARY KEY (`client_id`)
  88. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  89. -- --------------------------------------------------------
  90. --
  91. -- Table structure for table `config`
  92. --
  93. CREATE TABLE IF NOT EXISTS `config` (
  94. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  95. `cat` char(255) CHARACTER SET ascii NOT NULL,
  96. `k` char(255) CHARACTER SET ascii NOT NULL,
  97. `v` text NOT NULL,
  98. PRIMARY KEY (`id`),
  99. UNIQUE KEY `access` (`cat`,`k`)
  100. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  101. -- --------------------------------------------------------
  102. --
  103. -- Table structure for table `contact`
  104. --
  105. CREATE TABLE IF NOT EXISTS `contact` (
  106. `id` int(11) NOT NULL AUTO_INCREMENT,
  107. `uid` int(11) NOT NULL COMMENT 'owner uid',
  108. `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  109. `self` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'boolean 1 == info for local UID, primarily name and photo to use in item displays.',
  110. `remote_self` tinyint(1) NOT NULL DEFAULT '0',
  111. `rel` tinyint(1) NOT NULL DEFAULT '0',
  112. `duplex` tinyint(1) NOT NULL DEFAULT '0',
  113. `network` char(255) NOT NULL,
  114. `name` char(255) NOT NULL,
  115. `nick` char(255) NOT NULL,
  116. `attag` char(255) NOT NULL,
  117. `photo` text NOT NULL COMMENT 'remote photo URL initially until approved',
  118. `thumb` text NOT NULL,
  119. `micro` text NOT NULL,
  120. `site-pubkey` text NOT NULL,
  121. `issued-id` char(255) NOT NULL,
  122. `dfrn-id` char(255) NOT NULL,
  123. `url` char(255) NOT NULL,
  124. `nurl` char(255) NOT NULL,
  125. `addr` char(255) NOT NULL,
  126. `alias` char(255) NOT NULL,
  127. `pubkey` text NOT NULL,
  128. `prvkey` text NOT NULL,
  129. `batch` char(255) NOT NULL,
  130. `request` text NOT NULL,
  131. `notify` text NOT NULL,
  132. `poll` text NOT NULL,
  133. `confirm` text NOT NULL,
  134. `poco` text NOT NULL,
  135. `aes_allow` tinyint(1) NOT NULL DEFAULT '0',
  136. `ret-aes` tinyint(1) NOT NULL DEFAULT '0',
  137. `usehub` tinyint(1) NOT NULL DEFAULT '0',
  138. `subhub` tinyint(1) NOT NULL DEFAULT '0',
  139. `hub-verify` char(255) NOT NULL,
  140. `last-update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  141. `success_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  142. `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  143. `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  144. `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  145. `term-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  146. `priority` tinyint(3) NOT NULL,
  147. `blocked` tinyint(1) NOT NULL DEFAULT '1',
  148. `readonly` tinyint(1) NOT NULL DEFAULT '0',
  149. `writable` tinyint(1) NOT NULL DEFAULT '0',
  150. `forum` tinyint(1) NOT NULL DEFAULT '0',
  151. `prv` tinyint(1) NOT NULL DEFAULT '0',
  152. `hidden` tinyint(1) NOT NULL DEFAULT '0',
  153. `archive` tinyint(1) NOT NULL DEFAULT '0',
  154. `pending` tinyint(1) NOT NULL DEFAULT '1',
  155. `rating` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0-5 reputation, 0 unknown, 1 call police, 5 inscrutable',
  156. `reason` text NOT NULL COMMENT 'why a rating was given - will help friends decide to make friends or not',
  157. `closeness` tinyint(2) NOT NULL DEFAULT '99',
  158. `info` mediumtext NOT NULL,
  159. `profile-id` int(11) NOT NULL DEFAULT '0' COMMENT 'which profile to display - 0 is public default',
  160. `bdyear` char(4) NOT NULL COMMENT 'birthday notify flag',
  161. `bd` date NOT NULL,
  162. PRIMARY KEY (`id`),
  163. KEY `uid` (`uid`),
  164. KEY `self` (`self`),
  165. KEY `issued-id` (`issued-id`),
  166. KEY `dfrn-id` (`dfrn-id`),
  167. KEY `blocked` (`blocked`),
  168. KEY `readonly` (`readonly`),
  169. KEY `network` (`network`),
  170. KEY `name` (`name`),
  171. KEY `nick` (`nick`),
  172. KEY `attag` (`attag`),
  173. KEY `addr` (`addr`),
  174. KEY `url` (`url`),
  175. KEY `batch` (`batch`),
  176. KEY `nurl` (`nurl`),
  177. KEY `pending` (`pending`),
  178. KEY `hidden` (`hidden`),
  179. KEY `archive` (`archive`),
  180. KEY `forum` (`forum`)
  181. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  182. -- --------------------------------------------------------
  183. --
  184. -- Table structure for table `conv`
  185. --
  186. CREATE TABLE IF NOT EXISTS `conv` (
  187. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  188. `guid` char(64) NOT NULL,
  189. `recips` mediumtext NOT NULL,
  190. `uid` int(11) NOT NULL,
  191. `creator` char(255) NOT NULL,
  192. `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  193. `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  194. `subject` mediumtext NOT NULL,
  195. PRIMARY KEY (`id`),
  196. KEY `created` (`created`),
  197. KEY `updated` (`updated`)
  198. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  199. -- --------------------------------------------------------
  200. --
  201. -- Table structure for table `deliverq`
  202. --
  203. CREATE TABLE IF NOT EXISTS `deliverq` (
  204. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  205. `cmd` char(32) NOT NULL,
  206. `item` int(11) NOT NULL,
  207. `contact` int(11) NOT NULL,
  208. PRIMARY KEY (`id`)
  209. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  210. -- --------------------------------------------------------
  211. --
  212. -- Table structure for table `event`
  213. --
  214. CREATE TABLE IF NOT EXISTS `event` (
  215. `id` int(11) NOT NULL AUTO_INCREMENT,
  216. `uid` int(11) NOT NULL,
  217. `cid` int(11) NOT NULL,
  218. `uri` char(255) NOT NULL,
  219. `created` datetime NOT NULL,
  220. `edited` datetime NOT NULL,
  221. `start` datetime NOT NULL,
  222. `finish` datetime NOT NULL,
  223. `summary` text NOT NULL,
  224. `desc` text NOT NULL,
  225. `location` text NOT NULL,
  226. `type` char(255) NOT NULL,
  227. `nofinish` tinyint(1) NOT NULL DEFAULT '0',
  228. `adjust` tinyint(1) NOT NULL DEFAULT '1',
  229. `allow_cid` mediumtext NOT NULL,
  230. `allow_gid` mediumtext NOT NULL,
  231. `deny_cid` mediumtext NOT NULL,
  232. `deny_gid` mediumtext NOT NULL,
  233. PRIMARY KEY (`id`),
  234. KEY `uid` ( `uid` ),
  235. KEY `cid` ( `cid` ),
  236. KEY `uri` ( `uri` ),
  237. KEY `type` ( `type` ),
  238. KEY `start` ( `start` ),
  239. KEY `finish` ( `finish` ),
  240. KEY `adjust` ( `adjust` )
  241. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  242. -- --------------------------------------------------------
  243. --
  244. -- Table structure for table `fcontact`
  245. --
  246. CREATE TABLE IF NOT EXISTS `fcontact` (
  247. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  248. `url` char(255) NOT NULL,
  249. `name` char(255) NOT NULL,
  250. `photo` char(255) NOT NULL,
  251. `request` char(255) NOT NULL,
  252. `nick` char(255) NOT NULL,
  253. `addr` char(255) NOT NULL,
  254. `batch` char(255) NOT NULL,
  255. `notify` char(255) NOT NULL,
  256. `poll` char(255) NOT NULL,
  257. `confirm` char(255) NOT NULL,
  258. `priority` tinyint(1) NOT NULL,
  259. `network` char(32) NOT NULL,
  260. `alias` char(255) NOT NULL,
  261. `pubkey` text NOT NULL,
  262. `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  263. PRIMARY KEY (`id`),
  264. KEY `addr` (`addr`),
  265. KEY `network` (`network`)
  266. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  267. -- --------------------------------------------------------
  268. --
  269. -- Table structure for table `ffinder`
  270. --
  271. CREATE TABLE IF NOT EXISTS `ffinder` (
  272. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  273. `uid` int(10) unsigned NOT NULL,
  274. `cid` int(10) unsigned NOT NULL,
  275. `fid` int(10) unsigned NOT NULL,
  276. PRIMARY KEY (`id`)
  277. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  278. -- --------------------------------------------------------
  279. --
  280. -- Table structure for table `fserver`
  281. --
  282. CREATE TABLE IF NOT EXISTS `fserver` (
  283. `id` int(11) NOT NULL AUTO_INCREMENT,
  284. `server` char(255) NOT NULL,
  285. `posturl` char(255) NOT NULL,
  286. `key` text NOT NULL,
  287. PRIMARY KEY (`id`),
  288. KEY `server` (`server`)
  289. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  290. -- --------------------------------------------------------
  291. --
  292. -- Table structure for table `fsuggest`
  293. --
  294. CREATE TABLE IF NOT EXISTS `fsuggest` (
  295. `id` int(11) NOT NULL AUTO_INCREMENT,
  296. `uid` int(11) NOT NULL,
  297. `cid` int(11) NOT NULL,
  298. `name` char(255) NOT NULL,
  299. `url` char(255) NOT NULL,
  300. `request` char(255) NOT NULL,
  301. `photo` char(255) NOT NULL,
  302. `note` text NOT NULL,
  303. `created` datetime NOT NULL,
  304. PRIMARY KEY (`id`)
  305. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  306. -- --------------------------------------------------------
  307. --
  308. -- Table structure for table `gcign`
  309. --
  310. CREATE TABLE IF NOT EXISTS `gcign` (
  311. `id` int(11) NOT NULL AUTO_INCREMENT,
  312. `uid` int(11) NOT NULL,
  313. `gcid` int(11) NOT NULL,
  314. PRIMARY KEY (`id`),
  315. KEY `uid` (`uid`),
  316. KEY `gcid` (`gcid`)
  317. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  318. -- --------------------------------------------------------
  319. --
  320. -- Table structure for table `gcontact`
  321. --
  322. CREATE TABLE IF NOT EXISTS `gcontact` (
  323. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  324. `name` char(255) NOT NULL,
  325. `url` char(255) NOT NULL,
  326. `nurl` char(255) NOT NULL,
  327. `photo` char(255) NOT NULL,
  328. `connect` char(255) NOT NULL,
  329. PRIMARY KEY (`id`),
  330. KEY `nurl` (`nurl`)
  331. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  332. -- --------------------------------------------------------
  333. --
  334. -- Table structure for table `glink`
  335. --
  336. CREATE TABLE IF NOT EXISTS `glink` (
  337. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  338. `cid` int(11) NOT NULL,
  339. `uid` int(11) NOT NULL,
  340. `gcid` int(11) NOT NULL,
  341. `zcid` int(11) NOT NULL,
  342. `updated` datetime NOT NULL,
  343. PRIMARY KEY (`id`),
  344. KEY `cid` (`cid`),
  345. KEY `uid` (`uid`),
  346. KEY `gcid` (`gcid`),
  347. KEY `zcid` (`zcid`),
  348. KEY `updated` (`updated`)
  349. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  350. -- --------------------------------------------------------
  351. --
  352. -- Table structure for table `group`
  353. --
  354. CREATE TABLE IF NOT EXISTS `group` (
  355. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  356. `uid` int(10) unsigned NOT NULL,
  357. `visible` tinyint(1) NOT NULL DEFAULT '0',
  358. `deleted` tinyint(1) NOT NULL DEFAULT '0',
  359. `name` char(255) NOT NULL,
  360. PRIMARY KEY (`id`)
  361. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  362. -- --------------------------------------------------------
  363. --
  364. -- Table structure for table `group_member`
  365. --
  366. CREATE TABLE IF NOT EXISTS `group_member` (
  367. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  368. `uid` int(10) unsigned NOT NULL,
  369. `gid` int(10) unsigned NOT NULL,
  370. `contact-id` int(10) unsigned NOT NULL,
  371. PRIMARY KEY (`id`)
  372. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  373. -- --------------------------------------------------------
  374. --
  375. -- Table structure for table `guid`
  376. --
  377. CREATE TABLE IF NOT EXISTS `guid` (
  378. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  379. `guid` char(64) NOT NULL,
  380. PRIMARY KEY (`id`),
  381. KEY `guid` (`guid`)
  382. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  383. -- --------------------------------------------------------
  384. --
  385. -- Table structure for table `hook`
  386. --
  387. CREATE TABLE IF NOT EXISTS `hook` (
  388. `id` int(11) NOT NULL AUTO_INCREMENT,
  389. `hook` char(255) NOT NULL,
  390. `file` char(255) NOT NULL,
  391. `function` char(255) NOT NULL,
  392. PRIMARY KEY (`id`)
  393. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  394. -- --------------------------------------------------------
  395. --
  396. -- Table structure for table `intro`
  397. --
  398. CREATE TABLE IF NOT EXISTS `intro` (
  399. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  400. `uid` int(10) unsigned NOT NULL,
  401. `fid` int(11) NOT NULL DEFAULT '0',
  402. `contact-id` int(11) NOT NULL,
  403. `knowyou` tinyint(1) NOT NULL,
  404. `duplex` tinyint(1) NOT NULL DEFAULT '0',
  405. `note` text NOT NULL,
  406. `hash` char(255) NOT NULL,
  407. `datetime` datetime NOT NULL,
  408. `blocked` tinyint(1) NOT NULL DEFAULT '1',
  409. `ignore` tinyint(1) NOT NULL DEFAULT '0',
  410. PRIMARY KEY (`id`)
  411. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  412. -- --------------------------------------------------------
  413. --
  414. -- Table structure for table `item`
  415. --
  416. CREATE TABLE IF NOT EXISTS `item` (
  417. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  418. `guid` char(64) NOT NULL,
  419. `uri` char(255) CHARACTER SET ascii NOT NULL,
  420. `uid` int(10) unsigned NOT NULL DEFAULT '0',
  421. `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
  422. `type` char(255) NOT NULL,
  423. `wall` tinyint(1) NOT NULL DEFAULT '0',
  424. `gravity` tinyint(1) NOT NULL DEFAULT '0',
  425. `parent` int(10) unsigned NOT NULL DEFAULT '0',
  426. `parent-uri` char(255) CHARACTER SET ascii NOT NULL,
  427. `extid` char(255) NOT NULL,
  428. `thr-parent` char(255) NOT NULL,
  429. `created` datetime NOT NULL,
  430. `edited` datetime NOT NULL,
  431. `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  432. `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  433. `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  434. `owner-name` char(255) NOT NULL,
  435. `owner-link` char(255) NOT NULL,
  436. `owner-avatar` char(255) NOT NULL,
  437. `author-name` char(255) NOT NULL,
  438. `author-link` char(255) NOT NULL,
  439. `author-avatar` char(255) NOT NULL,
  440. `title` char(255) NOT NULL,
  441. `body` mediumtext NOT NULL,
  442. `app` char(255) NOT NULL,
  443. `verb` char(255) NOT NULL,
  444. `object-type` char(255) NOT NULL,
  445. `object` text NOT NULL,
  446. `target-type` char(255) NOT NULL,
  447. `target` text NOT NULL,
  448. `postopts` text NOT NULL,
  449. `plink` char(255) NOT NULL,
  450. `resource-id` char(255) NOT NULL,
  451. `event-id` int(11) NOT NULL,
  452. `tag` mediumtext NOT NULL,
  453. `attach` mediumtext NOT NULL,
  454. `inform` mediumtext NOT NULL,
  455. `file` mediumtext NOT NULL,
  456. `location` char(255) NOT NULL,
  457. `coord` char(255) NOT NULL,
  458. `allow_cid` mediumtext NOT NULL,
  459. `allow_gid` mediumtext NOT NULL,
  460. `deny_cid` mediumtext NOT NULL,
  461. `deny_gid` mediumtext NOT NULL,
  462. `private` tinyint(1) NOT NULL DEFAULT '0',
  463. `pubmail` tinyint(1) NOT NULL DEFAULT '0',
  464. `moderated` tinyint(1) NOT NULL DEFAULT '0',
  465. `visible` tinyint(1) NOT NULL DEFAULT '0',
  466. `spam` tinyint(1) NOT NULL DEFAULT '0',
  467. `starred` tinyint(1) NOT NULL DEFAULT '0',
  468. `bookmark` tinyint(1) NOT NULL DEFAULT '0',
  469. `unseen` tinyint(1) NOT NULL DEFAULT '1',
  470. `deleted` tinyint(1) NOT NULL DEFAULT '0',
  471. `origin` tinyint(1) NOT NULL DEFAULT '0',
  472. `forum_mode` tinyint(1) NOT NULL DEFAULT '0',
  473. `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
  474. PRIMARY KEY (`id`),
  475. KEY `uri` (`uri`),
  476. KEY `uid` (`uid`),
  477. KEY `contact-id` (`contact-id`),
  478. KEY `type` (`type`),
  479. KEY `parent` (`parent`),
  480. KEY `parent-uri` (`parent-uri`),
  481. KEY `created` (`created`),
  482. KEY `edited` (`edited`),
  483. KEY `visible` (`visible`),
  484. KEY `deleted` (`deleted`),
  485. KEY `last-child` (`last-child`),
  486. KEY `unseen` (`unseen`),
  487. KEY `extid` (`extid`),
  488. KEY `received` (`received`),
  489. KEY `starred` (`starred`),
  490. KEY `guid` (`guid`),
  491. KEY `origin` (`origin`),
  492. KEY `wall` (`wall`),
  493. KEY `forum_mode` (`forum_mode`),
  494. KEY `author-link` (`author-link`),
  495. KEY `bookmark` (`bookmark`),
  496. KEY `moderated` (`moderated`),
  497. KEY `spam` (`spam`),
  498. KEY `author-name` (`author-name`),
  499. FULLTEXT KEY `title` (`title`),
  500. FULLTEXT KEY `body` (`body`),
  501. FULLTEXT KEY `allow_cid` (`allow_cid`),
  502. FULLTEXT KEY `allow_gid` (`allow_gid`),
  503. FULLTEXT KEY `deny_cid` (`deny_cid`),
  504. FULLTEXT KEY `deny_gid` (`deny_gid`),
  505. FULLTEXT KEY `tag` (`tag`),
  506. FULLTEXT KEY `file` (`file`)
  507. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  508. -- --------------------------------------------------------
  509. --
  510. -- Table structure for table `item_id`
  511. --
  512. CREATE TABLE IF NOT EXISTS `item_id` (
  513. `iid` int(11) NOT NULL,
  514. `uid` int(11) NOT NULL,
  515. `sid` char(255) NOT NULL,
  516. `service` char(255) NOT NULL,
  517. PRIMARY KEY (`iid`),
  518. KEY `uid` (`uid`),
  519. KEY `sid` (`sid`),
  520. KEY `service` (`service`)
  521. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  522. -- --------------------------------------------------------
  523. --
  524. -- Table structure for table `mail`
  525. --
  526. CREATE TABLE IF NOT EXISTS `mail` (
  527. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  528. `uid` int(10) unsigned NOT NULL,
  529. `guid` char(64) NOT NULL,
  530. `from-name` char(255) NOT NULL,
  531. `from-photo` char(255) NOT NULL,
  532. `from-url` char(255) NOT NULL,
  533. `contact-id` char(255) NOT NULL,
  534. `convid` int(11) NOT NULL,
  535. `title` char(255) NOT NULL,
  536. `body` mediumtext NOT NULL,
  537. `seen` tinyint(1) NOT NULL,
  538. `reply` tinyint(1) NOT NULL DEFAULT '0',
  539. `replied` tinyint(1) NOT NULL,
  540. `unknown` tinyint(1) NOT NULL DEFAULT '0',
  541. `uri` char(255) NOT NULL,
  542. `parent-uri` char(255) NOT NULL,
  543. `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  544. PRIMARY KEY (`id`),
  545. KEY `reply` (`reply`),
  546. KEY `uid` (`uid`),
  547. KEY `guid` (`guid`),
  548. KEY `seen` (`seen`),
  549. KEY `uri` (`uri`),
  550. KEY `parent-uri` (`parent-uri`),
  551. KEY `created` (`created`),
  552. KEY `convid` (`convid`),
  553. KEY `unknown` (`unknown`)
  554. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  555. -- --------------------------------------------------------
  556. --
  557. -- Table structure for table `mailacct`
  558. --
  559. CREATE TABLE IF NOT EXISTS `mailacct` (
  560. `id` int(11) NOT NULL AUTO_INCREMENT,
  561. `uid` int(11) NOT NULL,
  562. `server` char(255) NOT NULL,
  563. `port` int(11) NOT NULL,
  564. `ssltype` char(16) NOT NULL,
  565. `mailbox` char(255) NOT NULL,
  566. `user` char(255) NOT NULL,
  567. `pass` text NOT NULL,
  568. `action` int(11) NOT NULL,
  569. `movetofolder` char(255) NOT NULL,
  570. `reply_to` char(255) NOT NULL,
  571. `pubmail` tinyint(1) NOT NULL DEFAULT '0',
  572. `last_check` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  573. PRIMARY KEY (`id`)
  574. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  575. -- --------------------------------------------------------
  576. --
  577. -- Table structure for table `manage`
  578. --
  579. CREATE TABLE IF NOT EXISTS `manage` (
  580. `id` int(11) NOT NULL AUTO_INCREMENT,
  581. `uid` int(11) NOT NULL,
  582. `mid` int(11) NOT NULL,
  583. PRIMARY KEY (`id`),
  584. KEY `uid` (`uid`),
  585. KEY `mid` (`mid`)
  586. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  587. -- --------------------------------------------------------
  588. --
  589. -- Table structure for table `notify`
  590. --
  591. CREATE TABLE IF NOT EXISTS `notify` (
  592. `id` int(11) NOT NULL AUTO_INCREMENT,
  593. `hash` char(64) NOT NULL,
  594. `name` char(255) NOT NULL,
  595. `url` char(255) NOT NULL,
  596. `photo` char(255) NOT NULL,
  597. `date` datetime NOT NULL,
  598. `msg` mediumtext NOT NULL,
  599. `uid` int(11) NOT NULL,
  600. `link` char(255) NOT NULL,
  601. `parent` int(11) NOT NULL,
  602. `seen` tinyint(1) NOT NULL DEFAULT '0',
  603. `type` int(11) NOT NULL,
  604. `verb` char(255) NOT NULL,
  605. `otype` char(16) NOT NULL,
  606. PRIMARY KEY (`id`),
  607. KEY `type` (`type`),
  608. KEY `seen` (`seen`),
  609. KEY `uid` (`uid`),
  610. KEY `date` (`date`),
  611. KEY `hash` (`hash`),
  612. KEY `parent` (`parent`),
  613. KEY `link` (`link`),
  614. KEY `otype` (`otype`)
  615. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  616. -- --------------------------------------------------------
  617. --
  618. -- Table structure for table `notify-threads`
  619. --
  620. CREATE TABLE IF NOT EXISTS `notify-threads` (
  621. `id` int(11) NOT NULL AUTO_INCREMENT,
  622. `notify-id` int(11) NOT NULL,
  623. `master-parent-item` int(10) unsigned NOT NULL DEFAULT '0',
  624. `parent-item` int(10) unsigned NOT NULL DEFAULT '0',
  625. `receiver-uid` int(11) NOT NULL,
  626. PRIMARY KEY (`id`),
  627. KEY `master-parent-item` (`master-parent-item`),
  628. KEY `receiver-uid` (`receiver-uid`)
  629. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  630. -- --------------------------------------------------------
  631. --
  632. -- Table structure for table `pconfig`
  633. --
  634. CREATE TABLE IF NOT EXISTS `pconfig` (
  635. `id` int(11) NOT NULL AUTO_INCREMENT,
  636. `uid` int(11) NOT NULL DEFAULT '0',
  637. `cat` char(255) CHARACTER SET ascii NOT NULL,
  638. `k` char(255) CHARACTER SET ascii NOT NULL,
  639. `v` mediumtext NOT NULL,
  640. PRIMARY KEY (`id`),
  641. UNIQUE KEY `access` (`uid`,`cat`,`k`)
  642. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  643. -- --------------------------------------------------------
  644. --
  645. -- Table structure for table `photo`
  646. --
  647. CREATE TABLE IF NOT EXISTS `photo` (
  648. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  649. `uid` int(10) unsigned NOT NULL,
  650. `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
  651. `guid` char(64) NOT NULL,
  652. `resource-id` char(255) NOT NULL,
  653. `created` datetime NOT NULL,
  654. `edited` datetime NOT NULL,
  655. `title` char(255) NOT NULL,
  656. `desc` text NOT NULL,
  657. `album` char(255) NOT NULL,
  658. `filename` char(255) NOT NULL,
  659. `type` CHAR(128) NOT NULL DEFAULT 'image/jpeg',
  660. `height` smallint(6) NOT NULL,
  661. `width` smallint(6) NOT NULL,
  662. `data` mediumblob NOT NULL,
  663. `scale` tinyint(3) NOT NULL,
  664. `profile` tinyint(1) NOT NULL DEFAULT '0',
  665. `allow_cid` mediumtext NOT NULL,
  666. `allow_gid` mediumtext NOT NULL,
  667. `deny_cid` mediumtext NOT NULL,
  668. `deny_gid` mediumtext NOT NULL,
  669. PRIMARY KEY (`id`),
  670. KEY `uid` (`uid`),
  671. KEY `resource-id` (`resource-id`),
  672. KEY `album` (`album`),
  673. KEY `scale` (`scale`),
  674. KEY `profile` (`profile`)
  675. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  676. -- --------------------------------------------------------
  677. --
  678. -- Table structure for table `poll`
  679. --
  680. CREATE TABLE IF NOT EXISTS `poll` (
  681. `id` int(11) NOT NULL AUTO_INCREMENT,
  682. `uid` int(11) NOT NULL,
  683. `q0` mediumtext NOT NULL,
  684. `q1` mediumtext NOT NULL,
  685. `q2` mediumtext NOT NULL,
  686. `q3` mediumtext NOT NULL,
  687. `q4` mediumtext NOT NULL,
  688. `q5` mediumtext NOT NULL,
  689. `q6` mediumtext NOT NULL,
  690. `q7` mediumtext NOT NULL,
  691. `q8` mediumtext NOT NULL,
  692. `q9` mediumtext NOT NULL,
  693. PRIMARY KEY (`id`),
  694. KEY `uid` (`uid`)
  695. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  696. -- --------------------------------------------------------
  697. --
  698. -- Table structure for table `poll_result`
  699. --
  700. CREATE TABLE IF NOT EXISTS `poll_result` (
  701. `id` int(11) NOT NULL AUTO_INCREMENT,
  702. `poll_id` int(11) NOT NULL,
  703. `choice` int(11) NOT NULL,
  704. PRIMARY KEY (`id`),
  705. KEY `poll_id` (`poll_id`),
  706. KEY `choice` (`choice`)
  707. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  708. -- --------------------------------------------------------
  709. --
  710. -- Table structure for table `profile`
  711. --
  712. CREATE TABLE IF NOT EXISTS `profile` (
  713. `id` int(11) NOT NULL AUTO_INCREMENT,
  714. `uid` int(11) NOT NULL,
  715. `profile-name` char(255) NOT NULL,
  716. `is-default` tinyint(1) NOT NULL DEFAULT '0',
  717. `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
  718. `name` char(255) NOT NULL,
  719. `pdesc` char(255) NOT NULL,
  720. `dob` char(32) NOT NULL DEFAULT '0000-00-00',
  721. `address` char(255) NOT NULL,
  722. `locality` char(255) NOT NULL,
  723. `region` char(255) NOT NULL,
  724. `postal-code` char(32) NOT NULL,
  725. `country-name` char(255) NOT NULL,
  726. `hometown` char(255) NOT NULL,
  727. `gender` char(32) NOT NULL,
  728. `marital` char(255) NOT NULL,
  729. `with` text NOT NULL,
  730. `howlong` datetime NOT NULL default '0000-00-00 00:00:00',
  731. `sexual` char(255) NOT NULL,
  732. `politic` char(255) NOT NULL,
  733. `religion` char(255) NOT NULL,
  734. `pub_keywords` text NOT NULL,
  735. `prv_keywords` text NOT NULL,
  736. `likes` text NOT NULL,
  737. `dislikes` text NOT NULL,
  738. `about` text NOT NULL,
  739. `summary` char(255) NOT NULL,
  740. `music` text NOT NULL,
  741. `book` text NOT NULL,
  742. `tv` text NOT NULL,
  743. `film` text NOT NULL,
  744. `interest` text NOT NULL,
  745. `romance` text NOT NULL,
  746. `work` text NOT NULL,
  747. `education` text NOT NULL,
  748. `contact` text NOT NULL,
  749. `homepage` char(255) NOT NULL,
  750. `photo` char(255) NOT NULL,
  751. `thumb` char(255) NOT NULL,
  752. `publish` tinyint(1) NOT NULL DEFAULT '0',
  753. `net-publish` tinyint(1) NOT NULL DEFAULT '0',
  754. PRIMARY KEY (`id`),
  755. FULLTEXT KEY `pub_keywords` (`pub_keywords`),
  756. FULLTEXT KEY `prv_keywords` (`prv_keywords`)
  757. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  758. -- --------------------------------------------------------
  759. --
  760. -- Table structure for table `profile_check`
  761. --
  762. CREATE TABLE IF NOT EXISTS `profile_check` (
  763. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  764. `uid` int(10) unsigned NOT NULL,
  765. `cid` int(10) unsigned NOT NULL DEFAULT '0',
  766. `dfrn_id` char(255) NOT NULL,
  767. `sec` char(255) NOT NULL,
  768. `expire` int(11) NOT NULL,
  769. PRIMARY KEY (`id`)
  770. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  771. -- --------------------------------------------------------
  772. --
  773. -- Table structure for table `queue`
  774. --
  775. CREATE TABLE IF NOT EXISTS `queue` (
  776. `id` int(11) NOT NULL AUTO_INCREMENT,
  777. `cid` int(11) NOT NULL,
  778. `network` char(32) NOT NULL,
  779. `created` datetime NOT NULL,
  780. `last` datetime NOT NULL,
  781. `content` mediumtext NOT NULL,
  782. `batch` tinyint(1) NOT NULL DEFAULT '0',
  783. PRIMARY KEY (`id`),
  784. KEY `cid` (`cid`),
  785. KEY `network` (`network`),
  786. KEY `created` (`created`),
  787. KEY `last` (`last`),
  788. KEY `batch` (`batch`)
  789. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  790. -- --------------------------------------------------------
  791. --
  792. -- Table structure for table `register`
  793. --
  794. CREATE TABLE IF NOT EXISTS `register` (
  795. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  796. `hash` char(255) NOT NULL,
  797. `created` datetime NOT NULL,
  798. `uid` int(10) unsigned NOT NULL,
  799. `password` char(255) NOT NULL,
  800. `language` char(16) NOT NULL,
  801. PRIMARY KEY (`id`)
  802. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  803. -- --------------------------------------------------------
  804. --
  805. -- Table structure for table `search`
  806. --
  807. CREATE TABLE IF NOT EXISTS `search` (
  808. `id` int(11) NOT NULL AUTO_INCREMENT,
  809. `uid` int(11) NOT NULL,
  810. `term` char(255) NOT NULL,
  811. PRIMARY KEY (`id`),
  812. KEY `uid` (`uid`),
  813. KEY `term` (`term`)
  814. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  815. -- --------------------------------------------------------
  816. --
  817. -- Table structure for table `session`
  818. --
  819. CREATE TABLE IF NOT EXISTS `session` (
  820. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  821. `sid` char(255) NOT NULL,
  822. `data` text NOT NULL,
  823. `expire` int(10) unsigned NOT NULL,
  824. PRIMARY KEY (`id`),
  825. KEY `sid` (`sid`),
  826. KEY `expire` (`expire`)
  827. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  828. -- --------------------------------------------------------
  829. --
  830. -- Table structure for table `sign`
  831. --
  832. CREATE TABLE IF NOT EXISTS `sign` (
  833. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  834. `iid` int(10) unsigned NOT NULL DEFAULT '0',
  835. `retract_iid` int(10) unsigned NOT NULL DEFAULT '0',
  836. `signed_text` mediumtext NOT NULL,
  837. `signature` text NOT NULL,
  838. `signer` char(255) NOT NULL,
  839. PRIMARY KEY (`id`),
  840. KEY `iid` (`iid`),
  841. KEY `retract_iid` (`retract_iid`)
  842. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  843. -- --------------------------------------------------------
  844. --
  845. -- Table structure for table `spam`
  846. --
  847. CREATE TABLE IF NOT EXISTS `spam` (
  848. `id` int(11) NOT NULL AUTO_INCREMENT,
  849. `uid` int(11) NOT NULL,
  850. `spam` int(11) NOT NULL DEFAULT '0',
  851. `ham` int(11) NOT NULL DEFAULT '0',
  852. `term` char(255) NOT NULL,
  853. `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  854. PRIMARY KEY (`id`),
  855. KEY `uid` (`uid`),
  856. KEY `spam` (`spam`),
  857. KEY `ham` (`ham`),
  858. KEY `term` (`term`)
  859. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  860. -- --------------------------------------------------------
  861. --
  862. -- Table structure for table `tokens`
  863. --
  864. CREATE TABLE IF NOT EXISTS `tokens` (
  865. `id` varchar(40) NOT NULL,
  866. `secret` text NOT NULL,
  867. `client_id` varchar(20) NOT NULL,
  868. `expires` int(11) NOT NULL,
  869. `scope` varchar(200) NOT NULL,
  870. `uid` int(11) NOT NULL,
  871. PRIMARY KEY (`id`)
  872. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  873. -- --------------------------------------------------------
  874. --
  875. -- Table structure for table `user`
  876. --
  877. CREATE TABLE IF NOT EXISTS `user` (
  878. `uid` int(11) NOT NULL AUTO_INCREMENT,
  879. `guid` char(16) NOT NULL,
  880. `username` char(255) NOT NULL,
  881. `password` char(255) NOT NULL,
  882. `nickname` char(255) NOT NULL,
  883. `email` char(255) NOT NULL,
  884. `openid` char(255) NOT NULL,
  885. `timezone` char(128) NOT NULL,
  886. `language` char(16) NOT NULL DEFAULT 'en',
  887. `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  888. `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  889. `default-location` char(255) NOT NULL,
  890. `allow_location` tinyint(1) NOT NULL DEFAULT '0',
  891. `theme` char(255) NOT NULL,
  892. `pubkey` text NOT NULL,
  893. `prvkey` text NOT NULL,
  894. `spubkey` text NOT NULL,
  895. `sprvkey` text NOT NULL,
  896. `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  897. `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
  898. `blockwall` tinyint(1) NOT NULL DEFAULT '0',
  899. `hidewall` tinyint(1) NOT NULL DEFAULT '0',
  900. `blocktags` tinyint(1) NOT NULL DEFAULT '0',
  901. `unkmail` tinyint(1) NOT NULL DEFAULT '0',
  902. `cntunkmail` int(11) NOT NULL DEFAULT '10',
  903. `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
  904. `page-flags` int(11) NOT NULL DEFAULT '0',
  905. `prvnets` tinyint(1) NOT NULL DEFAULT '0',
  906. `pwdreset` char(255) NOT NULL,
  907. `maxreq` int(11) NOT NULL DEFAULT '10',
  908. `expire` int(10) unsigned NOT NULL DEFAULT '0',
  909. `account_removed` tinyint(1) NOT NULL DEFAULT '0',
  910. `account_expired` tinyint(1) NOT NULL DEFAULT '0',
  911. `account_expires_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  912. `expire_notification_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  913. `service_class` char(32) NOT NULL,
  914. `def_gid` int(11) NOT NULL DEFAULT '0',
  915. `allow_cid` mediumtext NOT NULL,
  916. `allow_gid` mediumtext NOT NULL,
  917. `deny_cid` mediumtext NOT NULL,
  918. `deny_gid` mediumtext NOT NULL,
  919. `openidserver` text NOT NULL,
  920. PRIMARY KEY (`uid`),
  921. KEY `nickname` (`nickname`),
  922. KEY `login_date` (`login_date`),
  923. KEY `account_expired` (`account_expired`),
  924. KEY `hidewall` (`hidewall`),
  925. KEY `blockwall` (`blockwall`),
  926. KEY `blocked` (`blocked`),
  927. KEY `verified` (`verified`),
  928. KEY `unkmail` (`unkmail`),
  929. KEY `cntunkmail` (`cntunkmail`),
  930. KEY `account_removed` (`account_removed`),
  931. KEY `service_class` (`service_class`)
  932. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  933. -- --------------------------------------------------------
  934. --
  935. -- Table structure for table `userd`
  936. --
  937. CREATE TABLE IF NOT EXISTS `userd` (
  938. `id` int(11) NOT NULL AUTO_INCREMENT,
  939. `username` char(255) NOT NULL,
  940. PRIMARY KEY (`id`)
  941. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;