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.

779 lines
23 KiB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
10 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
10 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
10 years ago
10 years ago
11 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. -- phpMyAdmin SQL Dump
  2. -- version 2.11.9.4
  3. -- http://www.phpmyadmin.net
  4. --
  5. SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
  6. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  7. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  8. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  9. /*!40101 SET NAMES utf8 */;
  10. --
  11. --
  12. -- --------------------------------------------------------
  13. --
  14. -- Table structure for table `challenge`
  15. --
  16. CREATE TABLE IF NOT EXISTS `challenge` (
  17. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  18. `challenge` char(255) NOT NULL,
  19. `dfrn-id` char(255) NOT NULL,
  20. `expire` int(11) NOT NULL,
  21. `type` char(255) NOT NULL,
  22. `last_update` char(255) NOT NULL,
  23. PRIMARY KEY (`id`)
  24. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  25. -- --------------------------------------------------------
  26. CREATE TABLE IF NOT EXISTS `config` (
  27. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  28. `cat` char(255) NOT NULL,
  29. `k` char(255) NOT NULL,
  30. `v` text NOT NULL,
  31. PRIMARY KEY (`id`)
  32. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  33. --
  34. -- Table structure for table `contact`
  35. --
  36. CREATE TABLE IF NOT EXISTS `contact` (
  37. `id` int(11) NOT NULL AUTO_INCREMENT,
  38. `uid` int(11) NOT NULL COMMENT 'owner uid',
  39. `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  40. `self` tinyint(1) NOT NULL DEFAULT '0',
  41. `remote_self` tinyint(1) NOT NULL DEFAULT '0',
  42. `rel` tinyint(1) NOT NULL DEFAULT '0',
  43. `duplex` tinyint(1) NOT NULL DEFAULT '0',
  44. `network` char(255) NOT NULL,
  45. `name` char(255) NOT NULL,
  46. `nick` char(255) NOT NULL,
  47. `attag` char(255) NOT NULL,
  48. `photo` text NOT NULL,
  49. `thumb` text NOT NULL,
  50. `micro` text NOT NULL,
  51. `site-pubkey` text NOT NULL,
  52. `issued-id` char(255) NOT NULL,
  53. `dfrn-id` char(255) NOT NULL,
  54. `url` char(255) NOT NULL,
  55. `nurl` char(255) NOT NULL,
  56. `addr` char(255) NOT NULL,
  57. `alias` char(255) NOT NULL,
  58. `pubkey` text NOT NULL,
  59. `prvkey` text NOT NULL,
  60. `batch` char(255) NOT NULL,
  61. `request` text NOT NULL,
  62. `notify` text NOT NULL,
  63. `poll` text NOT NULL,
  64. `confirm` text NOT NULL,
  65. `poco` text NOT NULL,
  66. `aes_allow` tinyint(1) NOT NULL DEFAULT '0',
  67. `ret-aes` tinyint(1) NOT NULL DEFAULT '0',
  68. `usehub` tinyint(1) NOT NULL DEFAULT '0',
  69. `subhub` tinyint(1) NOT NULL DEFAULT '0',
  70. `hub-verify` char(255) NOT NULL,
  71. `last-update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  72. `success_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  73. `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  74. `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  75. `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  76. `term-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  77. `priority` tinyint(3) NOT NULL,
  78. `blocked` tinyint(1) NOT NULL DEFAULT '1',
  79. `readonly` tinyint(1) NOT NULL DEFAULT '0',
  80. `writable` tinyint(1) NOT NULL DEFAULT '0',
  81. `hidden` tinyint(1) NOT NULL DEFAULT '0',
  82. `pending` tinyint(1) NOT NULL DEFAULT '1',
  83. `rating` tinyint(1) NOT NULL DEFAULT '0',
  84. `reason` text NOT NULL,
  85. `info` mediumtext NOT NULL,
  86. `profile-id` int(11) NOT NULL DEFAULT '0',
  87. `bdyear` CHAR( 4 ) NOT NULL COMMENT 'birthday notify flag',
  88. `bd` date NOT NULL,
  89. PRIMARY KEY (`id`),
  90. KEY `uid` (`uid`),
  91. KEY `self` (`self`),
  92. KEY `network` (`network`),
  93. KEY `name` (`name`),
  94. KEY `nick` (`nick`),
  95. KEY `attag` (`attag`),
  96. KEY `url` (`url`),
  97. KEY `nurl` (`nurl`),
  98. KEY `addr` (`addr`),
  99. KEY `batch` (`batch`),
  100. KEY `issued-id` (`issued-id`),
  101. KEY `dfrn-id` (`dfrn-id`),
  102. KEY `blocked` (`blocked`),
  103. KEY `readonly` (`readonly`),
  104. KEY `hidden` (`hidden`),
  105. KEY `pending` (`pending`)
  106. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  107. -- --------------------------------------------------------
  108. --
  109. -- Table structure for table `group`
  110. --
  111. CREATE TABLE IF NOT EXISTS `group` (
  112. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  113. `uid` int(10) unsigned NOT NULL,
  114. `visible` tinyint(1) NOT NULL DEFAULT '0',
  115. `deleted` tinyint(1) NOT NULL DEFAULT '0',
  116. `name` char(255) NOT NULL,
  117. PRIMARY KEY (`id`)
  118. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  119. -- --------------------------------------------------------
  120. --
  121. -- Table structure for table `group_member`
  122. --
  123. CREATE TABLE IF NOT EXISTS `group_member` (
  124. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  125. `uid` int(10) unsigned NOT NULL,
  126. `gid` int(10) unsigned NOT NULL,
  127. `contact-id` int(10) unsigned NOT NULL,
  128. PRIMARY KEY (`id`)
  129. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  130. -- --------------------------------------------------------
  131. --
  132. -- Table structure for table `intro`
  133. --
  134. CREATE TABLE IF NOT EXISTS `intro` (
  135. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  136. `uid` int(10) unsigned NOT NULL,
  137. `fid` int(11) NOT NULL DEFAULT '0',
  138. `contact-id` int(11) NOT NULL,
  139. `knowyou` tinyint(1) NOT NULL,
  140. `duplex` tinyint(1) NOT NULL DEFAULT '0',
  141. `note` text NOT NULL,
  142. `hash` char(255) NOT NULL,
  143. `datetime` datetime NOT NULL,
  144. `blocked` tinyint(1) NOT NULL DEFAULT '1',
  145. `ignore` tinyint(1) NOT NULL DEFAULT '0',
  146. PRIMARY KEY (`id`)
  147. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  148. -- --------------------------------------------------------
  149. --
  150. -- Table structure for table `item`
  151. --
  152. CREATE TABLE IF NOT EXISTS `item` (
  153. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  154. `guid` char(64) NOT NULL,
  155. `uri` char(255) NOT NULL,
  156. `uid` int(10) unsigned NOT NULL DEFAULT '0',
  157. `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
  158. `type` char(255) NOT NULL,
  159. `wall` tinyint(1) NOT NULL DEFAULT '0',
  160. `gravity` tinyint(1) NOT NULL DEFAULT '0',
  161. `parent` int(10) unsigned NOT NULL DEFAULT '0',
  162. `parent-uri` char(255) NOT NULL,
  163. `extid` char(255) NOT NULL,
  164. `thr-parent` char(255) NOT NULL,
  165. `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  166. `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  167. `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  168. `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  169. `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  170. `owner-name` char(255) NOT NULL,
  171. `owner-link` char(255) NOT NULL,
  172. `owner-avatar` char(255) NOT NULL,
  173. `author-name` char(255) NOT NULL,
  174. `author-link` char(255) NOT NULL,
  175. `author-avatar` char(255) NOT NULL,
  176. `title` char(255) NOT NULL,
  177. `body` mediumtext NOT NULL,
  178. `app` char(255) NOT NULL,
  179. `verb` char(255) NOT NULL,
  180. `object-type` char(255) NOT NULL,
  181. `object` text NOT NULL,
  182. `target-type` char(255) NOT NULL,
  183. `target` text NOT NULL,
  184. `postopts` text NOT NULL,
  185. `plink` char(255) NOT NULL,
  186. `resource-id` char(255) NOT NULL,
  187. `event-id` int(10) unsigned NOT NULL,
  188. `tag` mediumtext NOT NULL,
  189. `attach` mediumtext NOT NULL,
  190. `inform` mediumtext NOT NULL,
  191. `location` char(255) NOT NULL,
  192. `coord` char(255) NOT NULL,
  193. `allow_cid` mediumtext NOT NULL,
  194. `allow_gid` mediumtext NOT NULL,
  195. `deny_cid` mediumtext NOT NULL,
  196. `deny_gid` mediumtext NOT NULL,
  197. `private` tinyint(1) NOT NULL DEFAULT '0',
  198. `pubmail` tinyint(1) NOT NULL DEFAULT '0',
  199. `moderated` tinyint(1) NOT NULL DEFAULT '0',
  200. `visible` tinyint(1) NOT NULL DEFAULT '0',
  201. `starred` tinyint(1) NOT NULL DEFAULT '0',
  202. `bookmark` tinyint(1) NOT NULL DEFAULT '0',
  203. `unseen` tinyint(1) NOT NULL DEFAULT '1',
  204. `deleted` tinyint(1) NOT NULL DEFAULT '0',
  205. `origin` tinyint(1) NOT NULL DEFAULT '0',
  206. `forum_mode` tinyint(1) NOT NULL DEFAULT '0',
  207. `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
  208. PRIMARY KEY (`id`),
  209. KEY `guid` (`guid`),
  210. KEY `uri` (`uri`),
  211. KEY `uid` (`uid`),
  212. KEY `contact-id` (`contact-id`),
  213. KEY `type` (`type`),
  214. KEY `parent` (`parent`),
  215. KEY `parent-uri` (`parent-uri`),
  216. KEY `extid` (`extid`),
  217. KEY `created` (`created`),
  218. KEY `edited` (`edited`),
  219. KEY `received` (`received`),
  220. KEY `moderated` (`moderated`),
  221. KEY `visible` (`visible`),
  222. KEY `starred` (`starred`),
  223. KEY `bookmark` (`bookmark`),
  224. KEY `deleted` (`deleted`),
  225. KEY `origin` (`origin`),
  226. KEY `forum_mode` (`forum_mode`),
  227. KEY `last-child` (`last-child`),
  228. KEY `unseen` (`unseen`),
  229. KEY `wall` (`wall`),
  230. KEY `author-link` (`author-link`),
  231. FULLTEXT KEY `title` (`title`),
  232. FULLTEXT KEY `body` (`body`),
  233. FULLTEXT KEY `tag` (`tag`),
  234. FULLTEXT KEY `allow_cid` (`allow_cid`),
  235. FULLTEXT KEY `allow_gid` (`allow_gid`),
  236. FULLTEXT KEY `deny_cid` (`deny_cid`),
  237. FULLTEXT KEY `deny_gid` (`deny_gid`)
  238. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  239. -- --------------------------------------------------------
  240. --
  241. -- Table structure for table `mail`
  242. --
  243. CREATE TABLE IF NOT EXISTS `mail` (
  244. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  245. `uid` int(10) unsigned NOT NULL,
  246. `guid` char(64) NOT NULL,
  247. `from-name` char(255) NOT NULL,
  248. `from-photo` char(255) NOT NULL,
  249. `from-url` char(255) NOT NULL,
  250. `contact-id` char(255) NOT NULL,
  251. `convid` int(10) unsigned NOT NULL,
  252. `title` char(255) NOT NULL,
  253. `body` mediumtext NOT NULL,
  254. `seen` tinyint(1) NOT NULL,
  255. `reply` tinyint(1) NOT NULL DEFAULT '0',
  256. `replied` tinyint(1) NOT NULL,
  257. `uri` char(255) NOT NULL,
  258. `parent-uri` char(255) NOT NULL,
  259. `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  260. PRIMARY KEY (`id`),
  261. KEY `uid` (`uid`),
  262. KEY `guid` (`guid`),
  263. KEY `convid` (`convid`),
  264. KEY `reply` (`reply`),
  265. KEY `uri` (`uri`),
  266. KEY `parent-uri` (`parent-uri`),
  267. KEY `created` (`created`)
  268. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  269. -- --------------------------------------------------------
  270. --
  271. -- Table structure for table `photo`
  272. --
  273. CREATE TABLE IF NOT EXISTS `photo` (
  274. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  275. `uid` int(10) unsigned NOT NULL,
  276. `contact-id` int(10) unsigned NOT NULL,
  277. `guid` char(64) NOT NULL,
  278. `resource-id` char(255) NOT NULL,
  279. `created` datetime NOT NULL,
  280. `edited` datetime NOT NULL,
  281. `title` char(255) NOT NULL,
  282. `desc` text NOT NULL,
  283. `album` char(255) NOT NULL,
  284. `filename` char(255) NOT NULL,
  285. `height` smallint(6) NOT NULL,
  286. `width` smallint(6) NOT NULL,
  287. `data` mediumblob NOT NULL,
  288. `scale` tinyint(3) NOT NULL,
  289. `profile` tinyint(1) NOT NULL DEFAULT '0',
  290. `allow_cid` mediumtext NOT NULL,
  291. `allow_gid` mediumtext NOT NULL,
  292. `deny_cid` mediumtext NOT NULL,
  293. `deny_gid` mediumtext NOT NULL,
  294. PRIMARY KEY (`id`),
  295. KEY `uid` (`uid`),
  296. KEY `resource-id` (`resource-id`),
  297. KEY `album` (`album`),
  298. KEY `scale` (`scale`),
  299. KEY `profile` (`profile`),
  300. KEY `guid` (`guid`)
  301. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  302. -- --------------------------------------------------------
  303. --
  304. -- Table structure for table `profile`
  305. --
  306. CREATE TABLE IF NOT EXISTS `profile` (
  307. `id` int(11) NOT NULL AUTO_INCREMENT,
  308. `uid` int(11) NOT NULL,
  309. `profile-name` char(255) NOT NULL,
  310. `is-default` tinyint(1) NOT NULL DEFAULT '0',
  311. `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
  312. `name` char(255) NOT NULL,
  313. `pdesc` char(255) NOT NULL,
  314. `dob` char(32) NOT NULL DEFAULT '0000-00-00',
  315. `address` char(255) NOT NULL,
  316. `locality` char(255) NOT NULL,
  317. `region` char(255) NOT NULL,
  318. `postal-code` char(32) NOT NULL,
  319. `country-name` char(255) NOT NULL,
  320. `gender` char(32) NOT NULL,
  321. `marital` char(255) NOT NULL,
  322. `showwith` tinyint(1) NOT NULL DEFAULT '0',
  323. `with` text NOT NULL,
  324. `sexual` char(255) NOT NULL,
  325. `politic` char(255) NOT NULL,
  326. `religion` char(255) NOT NULL,
  327. `pub_keywords` text NOT NULL,
  328. `prv_keywords` text NOT NULL,
  329. `about` text NOT NULL,
  330. `summary` char(255) NOT NULL,
  331. `music` text NOT NULL,
  332. `book` text NOT NULL,
  333. `tv` text NOT NULL,
  334. `film` text NOT NULL,
  335. `interest` text NOT NULL,
  336. `romance` text NOT NULL,
  337. `work` text NOT NULL,
  338. `education` text NOT NULL,
  339. `contact` text NOT NULL,
  340. `homepage` char(255) NOT NULL,
  341. `photo` char(255) NOT NULL,
  342. `thumb` char(255) NOT NULL,
  343. `publish` tinyint(1) NOT NULL DEFAULT '0',
  344. `net-publish` tinyint(1) NOT NULL DEFAULT '0',
  345. PRIMARY KEY (`id`),
  346. FULLTEXT KEY `pub_keywords` (`pub_keywords`),
  347. FULLTEXT KEY `prv_keywords` (`prv_keywords`)
  348. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  349. -- --------------------------------------------------------
  350. --
  351. -- Table structure for table `profile_check`
  352. --
  353. CREATE TABLE IF NOT EXISTS `profile_check` (
  354. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  355. `uid` int(10) unsigned NOT NULL,
  356. `cid` int(10) unsigned NOT NULL,
  357. `dfrn_id` char(255) NOT NULL,
  358. `sec` char(255) NOT NULL,
  359. `expire` int(11) NOT NULL,
  360. PRIMARY KEY (`id`)
  361. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  362. -- --------------------------------------------------------
  363. --
  364. -- Table structure for table `session`
  365. --
  366. CREATE TABLE IF NOT EXISTS `session` (
  367. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  368. `sid` char(255) NOT NULL,
  369. `data` text NOT NULL,
  370. `expire` int(10) unsigned NOT NULL,
  371. PRIMARY KEY (`id`),
  372. KEY `sid` (`sid`),
  373. KEY `expire` (`expire`)
  374. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  375. -- --------------------------------------------------------
  376. --
  377. -- Table structure for table `user`
  378. --
  379. CREATE TABLE IF NOT EXISTS `user` (
  380. `uid` int(11) NOT NULL AUTO_INCREMENT,
  381. `guid` char(16) NOT NULL,
  382. `username` char(255) NOT NULL,
  383. `password` char(255) NOT NULL,
  384. `nickname` char(255) NOT NULL,
  385. `email` char(255) NOT NULL,
  386. `openid` char(255) NOT NULL,
  387. `timezone` char(128) NOT NULL,
  388. `language` char(32) NOT NULL DEFAULT 'en',
  389. `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  390. `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  391. `default-location` char(255) NOT NULL,
  392. `allow_location` tinyint(1) NOT NULL DEFAULT '0',
  393. `theme` char(255) NOT NULL,
  394. `pubkey` text NOT NULL,
  395. `prvkey` text NOT NULL,
  396. `spubkey` text NOT NULL,
  397. `sprvkey` text NOT NULL,
  398. `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  399. `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
  400. `blockwall` tinyint(1) unsigned NOT NULL DEFAULT '0',
  401. `hidewall` tinyint(1) unsigned NOT NULL DEFAULT '0',
  402. `blocktags` tinyint(1) unsigned NOT NULL DEFAULT '0',
  403. `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
  404. `page-flags` int(11) unsigned NOT NULL DEFAULT '0',
  405. `prvnets` tinyint(1) NOT NULL DEFAULT '0',
  406. `pwdreset` char(255) NOT NULL,
  407. `maxreq` int(11) NOT NULL DEFAULT '10',
  408. `expire` int(11) unsigned NOT NULL DEFAULT '0',
  409. `account_expired` tinyint( 1 ) NOT NULL DEFAULT '0',
  410. `account_expires_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  411. `expire_notification_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  412. `allow_cid` mediumtext NOT NULL,
  413. `allow_gid` mediumtext NOT NULL,
  414. `deny_cid` mediumtext NOT NULL,
  415. `deny_gid` mediumtext NOT NULL,
  416. `openidserver` text NOT NULL,
  417. PRIMARY KEY (`uid`),
  418. KEY `nickname` (`nickname`),
  419. KEY `account_expired` (`account_expired`),
  420. KEY `hidewall` (`hidewall`),
  421. KEY `blockwall` (`blockwall`),
  422. KEY `blocked` (`blocked`),
  423. KEY `verified` (`verified`),
  424. KEY `login_date` (`login_date`)
  425. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  426. CREATE TABLE IF NOT EXISTS `register` (
  427. `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  428. `hash` CHAR( 255 ) NOT NULL ,
  429. `created` DATETIME NOT NULL ,
  430. `uid` INT(11) UNSIGNED NOT NULL,
  431. `password` CHAR(255) NOT NULL,
  432. `language` CHAR(16) NOT NULL,
  433. PRIMARY KEY (`id`)
  434. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  435. CREATE TABLE IF NOT EXISTS `clients` (
  436. `client_id` VARCHAR( 20 ) NOT NULL ,
  437. `pw` VARCHAR( 20 ) NOT NULL ,
  438. `redirect_uri` VARCHAR( 200 ) NOT NULL ,
  439. `name` VARCHAR( 128 ) NULL DEFAULT NULL,
  440. `icon` VARCHAR( 255 ) NULL DEFAULT NULL,
  441. `uid` INT NOT NULL DEFAULT 0,
  442. PRIMARY KEY ( `client_id` )
  443. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  444. CREATE TABLE IF NOT EXISTS `tokens` (
  445. `id` VARCHAR( 40 ) NOT NULL ,
  446. `secret` VARCHAR( 40 ) NOT NULL ,
  447. `client_id` VARCHAR( 20 ) NOT NULL ,
  448. `expires` INT NOT NULL ,
  449. `scope` VARCHAR( 200 ) NOT NULL ,
  450. `uid` INT NOT NULL ,
  451. PRIMARY KEY ( `id` )
  452. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  453. CREATE TABLE IF NOT EXISTS `auth_codes` (
  454. `id` VARCHAR( 40 ) NOT NULL ,
  455. `client_id` VARCHAR( 20 ) NOT NULL ,
  456. `redirect_uri` VARCHAR( 200 ) NOT NULL ,
  457. `expires` INT NOT NULL ,
  458. `scope` VARCHAR( 250 ) NOT NULL ,
  459. PRIMARY KEY ( `id` )
  460. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  461. CREATE TABLE IF NOT EXISTS `queue` (
  462. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  463. `cid` INT NOT NULL ,
  464. `network` CHAR( 32 ) NOT NULL,
  465. `created` DATETIME NOT NULL ,
  466. `last` DATETIME NOT NULL ,
  467. `content` MEDIUMTEXT NOT NULL,
  468. `batch` TINYINT( 1 ) NOT NULL DEFAULT '0',
  469. INDEX ( `cid` ),
  470. INDEX ( `created` ),
  471. INDEX ( `last` ),
  472. INDEX ( `network` ),
  473. INDEX ( `batch` )
  474. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  475. CREATE TABLE IF NOT EXISTS `pconfig` (
  476. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  477. `uid` INT NOT NULL DEFAULT '0',
  478. `cat` CHAR( 255 ) NOT NULL ,
  479. `k` CHAR( 255 ) NOT NULL ,
  480. `v` MEDIUMTEXT NOT NULL
  481. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  482. CREATE TABLE IF NOT EXISTS `hook` (
  483. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  484. `hook` CHAR( 255 ) NOT NULL ,
  485. `file` CHAR( 255 ) NOT NULL ,
  486. `function` CHAR( 255 ) NOT NULL
  487. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  488. CREATE TABLE IF NOT EXISTS `addon` (
  489. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  490. `name` CHAR( 255 ) NOT NULL ,
  491. `version` CHAR( 255 ) NOT NULL ,
  492. `installed` TINYINT( 1 ) NOT NULL DEFAULT '0' ,
  493. `timestamp` BIGINT NOT NULL DEFAULT '0' ,
  494. `plugin_admin` TINYINT( 1 ) NOT NULL DEFAULT '0'
  495. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  496. CREATE TABLE IF NOT EXISTS `event` (
  497. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  498. `uid` INT NOT NULL ,
  499. `cid` INT NOT NULL ,
  500. `uri` CHAR( 255 ) NOT NULL,
  501. `created` DATETIME NOT NULL ,
  502. `edited` DATETIME NOT NULL ,
  503. `start` DATETIME NOT NULL ,
  504. `finish` DATETIME NOT NULL ,
  505. `desc` TEXT NOT NULL ,
  506. `location` TEXT NOT NULL ,
  507. `type` CHAR( 255 ) NOT NULL ,
  508. `nofinish` TINYINT( 1 ) NOT NULL DEFAULT '0',
  509. `adjust` TINYINT( 1 ) NOT NULL DEFAULT '1',
  510. `allow_cid` MEDIUMTEXT NOT NULL ,
  511. `allow_gid` MEDIUMTEXT NOT NULL ,
  512. `deny_cid` MEDIUMTEXT NOT NULL ,
  513. `deny_gid` MEDIUMTEXT NOT NULL
  514. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  515. CREATE TABLE IF NOT EXISTS `cache` (
  516. `k` CHAR( 255 ) NOT NULL PRIMARY KEY ,
  517. `v` TEXT NOT NULL,
  518. `updated` DATETIME NOT NULL
  519. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  520. CREATE TABLE IF NOT EXISTS `fcontact` (
  521. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  522. `url` CHAR( 255 ) NOT NULL ,
  523. `name` CHAR( 255 ) NOT NULL ,
  524. `photo` CHAR( 255 ) NOT NULL ,
  525. `request` CHAR( 255 ) NOT NULL,
  526. `nick` CHAR( 255 ) NOT NULL ,
  527. `addr` CHAR( 255 ) NOT NULL ,
  528. `batch` CHAR( 255) NOT NULL,
  529. `notify` CHAR( 255 ) NOT NULL ,
  530. `poll` CHAR( 255 ) NOT NULL ,
  531. `confirm` CHAR( 255 ) NOT NULL ,
  532. `priority` TINYINT( 1 ) NOT NULL ,
  533. `network` CHAR( 32 ) NOT NULL ,
  534. `alias` CHAR( 255 ) NOT NULL ,
  535. `pubkey` TEXT NOT NULL ,
  536. `updated` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  537. INDEX ( `addr` ),
  538. INDEX ( `network` )
  539. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  540. CREATE TABLE IF NOT EXISTS `ffinder` (
  541. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  542. `uid` INT UNSIGNED NOT NULL ,
  543. `cid` INT UNSIGNED NOT NULL ,
  544. `fid` INT UNSIGNED NOT NULL
  545. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  546. CREATE TABLE IF NOT EXISTS `fsuggest` (
  547. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  548. `uid` INT NOT NULL ,
  549. `cid` INT NOT NULL ,
  550. `name` CHAR( 255 ) NOT NULL ,
  551. `url` CHAR( 255 ) NOT NULL ,
  552. `request` CHAR( 255 ) NOT NULL,
  553. `photo` CHAR( 255 ) NOT NULL ,
  554. `note` TEXT NOT NULL ,
  555. `created` DATETIME NOT NULL
  556. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  557. CREATE TABLE IF NOT EXISTS `mailacct` (
  558. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  559. `uid` INT NOT NULL,
  560. `server` CHAR( 255 ) NOT NULL ,
  561. `port` INT NOT NULL,
  562. `ssltype` CHAR( 16 ) NOT NULL,
  563. `mailbox` CHAR( 255 ) NOT NULL,
  564. `user` CHAR( 255 ) NOT NULL ,
  565. `pass` TEXT NOT NULL ,
  566. `reply_to` CHAR( 255 ) NOT NULL ,
  567. `pubmail` TINYINT(1) NOT NULL DEFAULT '0',
  568. `last_check` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'
  569. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  570. CREATE TABLE IF NOT EXISTS `attach` (
  571. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  572. `uid` INT NOT NULL ,
  573. `hash` CHAR(64) NOT NULL,
  574. `filename` CHAR(255) NOT NULL,
  575. `filetype` CHAR( 64 ) NOT NULL ,
  576. `filesize` INT NOT NULL ,
  577. `data` LONGBLOB NOT NULL ,
  578. `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  579. `edited` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  580. `allow_cid` MEDIUMTEXT NOT NULL ,
  581. `allow_gid` MEDIUMTEXT NOT NULL ,
  582. `deny_cid` MEDIUMTEXT NOT NULL ,
  583. `deny_gid` MEDIUMTEXT NOT NULL
  584. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  585. CREATE TABLE IF NOT EXISTS `guid` (
  586. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  587. `guid` CHAR( 64 ) NOT NULL ,
  588. INDEX ( `guid` )
  589. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  590. CREATE TABLE IF NOT EXISTS `sign` (
  591. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  592. `iid` INT UNSIGNED NOT NULL ,
  593. `signed_text` MEDIUMTEXT NOT NULL ,
  594. `signature` TEXT NOT NULL ,
  595. `signer` CHAR( 255 ) NOT NULL ,
  596. INDEX ( `iid` )
  597. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  598. CREATE TABLE IF NOT EXISTS `deliverq` (
  599. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  600. `cmd` CHAR( 32 ) NOT NULL ,
  601. `item` INT NOT NULL ,
  602. `contact` INT NOT NULL
  603. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  604. CREATE TABLE IF NOT EXISTS `search` (
  605. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  606. `uid` INT NOT NULL ,
  607. `term` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  608. INDEX ( `uid` ),
  609. INDEX ( `term` )
  610. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  611. CREATE TABLE IF NOT EXISTS `fserver` (
  612. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  613. `server` CHAR( 255 ) NOT NULL ,
  614. `posturl` CHAR( 255 ) NOT NULL ,
  615. `key` TEXT NOT NULL,
  616. INDEX ( `server` )
  617. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  618. CREATE TABLE IF NOT EXISTS `gcontact` (
  619. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  620. `name` CHAR( 255 ) NOT NULL ,
  621. `url` CHAR( 255 ) NOT NULL ,
  622. `nurl` CHAR( 255 ) NOT NULL ,
  623. `photo` CHAR( 255 ) NOT NULL,
  624. `connect` CHAR( 255 ) NOT NULL,
  625. INDEX ( `nurl` )
  626. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  627. CREATE TABLE IF NOT EXISTS `glink` (
  628. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  629. `cid` INT NOT NULL ,
  630. `uid` INT NOT NULL ,
  631. `gcid` INT NOT NULL,
  632. `updated` DATETIME NOT NULL,
  633. INDEX ( `cid` ),
  634. INDEX ( `uid` ),
  635. INDEX ( `gcid` ),
  636. INDEX ( `updated` )
  637. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  638. CREATE TABLE IF NOT EXISTS `gcign` (
  639. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  640. `uid` INT NOT NULL ,
  641. `gcid` INT NOT NULL,
  642. INDEX ( `uid` ),
  643. INDEX ( `gcid` )
  644. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  645. CREATE TABLE IF NOT EXISTS `conv` (
  646. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  647. `guid` CHAR( 64 ) NOT NULL ,
  648. `recips` MEDIUMTEXT NOT NULL ,
  649. `uid` INT NOT NULL,
  650. `creator` CHAR( 255 ) NOT NULL ,
  651. `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  652. `updated` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  653. `subject` MEDIUMTEXT NOT NULL,
  654. INDEX ( `created` ),
  655. INDEX ( `updated` )
  656. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  657. CREATE TABLE IF NOT EXISTS `notify` (
  658. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  659. `type` INT( 11 ) NOT NULL ,
  660. `name` CHAR( 255 ) NOT NULL ,
  661. `url` CHAR( 255 ) NOT NULL ,
  662. `photo` CHAR( 255 ) NOT NULL ,
  663. `date` DATETIME NOT NULL ,
  664. `msg` MEDIUMTEXT NOT NULL ,
  665. `uid` INT NOT NULL ,
  666. `link` CHAR( 255 ) NOT NULL ,
  667. `seen` TINYINT( 1 ) NOT NULL DEFAULT '0',
  668. `verb` CHAR( 255 ) NOT NULL,
  669. `otype` CHAR( 16 ) NOT NULL,
  670. INDEX ( `type` ),
  671. INDEX ( `uid` ),
  672. INDEX ( `seen` ),
  673. INDEX ( `date` )
  674. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  675. CREATE TABLE IF NOT EXISTS `item_id` (
  676. `iid` INT NOT NULL ,
  677. `uid` INT NOT NULL ,
  678. `face` CHAR( 255 ) NOT NULL ,
  679. `dspr` CHAR( 255 ) NOT NULL ,
  680. `twit` CHAR( 255 ) NOT NULL ,
  681. `stat` CHAR( 255 ) NOT NULL ,
  682. PRIMARY KEY ( `iid` ),
  683. INDEX ( `uid` ),
  684. INDEX ( `face` ),
  685. INDEX ( `dspr` ),
  686. INDEX ( `twit` ),
  687. INDEX ( `stat` )
  688. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  689. CREATE TABLE IF NOT EXISTS `manage` (
  690. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  691. `uid` INT NOT NULL ,
  692. `mid` INT NOT NULL,
  693. INDEX ( `uid` ),
  694. INDEX ( `mid` )
  695. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;