photos_10.3.3.sql 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910
  1. CREATE TABLE ZADDITIONALASSETATTRIBUTES ( Z_PK INTEGER PRIMARY KEY,
  2. Z_ENT INTEGER,
  3. Z_OPT INTEGER,
  4. ZALLOWEDFORANALYSIS INTEGER,
  5. ZCAMERACAPTUREDEVICE INTEGER,
  6. ZCLOUDAVALANCHEPICKTYPE INTEGER,
  7. ZCLOUDKINDSUBTYPE INTEGER,
  8. ZEMBEDDEDTHUMBNAILHEIGHT INTEGER,
  9. ZEMBEDDEDTHUMBNAILLENGTH INTEGER,
  10. ZEMBEDDEDTHUMBNAILOFFSET INTEGER,
  11. ZEMBEDDEDTHUMBNAILWIDTH INTEGER,
  12. ZEXTERNALUSAGEINTENT INTEGER,
  13. ZLOCATIONHASH INTEGER,
  14. ZORIGINALFILESIZE INTEGER,
  15. ZORIGINALHEIGHT INTEGER,
  16. ZORIGINALORIENTATION INTEGER,
  17. ZORIGINALRESOURCECHOICE INTEGER,
  18. ZORIGINALWIDTH INTEGER,
  19. ZPENDINGPLAYCOUNT INTEGER,
  20. ZPENDINGSHARECOUNT INTEGER,
  21. ZPENDINGVIEWCOUNT INTEGER,
  22. ZPLAYCOUNT INTEGER,
  23. ZREVERSELOCATIONDATAISVALID INTEGER,
  24. ZSCENEANALYSISVERSION INTEGER,
  25. ZSHARECOUNT INTEGER,
  26. ZSHIFTEDLOCATIONISVALID INTEGER,
  27. ZTIMEZONEOFFSET INTEGER,
  28. ZUPLOADATTEMPTS INTEGER,
  29. ZVIDEOCPDISPLAYTIMESCALE INTEGER,
  30. ZVIDEOCPDISPLAYVALUE INTEGER,
  31. ZVIDEOCPDURATIONTIMESCALE INTEGER,
  32. ZVIEWCOUNT INTEGER,
  33. ZASSET INTEGER,
  34. Z27_ASSET INTEGER,
  35. ZASSETDESCRIPTION INTEGER,
  36. ZUNMANAGEDADJUSTMENT INTEGER,
  37. ZLASTUPLOADATTEMPTDATE TIMESTAMP,
  38. ZSCENEANALYSISTIMESTAMP TIMESTAMP,
  39. ZADJUSTEDFINGERPRINT VARCHAR,
  40. ZCREATORBUNDLEID VARCHAR,
  41. ZCUSTOMCOLLECTIONNAME VARCHAR,
  42. ZCUSTOMCOLLECTIONUUID VARCHAR,
  43. ZCUSTOMMOMENTNAME VARCHAR,
  44. ZCUSTOMMOMENTUUID VARCHAR,
  45. ZEDITORBUNDLEID VARCHAR,
  46. ZEXIFTIMESTAMPSTRING VARCHAR,
  47. ZIMPORTSESSIONID VARCHAR,
  48. ZMASTERFINGERPRINT VARCHAR,
  49. ZMONTAGE VARCHAR,
  50. ZORIGINALASSETSUUID VARCHAR,
  51. ZORIGINALFILENAME VARCHAR,
  52. ZORIGINATINGASSETIDENTIFIER VARCHAR,
  53. ZPUBLICGLOBALUUID VARCHAR,
  54. ZTIMEZONENAME VARCHAR,
  55. ZTITLE VARCHAR,
  56. ZDISTANCEIDENTITY BLOB,
  57. ZFACEREGIONS BLOB,
  58. ZORIGINALHASH BLOB,
  59. ZPLACEANNOTATIONDATA BLOB,
  60. ZREVERSELOCATIONDATA BLOB,
  61. ZSHIFTEDLOCATIONDATA BLOB );
  62. CREATE TABLE Z_1KEYWORDS ( Z_1ASSETATTRIBUTES INTEGER,
  63. Z_30KEYWORDS INTEGER,
  64. PRIMARY KEY (Z_1ASSETATTRIBUTES,
  65. Z_30KEYWORDS) );
  66. CREATE TABLE ZADJUSTMENT ( Z_PK INTEGER PRIMARY KEY,
  67. Z_ENT INTEGER,
  68. Z_OPT INTEGER,
  69. ZIDENTIFIER INTEGER,
  70. ZASSET INTEGER,
  71. Z27_ASSET INTEGER,
  72. Z_FOK_ASSET INTEGER,
  73. ZFILTERNAME VARCHAR,
  74. ZFILTERSETTINGS BLOB );
  75. CREATE TABLE ZALBUMLIST ( Z_PK INTEGER PRIMARY KEY,
  76. Z_ENT INTEGER,
  77. Z_OPT INTEGER,
  78. ZIDENTIFIER INTEGER,
  79. ZNEEDSREORDERINGNUMBER INTEGER,
  80. ZUUID VARCHAR );
  81. CREATE TABLE ZASSETANALYSISSTATE ( Z_PK INTEGER PRIMARY KEY,
  82. Z_ENT INTEGER,
  83. Z_OPT INTEGER,
  84. ZANALYSISSTATE INTEGER,
  85. ZWORKERFLAGS INTEGER,
  86. ZWORKERTYPE INTEGER,
  87. ZASSET INTEGER,
  88. Z27_ASSET INTEGER,
  89. ZIGNOREUNTILDATE TIMESTAMP,
  90. ZLASTIGNOREDDATE TIMESTAMP,
  91. ZSORTTOKEN FLOAT,
  92. ZASSETUUID VARCHAR );
  93. CREATE TABLE ZASSETDESCRIPTION ( Z_PK INTEGER PRIMARY KEY,
  94. Z_ENT INTEGER,
  95. Z_OPT INTEGER,
  96. ZASSETATTRIBUTES INTEGER,
  97. ZLONGDESCRIPTION VARCHAR );
  98. CREATE TABLE ZCLOUDFEEDENTRY ( Z_PK INTEGER PRIMARY KEY,
  99. Z_ENT INTEGER,
  100. Z_OPT INTEGER,
  101. ZENTRYPRIORITYNUMBER INTEGER,
  102. ZENTRYTYPENUMBER INTEGER,
  103. ZENTRYDATE TIMESTAMP,
  104. ZENTRYALBUMGUID VARCHAR,
  105. ZENTRYINVITATIONRECORDGUID VARCHAR,
  106. ZENTRYCLOUDASSETGUID VARCHAR );
  107. CREATE TABLE ZCLOUDMASTER ( Z_PK INTEGER PRIMARY KEY,
  108. Z_ENT INTEGER,
  109. Z_OPT INTEGER,
  110. ZCLOUDLOCALSTATE INTEGER,
  111. ZFULLSIZEJPEGSOURCE INTEGER,
  112. ZORIGINALORIENTATION INTEGER,
  113. ZMEDIAMETADATA INTEGER,
  114. ZCREATIONDATE TIMESTAMP,
  115. ZIMPORTDATE TIMESTAMP,
  116. ZCLOUDMASTERGUID VARCHAR,
  117. ZIMPORTSESSIONID VARCHAR,
  118. ZMEDIAMETADATATYPE VARCHAR,
  119. ZORIGINALFILENAME VARCHAR,
  120. ZORIGINATINGASSETIDENTIFIER VARCHAR,
  121. ZUNIFORMTYPEIDENTIFIER VARCHAR );
  122. CREATE TABLE ZCLOUDMASTERMEDIAMETADATA ( Z_PK INTEGER PRIMARY KEY,
  123. Z_ENT INTEGER,
  124. Z_OPT INTEGER,
  125. ZCLOUDMASTER INTEGER,
  126. ZDATA BLOB );
  127. CREATE TABLE ZCLOUDRESOURCE ( Z_PK INTEGER PRIMARY KEY,
  128. Z_ENT INTEGER,
  129. Z_OPT INTEGER,
  130. ZFILESIZE INTEGER,
  131. ZHEIGHT INTEGER,
  132. ZISAVAILABLE INTEGER,
  133. ZISLOCALLYAVAILABLE INTEGER,
  134. ZPREFETCHCOUNT INTEGER,
  135. ZTYPE INTEGER,
  136. ZWIDTH INTEGER,
  137. ZASSET INTEGER,
  138. Z27_ASSET INTEGER,
  139. ZCLOUDMASTER INTEGER,
  140. ZDATECREATED TIMESTAMP,
  141. ZLASTONDEMANDDOWNLOADDATE TIMESTAMP,
  142. ZLASTPREFETCHDATE TIMESTAMP,
  143. ZPRUNEDAT TIMESTAMP,
  144. ZASSETUUID VARCHAR,
  145. ZFILEPATH VARCHAR,
  146. ZFINGERPRINT VARCHAR,
  147. ZITEMIDENTIFIER VARCHAR,
  148. ZUNIFORMTYPEIDENTIFIER VARCHAR );
  149. CREATE TABLE ZCLOUDSHAREDALBUMINVITATIONRECORD ( Z_PK INTEGER PRIMARY KEY,
  150. Z_ENT INTEGER,
  151. Z_OPT INTEGER,
  152. ZINVITATIONSTATE INTEGER,
  153. ZINVITATIONSTATELOCAL INTEGER,
  154. ZINVITEEEMAILKEY INTEGER,
  155. ZISMINE INTEGER,
  156. ZALBUM INTEGER,
  157. Z_FOK_ALBUM INTEGER,
  158. ZINVITEESUBSCRIPTIONDATE TIMESTAMP,
  159. ZALBUMGUID VARCHAR,
  160. ZCLOUDGUID VARCHAR,
  161. ZINVITEEFIRSTNAME VARCHAR,
  162. ZINVITEEFULLNAME VARCHAR,
  163. ZINVITEEHASHEDPERSONID VARCHAR,
  164. ZINVITEELASTNAME VARCHAR );
  165. CREATE TABLE ZCLOUDSHAREDCOMMENT ( Z_PK INTEGER PRIMARY KEY,
  166. Z_ENT INTEGER,
  167. Z_OPT INTEGER,
  168. ZISBATCHCOMMENT INTEGER,
  169. ZISCAPTION INTEGER,
  170. ZISDELETABLE INTEGER,
  171. ZISLIKE INTEGER,
  172. ZISMYCOMMENT INTEGER,
  173. ZCLOUDFEEDCOMMENTENTRY INTEGER,
  174. ZCLOUDFEEDLIKECOMMENTENTRY INTEGER,
  175. ZCOMMENTEDASSET INTEGER,
  176. Z27_COMMENTEDASSET INTEGER,
  177. ZLIKEDASSET INTEGER,
  178. Z27_LIKEDASSET INTEGER,
  179. Z_FOK_LIKEDASSET INTEGER,
  180. Z_FOK_CLOUDFEEDCOMMENTENTRY INTEGER,
  181. Z_FOK_COMMENTEDASSET INTEGER,
  182. Z_FOK_CLOUDFEEDLIKECOMMENTENTRY INTEGER,
  183. ZCOMMENTCLIENTDATE TIMESTAMP,
  184. ZCOMMENTDATE TIMESTAMP,
  185. ZCLOUDGUID VARCHAR,
  186. ZCOMMENTTEXT VARCHAR,
  187. ZCOMMENTTYPE VARCHAR,
  188. ZCOMMENTERHASHEDPERSONID VARCHAR );
  189. CREATE TABLE ZDEFERREDREBUILDFACE ( Z_PK INTEGER PRIMARY KEY,
  190. Z_ENT INTEGER,
  191. Z_OPT INTEGER,
  192. ZFACEALGORITHMVERSION INTEGER,
  193. ZHIDDEN INTEGER,
  194. ZMANUAL INTEGER,
  195. ZNAMESOURCEAUTO INTEGER,
  196. ZREJECTED INTEGER,
  197. ZREPRESENTATIVE INTEGER,
  198. ZCENTERX FLOAT,
  199. ZCENTERY FLOAT,
  200. ZSIZE FLOAT,
  201. ZASSETCLOUDGUID VARCHAR,
  202. ZASSETUUID VARCHAR,
  203. ZPERSONUUID VARCHAR );
  204. CREATE TABLE ZDETECTEDFACE ( Z_PK INTEGER PRIMARY KEY,
  205. Z_ENT INTEGER,
  206. Z_OPT INTEGER,
  207. ZASSETVISIBLE INTEGER,
  208. ZCLOUDLOCALSTATE INTEGER,
  209. ZCLUSTERSEQUENCENUMBER INTEGER,
  210. ZCONFIRMEDFACECROPGENERATIONSTATE INTEGER,
  211. ZEXPRESSIONTYPE1 INTEGER,
  212. ZEXPRESSIONTYPE2 INTEGER,
  213. ZEXPRESSIONTYPE3 INTEGER,
  214. ZFACEALGORITHMVERSION INTEGER,
  215. ZHASSMILE INTEGER,
  216. ZHIDDEN INTEGER,
  217. ZISINTRASH INTEGER,
  218. ZISLEFTEYECLOSED INTEGER,
  219. ZISRIGHTEYECLOSED INTEGER,
  220. ZMANUAL INTEGER,
  221. ZNAMESOURCE INTEGER,
  222. ZQUALITYMEASURE INTEGER,
  223. ZSOURCEHEIGHT INTEGER,
  224. ZSOURCEWIDTH INTEGER,
  225. ZASSET INTEGER,
  226. Z27_ASSET INTEGER,
  227. ZFACECROP INTEGER,
  228. ZFACEGROUP INTEGER,
  229. ZFACEGROUPBEINGKEYFACE INTEGER,
  230. ZFACEPRINT INTEGER,
  231. ZPERSON INTEGER,
  232. ZPERSONBEINGKEYFACE INTEGER,
  233. ZADJUSTMENTVERSION TIMESTAMP,
  234. ZBLURSCORE FLOAT,
  235. ZCENTERX FLOAT,
  236. ZCENTERY FLOAT,
  237. ZEXPRESSIONCONFIDENCE FLOAT,
  238. ZEXPRESSIONSCORE1 FLOAT,
  239. ZEXPRESSIONSCORE2 FLOAT,
  240. ZEXPRESSIONSCORE3 FLOAT,
  241. ZLEFTEYEX FLOAT,
  242. ZLEFTEYEY FLOAT,
  243. ZMOUTHX FLOAT,
  244. ZMOUTHY FLOAT,
  245. ZPOSEPITCH FLOAT,
  246. ZPOSEROLL FLOAT,
  247. ZPOSEYAW FLOAT,
  248. ZRIGHTEYEX FLOAT,
  249. ZRIGHTEYEY FLOAT,
  250. ZSIZE FLOAT,
  251. ZMASTERIDENTIFIER VARCHAR,
  252. ZUUID VARCHAR );
  253. CREATE TABLE Z_15REJECTEDPERSONS ( Z_15REJECTEDFACES INTEGER,
  254. Z_36REJECTEDPERSONS INTEGER,
  255. PRIMARY KEY (Z_15REJECTEDFACES,
  256. Z_36REJECTEDPERSONS) );
  257. CREATE TABLE Z_15REJECTEDPERSONSNEEDINGFACECROPS ( Z_15REJECTEDFACESNEEDINGFACECROPS INTEGER,
  258. Z_36REJECTEDPERSONSNEEDINGFACECROPS INTEGER,
  259. PRIMARY KEY (Z_15REJECTEDFACESNEEDINGFACECROPS,
  260. Z_36REJECTEDPERSONSNEEDINGFACECROPS) );
  261. CREATE TABLE ZDETECTEDFACEGROUP ( Z_PK INTEGER PRIMARY KEY,
  262. Z_ENT INTEGER,
  263. Z_OPT INTEGER,
  264. ZPERSONBUILDERSTATE INTEGER,
  265. ZUNNAMEDFACECOUNT INTEGER,
  266. ZASSOCIATEDPERSON INTEGER,
  267. ZKEYFACE INTEGER,
  268. ZUUID VARCHAR );
  269. CREATE TABLE ZDETECTEDFACEPRINT ( Z_PK INTEGER PRIMARY KEY,
  270. Z_ENT INTEGER,
  271. Z_OPT INTEGER,
  272. ZFACEPRINTVERSION INTEGER,
  273. ZFACE INTEGER,
  274. ZDATA BLOB );
  275. CREATE TABLE ZFACECROP ( Z_PK INTEGER PRIMARY KEY,
  276. Z_ENT INTEGER,
  277. Z_OPT INTEGER,
  278. ZCLOUDLOCALSTATE INTEGER,
  279. ZSTATE INTEGER,
  280. ZTYPE INTEGER,
  281. ZASSET INTEGER,
  282. Z27_ASSET INTEGER,
  283. ZFACE INTEGER,
  284. ZPERSON INTEGER,
  285. ZUUID VARCHAR,
  286. ZRESOURCEDATA BLOB );
  287. CREATE TABLE ZGENERICALBUM ( Z_PK INTEGER PRIMARY KEY,
  288. Z_ENT INTEGER,
  289. Z_OPT INTEGER,
  290. ZCACHEDCOUNT INTEGER,
  291. ZCACHEDPHOTOSCOUNT INTEGER,
  292. ZCACHEDVIDEOSCOUNT INTEGER,
  293. ZCLOUDLOCALSTATE INTEGER,
  294. ZCUSTOMSORTASCENDING INTEGER,
  295. ZCUSTOMSORTKEY INTEGER,
  296. ZISPINNED INTEGER,
  297. ZKIND INTEGER,
  298. ZPENDINGITEMSCOUNT INTEGER,
  299. ZPENDINGITEMSTYPE INTEGER,
  300. ZSYNCEVENTORDERKEY INTEGER,
  301. ZTRASHEDSTATE INTEGER,
  302. ZCUSTOMKEYASSET INTEGER,
  303. Z27_CUSTOMKEYASSET INTEGER,
  304. ZKEYASSET INTEGER,
  305. Z27_KEYASSET INTEGER,
  306. ZPARENTFOLDER INTEGER,
  307. ZSECONDARYKEYASSET INTEGER,
  308. Z27_SECONDARYKEYASSET INTEGER,
  309. ZTERTIARYKEYASSET INTEGER,
  310. Z27_TERTIARYKEYASSET INTEGER,
  311. ZCLOUDALBUMSUBTYPE INTEGER,
  312. ZCLOUDMULTIPLECONTRIBUTORSENABLED INTEGER,
  313. ZCLOUDMULTIPLECONTRIBUTORSENABLEDLOCAL INTEGER,
  314. ZCLOUDNOTIFICATIONSENABLED INTEGER,
  315. ZCLOUDOWNEREMAILKEY INTEGER,
  316. ZCLOUDOWNERISWHITELISTED INTEGER,
  317. ZCLOUDPUBLICURLENABLED INTEGER,
  318. ZCLOUDPUBLICURLENABLEDLOCAL INTEGER,
  319. ZCLOUDRELATIONSHIPSTATE INTEGER,
  320. ZCLOUDRELATIONSHIPSTATELOCAL INTEGER,
  321. ZHASUNSEENCONTENT INTEGER,
  322. ZISOWNED INTEGER,
  323. ZUNSEENASSETSCOUNT INTEGER,
  324. ZKEYASSETFACEIDENTIFIER INTEGER,
  325. ZKEYASSETFACETHUMBNAILINDEX INTEGER,
  326. ZWALLPAPERALBUMTYPE INTEGER,
  327. Z_FOK_PARENTFOLDER INTEGER,
  328. ZENDDATE TIMESTAMP,
  329. ZSTARTDATE TIMESTAMP,
  330. ZTRASHEDDATE TIMESTAMP,
  331. ZCLOUDCREATIONDATE TIMESTAMP,
  332. ZCLOUDLASTCONTRIBUTIONDATE TIMESTAMP,
  333. ZCLOUDLASTINTERESTINGCHANGEDATE TIMESTAMP,
  334. ZCLOUDSUBSCRIPTIONDATE TIMESTAMP,
  335. ZCLOUDGUID VARCHAR,
  336. ZIMPORTSESSIONID VARCHAR,
  337. ZTITLE VARCHAR,
  338. ZUUID VARCHAR,
  339. ZCLOUDOWNERFIRSTNAME VARCHAR,
  340. ZCLOUDOWNERFULLNAME VARCHAR,
  341. ZCLOUDOWNERHASHEDPERSONID VARCHAR,
  342. ZCLOUDOWNERLASTNAME VARCHAR,
  343. ZCLOUDPERSONID VARCHAR,
  344. ZPUBLICURL VARCHAR,
  345. ZCUSTOMQUERYTYPE VARCHAR,
  346. ZCLOUDMETADATA BLOB,
  347. ZCUSTOMQUERYPARAMETERS BLOB );
  348. CREATE TABLE Z_19ALBUMLISTS ( Z_19ALBUMS INTEGER,
  349. Z_3ALBUMLISTS INTEGER,
  350. Z_FOK_19ALBUMS INTEGER,
  351. PRIMARY KEY (Z_19ALBUMS,
  352. Z_3ALBUMLISTS) );
  353. CREATE TABLE Z_20ASSETS ( Z_20ALBUMS INTEGER,
  354. Z_27ASSETS INTEGER,
  355. Z_FOK_27ASSETS INTEGER,
  356. PRIMARY KEY (Z_20ALBUMS,
  357. Z_27ASSETS) );
  358. CREATE TABLE ZGENERICASSET ( Z_PK INTEGER PRIMARY KEY,
  359. Z_ENT INTEGER,
  360. Z_OPT INTEGER,
  361. ZAVALANCHEPICKTYPE INTEGER,
  362. ZCLOUDDOWNLOADREQUESTS INTEGER,
  363. ZCLOUDHASCOMMENTSBYME INTEGER,
  364. ZCLOUDHASCOMMENTSCONVERSATION INTEGER,
  365. ZCLOUDHASUNSEENCOMMENTS INTEGER,
  366. ZCLOUDISDELETABLE INTEGER,
  367. ZCLOUDISMYASSET INTEGER,
  368. ZCLOUDLOCALSTATE INTEGER,
  369. ZCLOUDPLACEHOLDERKIND INTEGER,
  370. ZCOMPLETE INTEGER,
  371. ZCUSTOMRENDEREDVALUE INTEGER,
  372. ZFACEAREAPOINTS INTEGER,
  373. ZFAVORITE INTEGER,
  374. ZHASADJUSTMENTS INTEGER,
  375. ZHEIGHT INTEGER,
  376. ZHIDDEN INTEGER,
  377. ZKIND INTEGER,
  378. ZKINDSUBTYPE INTEGER,
  379. ZLOCALRESOURCESSTATE INTEGER,
  380. ZORIENTATION INTEGER,
  381. ZSAVEDASSETTYPE INTEGER,
  382. ZTHUMBNAILINDEX INTEGER,
  383. ZTRASHEDSTATE INTEGER,
  384. ZVIDEOCPDURATIONVALUE INTEGER,
  385. ZVIDEOCPVISIBILITYSTATE INTEGER,
  386. ZVISIBILITYSTATE INTEGER,
  387. ZWIDTH INTEGER,
  388. ZADDITIONALATTRIBUTES INTEGER,
  389. ZCLOUDFEEDASSETSENTRY INTEGER,
  390. ZMASTER INTEGER,
  391. ZMOMENT INTEGER,
  392. ZSEARCHDATA INTEGER,
  393. Z_FOK_CLOUDFEEDASSETSENTRY INTEGER,
  394. Z_FOK_MOMENT INTEGER,
  395. ZADDEDDATE TIMESTAMP,
  396. ZADJUSTMENTTIMESTAMP TIMESTAMP,
  397. ZCLOUDBATCHPUBLISHDATE TIMESTAMP,
  398. ZCLOUDLASTVIEWEDCOMMENTDATE TIMESTAMP,
  399. ZCLOUDSERVERPUBLISHDATE TIMESTAMP,
  400. ZCURATIONSCORE FLOAT,
  401. ZDATECREATED TIMESTAMP,
  402. ZDURATION FLOAT,
  403. ZFACEADJUSTMENTVERSION TIMESTAMP,
  404. ZLASTSHAREDDATE TIMESTAMP,
  405. ZLATITUDE FLOAT,
  406. ZLONGITUDE FLOAT,
  407. ZMODIFICATIONDATE TIMESTAMP,
  408. ZSORTTOKEN FLOAT,
  409. ZTRASHEDDATE TIMESTAMP,
  410. ZAVALANCHEUUID VARCHAR,
  411. ZCLOUDASSETGUID VARCHAR,
  412. ZCLOUDBATCHID VARCHAR,
  413. ZCLOUDCOLLECTIONGUID VARCHAR,
  414. ZCLOUDOWNERHASHEDPERSONID VARCHAR,
  415. ZDIRECTORY VARCHAR,
  416. ZFILENAME VARCHAR,
  417. ZGROUPINGUUID VARCHAR,
  418. ZMEDIAGROUPUUID VARCHAR,
  419. ZORIGINALCOLORSPACE VARCHAR,
  420. ZUNIFORMTYPEIDENTIFIER VARCHAR,
  421. ZUUID VARCHAR,
  422. ZLOCATIONDATA BLOB,
  423. ZIMAGEURLDATA BLOB,
  424. ZTHUMBNAILURLDATA BLOB,
  425. ZWALLPAPEROPTIONSDATA BLOB );
  426. CREATE TABLE Z_27MEMORIESBEINGREPRESENTATIVEASSETS ( Z_27REPRESENTATIVEASSETS INTEGER,
  427. Z_32MEMORIESBEINGREPRESENTATIVEASSETS INTEGER,
  428. PRIMARY KEY (Z_27REPRESENTATIVEASSETS,
  429. Z_32MEMORIESBEINGREPRESENTATIVEASSETS) );
  430. CREATE TABLE Z_27MEMORIESBEINGCURATEDASSETS ( Z_27CURATEDASSETS INTEGER,
  431. Z_32MEMORIESBEINGCURATEDASSETS INTEGER,
  432. PRIMARY KEY (Z_27CURATEDASSETS,
  433. Z_32MEMORIESBEINGCURATEDASSETS) );
  434. CREATE TABLE Z_27MEMORIESBEINGMOVIECURATEDASSETS ( Z_27MOVIECURATEDASSETS INTEGER,
  435. Z_32MEMORIESBEINGMOVIECURATEDASSETS INTEGER,
  436. PRIMARY KEY (Z_27MOVIECURATEDASSETS,
  437. Z_32MEMORIESBEINGMOVIECURATEDASSETS) );
  438. CREATE TABLE ZKEYWORD ( Z_PK INTEGER PRIMARY KEY,
  439. Z_ENT INTEGER,
  440. Z_OPT INTEGER,
  441. ZTITLE VARCHAR UNIQUE );
  442. CREATE TABLE ZLEGACYFACE ( Z_PK INTEGER PRIMARY KEY,
  443. Z_ENT INTEGER,
  444. Z_OPT INTEGER,
  445. ZIDENTIFIER INTEGER,
  446. ZASSET INTEGER,
  447. Z27_ASSET INTEGER,
  448. ZALBUMUUID VARCHAR,
  449. ZRELATIVERECTVALUE BLOB );
  450. CREATE TABLE ZMEMORY ( Z_PK INTEGER PRIMARY KEY,
  451. Z_ENT INTEGER,
  452. Z_OPT INTEGER,
  453. ZCATEGORY INTEGER,
  454. ZCLOUDLOCALSTATE INTEGER,
  455. ZFAVORITE INTEGER,
  456. ZPENDING INTEGER,
  457. ZPHOTOSGRAPHVERSION INTEGER,
  458. ZREJECTED INTEGER,
  459. ZSUBCATEGORY INTEGER,
  460. ZUSERCREATED INTEGER,
  461. ZKEYASSET INTEGER,
  462. Z27_KEYASSET INTEGER,
  463. ZCREATIONDATE TIMESTAMP,
  464. ZLASTMOVIEPLAYEDDATE TIMESTAMP,
  465. ZLASTVIEWEDDATE TIMESTAMP,
  466. ZSCORE FLOAT,
  467. ZSUBTITLE VARCHAR,
  468. ZTITLE VARCHAR,
  469. ZUUID VARCHAR,
  470. ZMOVIEASSETSTATE BLOB,
  471. ZASSETLISTPREDICATE BLOB,
  472. ZMOVIEDATA BLOB,
  473. ZPHOTOSGRAPHDATA BLOB );
  474. CREATE TABLE ZMOMENT ( Z_PK INTEGER PRIMARY KEY,
  475. Z_ENT INTEGER,
  476. Z_OPT INTEGER,
  477. ZCACHEDCOUNT INTEGER,
  478. ZCACHEDPHOTOSCOUNT INTEGER,
  479. ZCACHEDVIDEOSCOUNT INTEGER,
  480. ZGENERATIONTYPE INTEGER,
  481. ZREVERSELOCATIONDATAISVALID INTEGER,
  482. ZTRASHEDSTATE INTEGER,
  483. ZMEGAMOMENTLIST INTEGER,
  484. ZMOMENTLIBRARY INTEGER,
  485. ZYEARMOMENTLIST INTEGER,
  486. Z_FOK_MOMENTLIBRARY INTEGER,
  487. Z_FOK_MEGAMOMENTLIST INTEGER,
  488. Z_FOK_YEARMOMENTLIST INTEGER,
  489. ZENDDATE TIMESTAMP,
  490. ZMODIFICATIONDATE TIMESTAMP,
  491. ZREPRESENTATIVEDATE TIMESTAMP,
  492. ZSTARTDATE TIMESTAMP,
  493. ZTITLE VARCHAR,
  494. ZTITLE2 VARCHAR,
  495. ZTITLE3 VARCHAR,
  496. ZUUID VARCHAR,
  497. ZAPPROXIMATELOCATIONDATA BLOB,
  498. ZREVERSELOCATIONDATA BLOB );
  499. CREATE TABLE ZMOMENTLIBRARY ( Z_PK INTEGER PRIMARY KEY,
  500. Z_ENT INTEGER,
  501. Z_OPT INTEGER );
  502. CREATE TABLE ZMOMENTLIST ( Z_PK INTEGER PRIMARY KEY,
  503. Z_ENT INTEGER,
  504. Z_OPT INTEGER,
  505. ZGENERATIONTYPE INTEGER,
  506. ZGRANULARITYLEVEL INTEGER,
  507. ZREVERSELOCATIONDATAISVALID INTEGER,
  508. ZSORTINDEX INTEGER,
  509. ZTRASHEDSTATE INTEGER,
  510. ZENDDATE TIMESTAMP,
  511. ZREPRESENTATIVEDATE TIMESTAMP,
  512. ZSTARTDATE TIMESTAMP,
  513. ZTITLE VARCHAR,
  514. ZTITLE2 VARCHAR,
  515. ZTITLE3 VARCHAR,
  516. ZUUID VARCHAR,
  517. ZREVERSELOCATIONDATA BLOB );
  518. CREATE TABLE ZPERSON ( Z_PK INTEGER PRIMARY KEY,
  519. Z_ENT INTEGER,
  520. Z_OPT INTEGER,
  521. ZCLOUDLOCALSTATE INTEGER,
  522. ZFACECOUNT INTEGER,
  523. ZINPERSONNAMINGMODEL INTEGER,
  524. ZMANUALORDER INTEGER,
  525. ZTYPE INTEGER,
  526. ZVERIFIED INTEGER,
  527. ZASSOCIATEDFACEGROUP INTEGER,
  528. ZKEYFACE INTEGER,
  529. ZDISPLAYNAME VARCHAR,
  530. ZFULLNAME VARCHAR,
  531. ZPERSONUUID VARCHAR,
  532. ZPERSONURI VARCHAR,
  533. ZCONTACTMATCHINGDICTIONARY BLOB );
  534. CREATE TABLE ZPERSONREFERENCE ( Z_PK INTEGER PRIMARY KEY,
  535. Z_ENT INTEGER,
  536. Z_OPT INTEGER,
  537. ZASSETATTRIBUTES INTEGER,
  538. ZPERSON INTEGER,
  539. ZPERSONUUID VARCHAR,
  540. ZPERSONDATA BLOB );
  541. CREATE TABLE ZSCENECLASSIFICATION ( Z_PK INTEGER PRIMARY KEY,
  542. Z_ENT INTEGER,
  543. Z_OPT INTEGER,
  544. ZSCENEIDENTIFIER INTEGER,
  545. ZASSETATTRIBUTES INTEGER,
  546. ZCONFIDENCE FLOAT );
  547. CREATE TABLE ZSEARCHDATA ( Z_PK INTEGER PRIMARY KEY,
  548. Z_ENT INTEGER,
  549. Z_OPT INTEGER,
  550. ZVALID INTEGER,
  551. ZASSET INTEGER,
  552. Z27_ASSET INTEGER,
  553. ZDATA BLOB );
  554. CREATE TABLE ZSIDECARFILE ( Z_PK INTEGER PRIMARY KEY,
  555. Z_ENT INTEGER,
  556. Z_OPT INTEGER,
  557. ZCOMPRESSEDSIZE INTEGER,
  558. ZINDEX INTEGER,
  559. ZASSET INTEGER,
  560. Z27_ASSET INTEGER,
  561. ZCAPTUREDATE TIMESTAMP,
  562. ZMODIFICATIONDATE TIMESTAMP,
  563. ZFILENAME VARCHAR,
  564. ZORIGINALFILENAME VARCHAR,
  565. ZUNIFORMTYPEIDENTIFIER VARCHAR );
  566. CREATE TABLE ZUNMANAGEDADJUSTMENT ( Z_PK INTEGER PRIMARY KEY,
  567. Z_ENT INTEGER,
  568. Z_OPT INTEGER,
  569. ZADJUSTMENTBASEIMAGEFORMAT INTEGER,
  570. ZASSETATTRIBUTES INTEGER,
  571. ZADJUSTMENTTIMESTAMP TIMESTAMP,
  572. ZADJUSTMENTFORMATIDENTIFIER VARCHAR,
  573. ZADJUSTMENTFORMATVERSION VARCHAR,
  574. ZEDITORLOCALIZEDNAME VARCHAR,
  575. ZOTHERADJUSTMENTSFINGERPRINT VARCHAR,
  576. ZSIMILARTOORIGINALADJUSTMENTSFINGERPRINT VARCHAR,
  577. ZUUID VARCHAR );
  578. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZADJUSTEDFINGERPRINT_INDEX ON ZADDITIONALASSETATTRIBUTES (ZADJUSTEDFINGERPRINT);
  579. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZALLOWEDFORANALYSIS_INDEX ON ZADDITIONALASSETATTRIBUTES (ZALLOWEDFORANALYSIS);
  580. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZCAMERACAPTUREDEVICE_INDEX ON ZADDITIONALASSETATTRIBUTES (ZCAMERACAPTUREDEVICE);
  581. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZCREATORBUNDLEID_INDEX ON ZADDITIONALASSETATTRIBUTES (ZCREATORBUNDLEID);
  582. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZLOCATIONHASH_INDEX ON ZADDITIONALASSETATTRIBUTES (ZLOCATIONHASH);
  583. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZMASTERFINGERPRINT_INDEX ON ZADDITIONALASSETATTRIBUTES (ZMASTERFINGERPRINT);
  584. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZORIGINALASSETSUUID_INDEX ON ZADDITIONALASSETATTRIBUTES (ZORIGINALASSETSUUID);
  585. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZORIGINALHASH_INDEX ON ZADDITIONALASSETATTRIBUTES (ZORIGINALHASH);
  586. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZPUBLICGLOBALUUID_INDEX ON ZADDITIONALASSETATTRIBUTES (ZPUBLICGLOBALUUID);
  587. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZREVERSELOCATIONDATAISVALID_INDEX ON ZADDITIONALASSETATTRIBUTES (ZREVERSELOCATIONDATAISVALID);
  588. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZSHIFTEDLOCATIONISVALID_INDEX ON ZADDITIONALASSETATTRIBUTES (ZSHIFTEDLOCATIONISVALID);
  589. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZUPLOADATTEMPTS_INDEX ON ZADDITIONALASSETATTRIBUTES (ZUPLOADATTEMPTS);
  590. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZASSET_INDEX ON ZADDITIONALASSETATTRIBUTES (ZASSET);
  591. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZASSETDESCRIPTION_INDEX ON ZADDITIONALASSETATTRIBUTES (ZASSETDESCRIPTION);
  592. CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZUNMANAGEDADJUSTMENT_INDEX ON ZADDITIONALASSETATTRIBUTES (ZUNMANAGEDADJUSTMENT);
  593. CREATE INDEX Z_1KEYWORDS_Z_30KEYWORDS_INDEX ON Z_1KEYWORDS (Z_30KEYWORDS,
  594. Z_1ASSETATTRIBUTES);
  595. CREATE INDEX ZADJUSTMENT_ZASSET_INDEX ON ZADJUSTMENT (ZASSET);
  596. CREATE INDEX ZALBUMLIST_ZIDENTIFIER_INDEX ON ZALBUMLIST (ZIDENTIFIER);
  597. CREATE INDEX ZALBUMLIST_ZUUID_INDEX ON ZALBUMLIST (ZUUID);
  598. CREATE INDEX ZASSETANALYSISSTATE_ZSORTTOKEN_INDEX ON ZASSETANALYSISSTATE (ZSORTTOKEN);
  599. CREATE INDEX ZASSETANALYSISSTATE_ZWORKERTYPE_INDEX ON ZASSETANALYSISSTATE (ZWORKERTYPE);
  600. CREATE INDEX ZASSETANALYSISSTATE_ZASSET_INDEX ON ZASSETANALYSISSTATE (ZASSET);
  601. CREATE INDEX ZASSETANALYSISSTATE_ZWORKERTYPE_ZSORTTOKEN ON ZASSETANALYSISSTATE (ZWORKERTYPE,
  602. ZSORTTOKEN);
  603. CREATE INDEX ZASSETANALYSISSTATE_ZANALYSISSTATE_ZWORKERTYPE_ZASSET ON ZASSETANALYSISSTATE (ZANALYSISSTATE,
  604. ZWORKERTYPE,
  605. ZASSET);
  606. CREATE INDEX ZASSETDESCRIPTION_ZASSETATTRIBUTES_INDEX ON ZASSETDESCRIPTION (ZASSETATTRIBUTES);
  607. CREATE INDEX ZCLOUDFEEDENTRY_ZENTRYDATE_INDEX ON ZCLOUDFEEDENTRY (ZENTRYDATE);
  608. CREATE INDEX ZCLOUDFEEDENTRY_ZENTRYTYPENUMBER_INDEX ON ZCLOUDFEEDENTRY (ZENTRYTYPENUMBER);
  609. CREATE INDEX ZCLOUDFEEDENTRY_Z_ENT_INDEX ON ZCLOUDFEEDENTRY (Z_ENT);
  610. CREATE INDEX ZCLOUDFEEDENTRY_ZENTRYDATE_ZENTRYPRIORITYNUMBER_ZENTRYTYPENUMBER ON ZCLOUDFEEDENTRY (ZENTRYDATE,
  611. ZENTRYPRIORITYNUMBER,
  612. ZENTRYTYPENUMBER);
  613. CREATE INDEX ZCLOUDFEEDENTRY_Z_ENT_ZENTRYDATE ON ZCLOUDFEEDENTRY (Z_ENT,
  614. ZENTRYDATE);
  615. CREATE INDEX ZCLOUDMASTER_ZCLOUDLOCALSTATE_INDEX ON ZCLOUDMASTER (ZCLOUDLOCALSTATE);
  616. CREATE INDEX ZCLOUDMASTER_ZCLOUDMASTERGUID_INDEX ON ZCLOUDMASTER (ZCLOUDMASTERGUID);
  617. CREATE INDEX ZCLOUDMASTER_ZMEDIAMETADATA_INDEX ON ZCLOUDMASTER (ZMEDIAMETADATA);
  618. CREATE INDEX ZCLOUDMASTERMEDIAMETADATA_ZCLOUDMASTER_INDEX ON ZCLOUDMASTERMEDIAMETADATA (ZCLOUDMASTER);
  619. CREATE INDEX ZCLOUDRESOURCE_ZASSETUUID_INDEX ON ZCLOUDRESOURCE (ZASSETUUID);
  620. CREATE INDEX ZCLOUDRESOURCE_ZDATECREATED_INDEX ON ZCLOUDRESOURCE (ZDATECREATED);
  621. CREATE INDEX ZCLOUDRESOURCE_ZFINGERPRINT_INDEX ON ZCLOUDRESOURCE (ZFINGERPRINT);
  622. CREATE INDEX ZCLOUDRESOURCE_ZISAVAILABLE_INDEX ON ZCLOUDRESOURCE (ZISAVAILABLE);
  623. CREATE INDEX ZCLOUDRESOURCE_ZISLOCALLYAVAILABLE_INDEX ON ZCLOUDRESOURCE (ZISLOCALLYAVAILABLE);
  624. CREATE INDEX ZCLOUDRESOURCE_ZLASTONDEMANDDOWNLOADDATE_INDEX ON ZCLOUDRESOURCE (ZLASTONDEMANDDOWNLOADDATE);
  625. CREATE INDEX ZCLOUDRESOURCE_ZLASTPREFETCHDATE_INDEX ON ZCLOUDRESOURCE (ZLASTPREFETCHDATE);
  626. CREATE INDEX ZCLOUDRESOURCE_ZPREFETCHCOUNT_INDEX ON ZCLOUDRESOURCE (ZPREFETCHCOUNT);
  627. CREATE INDEX ZCLOUDRESOURCE_ZTYPE_INDEX ON ZCLOUDRESOURCE (ZTYPE);
  628. CREATE INDEX ZCLOUDRESOURCE_ZASSET_INDEX ON ZCLOUDRESOURCE (ZASSET);
  629. CREATE INDEX ZCLOUDRESOURCE_ZCLOUDMASTER_INDEX ON ZCLOUDRESOURCE (ZCLOUDMASTER);
  630. CREATE INDEX ZCLOUDRESOURCE_ZTYPE_ZISLOCALLYAVAILABLE_ZDATECREATED ON ZCLOUDRESOURCE (ZTYPE,
  631. ZISLOCALLYAVAILABLE,
  632. ZDATECREATED);
  633. CREATE INDEX ZCLOUDSHAREDALBUMINVITATIONRECORD_ZALBUM_INDEX ON ZCLOUDSHAREDALBUMINVITATIONRECORD (ZALBUM);
  634. CREATE INDEX ZCLOUDSHAREDCOMMENT_ZCLOUDGUID_INDEX ON ZCLOUDSHAREDCOMMENT (ZCLOUDGUID);
  635. CREATE INDEX ZCLOUDSHAREDCOMMENT_ZCLOUDFEEDCOMMENTENTRY_INDEX ON ZCLOUDSHAREDCOMMENT (ZCLOUDFEEDCOMMENTENTRY);
  636. CREATE INDEX ZCLOUDSHAREDCOMMENT_ZCLOUDFEEDLIKECOMMENTENTRY_INDEX ON ZCLOUDSHAREDCOMMENT (ZCLOUDFEEDLIKECOMMENTENTRY);
  637. CREATE INDEX ZCLOUDSHAREDCOMMENT_ZCOMMENTEDASSET_INDEX ON ZCLOUDSHAREDCOMMENT (ZCOMMENTEDASSET);
  638. CREATE INDEX ZCLOUDSHAREDCOMMENT_ZLIKEDASSET_INDEX ON ZCLOUDSHAREDCOMMENT (ZLIKEDASSET);
  639. CREATE INDEX ZDEFERREDREBUILDFACE_ZASSETCLOUDGUID_INDEX ON ZDEFERREDREBUILDFACE (ZASSETCLOUDGUID);
  640. CREATE INDEX ZDETECTEDFACE_ZCLOUDLOCALSTATE_INDEX ON ZDETECTEDFACE (ZCLOUDLOCALSTATE);
  641. CREATE INDEX ZDETECTEDFACE_ZCLUSTERSEQUENCENUMBER_INDEX ON ZDETECTEDFACE (ZCLUSTERSEQUENCENUMBER);
  642. CREATE INDEX ZDETECTEDFACE_ZUUID_INDEX ON ZDETECTEDFACE (ZUUID);
  643. CREATE INDEX ZDETECTEDFACE_ZASSET_INDEX ON ZDETECTEDFACE (ZASSET);
  644. CREATE INDEX ZDETECTEDFACE_ZFACECROP_INDEX ON ZDETECTEDFACE (ZFACECROP);
  645. CREATE INDEX ZDETECTEDFACE_ZFACEGROUP_INDEX ON ZDETECTEDFACE (ZFACEGROUP);
  646. CREATE INDEX ZDETECTEDFACE_ZFACEGROUPBEINGKEYFACE_INDEX ON ZDETECTEDFACE (ZFACEGROUPBEINGKEYFACE);
  647. CREATE INDEX ZDETECTEDFACE_ZFACEPRINT_INDEX ON ZDETECTEDFACE (ZFACEPRINT);
  648. CREATE INDEX ZDETECTEDFACE_ZPERSON_INDEX ON ZDETECTEDFACE (ZPERSON);
  649. CREATE INDEX ZDETECTEDFACE_ZPERSONBEINGKEYFACE_INDEX ON ZDETECTEDFACE (ZPERSONBEINGKEYFACE);
  650. CREATE INDEX Z_15REJECTEDPERSONS_Z_36REJECTEDPERSONS_INDEX ON Z_15REJECTEDPERSONS (Z_36REJECTEDPERSONS,
  651. Z_15REJECTEDFACES);
  652. CREATE INDEX Z_15REJECTEDPERSONSNEEDINGFACECROPS_Z_36REJECTEDPERSONSNEEDINGFACECROPS_INDEX ON Z_15REJECTEDPERSONSNEEDINGFACECROPS (Z_36REJECTEDPERSONSNEEDINGFACECROPS,
  653. Z_15REJECTEDFACESNEEDINGFACECROPS);
  654. CREATE INDEX ZDETECTEDFACEGROUP_ZPERSONBUILDERSTATE_INDEX ON ZDETECTEDFACEGROUP (ZPERSONBUILDERSTATE);
  655. CREATE INDEX ZDETECTEDFACEGROUP_ZASSOCIATEDPERSON_INDEX ON ZDETECTEDFACEGROUP (ZASSOCIATEDPERSON);
  656. CREATE INDEX ZDETECTEDFACEGROUP_ZKEYFACE_INDEX ON ZDETECTEDFACEGROUP (ZKEYFACE);
  657. CREATE INDEX ZDETECTEDFACEPRINT_ZFACE_INDEX ON ZDETECTEDFACEPRINT (ZFACE);
  658. CREATE INDEX ZFACECROP_ZCLOUDLOCALSTATE_INDEX ON ZFACECROP (ZCLOUDLOCALSTATE);
  659. CREATE INDEX ZFACECROP_ZUUID_INDEX ON ZFACECROP (ZUUID);
  660. CREATE INDEX ZFACECROP_ZASSET_INDEX ON ZFACECROP (ZASSET);
  661. CREATE INDEX ZFACECROP_ZFACE_INDEX ON ZFACECROP (ZFACE);
  662. CREATE INDEX ZFACECROP_ZPERSON_INDEX ON ZFACECROP (ZPERSON);
  663. CREATE INDEX ZGENERICALBUM_ZCLOUDGUID_INDEX ON ZGENERICALBUM (ZCLOUDGUID);
  664. CREATE INDEX ZGENERICALBUM_ZCLOUDLOCALSTATE_INDEX ON ZGENERICALBUM (ZCLOUDLOCALSTATE);
  665. CREATE INDEX ZGENERICALBUM_ZKIND_INDEX ON ZGENERICALBUM (ZKIND);
  666. CREATE INDEX ZGENERICALBUM_ZSYNCEVENTORDERKEY_INDEX ON ZGENERICALBUM (ZSYNCEVENTORDERKEY);
  667. CREATE INDEX ZGENERICALBUM_ZUUID_INDEX ON ZGENERICALBUM (ZUUID);
  668. CREATE INDEX ZGENERICALBUM_ZCUSTOMKEYASSET_INDEX ON ZGENERICALBUM (ZCUSTOMKEYASSET);
  669. CREATE INDEX ZGENERICALBUM_ZKEYASSET_INDEX ON ZGENERICALBUM (ZKEYASSET);
  670. CREATE INDEX ZGENERICALBUM_ZPARENTFOLDER_INDEX ON ZGENERICALBUM (ZPARENTFOLDER);
  671. CREATE INDEX ZGENERICALBUM_ZSECONDARYKEYASSET_INDEX ON ZGENERICALBUM (ZSECONDARYKEYASSET);
  672. CREATE INDEX ZGENERICALBUM_ZTERTIARYKEYASSET_INDEX ON ZGENERICALBUM (ZTERTIARYKEYASSET);
  673. CREATE INDEX ZGENERICALBUM_ZWALLPAPERALBUMTYPE_INDEX ON ZGENERICALBUM (ZWALLPAPERALBUMTYPE);
  674. CREATE INDEX Z_19ALBUMLISTS_Z_3ALBUMLISTS_INDEX ON Z_19ALBUMLISTS (Z_3ALBUMLISTS,
  675. Z_19ALBUMS);
  676. CREATE INDEX ZGENERICALBUM_Z_ENT_INDEX ON ZGENERICALBUM (Z_ENT);
  677. CREATE INDEX Z_20ASSETS_Z_27ASSETS_INDEX ON Z_20ASSETS (Z_27ASSETS,
  678. Z_20ALBUMS);
  679. CREATE INDEX ZGENERICASSET_ZADDEDDATE_INDEX ON ZGENERICASSET (ZADDEDDATE);
  680. CREATE INDEX ZGENERICASSET_ZAVALANCHEPICKTYPE_INDEX ON ZGENERICASSET (ZAVALANCHEPICKTYPE);
  681. CREATE INDEX ZGENERICASSET_ZAVALANCHEUUID_INDEX ON ZGENERICASSET (ZAVALANCHEUUID);
  682. CREATE INDEX ZGENERICASSET_ZCLOUDASSETGUID_INDEX ON ZGENERICASSET (ZCLOUDASSETGUID);
  683. CREATE INDEX ZGENERICASSET_ZCLOUDLOCALSTATE_INDEX ON ZGENERICASSET (ZCLOUDLOCALSTATE);
  684. CREATE INDEX ZGENERICASSET_ZCLOUDPLACEHOLDERKIND_INDEX ON ZGENERICASSET (ZCLOUDPLACEHOLDERKIND);
  685. CREATE INDEX ZGENERICASSET_ZCOMPLETE_INDEX ON ZGENERICASSET (ZCOMPLETE);
  686. CREATE INDEX ZGENERICASSET_ZCUSTOMRENDEREDVALUE_INDEX ON ZGENERICASSET (ZCUSTOMRENDEREDVALUE);
  687. CREATE INDEX ZGENERICASSET_ZDATECREATED_INDEX ON ZGENERICASSET (ZDATECREATED);
  688. CREATE INDEX ZGENERICASSET_ZFAVORITE_INDEX ON ZGENERICASSET (ZFAVORITE);
  689. CREATE INDEX ZGENERICASSET_ZKIND_INDEX ON ZGENERICASSET (ZKIND);
  690. CREATE INDEX ZGENERICASSET_ZKINDSUBTYPE_INDEX ON ZGENERICASSET (ZKINDSUBTYPE);
  691. CREATE INDEX ZGENERICASSET_ZLASTSHAREDDATE_INDEX ON ZGENERICASSET (ZLASTSHAREDDATE);
  692. CREATE INDEX ZGENERICASSET_ZMEDIAGROUPUUID_INDEX ON ZGENERICASSET (ZMEDIAGROUPUUID);
  693. CREATE INDEX ZGENERICASSET_ZSAVEDASSETTYPE_INDEX ON ZGENERICASSET (ZSAVEDASSETTYPE);
  694. CREATE INDEX ZGENERICASSET_ZSORTTOKEN_INDEX ON ZGENERICASSET (ZSORTTOKEN);
  695. CREATE INDEX ZGENERICASSET_ZTHUMBNAILINDEX_INDEX ON ZGENERICASSET (ZTHUMBNAILINDEX);
  696. CREATE INDEX ZGENERICASSET_ZUUID_INDEX ON ZGENERICASSET (ZUUID);
  697. CREATE INDEX ZGENERICASSET_ZVISIBILITYSTATE_INDEX ON ZGENERICASSET (ZVISIBILITYSTATE);
  698. CREATE INDEX ZGENERICASSET_ZADDITIONALATTRIBUTES_INDEX ON ZGENERICASSET (ZADDITIONALATTRIBUTES);
  699. CREATE INDEX ZGENERICASSET_ZCLOUDFEEDASSETSENTRY_INDEX ON ZGENERICASSET (ZCLOUDFEEDASSETSENTRY);
  700. CREATE INDEX ZGENERICASSET_ZMASTER_INDEX ON ZGENERICASSET (ZMASTER);
  701. CREATE INDEX ZGENERICASSET_ZMOMENT_INDEX ON ZGENERICASSET (ZMOMENT);
  702. CREATE INDEX ZGENERICASSET_ZSEARCHDATA_INDEX ON ZGENERICASSET (ZSEARCHDATA);
  703. CREATE INDEX Z_27MEMORIESBEINGREPRESENTATIVEASSETS_Z_32MEMORIESBEINGREPRESENTATIVEASSETS_INDEX ON Z_27MEMORIESBEINGREPRESENTATIVEASSETS (Z_32MEMORIESBEINGREPRESENTATIVEASSETS,
  704. Z_27REPRESENTATIVEASSETS);
  705. CREATE INDEX Z_27MEMORIESBEINGCURATEDASSETS_Z_32MEMORIESBEINGCURATEDASSETS_INDEX ON Z_27MEMORIESBEINGCURATEDASSETS (Z_32MEMORIESBEINGCURATEDASSETS,
  706. Z_27CURATEDASSETS);
  707. CREATE INDEX Z_27MEMORIESBEINGMOVIECURATEDASSETS_Z_32MEMORIESBEINGMOVIECURATEDASSETS_INDEX ON Z_27MEMORIESBEINGMOVIECURATEDASSETS (Z_32MEMORIESBEINGMOVIECURATEDASSETS,
  708. Z_27MOVIECURATEDASSETS);
  709. CREATE INDEX ZGENERICASSET_Z_ENT_INDEX ON ZGENERICASSET (Z_ENT);
  710. CREATE INDEX ZGENERICASSET_ZKIND_Z_ENT ON ZGENERICASSET (ZKIND,
  711. Z_ENT);
  712. CREATE INDEX ZGENERICASSET_ZCLOUDASSETGUID_ZSAVEDASSETTYPE ON ZGENERICASSET (ZCLOUDASSETGUID,
  713. ZSAVEDASSETTYPE);
  714. CREATE INDEX ZGENERICASSET_ZDIRECTORY_ZFILENAME ON ZGENERICASSET (ZDIRECTORY,
  715. ZFILENAME);
  716. CREATE INDEX ZGENERICASSET_ZCLOUDLOCALSTATE ON ZGENERICASSET (ZCLOUDLOCALSTATE);
  717. CREATE INDEX ZGENERICASSET_ZHIDDEN_ZVISIBILITYSTATE ON ZGENERICASSET (ZHIDDEN,
  718. ZVISIBILITYSTATE);
  719. CREATE INDEX ZGENERICASSET_ZTRASHEDSTATE_ZTRASHEDDATE ON ZGENERICASSET (ZTRASHEDSTATE,
  720. ZTRASHEDDATE);
  721. CREATE INDEX ZGENERICASSET_ZADDEDDATE_ZSORTTOKEN ON ZGENERICASSET (ZADDEDDATE,
  722. ZSORTTOKEN);
  723. CREATE INDEX ZGENERICASSET_ZADDEDDATE_ZSORTTOKEN_ZKIND_ZSAVEDASSETTYPE_ZVISIBILITYSTATE_ZTRASHEDSTATE_ZHIDDEN_ZAVALANCHEPICKTYPE_ZCOMPLETE_Z_ENT ON ZGENERICASSET (ZADDEDDATE,
  724. ZSORTTOKEN,
  725. ZKIND,
  726. ZSAVEDASSETTYPE,
  727. ZVISIBILITYSTATE,
  728. ZTRASHEDSTATE,
  729. ZHIDDEN,
  730. ZAVALANCHEPICKTYPE,
  731. ZCOMPLETE,
  732. Z_ENT);
  733. CREATE INDEX ZGENERICASSET_ZTRASHEDSTATE_ZCLOUDLOCALSTATE_ZSAVEDASSETTYPE ON ZGENERICASSET (ZTRASHEDSTATE,
  734. ZCLOUDLOCALSTATE,
  735. ZSAVEDASSETTYPE);
  736. CREATE INDEX ZGENERICASSET_ZKIND_ZTRASHEDSTATE_ZCLOUDLOCALSTATE_ZSAVEDASSETTYPE ON ZGENERICASSET (ZKIND,
  737. ZTRASHEDSTATE,
  738. ZCLOUDLOCALSTATE,
  739. ZSAVEDASSETTYPE);
  740. CREATE INDEX ZKEYWORD_ZTITLE_INDEX ON ZKEYWORD (ZTITLE);
  741. CREATE INDEX ZLEGACYFACE_ZALBUMUUID_INDEX ON ZLEGACYFACE (ZALBUMUUID);
  742. CREATE INDEX ZLEGACYFACE_ZIDENTIFIER_INDEX ON ZLEGACYFACE (ZIDENTIFIER);
  743. CREATE INDEX ZLEGACYFACE_ZASSET_INDEX ON ZLEGACYFACE (ZASSET);
  744. CREATE INDEX ZMEMORY_ZCLOUDLOCALSTATE_INDEX ON ZMEMORY (ZCLOUDLOCALSTATE);
  745. CREATE INDEX ZMEMORY_ZLASTMOVIEPLAYEDDATE_INDEX ON ZMEMORY (ZLASTMOVIEPLAYEDDATE);
  746. CREATE INDEX ZMEMORY_ZLASTVIEWEDDATE_INDEX ON ZMEMORY (ZLASTVIEWEDDATE);
  747. CREATE INDEX ZMEMORY_ZPENDING_INDEX ON ZMEMORY (ZPENDING);
  748. CREATE INDEX ZMEMORY_ZUUID_INDEX ON ZMEMORY (ZUUID);
  749. CREATE INDEX ZMEMORY_ZKEYASSET_INDEX ON ZMEMORY (ZKEYASSET);
  750. CREATE INDEX ZMOMENT_ZENDDATE_INDEX ON ZMOMENT (ZENDDATE);
  751. CREATE INDEX ZMOMENT_ZREPRESENTATIVEDATE_INDEX ON ZMOMENT (ZREPRESENTATIVEDATE);
  752. CREATE INDEX ZMOMENT_ZREVERSELOCATIONDATAISVALID_INDEX ON ZMOMENT (ZREVERSELOCATIONDATAISVALID);
  753. CREATE INDEX ZMOMENT_ZSTARTDATE_INDEX ON ZMOMENT (ZSTARTDATE);
  754. CREATE INDEX ZMOMENT_ZTRASHEDSTATE_INDEX ON ZMOMENT (ZTRASHEDSTATE);
  755. CREATE INDEX ZMOMENT_ZUUID_INDEX ON ZMOMENT (ZUUID);
  756. CREATE INDEX ZMOMENT_ZMEGAMOMENTLIST_INDEX ON ZMOMENT (ZMEGAMOMENTLIST);
  757. CREATE INDEX ZMOMENT_ZMOMENTLIBRARY_INDEX ON ZMOMENT (ZMOMENTLIBRARY);
  758. CREATE INDEX ZMOMENT_ZYEARMOMENTLIST_INDEX ON ZMOMENT (ZYEARMOMENTLIST);
  759. CREATE INDEX ZMOMENT_ZSTARTDATE_ZENDDATE ON ZMOMENT (ZSTARTDATE,
  760. ZENDDATE);
  761. CREATE INDEX ZMOMENTLIST_ZGRANULARITYLEVEL_INDEX ON ZMOMENTLIST (ZGRANULARITYLEVEL);
  762. CREATE INDEX ZMOMENTLIST_ZREPRESENTATIVEDATE_INDEX ON ZMOMENTLIST (ZREPRESENTATIVEDATE);
  763. CREATE INDEX ZMOMENTLIST_ZREVERSELOCATIONDATAISVALID_INDEX ON ZMOMENTLIST (ZREVERSELOCATIONDATAISVALID);
  764. CREATE INDEX ZMOMENTLIST_ZSORTINDEX_INDEX ON ZMOMENTLIST (ZSORTINDEX);
  765. CREATE INDEX ZMOMENTLIST_ZTRASHEDSTATE_INDEX ON ZMOMENTLIST (ZTRASHEDSTATE);
  766. CREATE INDEX ZMOMENTLIST_ZUUID_INDEX ON ZMOMENTLIST (ZUUID);
  767. CREATE INDEX ZMOMENTLIST_ZGRANULARITYLEVEL_ZSORTINDEX ON ZMOMENTLIST (ZGRANULARITYLEVEL,
  768. ZSORTINDEX);
  769. CREATE INDEX ZMOMENTLIST_ZREVERSELOCATIONDATAISVALID_ZGRANULARITYLEVEL ON ZMOMENTLIST (ZREVERSELOCATIONDATAISVALID,
  770. ZGRANULARITYLEVEL);
  771. CREATE INDEX ZPERSON_ZCLOUDLOCALSTATE_INDEX ON ZPERSON (ZCLOUDLOCALSTATE);
  772. CREATE INDEX ZPERSON_ZFACECOUNT_INDEX ON ZPERSON (ZFACECOUNT);
  773. CREATE INDEX ZPERSON_ZMANUALORDER_INDEX ON ZPERSON (ZMANUALORDER);
  774. CREATE INDEX ZPERSON_ZPERSONUUID_INDEX ON ZPERSON (ZPERSONUUID);
  775. CREATE INDEX ZPERSON_ZPERSONURI_INDEX ON ZPERSON (ZPERSONURI);
  776. CREATE INDEX ZPERSON_ZTYPE_INDEX ON ZPERSON (ZTYPE);
  777. CREATE INDEX ZPERSON_ZASSOCIATEDFACEGROUP_INDEX ON ZPERSON (ZASSOCIATEDFACEGROUP);
  778. CREATE INDEX ZPERSON_ZKEYFACE_INDEX ON ZPERSON (ZKEYFACE);
  779. CREATE INDEX ZPERSON_ZVERIFIED_ZFACECOUNT_ZTYPE ON ZPERSON (ZVERIFIED,
  780. ZFACECOUNT,
  781. ZTYPE);
  782. CREATE INDEX ZPERSONREFERENCE_ZASSETATTRIBUTES_INDEX ON ZPERSONREFERENCE (ZASSETATTRIBUTES);
  783. CREATE INDEX ZPERSONREFERENCE_ZPERSON_INDEX ON ZPERSONREFERENCE (ZPERSON);
  784. CREATE INDEX ZSCENECLASSIFICATION_ZASSETATTRIBUTES_INDEX ON ZSCENECLASSIFICATION (ZASSETATTRIBUTES);
  785. CREATE INDEX ZSEARCHDATA_ZVALID_INDEX ON ZSEARCHDATA (ZVALID);
  786. CREATE INDEX ZSEARCHDATA_ZASSET_INDEX ON ZSEARCHDATA (ZASSET);
  787. CREATE INDEX ZSIDECARFILE_ZASSET_INDEX ON ZSIDECARFILE (ZASSET);
  788. CREATE INDEX ZUNMANAGEDADJUSTMENT_ZASSETATTRIBUTES_INDEX ON ZUNMANAGEDADJUSTMENT (ZASSETATTRIBUTES);
  789. CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_INSERT_INCREMENT AFTER INSERT ON ZGENERICASSET FOR EACH ROW WHEN NEW.ZTRASHEDSTATE == 0 AND NEW.ZVISIBILITYSTATE == 0 AND NEW.ZHIDDEN == 0 BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = IFNULL(ZASSETVISIBLE,0) + 1 WHERE NEW.Z_PK = ZASSET; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
  790. Z_ENT,
  791. Z_PK,
  792. 'ZASSETVISIBLE',
  793. ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE ZASSET = NEW.Z_PK; END;
  794. CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_UPDATE_INCREMENT AFTER UPDATE OF ZTRASHEDSTATE,
  795. ZVISIBILITYSTATE,
  796. ZHIDDEN ON ZGENERICASSET FOR EACH ROW WHEN (NEW.ZTRASHEDSTATE == 0 AND NEW.ZVISIBILITYSTATE == 0 AND NEW.ZHIDDEN == 0) AND (NEW.ZTRASHEDSTATE != OLD.ZTRASHEDSTATE OR NEW.ZVISIBILITYSTATE != OLD.ZVISIBILITYSTATE OR NEW.ZHIDDEN != OLD.ZHIDDEN) BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = IFNULL(ZASSETVISIBLE,0) + 1 WHERE NEW.Z_PK = ZASSET; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
  797. Z_ENT,
  798. Z_PK,
  799. 'ZASSETVISIBLE',
  800. ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE ZASSET = NEW.Z_PK; END;
  801. CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_UPDATE_DECREMENT AFTER UPDATE OF ZTRASHEDSTATE,
  802. ZVISIBILITYSTATE,
  803. ZHIDDEN ON ZGENERICASSET FOR EACH ROW WHEN (OLD.ZTRASHEDSTATE == 0 AND OLD.ZVISIBILITYSTATE == 0 AND OLD.ZHIDDEN == 0) AND (NEW.ZTRASHEDSTATE != OLD.ZTRASHEDSTATE OR NEW.ZVISIBILITYSTATE != OLD.ZVISIBILITYSTATE OR NEW.ZHIDDEN != OLD.ZHIDDEN) BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = MAX(0,IFNULL(ZASSETVISIBLE,0) - 1) WHERE OLD.Z_PK = ZASSET; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
  804. Z_ENT,
  805. Z_PK,
  806. 'ZASSETVISIBLE',
  807. ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE ZASSET = NEW.Z_PK; END;
  808. CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_DELETE_DECREMENT AFTER DELETE ON ZGENERICASSET FOR EACH ROW WHEN OLD.ZTRASHEDSTATE == 0 AND OLD.ZVISIBILITYSTATE == 0 AND OLD.ZHIDDEN == 0 BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = MAX(0,IFNULL(ZASSETVISIBLE,0) - 1) WHERE OLD.Z_PK = ZASSET; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
  809. Z_ENT,
  810. Z_PK,
  811. 'ZASSETVISIBLE',
  812. ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE ZASSET = OLD.Z_PK; END;
  813. CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_ZDETECTEDFACE_INSERT_INCREMENT AFTER INSERT ON ZDETECTEDFACE FOR EACH ROW BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = (SELECT COUNT(Z_PK) FROM ZGENERICASSET WHERE (Z_PK = NEW.ZASSET) AND (ZTRASHEDSTATE == 0 AND ZVISIBILITYSTATE == 0 AND ZHIDDEN == 0)) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
  814. Z_ENT,
  815. Z_PK,
  816. 'ZASSETVISIBLE',
  817. ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE Z_PK = NEW.Z_PK; END;
  818. CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_ZASSET_UPDATE_TO_NULL AFTER UPDATE OF ZASSET ON ZDETECTEDFACE WHEN (NEW.ZASSET IS NULL AND OLD.ZASSET IS NOT NULL) BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = 0 WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
  819. Z_ENT,
  820. Z_PK,
  821. 'ZASSETVISIBLE',
  822. ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE Z_PK = NEW.Z_PK; END;
  823. CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_ZASSET_UPDATE_INCREMENT AFTER UPDATE OF ZASSET ON ZDETECTEDFACE WHEN ((NEW.ZASSET IS NOT NULL AND OLD.ZASSET IS NULL) OR (NEW.ZASSET != OLD.ZASSET)) BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = (SELECT COUNT(Z_PK) FROM ZGENERICASSET WHERE Z_PK = NEW.ZASSET AND (ZTRASHEDSTATE == 0 AND ZVISIBILITYSTATE == 0 AND ZHIDDEN == 0)) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
  824. Z_ENT,
  825. Z_PK,
  826. 'ZASSETVISIBLE',
  827. ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE Z_PK = NEW.Z_PK; END;
  828. CREATE VIRTUAL TABLE Z_RT_GenericAsset_boundedByRect USING RTREE (Z_PK INTEGER PRIMARY KEY,
  829. ZLATITUDE_MIN FLOAT,
  830. ZLATITUDE_MAX FLOAT,
  831. ZLONGITUDE_MIN FLOAT,
  832. ZLONGITUDE_MAX FLOAT);
  833. CREATE TABLE IF NOT EXISTS "Z_RT_GenericAsset_boundedByRect_node"(nodeno INTEGER PRIMARY KEY,
  834. data BLOB);
  835. CREATE TABLE IF NOT EXISTS "Z_RT_GenericAsset_boundedByRect_rowid"(rowid INTEGER PRIMARY KEY,
  836. nodeno INTEGER);
  837. CREATE TABLE IF NOT EXISTS "Z_RT_GenericAsset_boundedByRect_parent"(nodeno INTEGER PRIMARY KEY,
  838. parentnode INTEGER);
  839. CREATE TRIGGER Z_RT_GenericAsset_boundedByRect_INSERT AFTER INSERT ON ZGENERICASSET FOR EACH ROW BEGIN INSERT OR REPLACE INTO Z_RT_GenericAsset_boundedByRect (Z_PK,
  840. ZLATITUDE_MIN,
  841. ZLATITUDE_MAX,
  842. ZLONGITUDE_MIN,
  843. ZLONGITUDE_MAX) VALUES (NEW.Z_PK,
  844. NEW.ZLATITUDE ,NEW.ZLATITUDE,
  845. NEW.ZLONGITUDE,
  846. NEW.ZLONGITUDE) ; END;
  847. CREATE TRIGGER Z_RT_GenericAsset_boundedByRect_UPDATE AFTER UPDATE ON ZGENERICASSET FOR EACH ROW BEGIN DELETE FROM Z_RT_GenericAsset_boundedByRect WHERE Z_PK = NEW.Z_PK ; INSERT INTO Z_RT_GenericAsset_boundedByRect (Z_PK,
  848. ZLATITUDE_MIN,
  849. ZLATITUDE_MAX,
  850. ZLONGITUDE_MIN,
  851. ZLONGITUDE_MAX) VALUES (NEW.Z_PK,
  852. NEW.ZLATITUDE ,NEW.ZLATITUDE,
  853. NEW.ZLONGITUDE,
  854. NEW.ZLONGITUDE) ; END;
  855. CREATE TRIGGER Z_RT_GenericAsset_boundedByRect_DELETE AFTER DELETE ON ZGENERICASSET FOR EACH ROW BEGIN DELETE FROM Z_RT_GenericAsset_boundedByRect WHERE Z_PK = OLD.Z_PK ; END;
  856. CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_INSERT_INCREMENT AFTER INSERT ON ZDETECTEDFACE FOR EACH ROW WHEN NEW.ZHIDDEN == 0 AND NEW.ZASSETVISIBLE == 1 BEGIN UPDATE ZPERSON SET ZFACECOUNT = IFNULL(ZFACECOUNT,0) + 1 WHERE NEW.ZPERSON = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
  857. Z_ENT,
  858. Z_PK,
  859. 'ZFACECOUNT',
  860. ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.ZPERSON; END;
  861. CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_UPDATE_INCREMENT AFTER UPDATE OF ZHIDDEN,
  862. ZASSETVISIBLE ON ZDETECTEDFACE FOR EACH ROW WHEN (NEW.ZHIDDEN == 0 AND NEW.ZASSETVISIBLE == 1) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZASSETVISIBLE != OLD.ZASSETVISIBLE) AND (NEW.ZPERSON == OLD.ZPERSON) BEGIN UPDATE ZPERSON SET ZFACECOUNT = IFNULL(ZFACECOUNT,0) + 1 WHERE NEW.ZPERSON = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
  863. Z_ENT,
  864. Z_PK,
  865. 'ZFACECOUNT',
  866. ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.ZPERSON; END;
  867. CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_UPDATE_DECREMENT AFTER UPDATE OF ZHIDDEN,
  868. ZASSETVISIBLE ON ZDETECTEDFACE FOR EACH ROW WHEN (OLD.ZHIDDEN == 0 AND OLD.ZASSETVISIBLE == 1) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZASSETVISIBLE != OLD.ZASSETVISIBLE) AND (OLD.ZPERSON == NEW.ZPERSON) BEGIN UPDATE ZPERSON SET ZFACECOUNT = MAX(0,IFNULL(ZFACECOUNT,0) - 1) WHERE OLD.ZPERSON = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
  869. Z_ENT,
  870. Z_PK,
  871. 'ZFACECOUNT',
  872. ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.ZPERSON; END;
  873. CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_DELETE_DECREMENT AFTER DELETE ON ZDETECTEDFACE FOR EACH ROW WHEN OLD.ZHIDDEN == 0 AND OLD.ZASSETVISIBLE == 1 BEGIN UPDATE ZPERSON SET ZFACECOUNT = MAX(0,IFNULL(ZFACECOUNT,0) - 1) WHERE OLD.ZPERSON = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
  874. Z_ENT,
  875. Z_PK,
  876. 'ZFACECOUNT',
  877. ZFACECOUNT) FROM ZPERSON WHERE Z_PK = OLD.ZPERSON; END;
  878. CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_ZPERSON_INSERT_INCREMENT AFTER INSERT ON ZPERSON FOR EACH ROW BEGIN UPDATE ZPERSON SET ZFACECOUNT = (SELECT COUNT(Z_PK) FROM ZDETECTEDFACE WHERE (ZPERSON = NEW.Z_PK) AND (ZHIDDEN == 0 AND ZASSETVISIBLE == 1)) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
  879. Z_ENT,
  880. Z_PK,
  881. 'ZFACECOUNT',
  882. ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.Z_PK; END;
  883. CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_ZPERSON_UPDATE_INCREMENT AFTER UPDATE OF ZPERSON ON ZDETECTEDFACE WHEN (NEW.ZHIDDEN == 0 AND NEW.ZASSETVISIBLE == 1) AND ((NEW.ZPERSON IS NOT NULL AND OLD.ZPERSON IS NULL) OR (NEW.ZPERSON != OLD.ZPERSON)) BEGIN UPDATE ZPERSON SET ZFACECOUNT = IFNULL(ZFACECOUNT,0) + 1 WHERE Z_PK = NEW.ZPERSON; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
  884. Z_ENT,
  885. Z_PK,
  886. 'ZFACECOUNT',
  887. ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.ZPERSON; END;
  888. CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_ZPERSON_UPDATE_DECREMENT AFTER UPDATE OF ZPERSON ON ZDETECTEDFACE WHEN (OLD.ZHIDDEN == 0 AND OLD.ZASSETVISIBLE == 1) AND ((OLD.ZPERSON IS NOT NULL AND NEW.ZPERSON IS NULL) OR (NEW.ZPERSON != OLD.ZPERSON)) BEGIN UPDATE ZPERSON SET ZFACECOUNT = MAX(0,IFNULL(ZFACECOUNT,0) - 1) WHERE Z_PK = OLD.ZPERSON; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
  889. Z_ENT,
  890. Z_PK,
  891. 'ZFACECOUNT',
  892. ZFACECOUNT) FROM ZPERSON WHERE Z_PK = OLD.ZPERSON; END;
  893. CREATE TABLE Z_PRIMARYKEY (Z_ENT INTEGER PRIMARY KEY,
  894. Z_NAME VARCHAR,
  895. Z_SUPER INTEGER,
  896. Z_MAX INTEGER);
  897. CREATE TABLE Z_METADATA (Z_VERSION INTEGER PRIMARY KEY,
  898. Z_UUID VARCHAR(255),
  899. Z_PLIST BLOB);
  900. CREATE TABLE Z_MODELCACHE (Z_CONTENT BLOB);
  901. CREATE INDEX RADAR_10322662_INDEX ON Z_20ASSETS (Z_20ALBUMS,
  902. Z_27ASSETS,
  903. Z_FOK_27ASSETS);
  904. CREATE INDEX RADAR_16788878_INDEX ON ZMOMENT (ZMOMENTLIBRARY,
  905. Z_FOK_MOMENTLIBRARY);
  906. CREATE INDEX RADAR_16835859_INDEX ON ZGENERICASSET (ZMOMENT,
  907. Z_FOK_MOMENT);
  908. CREATE INDEX RADAR_22158684_INDEX ON Z_20ASSETS (Z_20ALBUMS,
  909. Z_FOK_27ASSETS,
  910. Z_27ASSETS);