notes_11.2.sql 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. CREATE TABLE ZICCLOUDSTATE (
  2. Z_PK INTEGER PRIMARY KEY,
  3. Z_ENT INTEGER,
  4. Z_OPT INTEGER,
  5. ZCURRENTLOCALVERSION INTEGER,
  6. ZINCLOUD INTEGER,
  7. ZLATESTVERSIONSYNCEDTOCLOUD INTEGER,
  8. ZCLOUDSYNCINGOBJECT INTEGER,
  9. Z2_CLOUDSYNCINGOBJECT INTEGER,
  10. ZLOCALVERSIONDATE TIMESTAMP );
  11. CREATE TABLE ZICCLOUDSYNCINGOBJECT (
  12. Z_PK INTEGER PRIMARY KEY,
  13. Z_ENT INTEGER,
  14. Z_OPT INTEGER,
  15. ZCRYPTOITERATIONCOUNT INTEGER,
  16. ZISPASSWORDPROTECTED INTEGER,
  17. ZMARKEDFORDELETION INTEGER,
  18. ZMINIMUMSUPPORTEDNOTESVERSION INTEGER,
  19. ZNEEDSINITIALFETCHFROMCLOUD INTEGER,
  20. ZNEEDSTOBEFETCHEDFROMCLOUD INTEGER,
  21. ZNEEDSTOSAVEUSERSPECIFICRECORD INTEGER,
  22. ZCLOUDSTATE INTEGER,
  23. ZCHECKEDFORLOCATION INTEGER,
  24. ZFILESIZE INTEGER,
  25. ZHASMARKUPDATA INTEGER,
  26. ZIMAGEFILTERTYPE INTEGER,
  27. ZORIENTATION INTEGER,
  28. ZSECTION INTEGER,
  29. ZLOCATION INTEGER,
  30. ZMEDIA INTEGER,
  31. ZNOTE INTEGER,
  32. ZNOTEUSINGTITLEFORNOTETITLE INTEGER,
  33. ZPARENTATTACHMENT INTEGER,
  34. ZSCALEWHENDRAWING INTEGER,
  35. ZVERSION INTEGER,
  36. ZVERSIONOUTOFDATE INTEGER,
  37. ZATTACHMENT INTEGER,
  38. ZSTATE INTEGER,
  39. ZACCOUNT INTEGER,
  40. ZTYPE INTEGER,
  41. ZACCOUNT1 INTEGER,
  42. ZATTACHMENT1 INTEGER,
  43. ZATTACHMENTVIEWTYPE INTEGER,
  44. ZISPINNED INTEGER,
  45. ZLEGACYNOTEWASPLAINTEXT INTEGER,
  46. ZNOTEHASCHANGES INTEGER,
  47. ZPAPERSTYLETYPE INTEGER,
  48. ZACCOUNT2 INTEGER,
  49. ZFOLDER INTEGER,
  50. ZNOTEDATA INTEGER,
  51. ZTITLESOURCEATTACHMENT INTEGER,
  52. ZISHIDDENNOTECONTAINER INTEGER,
  53. ZSORTORDER INTEGER,
  54. ZOWNER INTEGER,
  55. ZACCOUNTTYPE INTEGER,
  56. ZDIDCHOOSETOMIGRATE INTEGER,
  57. ZDIDFINISHMIGRATION INTEGER,
  58. ZDIDMIGRATEONMAC INTEGER,
  59. ZFOLDERTYPE INTEGER,
  60. ZIMPORTEDFROMLEGACY INTEGER,
  61. ZACCOUNT3 INTEGER,
  62. ZPARENT INTEGER,
  63. ZCREATIONDATE TIMESTAMP,
  64. ZCROPPINGQUADBOTTOMLEFTX FLOAT,
  65. ZCROPPINGQUADBOTTOMLEFTY FLOAT,
  66. ZCROPPINGQUADBOTTOMRIGHTX FLOAT,
  67. ZCROPPINGQUADBOTTOMRIGHTY FLOAT,
  68. ZCROPPINGQUADTOPLEFTX FLOAT,
  69. ZCROPPINGQUADTOPLEFTY FLOAT,
  70. ZCROPPINGQUADTOPRIGHTX FLOAT,
  71. ZCROPPINGQUADTOPRIGHTY FLOAT,
  72. ZDURATION FLOAT,
  73. ZMODIFICATIONDATE TIMESTAMP,
  74. ZORIGINX FLOAT,
  75. ZORIGINY FLOAT,
  76. ZPREVIEWUPDATEDATE TIMESTAMP,
  77. ZSIZEHEIGHT FLOAT,
  78. ZSIZEWIDTH FLOAT,
  79. ZHEIGHT FLOAT,
  80. ZMODIFIEDDATE TIMESTAMP,
  81. ZSCALE FLOAT,
  82. ZWIDTH FLOAT,
  83. ZSTATEMODIFICATIONDATE TIMESTAMP,
  84. ZMODIFICATIONDATEATIMPORT TIMESTAMP,
  85. ZCREATIONDATE1 TIMESTAMP,
  86. ZFOLDERMODIFICATIONDATE TIMESTAMP,
  87. ZLASTNOTIFIEDDATE TIMESTAMP,
  88. ZLASTVIEWEDMODIFICATIONDATE TIMESTAMP,
  89. ZLEGACYMODIFICATIONDATEATIMPORT TIMESTAMP,
  90. ZMODIFICATIONDATE1 TIMESTAMP,
  91. ZDATEFORLASTTITLEMODIFICATION TIMESTAMP,
  92. ZPARENTMODIFICATIONDATE TIMESTAMP,
  93. ZIDENTIFIER VARCHAR UNIQUE,
  94. ZPASSWORDHINT VARCHAR,
  95. ZZONEOWNERNAME VARCHAR,
  96. ZADDITIONALINDEXABLETEXT VARCHAR,
  97. ZFALLBACKSUBTITLEIOS VARCHAR,
  98. ZFALLBACKSUBTITLEMAC VARCHAR,
  99. ZFALLBACKTITLE VARCHAR,
  100. ZREMOTEFILEURLSTRING VARCHAR,
  101. ZSUMMARY VARCHAR,
  102. ZTITLE VARCHAR,
  103. ZTYPEUTI VARCHAR,
  104. ZURLSTRING VARCHAR,
  105. ZUSERTITLE VARCHAR,
  106. ZDEVICEIDENTIFIER VARCHAR,
  107. ZCONTENTHASHATIMPORT VARCHAR,
  108. ZFILENAME VARCHAR,
  109. ZLEGACYCONTENTHASHATIMPORT VARCHAR,
  110. ZLEGACYIMPORTDEVICEIDENTIFIER VARCHAR,
  111. ZLEGACYMANAGEDOBJECTIDURIREPRESENTATION VARCHAR,
  112. ZSELECTEDINKCOLORSTRING VARCHAR,
  113. ZSELECTEDINKIDENTIFIER VARCHAR,
  114. ZSNIPPET VARCHAR,
  115. ZTHUMBNAILATTACHMENTIDENTIFIER VARCHAR,
  116. ZTITLE1 VARCHAR,
  117. ZACCOUNTNAMEFORACCOUNTLISTSORTING VARCHAR,
  118. ZNESTEDTITLEFORSORTING VARCHAR,
  119. ZNAME VARCHAR,
  120. ZUSERRECORDNAME VARCHAR,
  121. ZTITLE2 VARCHAR,
  122. ZASSETCRYPTOINITIALIZATIONVECTOR BLOB,
  123. ZASSETCRYPTOTAG BLOB,
  124. ZCRYPTOINITIALIZATIONVECTOR BLOB,
  125. ZCRYPTOSALT BLOB,
  126. ZCRYPTOTAG BLOB,
  127. ZCRYPTOWRAPPEDKEY BLOB,
  128. ZENCRYPTEDVALUESJSON BLOB,
  129. ZSERVERRECORDDATA BLOB,
  130. ZSERVERSHAREDATA BLOB,
  131. ZUNAPPLIEDENCRYPTEDRECORD BLOB,
  132. ZUSERSPECIFICSERVERRECORDDATA BLOB,
  133. ZFALLBACKIMAGECRYPTOINITIALIZATIONVECTOR BLOB,
  134. ZFALLBACKIMAGECRYPTOTAG BLOB,
  135. ZMARKUPMODELDATA BLOB,
  136. ZMERGEABLEDATA BLOB,
  137. ZMETADATADATA BLOB,
  138. ZCRYPTOMETADATAINITIALIZATIONVECTOR BLOB,
  139. ZCRYPTOMETADATATAG BLOB,
  140. ZENCRYPTEDMETADATA BLOB,
  141. ZMETADATA BLOB,
  142. ZLASTNOTIFIEDTIMESTAMPDATA BLOB,
  143. ZLASTVIEWEDTIMESTAMPDATA BLOB,
  144. ZREPLICAIDTOUSERIDDICTDATA BLOB,
  145. ZCRYPTOVERIFIER BLOB );
  146. CREATE TABLE ZICLOCATION (
  147. Z_PK INTEGER PRIMARY KEY,
  148. Z_ENT INTEGER,
  149. Z_OPT INTEGER,
  150. ZPLACEUPDATED INTEGER,
  151. ZATTACHMENT INTEGER,
  152. ZLATITUDE FLOAT,
  153. ZLONGITUDE FLOAT,
  154. ZPLACEMARKDATA BLOB );
  155. CREATE TABLE ZICNOTEDATA (
  156. Z_PK INTEGER PRIMARY KEY,
  157. Z_ENT INTEGER,
  158. Z_OPT INTEGER,
  159. ZNOTE INTEGER,
  160. ZCRYPTOINITIALIZATIONVECTOR BLOB,
  161. ZCRYPTOTAG BLOB,
  162. ZDATA BLOB );
  163. CREATE TABLE ZICSEARCHINDEXTRANSACTION (
  164. Z_PK INTEGER PRIMARY KEY,
  165. Z_ENT INTEGER,
  166. Z_OPT INTEGER,
  167. ZLASTTRANSACTIONID INTEGER,
  168. ZIDENTIFIER VARCHAR );
  169. CREATE TABLE ZICSERVERCHANGETOKEN (
  170. Z_PK INTEGER PRIMARY KEY,
  171. Z_ENT INTEGER,
  172. Z_OPT INTEGER,
  173. ZDATABASESCOPE INTEGER,
  174. ZACCOUNT INTEGER,
  175. ZOWNERNAME VARCHAR,
  176. ZZONENAME VARCHAR,
  177. ZCKSERVERCHANGETOKENDATA BLOB );
  178. CREATE TABLE ZNEXTID (
  179. Z_PK INTEGER PRIMARY KEY,
  180. Z_ENT INTEGER,
  181. Z_OPT INTEGER,
  182. ZCOUNTER INTEGER );
  183. CREATE TABLE Z_PRIMARYKEY (
  184. Z_ENT INTEGER PRIMARY KEY,
  185. Z_NAME VARCHAR,
  186. Z_SUPER INTEGER,
  187. Z_MAX INTEGER);
  188. CREATE TABLE Z_METADATA (
  189. Z_VERSION INTEGER PRIMARY KEY,
  190. Z_UUID VARCHAR(255),
  191. Z_PLIST BLOB);
  192. CREATE TABLE Z_MODELCACHE (
  193. Z_CONTENT BLOB);
  194. CREATE TABLE ACHANGE (
  195. Z_PK INTEGER PRIMARY KEY,
  196. Z_ENT INTEGER,
  197. Z_OPT INTEGER,
  198. ZCHANGETYPE INTEGER,
  199. ZENTITY INTEGER,
  200. ZENTITYPK INTEGER,
  201. ZTRANSACTIONID INTEGER,
  202. ZCOLUMNS BLOB );
  203. CREATE TABLE ATRANSACTION (
  204. Z_PK INTEGER PRIMARY KEY,
  205. Z_ENT INTEGER,
  206. Z_OPT INTEGER,
  207. ZTIMESTAMP FLOAT,
  208. ZAUTHOR VARCHAR,
  209. ZBUNDLEID VARCHAR,
  210. ZCONTEXTNAME VARCHAR,
  211. ZPROCESSID VARCHAR,
  212. ZQUERYGEN BLOB );
  213. CREATE INDEX ZICCLOUDSTATE_ZCLOUDSYNCINGOBJECT_INDEX ON ZICCLOUDSTATE (ZCLOUDSYNCINGOBJECT);
  214. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZCLOUDSTATE_INDEX ON ZICCLOUDSYNCINGOBJECT (ZCLOUDSTATE);
  215. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZLOCATION_INDEX ON ZICCLOUDSYNCINGOBJECT (ZLOCATION);
  216. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZMEDIA_INDEX ON ZICCLOUDSYNCINGOBJECT (ZMEDIA);
  217. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZNOTE_INDEX ON ZICCLOUDSYNCINGOBJECT (ZNOTE);
  218. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZNOTEUSINGTITLEFORNOTETITLE_INDEX ON ZICCLOUDSYNCINGOBJECT (ZNOTEUSINGTITLEFORNOTETITLE);
  219. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZPARENTATTACHMENT_INDEX ON ZICCLOUDSYNCINGOBJECT (ZPARENTATTACHMENT);
  220. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZATTACHMENT_INDEX ON ZICCLOUDSYNCINGOBJECT (ZATTACHMENT);
  221. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZACCOUNT_INDEX ON ZICCLOUDSYNCINGOBJECT (ZACCOUNT);
  222. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZACCOUNT1_INDEX ON ZICCLOUDSYNCINGOBJECT (ZACCOUNT1);
  223. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZATTACHMENT1_INDEX ON ZICCLOUDSYNCINGOBJECT (ZATTACHMENT1);
  224. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZACCOUNT2_INDEX ON ZICCLOUDSYNCINGOBJECT (ZACCOUNT2);
  225. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZFOLDER_INDEX ON ZICCLOUDSYNCINGOBJECT (ZFOLDER);
  226. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZNOTEDATA_INDEX ON ZICCLOUDSYNCINGOBJECT (ZNOTEDATA);
  227. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZTITLESOURCEATTACHMENT_INDEX ON ZICCLOUDSYNCINGOBJECT (ZTITLESOURCEATTACHMENT);
  228. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZOWNER_INDEX ON ZICCLOUDSYNCINGOBJECT (ZOWNER);
  229. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZACCOUNT3_INDEX ON ZICCLOUDSYNCINGOBJECT (ZACCOUNT3);
  230. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZPARENT_INDEX ON ZICCLOUDSYNCINGOBJECT (ZPARENT);
  231. CREATE INDEX ZICCLOUDSYNCINGOBJECT_Z_ENT_INDEX ON ZICCLOUDSYNCINGOBJECT (Z_ENT);
  232. CREATE INDEX ZICLOCATION_ZATTACHMENT_INDEX ON ZICLOCATION (ZATTACHMENT);
  233. CREATE INDEX ZICLOCATION_Z_ENT_INDEX ON ZICLOCATION (Z_ENT);
  234. CREATE INDEX ZICNOTEDATA_ZNOTE_INDEX ON ZICNOTEDATA (ZNOTE);
  235. CREATE INDEX ZICSERVERCHANGETOKEN_ZACCOUNT_INDEX ON ZICSERVERCHANGETOKEN (ZACCOUNT);
  236. CREATE INDEX ACHANGE_ZTRANSACTIONID_INDEX ON ACHANGE (ZTRANSACTIONID);