ECDBDef.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. /*
  2. * Copyright 2005 - 2016 Zarafa and its licensors
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU Affero General Public License, version 3,
  6. * as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Affero General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Affero General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. *
  16. */
  17. #ifndef ECDBDEF_H
  18. #define ECDBDEF_H
  19. /**
  20. * @page kopano_db Database
  21. *
  22. * @section kopano_db_layout Database layout
  23. *
  24. * Server tables:
  25. * @code
  26. * abchanges | All addressbook changes
  27. * acl | User permission objects
  28. * changes | Object changes
  29. * clientupdatestatus| Update status of the kopano client, only used with auto updater
  30. * hierarchy | The hiearchy between the mapi objects
  31. * indexedproperties | Mapi object entryid and sourcekey
  32. * lob | Attachment data. Only when the setting attachment in database is enabled
  33. * mvproperties | The multi value properties of a mapi object. Store, folder and message
  34. * names | Custom property defines
  35. * outgoingqueue | Pending messages to send
  36. * properties | The single value properties of a mapi object. Store, folder and message
  37. * receivefolder | Specifies the mapi receivefolder, for example the inbox
  38. * searchresults | Search folder results
  39. * settings | Server dependent settings
  40. * singleinstances | The relation between an attachment and one or more message objects
  41. * stores | A list with data stores related to one user and includes the deleted stores.
  42. * syncedmessages | Messages which are synced with a specific restriction
  43. * syncs | Sync state of a folder
  44. * users | User relation between the userplugin and kopano
  45. * versions | Database update information
  46. * @endcode
  47. *
  48. * Database and unix user plugin tables:
  49. * @code
  50. * object | Unique user object id and user type
  51. * objectmvproperty | Multi value properties of a user
  52. * objectproperty | Single value properties of a user
  53. * objectrelation | User, group, company and sendas relations
  54. * @endcode
  55. *
  56. * @todo Add an image of the database layout
  57. *
  58. * @section kopano_db_update Database update system
  59. *
  60. * @todo describe the update system
  61. *
  62. *
  63. */
  64. #define Z_TABLEDEF_ACL "CREATE TABLE `acl` ( \
  65. `id` int(11) NOT NULL default '0', \
  66. `hierarchy_id` int(11) unsigned NOT NULL default '0', \
  67. `type` tinyint(4) unsigned NOT NULL default '0', \
  68. `rights` int(11) unsigned NOT NULL default '0', \
  69. PRIMARY KEY (`hierarchy_id`,`id`,`type`) \
  70. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  71. #define Z_TABLEDEF_HIERARCHY "CREATE TABLE `hierarchy` ( \
  72. `id` int(11) unsigned NOT NULL auto_increment, \
  73. `parent` int(11) unsigned default '0', \
  74. `type` tinyint(4) unsigned NOT NULL default '0', \
  75. `flags` smallint(6) unsigned NOT NULL default '0', \
  76. `owner` int(11) unsigned NOT NULL default '0', \
  77. PRIMARY KEY (`id`), \
  78. KEY `parenttypeflags` (`parent`, `type`, `flags`) \
  79. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  80. #define Z_TABLEDEF_NAMES "CREATE TABLE `names` ( \
  81. `id` int(11) NOT NULL auto_increment, \
  82. `nameid` int(11) default NULL, \
  83. `namestring` varchar(255) binary default NULL, \
  84. `guid` blob NOT NULL, \
  85. PRIMARY KEY (`id`), \
  86. KEY `nameid` (`nameid`), \
  87. KEY `namestring` (`namestring`), \
  88. KEY `guidnameid` (`guid`(16),`nameid`), \
  89. KEY `guidnamestring` (`guid`(16),`namestring`) \
  90. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  91. #define Z_TABLEDEF_MVPROPERTIES "CREATE TABLE `mvproperties` ( \
  92. `hierarchyid` int(11) unsigned NOT NULL default '0', \
  93. `orderid` smallint(6) unsigned NOT NULL default '0', \
  94. `tag` smallint(6) unsigned NOT NULL default '0', \
  95. `type` smallint(6) unsigned NOT NULL default '0', \
  96. `val_ulong` int(11) unsigned default NULL, \
  97. `val_string` longtext, \
  98. `val_binary` longblob, \
  99. `val_double` double default NULL, \
  100. `val_longint` bigint(20) default NULL, \
  101. `val_hi` int(11) default NULL, \
  102. `val_lo` int(11) unsigned default NULL, \
  103. PRIMARY KEY (`hierarchyid`, `tag`, `type`, `orderid`) \
  104. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  105. #define Z_TABLEDEF_TPROPERTIES "CREATE TABLE `tproperties` ( \
  106. `folderid` int(11) unsigned NOT NULL default '0', \
  107. `hierarchyid` int(11) unsigned NOT NULL default '0', \
  108. `tag` smallint(6) unsigned NOT NULL default '0', \
  109. `type` smallint(6) unsigned NOT NULL, \
  110. `val_ulong` int(11) unsigned default NULL, \
  111. `val_string` longtext, \
  112. `val_binary` longblob, \
  113. `val_double` double default NULL, \
  114. `val_longint` bigint(20) default NULL, \
  115. `val_hi` int(11) default NULL, \
  116. `val_lo` int(11) unsigned default NULL, \
  117. PRIMARY KEY `ht` (`folderid`,`tag`,`hierarchyid`,`type`), \
  118. KEY `hi` (`hierarchyid`) \
  119. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  120. #define Z_TABLEDEF_DELAYEDUPDATE "CREATE TABLE `deferredupdate` (\
  121. `hierarchyid` int(11) unsigned NOT NULL, \
  122. `folderid` int(11) unsigned NOT NULL, \
  123. `srcfolderid` int(11) unsigned, \
  124. PRIMARY KEY(`hierarchyid`), \
  125. KEY `folderid` (`folderid`) \
  126. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  127. #define Z_TABLEDEF_PROPERTIES "CREATE TABLE `properties` ( \
  128. `hierarchyid` int(11) unsigned NOT NULL default '0', \
  129. `tag` smallint(6) unsigned NOT NULL default '0', \
  130. `type` smallint(6) unsigned NOT NULL, \
  131. `val_ulong` int(11) unsigned default NULL, \
  132. `val_string` longtext, \
  133. `val_binary` longblob, \
  134. `val_double` double default NULL, \
  135. `val_longint` bigint(20) default NULL, \
  136. `val_hi` int(11) default NULL, \
  137. `val_lo` int(11) unsigned default NULL, \
  138. `comp` bool default false, \
  139. PRIMARY KEY `ht` (`hierarchyid`,`tag`,`type`) \
  140. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  141. #define Z_TABLEDEF_RECEIVEFOLDER "CREATE TABLE `receivefolder` ( \
  142. `id` int(11) unsigned NOT NULL auto_increment, \
  143. `storeid` int(11) unsigned NOT NULL default '0', \
  144. `objid` int(11) unsigned NOT NULL default '0', \
  145. `messageclass` varchar(255) NOT NULL default '', \
  146. PRIMARY KEY (`id`), \
  147. UNIQUE KEY `storeid` (`storeid`,`messageclass`) \
  148. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  149. #define Z_TABLEDEF_STORES "CREATE TABLE `stores` ( \
  150. `id` int(11) unsigned NOT NULL auto_increment, \
  151. `hierarchy_id` int(11) unsigned NOT NULL default '0', \
  152. `user_id` int(11) unsigned NOT NULL default '0', \
  153. `type` smallint(6) unsigned NOT NULL default '0', \
  154. `user_name` varchar(255) CHARACTER SET utf8 NOT NULL default '', \
  155. `company` int(11) unsigned NOT NULL default '0', \
  156. `guid` blob NOT NULL, \
  157. PRIMARY KEY (`user_id`, `hierarchy_id`, `type`), \
  158. UNIQUE KEY `id` (`id`) \
  159. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  160. #define Z_TABLEDEF_USERS "CREATE TABLE `users` ( \
  161. `id` int(11) unsigned NOT NULL auto_increment, \
  162. `externid` blob, \
  163. `objectclass` int(11) NOT NULL default '0', \
  164. `signature` varbinary(255) NOT NULL default '0', \
  165. `company` int(11) unsigned NOT NULL default '0', \
  166. PRIMARY KEY (`id`), \
  167. UNIQUE KEY externid (`externid`(255), `objectclass`) \
  168. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  169. #define Z_TABLEDEF_OUTGOINGQUEUE "CREATE TABLE `outgoingqueue` ( \
  170. `store_id` int(11) unsigned NOT NULL default '0', \
  171. `hierarchy_id` int(11) unsigned NOT NULL default '0', \
  172. `flags` tinyint(4) unsigned NOT NULL default '0', \
  173. PRIMARY KEY (`hierarchy_id`,`flags`,`store_id`) \
  174. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  175. #define Z_TABLEDEF_LOB "CREATE TABLE `lob` ( \
  176. `instanceid` int(11) unsigned NOT NULL, \
  177. `chunkid` smallint(6) unsigned NOT NULL, \
  178. `tag` smallint(6) unsigned NOT NULL, \
  179. `val_binary` longblob, \
  180. PRIMARY KEY (`instanceid`,`tag`,`chunkid`) \
  181. ) ENGINE=InnoDB MAX_ROWS=1000000000 AVG_ROW_LENGTH=1750 CHARACTER SET utf8 COLLATE utf8_general_ci;"
  182. #define Z_TABLEDEF_REFERENCES "CREATE TABLE `singleinstances` ( \
  183. `instanceid` int(11) unsigned NOT NULL auto_increment, \
  184. `hierarchyid` int(11) unsigned NOT NULL default '0', \
  185. `tag` smallint(6) unsigned NOT NULL default '0', \
  186. PRIMARY KEY (`instanceid`, `hierarchyid`, `tag`), \
  187. UNIQUE KEY `hkey` (`hierarchyid`, `tag`) \
  188. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  189. #define Z_TABLEDEF_OBJECT "CREATE TABLE object ( \
  190. `id` int(11) unsigned NOT NULL auto_increment, \
  191. `externid` blob, \
  192. `objectclass` int(11) unsigned NOT NULL default '0', \
  193. PRIMARY KEY (`id`, `objectclass`), \
  194. UNIQUE KEY id (`id`), \
  195. UNIQUE KEY externid (`externid`(255), `objectclass`) \
  196. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  197. #define Z_TABLEDEF_OBJECT_PROPERTY "CREATE TABLE objectproperty ( \
  198. `objectid` int(11) unsigned NOT NULL default '0', \
  199. `propname` varchar(255) binary NOT NULL, \
  200. `value` text, \
  201. PRIMARY KEY (`objectid`, `propname`) \
  202. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  203. #define Z_TABLEDEF_OBJECT_MVPROPERTY "CREATE TABLE objectmvproperty ( \
  204. `objectid` int(11) unsigned NOT NULL default '0', \
  205. `propname` varchar(255) binary NOT NULL, \
  206. `orderid` tinyint(11) unsigned NOT NULL default '0', \
  207. `value` text, \
  208. PRIMARY KEY (`objectid`, `orderid`, `propname`) \
  209. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  210. #define Z_TABLEDEF_OBJECT_RELATION "CREATE TABLE objectrelation ( \
  211. `objectid` int(11) unsigned NOT NULL default '0', \
  212. `parentobjectid` int(11) unsigned NOT NULL default '0', \
  213. `relationtype` tinyint(11) unsigned NOT NULL, \
  214. PRIMARY KEY (`objectid`, `parentobjectid`, `relationtype`) \
  215. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  216. #define Z_TABLEDEF_VERSIONS "CREATE TABLE versions ( \
  217. `major` int(11) unsigned NOT NULL default '0', \
  218. `minor` int(11) unsigned NOT NULL default '0', \
  219. `micro` int(11) unsigned not null default 0, \
  220. `revision` int(11) unsigned NOT NULL default '0', \
  221. `databaserevision` int(11) unsigned NOT NULL default '0', \
  222. `updatetime` datetime NOT NULL, \
  223. PRIMARY KEY (`major`, `minor`, `micro`, `revision`, `databaserevision`) \
  224. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  225. #define Z_TABLEDEF_SEARCHRESULTS "CREATE TABLE searchresults ( \
  226. `folderid` int(11) unsigned NOT NULL default '0', \
  227. `hierarchyid` int(11) unsigned NOT NULL default '0', \
  228. `flags` int(11) unsigned NOT NULL default '0', \
  229. PRIMARY KEY (`folderid`, `hierarchyid`) \
  230. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  231. #define Z_TABLEDEF_CHANGES "CREATE TABLE `changes` ( \
  232. `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, \
  233. `sourcekey` VARBINARY(64) NOT NULL, \
  234. `parentsourcekey` VARBINARY(64) NOT NULL, \
  235. `change_type` INT(11) UNSIGNED NOT NULL DEFAULT '0', \
  236. `flags` INT(11) UNSIGNED DEFAULT NULL, \
  237. `sourcesync` INT(11) UNSIGNED DEFAULT NULL, \
  238. PRIMARY KEY (`parentsourcekey`,`sourcekey`,`change_type`), \
  239. UNIQUE KEY `changeid` (`id`), \
  240. UNIQUE KEY `state` (`parentsourcekey`,`id`) \
  241. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  242. #define Z_TABLEDEF_ABCHANGES "CREATE TABLE `abchanges` ( \
  243. `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, \
  244. `sourcekey` VARBINARY(255) NOT NULL, \
  245. `parentsourcekey` VARBINARY(255) NOT NULL, \
  246. `change_type` INT(11) UNSIGNED NOT NULL DEFAULT '0', \
  247. PRIMARY KEY (`parentsourcekey`,`change_type`,`sourcekey`), \
  248. UNIQUE KEY `changeid` (`id`) \
  249. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  250. #define Z_TABLEDEF_SYNCS "CREATE TABLE `syncs` ( \
  251. `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, \
  252. `sourcekey` VARBINARY(64) NOT NULL, \
  253. `change_id` INT(11) UNSIGNED NOT NULL, \
  254. `sync_type` INT(11) UNSIGNED NULL, \
  255. `sync_time` DATETIME NOT NULL, \
  256. PRIMARY KEY(`id`), \
  257. KEY `foldersync` (`sourcekey`,`sync_type`), \
  258. KEY `changes` (`change_id`), \
  259. KEY `sync_time` (`sync_time`) \
  260. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  261. #define Z_TABLEDEFS_SYNCEDMESSAGES "CREATE TABLE `syncedmessages` ( \
  262. `sync_id` int(11) unsigned NOT NULL, \
  263. `change_id` int(11) unsigned NOT NULL, \
  264. `sourcekey` varbinary(64) NOT NULL, \
  265. `parentsourcekey` varbinary(64) NOT NULL, \
  266. PRIMARY KEY (`sync_id`,`change_id`,`sourcekey`), \
  267. KEY `sync_state` (`sync_id`,`change_id`) \
  268. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  269. #define Z_TABLEDEF_INDEXED_PROPERTIES "CREATE TABLE indexedproperties ( \
  270. `hierarchyid` int(11) unsigned NOT NULL default '0', \
  271. `tag` smallint(6) unsigned NOT NULL default '0', \
  272. `val_binary` varbinary(255), \
  273. PRIMARY KEY (`hierarchyid`, `tag`), \
  274. UNIQUE KEY `bin` (`tag`, `val_binary`) \
  275. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  276. #define Z_TABLEDEF_SETTINGS "CREATE TABLE settings ( \
  277. `name` varchar(255) binary NOT NULL, \
  278. `value` blob NOT NULL, \
  279. PRIMARY KEY (`name`) \
  280. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  281. #define Z_TABLEDEF_CLIENTUPDATESTATUS "CREATE TABLE clientupdatestatus ( \
  282. `userid` int(11) unsigned NOT NULL, \
  283. `trackid` int(11) unsigned NOT NULL, \
  284. `updatetime` DATETIME NOT NULL, \
  285. `currentversion` varchar(50) binary NOT NULL, \
  286. `latestversion` varchar(50) binary NOT NULL, \
  287. `computername` varchar(255) binary NOT NULL, \
  288. `status` int(11) unsigned NOT NULL, \
  289. PRIMARY KEY (`userid`), \
  290. UNIQUE KEY (`trackid`) \
  291. ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;"
  292. // Default mysql table data
  293. #define Z_TABLEDATA_ACL "INSERT INTO `acl` VALUES (2, 2, 2, 1531), \
  294. (2, 1, 2, 1531), \
  295. (1, 1, 2, 1531), \
  296. (1, 2, 2, 1531);"
  297. #define Z_TABLEDATA_HIERARCHY "INSERT INTO `hierarchy` VALUES \
  298. (1, NULL, 1, 0, 2),\
  299. (2, 1, 3, 0, 2);"
  300. #define Z_TABLEDATA_PROPERTIES "INSERT INTO `properties` VALUES \
  301. (1, 12289, 30, NULL, 'Admin store', NULL, NULL, NULL, NULL, NULL, false), \
  302. (2, 12289, 30, NULL, 'root Admin store', NULL, NULL, NULL, NULL, NULL, false);"
  303. #define Z_TABLEDATA_STORES "INSERT INTO `stores` VALUES (1, 1, 2, 0, 'SYSTEM', 0, 0x8962ffeffb7b4d639bc5967c4bb58234);"
  304. //1=KOPANO_UID_EVERYONE, 0x30002=DISTLIST_SECURITY
  305. //2=KOPANO_UID_SYSTEM, 0x10001=ACTIVE_USER
  306. #define Z_TABLEDATA_USERS "INSERT INTO `users` (`id`, `externid`, `objectclass`, `signature`, `company`) VALUES \
  307. (1, NULL, 0x30002, '', 0), \
  308. (2, NULL, 0x10001, '', 0);"
  309. #define Z_TABLEDATA_INDEXED_PROPERTIES "INSERT INTO `indexedproperties` VALUES (1, 0x0FFF, 0x000000008962ffeffb7b4d639bc5967c4bb5823400000000010000000100000000000000 ), \
  310. (2,0x0FFF, 0x000000008962ffeffb7b4d639bc5967c4bb5823400000000030000000200000000000000);"
  311. #define Z_TABLEDATA_SETTINGS "INSERT INTO `settings` VALUES ('source_key_auto_increment' , CHAR(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)), \
  312. ('imapseq', '3'), \
  313. ('charset', 'utf8');"
  314. // Database update definitions
  315. #define Z_UPDATE_CREATE_VERSIONS_TABLE 1
  316. #define Z_UPDATE_CREATE_SEARCHFOLDERS_TABLE 2
  317. #define Z_UPDATE_FIX_USERTABLE_NONACTIVE 3
  318. #define Z_UPDATE_ADD_FLAGS_TO_SEARCHRESULTS 4
  319. #define Z_UPDATE_POPULATE_SEARCHFOLDERS 5
  320. #define Z_UPDATE_CREATE_CHANGES_TABLE 6
  321. #define Z_UPDATE_CREATE_SYNCS_TABLE 7
  322. #define Z_UPDATE_CREATE_INDEXEDPROPS_TABLE 8
  323. #define Z_UPDATE_CREATE_SETTINGS_TABLE 9
  324. #define Z_UPDATE_CREATE_SERVER_GUID 10
  325. #define Z_UPDATE_CREATE_SOURCE_KEYS 11
  326. #define Z_UPDATE_CONVERT_ENTRYIDS 12
  327. #define Z_UPDATE_CONVERT_SC_ENTRYIDLIST 13
  328. #define Z_UPDATE_CONVERT_USER_OBJECT_TYPE 14
  329. #define Z_UPDATE_ADD_USER_SIGNATURE 15
  330. #define Z_UPDATE_ADD_SOURCE_KEY_SETTING 16
  331. #define Z_UPDATE_FIX_USERS_RESTRICTIONS 17
  332. #define Z_UPDATE_ADD_USER_COMPANY 18
  333. #define Z_UPDATE_ADD_OBJECT_RELATION_TYPE 19
  334. #define Z_UPDATE_DEL_DEFAULT_COMPANY 20
  335. #define Z_UPDATE_ADD_COMPANY_TO_STORES 21
  336. #define Z_UPDATE_ADD_IMAP_SEQ 22
  337. #define Z_UPDATE_KEYS_CHANGES 23
  338. #define Z_UPDATE_MOVE_PUBLICFOLDERS 24
  339. #define Z_UPDATE_ADD_EXTERNID_TO_OBJECT 25
  340. #define Z_UPDATE_CREATE_REFERENCES 26
  341. #define Z_UPDATE_LOCK_DISTRIBUTED 27
  342. #define Z_UPDATE_CREATE_ABCHANGES_TABLE 28
  343. #define Z_UPDATE_SINGLEINSTANCE_TAG 29
  344. #define Z_UPDATE_CREATE_SYNCEDMESSAGES_TABLE 30
  345. #define Z_UPDATE_FORCE_AB_RESYNC 31
  346. #define Z_UPDATE_RENAME_OBJECT_TYPE_TO_CLASS 32
  347. #define Z_UPDATE_CONVERT_OBJECT_TYPE_TO_CLASS 33
  348. #define Z_UPDATE_ADD_OBJECT_MVPROPERTY_TABLE 34
  349. #define Z_UPDATE_COMPANYNAME_TO_COMPANYID 35
  350. #define Z_UPDATE_OUTGOINGQUEUE_PRIMARY_KEY 36
  351. #define Z_UPDATE_ACL_PRIMARY_KEY 37
  352. #define Z_UPDATE_BLOB_EXTERNID 38
  353. #define Z_UPDATE_KEYS_CHANGES_2 39
  354. #define Z_UPDATE_MVPROPERTIES_PRIMARY_KEY 40
  355. #define Z_UPDATE_FIX_SECURITYGROUP_DBPLUGIN 41
  356. #define Z_UPDATE_CONVERT_SENDAS_DBPLUGIN 42
  357. #define Z_UPDATE_MOVE_IMAP_SUBSCRIBES 43
  358. #define Z_UPDATE_SYNC_TIME_KEY 44
  359. #define Z_UPDATE_ADD_STATE_KEY 45
  360. #define Z_UPDATE_CONVERT_TO_UNICODE 46
  361. #define Z_UPDATE_CONVERT_STORE_USERNAME 47
  362. #define Z_UPDATE_CONVERT_RULES 48
  363. #define Z_UPDATE_CONVERT_SEARCH_FOLDERS 49
  364. #define Z_UPDATE_CONVERT_PROPERTIES 50
  365. #define Z_UPDATE_CREATE_COUNTERS 51
  366. #define Z_UPDATE_CREATE_COMMON_PROPS 52
  367. #define Z_UPDATE_CHECK_ATTACHMENTS 53
  368. #define Z_UPDATE_CREATE_TPROPERTIES 54
  369. #define Z_UPDATE_CONVERT_HIERARCHY 55
  370. #define Z_UPDATE_CREATE_DEFERRED 56
  371. #define Z_UPDATE_CONVERT_CHANGES 57
  372. #define Z_UPDATE_CONVERT_NAMES 58
  373. #define Z_UPDATE_CONVERT_RF_TOUNICODE 59
  374. #define Z_UPDATE_CREATE_CLIENTUPDATE_TABLE 60
  375. #define Z_UPDATE_CONVERT_STORES 61
  376. #define Z_UPDATE_UPDATE_STORES 62
  377. #define Z_UPDATE_UPDATE_WLINK_RECKEY 63
  378. #define Z_UPDATE_VERSIONTBL_MICRO 64
  379. #define Z_UPDATE_CHANGES_PKEY 65
  380. #define Z_UPDATE_ABCHANGES_PKEY 66
  381. /*
  382. * The first population of the SQL tables can use both create-type and
  383. * update-type operations; %Z_UPDATE_RELEASE_ID specifies the schema
  384. * version that can be reached with creates only.
  385. * (This is never less than %Z_UPDATE_LAST.)
  386. */
  387. #define Z_UPDATE_RELEASE_ID 66
  388. // This is the last update ID always update this to the last ID
  389. #define Z_UPDATE_LAST 66
  390. #endif