notes_10.3.3.sql 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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. ZPARENTATTACHMENT INTEGER,
  33. ZSCALEWHENDRAWING INTEGER,
  34. ZVERSION INTEGER,
  35. ZVERSIONOUTOFDATE INTEGER,
  36. ZATTACHMENT INTEGER,
  37. ZSTATE INTEGER,
  38. ZACCOUNT INTEGER,
  39. ZTYPE INTEGER,
  40. ZACCOUNT1 INTEGER,
  41. ZATTACHMENT1 INTEGER,
  42. ZATTACHMENTVIEWTYPE INTEGER,
  43. ZINTEGERID INTEGER,
  44. ZLEGACYNOTEINTEGERID INTEGER,
  45. ZLEGACYNOTEWASPLAINTEXT INTEGER,
  46. ZNOTEHASCHANGES INTEGER,
  47. ZACCOUNT2 INTEGER,
  48. ZNOTEDATA INTEGER,
  49. ZISHIDDENNOTECONTAINER INTEGER,
  50. ZSORTORDER INTEGER,
  51. ZOWNER INTEGER,
  52. ZACCOUNTTYPE INTEGER,
  53. ZDIDCHOOSETOMIGRATE INTEGER,
  54. ZDIDFINISHMIGRATION INTEGER,
  55. ZDIDMIGRATEONMAC INTEGER,
  56. ZFOLDERTYPE INTEGER,
  57. ZIMPORTEDFROMLEGACY INTEGER,
  58. ZACCOUNT3 INTEGER,
  59. ZPARENT INTEGER,
  60. ZCREATIONDATE TIMESTAMP,
  61. ZCROPPINGQUADBOTTOMLEFTX FLOAT,
  62. ZCROPPINGQUADBOTTOMLEFTY FLOAT,
  63. ZCROPPINGQUADBOTTOMRIGHTX FLOAT,
  64. ZCROPPINGQUADBOTTOMRIGHTY FLOAT,
  65. ZCROPPINGQUADTOPLEFTX FLOAT,
  66. ZCROPPINGQUADTOPLEFTY FLOAT,
  67. ZCROPPINGQUADTOPRIGHTX FLOAT,
  68. ZCROPPINGQUADTOPRIGHTY FLOAT,
  69. ZDURATION FLOAT,
  70. ZMODIFICATIONDATE TIMESTAMP,
  71. ZORIGINX FLOAT,
  72. ZORIGINY FLOAT,
  73. ZPREVIEWUPDATEDATE TIMESTAMP,
  74. ZSIZEHEIGHT FLOAT,
  75. ZSIZEWIDTH FLOAT,
  76. ZHEIGHT FLOAT,
  77. ZMODIFIEDDATE TIMESTAMP,
  78. ZSCALE FLOAT,
  79. ZWIDTH FLOAT,
  80. ZSTATEMODIFICATIONDATE TIMESTAMP,
  81. ZMODIFICATIONDATEATIMPORT TIMESTAMP,
  82. ZCREATIONDATE1 TIMESTAMP,
  83. ZFOLDERSMODIFICATIONDATE TIMESTAMP,
  84. ZLASTVIEWEDMODIFICATIONDATE TIMESTAMP,
  85. ZLEGACYMODIFICATIONDATEATIMPORT TIMESTAMP,
  86. ZMODIFICATIONDATE1 TIMESTAMP,
  87. ZDATEFORLASTTITLEMODIFICATION TIMESTAMP,
  88. ZPARENTMODIFICATIONDATE TIMESTAMP,
  89. ZIDENTIFIER VARCHAR UNIQUE,
  90. ZPASSWORDHINT VARCHAR,
  91. ZZONEOWNERNAME VARCHAR,
  92. ZSUMMARY VARCHAR,
  93. ZTITLE VARCHAR,
  94. ZTYPEUTI VARCHAR,
  95. ZURLSTRING VARCHAR,
  96. ZDEVICEIDENTIFIER VARCHAR,
  97. ZCONTENTHASHATIMPORT VARCHAR,
  98. ZFILENAME VARCHAR,
  99. ZLEGACYCONTENTHASHATIMPORT VARCHAR,
  100. ZLEGACYIMPORTDEVICEIDENTIFIER VARCHAR,
  101. ZLEGACYMANAGEDOBJECTIDURIREPRESENTATION VARCHAR,
  102. ZSNIPPET VARCHAR,
  103. ZTHUMBNAILATTACHMENTIDENTIFIER VARCHAR,
  104. ZTITLE1 VARCHAR,
  105. ZACCOUNTNAMEFORACCOUNTLISTSORTING VARCHAR,
  106. ZNESTEDTITLEFORSORTING VARCHAR,
  107. ZNAME VARCHAR,
  108. ZUSERRECORDNAME VARCHAR,
  109. ZTITLE2 VARCHAR,
  110. ZSERVERRECORD BLOB,
  111. ZSERVERSHARE BLOB,
  112. ZUSERSPECIFICSERVERRECORD BLOB,
  113. ZREMOTEFILEURL BLOB,
  114. ZASSETCRYPTOINITIALIZATIONVECTOR BLOB,
  115. ZASSETCRYPTOTAG BLOB,
  116. ZCRYPTOINITIALIZATIONVECTOR BLOB,
  117. ZCRYPTOSALT BLOB,
  118. ZCRYPTOTAG BLOB,
  119. ZCRYPTOWRAPPEDKEY BLOB,
  120. ZENCRYPTEDVALUESJSON BLOB,
  121. ZUNAPPLIEDENCRYPTEDRECORD BLOB,
  122. ZFALLBACKIMAGECRYPTOINITIALIZATIONVECTOR BLOB,
  123. ZFALLBACKIMAGECRYPTOTAG BLOB,
  124. ZMARKUPMODELDATA BLOB,
  125. ZMERGEABLEDATA BLOB,
  126. ZCRYPTOMETADATAINITIALIZATIONVECTOR BLOB,
  127. ZCRYPTOMETADATATAG BLOB,
  128. ZENCRYPTEDMETADATA BLOB,
  129. ZMETADATA BLOB,
  130. ZCRYPTOVERIFIER BLOB );
  131. CREATE TABLE Z_11NOTES (
  132. Z_11FOLDERS INTEGER,
  133. Z_8NOTES INTEGER,
  134. PRIMARY KEY (Z_11FOLDERS, Z_8NOTES) );
  135. CREATE TABLE ZICLOCATION (
  136. Z_PK INTEGER PRIMARY KEY,
  137. Z_ENT INTEGER,
  138. Z_OPT INTEGER,
  139. ZPLACEUPDATED INTEGER,
  140. ZATTACHMENT INTEGER,
  141. ZLATITUDE FLOAT,
  142. ZLONGITUDE FLOAT,
  143. ZPLACEMARK BLOB );
  144. CREATE TABLE ZICNOTECHANGE (
  145. Z_PK INTEGER PRIMARY KEY,
  146. Z_ENT INTEGER,
  147. Z_OPT INTEGER,
  148. ZCHANGETYPE INTEGER,
  149. ZFOLDER INTEGER,
  150. ZLEGACYNOTEINTEGERIDS BLOB,
  151. ZNOTEIDENTIFIERS BLOB );
  152. CREATE TABLE ZICNOTEDATA (
  153. Z_PK INTEGER PRIMARY KEY,
  154. Z_ENT INTEGER,
  155. Z_OPT INTEGER,
  156. ZNOTE INTEGER,
  157. ZCRYPTOINITIALIZATIONVECTOR BLOB,
  158. ZCRYPTOTAG BLOB,
  159. ZDATA BLOB );
  160. CREATE TABLE ZICSEARCHINDEXTRANSACTION (
  161. Z_PK INTEGER PRIMARY KEY,
  162. Z_ENT INTEGER,
  163. Z_OPT INTEGER,
  164. ZLASTTRANSACTIONID INTEGER,
  165. ZIDENTIFIER VARCHAR );
  166. CREATE TABLE ZICSERVERCHANGETOKEN (
  167. Z_PK INTEGER PRIMARY KEY,
  168. Z_ENT INTEGER,
  169. Z_OPT INTEGER,
  170. ZDATABASESCOPE INTEGER,
  171. ZACCOUNT INTEGER,
  172. ZOWNERNAME VARCHAR,
  173. ZZONENAME VARCHAR,
  174. ZCKSERVERCHANGETOKEN BLOB );
  175. CREATE TABLE ZNEXTID (
  176. Z_PK INTEGER PRIMARY KEY,
  177. Z_ENT INTEGER,
  178. Z_OPT INTEGER,
  179. ZCOUNTER INTEGER );
  180. CREATE INDEX ZICCLOUDSTATE_ZCLOUDSYNCINGOBJECT_INDEX ON ZICCLOUDSTATE (ZCLOUDSYNCINGOBJECT);
  181. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZCLOUDSTATE_INDEX ON ZICCLOUDSYNCINGOBJECT (ZCLOUDSTATE);
  182. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZLOCATION_INDEX ON ZICCLOUDSYNCINGOBJECT (ZLOCATION);
  183. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZMEDIA_INDEX ON ZICCLOUDSYNCINGOBJECT (ZMEDIA);
  184. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZNOTE_INDEX ON ZICCLOUDSYNCINGOBJECT (ZNOTE);
  185. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZPARENTATTACHMENT_INDEX ON ZICCLOUDSYNCINGOBJECT (ZPARENTATTACHMENT);
  186. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZATTACHMENT_INDEX ON ZICCLOUDSYNCINGOBJECT (ZATTACHMENT);
  187. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZACCOUNT_INDEX ON ZICCLOUDSYNCINGOBJECT (ZACCOUNT);
  188. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZACCOUNT1_INDEX ON ZICCLOUDSYNCINGOBJECT (ZACCOUNT1);
  189. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZATTACHMENT1_INDEX ON ZICCLOUDSYNCINGOBJECT (ZATTACHMENT1);
  190. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZACCOUNT2_INDEX ON ZICCLOUDSYNCINGOBJECT (ZACCOUNT2);
  191. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZNOTEDATA_INDEX ON ZICCLOUDSYNCINGOBJECT (ZNOTEDATA);
  192. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZOWNER_INDEX ON ZICCLOUDSYNCINGOBJECT (ZOWNER);
  193. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZACCOUNT3_INDEX ON ZICCLOUDSYNCINGOBJECT (ZACCOUNT3);
  194. CREATE INDEX ZICCLOUDSYNCINGOBJECT_ZPARENT_INDEX ON ZICCLOUDSYNCINGOBJECT (ZPARENT);
  195. CREATE INDEX ZICCLOUDSYNCINGOBJECT_Z_ENT_INDEX ON ZICCLOUDSYNCINGOBJECT (Z_ENT);
  196. CREATE INDEX Z_11NOTES_Z_8NOTES_INDEX ON Z_11NOTES (Z_8NOTES,
  197. Z_11FOLDERS);
  198. CREATE INDEX ZICLOCATION_ZATTACHMENT_INDEX ON ZICLOCATION (ZATTACHMENT);
  199. CREATE INDEX ZICLOCATION_Z_ENT_INDEX ON ZICLOCATION (Z_ENT);
  200. CREATE INDEX ZICNOTECHANGE_ZFOLDER_INDEX ON ZICNOTECHANGE (ZFOLDER);
  201. CREATE INDEX ZICNOTEDATA_ZNOTE_INDEX ON ZICNOTEDATA (ZNOTE);
  202. CREATE INDEX ZICSERVERCHANGETOKEN_ZACCOUNT_INDEX ON ZICSERVERCHANGETOKEN (ZACCOUNT);
  203. CREATE TABLE Z_PRIMARYKEY (
  204. Z_ENT INTEGER PRIMARY KEY,
  205. Z_NAME VARCHAR,
  206. Z_SUPER INTEGER,
  207. Z_MAX INTEGER);
  208. CREATE TABLE Z_METADATA (
  209. Z_VERSION INTEGER PRIMARY KEY,
  210. Z_UUID VARCHAR(255),
  211. Z_PLIST BLOB);
  212. CREATE TABLE Z_MODELCACHE (
  213. Z_CONTENT BLOB);