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.

381 lines
11 KiB

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
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
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
  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. `rel` tinyint(1) NOT NULL DEFAULT '0',
  42. `duplex` tinyint(1) NOT NULL DEFAULT '0',
  43. `network` char(255) NOT NULL,
  44. `name` char(255) NOT NULL,
  45. `nick` char(255) NOT NULL,
  46. `photo` text NOT NULL,
  47. `thumb` text NOT NULL,
  48. `site-pubkey` text NOT NULL,
  49. `issued-id` char(255) NOT NULL,
  50. `dfrn-id` char(255) NOT NULL,
  51. `url` char(255) NOT NULL,
  52. `lrdd` char(255) NOT NULL,
  53. `pubkey` text NOT NULL,
  54. `prvkey` text NOT NULL,
  55. `request` text NOT NULL,
  56. `notify` text NOT NULL,
  57. `poll` text NOT NULL,
  58. `confirm` text NOT NULL,
  59. `aes_allow` tinyint(1) NOT NULL DEFAULT '0',
  60. `ret-aes` tinyint(1) NOT NULL DEFAULT '0',
  61. `usehub` tinyint(1) NOT NULL DEFAULT '0',
  62. `subhub` tinyint(1) NOT NULL DEFAULT '0',
  63. `hub-verify` char(255) NOT NULL,
  64. `last-update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  65. `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  66. `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  67. `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  68. `term-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  69. `priority` tinyint(3) NOT NULL,
  70. `blocked` tinyint(1) NOT NULL DEFAULT '1',
  71. `readonly` tinyint(1) NOT NULL DEFAULT '0',
  72. `pending` tinyint(1) NOT NULL DEFAULT '1',
  73. `rating` tinyint(1) NOT NULL DEFAULT '0',
  74. `reason` text NOT NULL,
  75. `profile-id` int(11) NOT NULL DEFAULT '0',
  76. PRIMARY KEY (`id`),
  77. KEY `uid` (`uid`),
  78. KEY `self` (`self`),
  79. KEY `issued-id` (`issued-id`),
  80. KEY `dfrn-id` (`dfrn-id`),
  81. KEY `blocked` (`blocked`),
  82. KEY `readonly` (`readonly`)
  83. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  84. -- --------------------------------------------------------
  85. --
  86. -- Table structure for table `group`
  87. --
  88. CREATE TABLE IF NOT EXISTS `group` (
  89. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  90. `uid` int(10) unsigned NOT NULL,
  91. `deleted` tinyint(1) NOT NULL DEFAULT '0',
  92. `name` char(255) NOT NULL,
  93. PRIMARY KEY (`id`)
  94. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  95. -- --------------------------------------------------------
  96. --
  97. -- Table structure for table `group_member`
  98. --
  99. CREATE TABLE IF NOT EXISTS `group_member` (
  100. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  101. `uid` int(10) unsigned NOT NULL,
  102. `gid` int(10) unsigned NOT NULL,
  103. `contact-id` int(10) unsigned NOT NULL,
  104. PRIMARY KEY (`id`)
  105. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  106. -- --------------------------------------------------------
  107. --
  108. -- Table structure for table `intro`
  109. --
  110. CREATE TABLE IF NOT EXISTS `intro` (
  111. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  112. `uid` int(10) unsigned NOT NULL,
  113. `contact-id` int(11) NOT NULL,
  114. `knowyou` tinyint(1) NOT NULL,
  115. `duplex` tinyint(1) NOT NULL DEFAULT '0',
  116. `note` text NOT NULL,
  117. `hash` char(255) NOT NULL,
  118. `datetime` datetime NOT NULL,
  119. `blocked` tinyint(1) NOT NULL DEFAULT '1',
  120. `ignore` tinyint(1) NOT NULL DEFAULT '0',
  121. PRIMARY KEY (`id`)
  122. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  123. -- --------------------------------------------------------
  124. --
  125. -- Table structure for table `item`
  126. --
  127. CREATE TABLE IF NOT EXISTS `item` (
  128. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  129. `uri` char(255) CHARACTER SET ascii NOT NULL,
  130. `uid` int(10) unsigned NOT NULL DEFAULT '0',
  131. `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
  132. `type` char(255) NOT NULL,
  133. `wall` tinyint(1) NOT NULL DEFAULT '0',
  134. `gravity` tinyint(1) NOT NULL DEFAULT '0',
  135. `parent` int(10) unsigned NOT NULL DEFAULT '0',
  136. `parent-uri` char(255) CHARACTER SET ascii NOT NULL,
  137. `created` datetime NOT NULL,
  138. `edited` datetime NOT NULL,
  139. `changed` datetime NOT NULL,
  140. `owner-name` char(255) NOT NULL,
  141. `owner-link` char(255) NOT NULL,
  142. `owner-avatar` char(255) NOT NULL,
  143. `author-name` char(255) NOT NULL,
  144. `author-link` char(255) NOT NULL,
  145. `author-avatar` char(255) NOT NULL,
  146. `title` char(255) NOT NULL,
  147. `body` text NOT NULL,
  148. `verb` char(255) NOT NULL,
  149. `object-type` char(255) NOT NULL,
  150. `object` text NOT NULL,
  151. `target-type` char(255) NOT NULL,
  152. `target` text NOT NULL,
  153. `resource-id` char(255) NOT NULL,
  154. `tag` mediumtext NOT NULL,
  155. `inform` mediumtext NOT NULL,
  156. `location` char(255) NOT NULL,
  157. `coord` char(255) NOT NULL,
  158. `allow_cid` mediumtext NOT NULL,
  159. `allow_gid` mediumtext NOT NULL,
  160. `deny_cid` mediumtext NOT NULL,
  161. `deny_gid` mediumtext NOT NULL,
  162. `visible` tinyint(1) NOT NULL DEFAULT '0',
  163. `unseen` tinyint(1) NOT NULL DEFAULT '1',
  164. `deleted` tinyint(1) NOT NULL DEFAULT '0',
  165. `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
  166. PRIMARY KEY (`id`),
  167. KEY `uri` (`uri`),
  168. KEY `uid` (`uid`),
  169. KEY `contact-id` (`contact-id`),
  170. KEY `type` (`type`),
  171. KEY `wall` (`wall`),
  172. KEY `parent` (`parent`),
  173. KEY `parent-uri` (`parent-uri`),
  174. KEY `created` (`created`),
  175. KEY `edited` (`edited`),
  176. KEY `visible` (`visible`),
  177. KEY `deleted` (`deleted`),
  178. KEY `last-child` (`last-child`),
  179. KEY `unseen` (`unseen`),
  180. FULLTEXT KEY `title` (`title`),
  181. FULLTEXT KEY `body` (`body`),
  182. FULLTEXT KEY `allow_cid` (`allow_cid`),
  183. FULLTEXT KEY `allow_gid` (`allow_gid`),
  184. FULLTEXT KEY `deny_cid` (`deny_cid`),
  185. FULLTEXT KEY `deny_gid` (`deny_gid`)
  186. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  187. -- --------------------------------------------------------
  188. --
  189. -- Table structure for table `mail`
  190. --
  191. CREATE TABLE IF NOT EXISTS `mail` (
  192. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  193. `uid` int(10) unsigned NOT NULL,
  194. `from-name` char(255) NOT NULL,
  195. `from-photo` char(255) NOT NULL,
  196. `from-url` char(255) NOT NULL,
  197. `contact-id` char(255) NOT NULL,
  198. `title` char(255) NOT NULL,
  199. `body` text NOT NULL,
  200. `delivered` tinyint(1) NOT NULL,
  201. `seen` tinyint(1) NOT NULL,
  202. `replied` tinyint(1) NOT NULL,
  203. `uri` char(255) NOT NULL,
  204. `parent-uri` char(255) NOT NULL,
  205. `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  206. PRIMARY KEY (`id`)
  207. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  208. -- --------------------------------------------------------
  209. --
  210. -- Table structure for table `photo`
  211. --
  212. CREATE TABLE IF NOT EXISTS `photo` (
  213. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  214. `uid` int(10) unsigned NOT NULL,
  215. `contact-id` int(10) unsigned NOT NULL,
  216. `resource-id` char(255) NOT NULL,
  217. `created` datetime NOT NULL,
  218. `edited` datetime NOT NULL,
  219. `title` char(255) NOT NULL,
  220. `desc` text NOT NULL,
  221. `album` char(255) NOT NULL,
  222. `filename` char(255) NOT NULL,
  223. `height` smallint(6) NOT NULL,
  224. `width` smallint(6) NOT NULL,
  225. `data` mediumblob NOT NULL,
  226. `scale` tinyint(3) NOT NULL,
  227. `profile` tinyint(1) NOT NULL DEFAULT '0',
  228. `allow_cid` mediumtext NOT NULL,
  229. `allow_gid` mediumtext NOT NULL,
  230. `deny_cid` mediumtext NOT NULL,
  231. `deny_gid` mediumtext NOT NULL,
  232. PRIMARY KEY (`id`)
  233. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  234. -- --------------------------------------------------------
  235. --
  236. -- Table structure for table `profile`
  237. --
  238. CREATE TABLE IF NOT EXISTS `profile` (
  239. `id` int(11) NOT NULL AUTO_INCREMENT,
  240. `uid` int(11) NOT NULL,
  241. `profile-name` char(255) NOT NULL,
  242. `is-default` tinyint(1) NOT NULL DEFAULT '0',
  243. `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
  244. `name` char(255) NOT NULL,
  245. `dob` char(32) NOT NULL DEFAULT '0000-00-00',
  246. `address` char(255) NOT NULL,
  247. `locality` char(255) NOT NULL,
  248. `region` char(255) NOT NULL,
  249. `postal-code` char(32) NOT NULL,
  250. `country-name` char(255) NOT NULL,
  251. `gender` char(32) NOT NULL,
  252. `marital` char(255) NOT NULL,
  253. `with` text NOT NULL,
  254. `sexual` char(255) NOT NULL,
  255. `politic` char(255) NOT NULL,
  256. `religion` char(255) NOT NULL,
  257. `about` text NOT NULL,
  258. `summary` char(255) NOT NULL,
  259. `music` text NOT NULL,
  260. `book` text NOT NULL,
  261. `tv` text NOT NULL,
  262. `film` text NOT NULL,
  263. `interest` text NOT NULL,
  264. `romance` text NOT NULL,
  265. `work` text NOT NULL,
  266. `education` text NOT NULL,
  267. `contact` text NOT NULL,
  268. `homepage` char(255) NOT NULL,
  269. `photo` char(255) NOT NULL,
  270. `thumb` char(255) NOT NULL,
  271. `publish` tinyint(1) NOT NULL DEFAULT '0',
  272. `net-publish` tinyint(1) NOT NULL DEFAULT '0',
  273. PRIMARY KEY (`id`)
  274. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  275. -- --------------------------------------------------------
  276. --
  277. -- Table structure for table `profile_check`
  278. --
  279. CREATE TABLE IF NOT EXISTS `profile_check` (
  280. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  281. `uid` int(10) unsigned NOT NULL,
  282. `dfrn_id` char(255) NOT NULL,
  283. `expire` int(11) NOT NULL,
  284. PRIMARY KEY (`id`)
  285. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  286. -- --------------------------------------------------------
  287. --
  288. -- Table structure for table `session`
  289. --
  290. CREATE TABLE IF NOT EXISTS `session` (
  291. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  292. `sid` char(255) NOT NULL,
  293. `data` text NOT NULL,
  294. `expire` int(10) unsigned NOT NULL,
  295. PRIMARY KEY (`id`),
  296. KEY `sid` (`sid`),
  297. KEY `expire` (`expire`)
  298. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  299. -- --------------------------------------------------------
  300. --
  301. -- Table structure for table `user`
  302. --
  303. CREATE TABLE IF NOT EXISTS `user` (
  304. `uid` int(11) NOT NULL AUTO_INCREMENT,
  305. `username` char(255) NOT NULL,
  306. `password` char(255) NOT NULL,
  307. `nickname` char(255) NOT NULL,
  308. `email` char(255) NOT NULL,
  309. `timezone` char(128) NOT NULL,
  310. `default-location` char(255) NOT NULL,
  311. `allow_location` tinyint(1) NOT NULL DEFAULT '0',
  312. `theme` char(255) NOT NULL,
  313. `pubkey` text NOT NULL,
  314. `prvkey` text NOT NULL,
  315. `spubkey` text NOT NULL,
  316. `sprvkey` text NOT NULL,
  317. `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  318. `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
  319. `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
  320. `page-flags` int(11) unsigned NOT NULL DEFAULT '0',
  321. `pwdreset` char(255) NOT NULL,
  322. `allow_cid` mediumtext NOT NULL,
  323. `allow_gid` mediumtext NOT NULL,
  324. `deny_cid` mediumtext NOT NULL,
  325. `deny_gid` mediumtext NOT NULL,
  326. PRIMARY KEY (`uid`),
  327. KEY `nickname` (`nickname`)
  328. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  329. CREATE TABLE IF NOT EXISTS `register` (
  330. `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  331. `hash` CHAR( 255 ) NOT NULL ,
  332. `created` DATETIME NOT NULL ,
  333. `uid` INT(11) UNSIGNED NOT NULL,
  334. `password` CHAR(255) NOT NULL,
  335. PRIMARY KEY (`id`)
  336. ) ENGINE = MYISAM DEFAULT CHARSET=utf8;