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.
 
 
 
 
 
 

635 lines
19 KiB

  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. `addr` char(255) NOT NULL,
  56. `alias` char(255) NOT NULL,
  57. `pubkey` text NOT NULL,
  58. `prvkey` text NOT NULL,
  59. `batch` char(255) NOT NULL,
  60. `request` text NOT NULL,
  61. `notify` text NOT NULL,
  62. `poll` text NOT NULL,
  63. `confirm` text NOT NULL,
  64. `aes_allow` tinyint(1) NOT NULL DEFAULT '0',
  65. `ret-aes` tinyint(1) NOT NULL DEFAULT '0',
  66. `usehub` tinyint(1) NOT NULL DEFAULT '0',
  67. `subhub` tinyint(1) NOT NULL DEFAULT '0',
  68. `hub-verify` char(255) NOT NULL,
  69. `last-update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  70. `success_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  71. `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  72. `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  73. `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  74. `term-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  75. `priority` tinyint(3) NOT NULL,
  76. `blocked` tinyint(1) NOT NULL DEFAULT '1',
  77. `readonly` tinyint(1) NOT NULL DEFAULT '0',
  78. `writable` tinyint(1) NOT NULL DEFAULT '0',
  79. `pending` tinyint(1) NOT NULL DEFAULT '1',
  80. `rating` tinyint(1) NOT NULL DEFAULT '0',
  81. `reason` text NOT NULL,
  82. `info` mediumtext NOT NULL,
  83. `profile-id` int(11) NOT NULL DEFAULT '0',
  84. `bdyear` CHAR( 4 ) NOT NULL COMMENT 'birthday notify flag',
  85. PRIMARY KEY (`id`),
  86. KEY `uid` (`uid`),
  87. KEY `self` (`self`),
  88. KEY `issued-id` (`issued-id`),
  89. KEY `dfrn-id` (`dfrn-id`),
  90. KEY `blocked` (`blocked`),
  91. KEY `readonly` (`readonly`)
  92. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  93. -- --------------------------------------------------------
  94. --
  95. -- Table structure for table `group`
  96. --
  97. CREATE TABLE IF NOT EXISTS `group` (
  98. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  99. `uid` int(10) unsigned NOT NULL,
  100. `deleted` tinyint(1) NOT NULL DEFAULT '0',
  101. `name` char(255) NOT NULL,
  102. PRIMARY KEY (`id`)
  103. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  104. -- --------------------------------------------------------
  105. --
  106. -- Table structure for table `group_member`
  107. --
  108. CREATE TABLE IF NOT EXISTS `group_member` (
  109. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  110. `uid` int(10) unsigned NOT NULL,
  111. `gid` int(10) unsigned NOT NULL,
  112. `contact-id` int(10) unsigned NOT NULL,
  113. PRIMARY KEY (`id`)
  114. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  115. -- --------------------------------------------------------
  116. --
  117. -- Table structure for table `intro`
  118. --
  119. CREATE TABLE IF NOT EXISTS `intro` (
  120. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  121. `uid` int(10) unsigned NOT NULL,
  122. `fid` int(11) NOT NULL DEFAULT '0',
  123. `contact-id` int(11) NOT NULL,
  124. `knowyou` tinyint(1) NOT NULL,
  125. `duplex` tinyint(1) NOT NULL DEFAULT '0',
  126. `note` text NOT NULL,
  127. `hash` char(255) NOT NULL,
  128. `datetime` datetime NOT NULL,
  129. `blocked` tinyint(1) NOT NULL DEFAULT '1',
  130. `ignore` tinyint(1) NOT NULL DEFAULT '0',
  131. PRIMARY KEY (`id`)
  132. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  133. -- --------------------------------------------------------
  134. --
  135. -- Table structure for table `item`
  136. --
  137. CREATE TABLE IF NOT EXISTS `item` (
  138. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  139. `guid` char(64) NOT NULL,
  140. `uri` char(255) NOT NULL,
  141. `uid` int(10) unsigned NOT NULL DEFAULT '0',
  142. `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
  143. `type` char(255) NOT NULL,
  144. `wall` tinyint(1) NOT NULL DEFAULT '0',
  145. `gravity` tinyint(1) NOT NULL DEFAULT '0',
  146. `parent` int(10) unsigned NOT NULL DEFAULT '0',
  147. `parent-uri` char(255) NOT NULL,
  148. `extid` char(255) NOT NULL,
  149. `thr-parent` char(255) NOT NULL,
  150. `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  151. `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  152. `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  153. `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  154. `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  155. `owner-name` char(255) NOT NULL,
  156. `owner-link` char(255) NOT NULL,
  157. `owner-avatar` char(255) NOT NULL,
  158. `author-name` char(255) NOT NULL,
  159. `author-link` char(255) NOT NULL,
  160. `author-avatar` char(255) NOT NULL,
  161. `title` char(255) NOT NULL,
  162. `body` mediumtext NOT NULL,
  163. `app` char(255) NOT NULL,
  164. `verb` char(255) NOT NULL,
  165. `object-type` char(255) NOT NULL,
  166. `object` text NOT NULL,
  167. `target-type` char(255) NOT NULL,
  168. `target` text NOT NULL,
  169. `plink` char(255) NOT NULL,
  170. `resource-id` char(255) NOT NULL,
  171. `event-id` int(10) unsigned NOT NULL,
  172. `tag` mediumtext NOT NULL,
  173. `attach` mediumtext NOT NULL,
  174. `inform` mediumtext NOT NULL,
  175. `location` char(255) NOT NULL,
  176. `coord` char(255) NOT NULL,
  177. `allow_cid` mediumtext NOT NULL,
  178. `allow_gid` mediumtext NOT NULL,
  179. `deny_cid` mediumtext NOT NULL,
  180. `deny_gid` mediumtext NOT NULL,
  181. `private` tinyint(1) NOT NULL DEFAULT '0',
  182. `pubmail` tinyint(1) NOT NULL DEFAULT '0',
  183. `visible` tinyint(1) NOT NULL DEFAULT '0',
  184. `starred` tinyint(1) NOT NULL DEFAULT '0',
  185. `bookmark` tinyint(1) NOT NULL DEFAULT '0',
  186. `unseen` tinyint(1) NOT NULL DEFAULT '1',
  187. `deleted` tinyint(1) NOT NULL DEFAULT '0',
  188. `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
  189. PRIMARY KEY (`id`),
  190. KEY `guid` (`guid`),
  191. KEY `uri` (`uri`),
  192. KEY `uid` (`uid`),
  193. KEY `contact-id` (`contact-id`),
  194. KEY `type` (`type`),
  195. KEY `wall` (`wall`),
  196. KEY `parent` (`parent`),
  197. KEY `parent-uri` (`parent-uri`),
  198. KEY `extid` (`extid`),
  199. KEY `created` (`created`),
  200. KEY `edited` (`edited`),
  201. KEY `received` (`received`),
  202. KEY `visible` (`visible`),
  203. KEY `starred` (`starred`),
  204. KEY `deleted` (`deleted`),
  205. KEY `last-child` (`last-child`),
  206. KEY `unseen` (`unseen`),
  207. FULLTEXT KEY `title` (`title`),
  208. FULLTEXT KEY `body` (`body`),
  209. FULLTEXT KEY `allow_cid` (`allow_cid`),
  210. FULLTEXT KEY `allow_gid` (`allow_gid`),
  211. FULLTEXT KEY `deny_cid` (`deny_cid`),
  212. FULLTEXT KEY `deny_gid` (`deny_gid`)
  213. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  214. -- --------------------------------------------------------
  215. --
  216. -- Table structure for table `mail`
  217. --
  218. CREATE TABLE IF NOT EXISTS `mail` (
  219. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  220. `uid` int(10) unsigned NOT NULL,
  221. `from-name` char(255) NOT NULL,
  222. `from-photo` char(255) NOT NULL,
  223. `from-url` char(255) NOT NULL,
  224. `contact-id` char(255) NOT NULL,
  225. `title` char(255) NOT NULL,
  226. `body` mediumtext NOT NULL,
  227. `seen` tinyint(1) NOT NULL,
  228. `replied` tinyint(1) NOT NULL,
  229. `uri` char(255) NOT NULL,
  230. `parent-uri` char(255) NOT NULL,
  231. `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  232. PRIMARY KEY (`id`)
  233. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  234. -- --------------------------------------------------------
  235. --
  236. -- Table structure for table `photo`
  237. --
  238. CREATE TABLE IF NOT EXISTS `photo` (
  239. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  240. `uid` int(10) unsigned NOT NULL,
  241. `contact-id` int(10) unsigned NOT NULL,
  242. `guid` char(64) NOT NULL,
  243. `resource-id` char(255) NOT NULL,
  244. `created` datetime NOT NULL,
  245. `edited` datetime NOT NULL,
  246. `title` char(255) NOT NULL,
  247. `desc` text NOT NULL,
  248. `album` char(255) NOT NULL,
  249. `filename` char(255) NOT NULL,
  250. `height` smallint(6) NOT NULL,
  251. `width` smallint(6) NOT NULL,
  252. `data` mediumblob NOT NULL,
  253. `scale` tinyint(3) NOT NULL,
  254. `profile` tinyint(1) NOT NULL DEFAULT '0',
  255. `allow_cid` mediumtext NOT NULL,
  256. `allow_gid` mediumtext NOT NULL,
  257. `deny_cid` mediumtext NOT NULL,
  258. `deny_gid` mediumtext NOT NULL,
  259. PRIMARY KEY (`id`),
  260. KEY `uid` (`uid`),
  261. KEY `resource-id` (`resource-id`),
  262. KEY `album` (`album`),
  263. KEY `scale` (`scale`),
  264. KEY `profile` (`profile`),
  265. KEY `guid` (`guid`)
  266. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  267. -- --------------------------------------------------------
  268. --
  269. -- Table structure for table `profile`
  270. --
  271. CREATE TABLE IF NOT EXISTS `profile` (
  272. `id` int(11) NOT NULL AUTO_INCREMENT,
  273. `uid` int(11) NOT NULL,
  274. `profile-name` char(255) NOT NULL,
  275. `is-default` tinyint(1) NOT NULL DEFAULT '0',
  276. `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
  277. `name` char(255) NOT NULL,
  278. `pdesc` char(255) NOT NULL,
  279. `dob` char(32) NOT NULL DEFAULT '0000-00-00',
  280. `address` char(255) NOT NULL,
  281. `locality` char(255) NOT NULL,
  282. `region` char(255) NOT NULL,
  283. `postal-code` char(32) NOT NULL,
  284. `country-name` char(255) NOT NULL,
  285. `gender` char(32) NOT NULL,
  286. `marital` char(255) NOT NULL,
  287. `showwith` tinyint(1) NOT NULL DEFAULT '0',
  288. `with` text NOT NULL,
  289. `sexual` char(255) NOT NULL,
  290. `politic` char(255) NOT NULL,
  291. `religion` char(255) NOT NULL,
  292. `pub_keywords` text NOT NULL,
  293. `prv_keywords` text NOT NULL,
  294. `about` text NOT NULL,
  295. `summary` char(255) NOT NULL,
  296. `music` text NOT NULL,
  297. `book` text NOT NULL,
  298. `tv` text NOT NULL,
  299. `film` text NOT NULL,
  300. `interest` text NOT NULL,
  301. `romance` text NOT NULL,
  302. `work` text NOT NULL,
  303. `education` text NOT NULL,
  304. `contact` text NOT NULL,
  305. `homepage` char(255) NOT NULL,
  306. `photo` char(255) NOT NULL,
  307. `thumb` char(255) NOT NULL,
  308. `publish` tinyint(1) NOT NULL DEFAULT '0',
  309. `net-publish` tinyint(1) NOT NULL DEFAULT '0',
  310. PRIMARY KEY (`id`),
  311. FULLTEXT KEY `pub_keywords` (`pub_keywords`),
  312. FULLTEXT KEY `prv_keywords` (`prv_keywords`)
  313. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  314. -- --------------------------------------------------------
  315. --
  316. -- Table structure for table `profile_check`
  317. --
  318. CREATE TABLE IF NOT EXISTS `profile_check` (
  319. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  320. `uid` int(10) unsigned NOT NULL,
  321. `cid` int(10) unsigned NOT NULL,
  322. `dfrn_id` char(255) NOT NULL,
  323. `sec` char(255) NOT NULL,
  324. `expire` int(11) NOT NULL,
  325. PRIMARY KEY (`id`)
  326. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  327. -- --------------------------------------------------------
  328. --
  329. -- Table structure for table `session`
  330. --
  331. CREATE TABLE IF NOT EXISTS `session` (
  332. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  333. `sid` char(255) NOT NULL,
  334. `data` text NOT NULL,
  335. `expire` int(10) unsigned NOT NULL,
  336. PRIMARY KEY (`id`),
  337. KEY `sid` (`sid`),
  338. KEY `expire` (`expire`)
  339. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  340. -- --------------------------------------------------------
  341. --
  342. -- Table structure for table `user`
  343. --
  344. CREATE TABLE IF NOT EXISTS `user` (
  345. `uid` int(11) NOT NULL AUTO_INCREMENT,
  346. `guid` char(16) NOT NULL,
  347. `username` char(255) NOT NULL,
  348. `password` char(255) NOT NULL,
  349. `nickname` char(255) NOT NULL,
  350. `email` char(255) NOT NULL,
  351. `openid` char(255) NOT NULL,
  352. `timezone` char(128) NOT NULL,
  353. `language` char(32) NOT NULL DEFAULT 'en',
  354. `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  355. `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  356. `default-location` char(255) NOT NULL,
  357. `allow_location` tinyint(1) NOT NULL DEFAULT '0',
  358. `theme` char(255) NOT NULL,
  359. `pubkey` text NOT NULL,
  360. `prvkey` text NOT NULL,
  361. `spubkey` text NOT NULL,
  362. `sprvkey` text NOT NULL,
  363. `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  364. `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
  365. `blockwall` tinyint(1) unsigned NOT NULL DEFAULT '0',
  366. `hidewall` tinyint(1) unsigned NOT NULL DEFAULT '0',
  367. `blocktags` tinyint(1) unsigned NOT NULL DEFAULT '0',
  368. `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
  369. `page-flags` int(11) unsigned NOT NULL DEFAULT '0',
  370. `prvnets` tinyint(1) NOT NULL DEFAULT '0',
  371. `pwdreset` char(255) NOT NULL,
  372. `maxreq` int(11) NOT NULL DEFAULT '10',
  373. `expire` int(11) unsigned NOT NULL DEFAULT '0',
  374. `account_expired` tinyint( 1 ) NOT NULL DEFAULT '0',
  375. `account_expires_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  376. `expire_notification_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  377. `allow_cid` mediumtext NOT NULL,
  378. `allow_gid` mediumtext NOT NULL,
  379. `deny_cid` mediumtext NOT NULL,
  380. `deny_gid` mediumtext NOT NULL,
  381. `openidserver` text NOT NULL,
  382. PRIMARY KEY (`uid`),
  383. KEY `nickname` (`nickname`),
  384. KEY `account_expired` (`account_expired`),
  385. KEY `login_date` (`login_date`)
  386. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  387. CREATE TABLE IF NOT EXISTS `register` (
  388. `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  389. `hash` CHAR( 255 ) NOT NULL ,
  390. `created` DATETIME NOT NULL ,
  391. `uid` INT(11) UNSIGNED NOT NULL,
  392. `password` CHAR(255) NOT NULL,
  393. `language` CHAR(16) NOT NULL,
  394. PRIMARY KEY (`id`)
  395. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  396. CREATE TABLE IF NOT EXISTS `clients` (
  397. `client_id` VARCHAR( 20 ) NOT NULL ,
  398. `pw` VARCHAR( 20 ) NOT NULL ,
  399. `redirect_uri` VARCHAR( 200 ) NOT NULL ,
  400. PRIMARY KEY ( `client_id` )
  401. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  402. CREATE TABLE IF NOT EXISTS `tokens` (
  403. `id` VARCHAR( 40 ) NOT NULL ,
  404. `client_id` VARCHAR( 20 ) NOT NULL ,
  405. `expires` INT NOT NULL ,
  406. `scope` VARCHAR( 200 ) NOT NULL ,
  407. PRIMARY KEY ( `id` )
  408. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  409. CREATE TABLE IF NOT EXISTS `auth_codes` (
  410. `id` VARCHAR( 40 ) NOT NULL ,
  411. `client_id` VARCHAR( 20 ) NOT NULL ,
  412. `redirect_uri` VARCHAR( 200 ) NOT NULL ,
  413. `expires` INT NOT NULL ,
  414. `scope` VARCHAR( 250 ) NOT NULL ,
  415. PRIMARY KEY ( `id` )
  416. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  417. CREATE TABLE IF NOT EXISTS `queue` (
  418. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  419. `cid` INT NOT NULL ,
  420. `network` CHAR( 32 ) NOT NULL,
  421. `created` DATETIME NOT NULL ,
  422. `last` DATETIME NOT NULL ,
  423. `content` MEDIUMTEXT NOT NULL,
  424. `batch` TINYINT( 1 ) NOT NULL DEFAULT '0'
  425. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  426. CREATE TABLE IF NOT EXISTS `pconfig` (
  427. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  428. `uid` INT NOT NULL DEFAULT '0',
  429. `cat` CHAR( 255 ) NOT NULL ,
  430. `k` CHAR( 255 ) NOT NULL ,
  431. `v` MEDIUMTEXT NOT NULL
  432. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  433. CREATE TABLE IF NOT EXISTS `hook` (
  434. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  435. `hook` CHAR( 255 ) NOT NULL ,
  436. `file` CHAR( 255 ) NOT NULL ,
  437. `function` CHAR( 255 ) NOT NULL
  438. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  439. CREATE TABLE IF NOT EXISTS `addon` (
  440. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  441. `name` CHAR( 255 ) NOT NULL ,
  442. `version` CHAR( 255 ) NOT NULL ,
  443. `installed` TINYINT( 1 ) NOT NULL DEFAULT '0' ,
  444. `timestamp` BIGINT NOT NULL DEFAULT '0' ,
  445. `plugin_admin` TINYINT( 1 ) NOT NULL DEFAULT '0'
  446. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  447. CREATE TABLE IF NOT EXISTS `event` (
  448. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  449. `uid` INT NOT NULL ,
  450. `cid` INT NOT NULL ,
  451. `uri` CHAR( 255 ) NOT NULL,
  452. `created` DATETIME NOT NULL ,
  453. `edited` DATETIME NOT NULL ,
  454. `start` DATETIME NOT NULL ,
  455. `finish` DATETIME NOT NULL ,
  456. `desc` TEXT NOT NULL ,
  457. `location` TEXT NOT NULL ,
  458. `type` CHAR( 255 ) NOT NULL ,
  459. `nofinish` TINYINT( 1 ) NOT NULL DEFAULT '0',
  460. `adjust` TINYINT( 1 ) NOT NULL DEFAULT '1',
  461. `allow_cid` MEDIUMTEXT NOT NULL ,
  462. `allow_gid` MEDIUMTEXT NOT NULL ,
  463. `deny_cid` MEDIUMTEXT NOT NULL ,
  464. `deny_gid` MEDIUMTEXT NOT NULL
  465. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  466. CREATE TABLE IF NOT EXISTS `cache` (
  467. `k` CHAR( 255 ) NOT NULL PRIMARY KEY ,
  468. `v` TEXT NOT NULL,
  469. `updated` DATETIME NOT NULL
  470. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  471. CREATE TABLE IF NOT EXISTS `fcontact` (
  472. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  473. `url` CHAR( 255 ) NOT NULL ,
  474. `name` CHAR( 255 ) NOT NULL ,
  475. `photo` CHAR( 255 ) NOT NULL ,
  476. `request` CHAR( 255 ) NOT NULL,
  477. `nick` CHAR( 255 ) NOT NULL ,
  478. `addr` CHAR( 255 ) NOT NULL ,
  479. `batch` CHAR( 255) NOT NULL,
  480. `notify` CHAR( 255 ) NOT NULL ,
  481. `poll` CHAR( 255 ) NOT NULL ,
  482. `confirm` CHAR( 255 ) NOT NULL ,
  483. `priority` TINYINT( 1 ) NOT NULL ,
  484. `network` CHAR( 32 ) NOT NULL ,
  485. `alias` CHAR( 255 ) NOT NULL ,
  486. `pubkey` TEXT NOT NULL ,
  487. `updated` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  488. INDEX ( `addr` ),
  489. INDEX ( `network` )
  490. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  491. CREATE TABLE IF NOT EXISTS `ffinder` (
  492. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  493. `uid` INT UNSIGNED NOT NULL ,
  494. `cid` INT UNSIGNED NOT NULL ,
  495. `fid` INT UNSIGNED NOT NULL
  496. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  497. CREATE TABLE IF NOT EXISTS `fsuggest` (
  498. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  499. `uid` INT NOT NULL ,
  500. `cid` INT NOT NULL ,
  501. `name` CHAR( 255 ) NOT NULL ,
  502. `url` CHAR( 255 ) NOT NULL ,
  503. `request` CHAR( 255 ) NOT NULL,
  504. `photo` CHAR( 255 ) NOT NULL ,
  505. `note` TEXT NOT NULL ,
  506. `created` DATETIME NOT NULL
  507. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  508. CREATE TABLE IF NOT EXISTS `mailacct` (
  509. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  510. `uid` INT NOT NULL,
  511. `server` CHAR( 255 ) NOT NULL ,
  512. `port` INT NOT NULL,
  513. `ssltype` CHAR( 16 ) NOT NULL,
  514. `mailbox` CHAR( 255 ) NOT NULL,
  515. `user` CHAR( 255 ) NOT NULL ,
  516. `pass` TEXT NOT NULL ,
  517. `reply_to` CHAR( 255 ) NOT NULL ,
  518. `pubmail` TINYINT(1) NOT NULL DEFAULT '0',
  519. `last_check` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'
  520. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  521. CREATE TABLE IF NOT EXISTS `attach` (
  522. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  523. `uid` INT NOT NULL ,
  524. `hash` CHAR(64) NOT NULL,
  525. `filename` CHAR(255) NOT NULL,
  526. `filetype` CHAR( 64 ) NOT NULL ,
  527. `filesize` INT NOT NULL ,
  528. `data` LONGBLOB NOT NULL ,
  529. `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  530. `edited` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  531. `allow_cid` MEDIUMTEXT NOT NULL ,
  532. `allow_gid` MEDIUMTEXT NOT NULL ,
  533. `deny_cid` MEDIUMTEXT NOT NULL ,
  534. `deny_gid` MEDIUMTEXT NOT NULL
  535. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  536. CREATE TABLE IF NOT EXISTS `guid` (
  537. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  538. `guid` CHAR( 64 ) NOT NULL ,
  539. INDEX ( `guid` )
  540. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  541. CREATE TABLE IF NOT EXISTS `sign` (
  542. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  543. `iid` INT UNSIGNED NOT NULL ,
  544. `signed_text` MEDIUMTEXT NOT NULL ,
  545. `signature` TEXT NOT NULL ,
  546. `signer` CHAR( 255 ) NOT NULL ,
  547. INDEX ( `iid` )
  548. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  549. CREATE TABLE IF NOT EXISTS `deliverq` (
  550. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  551. `cmd` CHAR( 32 ) NOT NULL ,
  552. `item` INT NOT NULL ,
  553. `contact` INT NOT NULL
  554. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
  555. CREATE TABLE IF NOT EXISTS `search` (
  556. `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  557. `uid` INT NOT NULL ,
  558. `term` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  559. INDEX ( `uid` ),
  560. INDEX ( `term` )
  561. ) ENGINE = MyISAM DEFAULT CHARSET=utf8;