Skip to content

macOS 14.6 Photos Schema

Rhet Turnbull edited this page Aug 4, 2024 · 1 revision

The schema changed slightly from 14.5 to 14.6

CREATE TABLE ZADDITIONALASSETATTRIBUTES ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZALLOWEDFORANALYSIS INTEGER, ZCAMERACAPTUREDEVICE INTEGER, ZCLOUDAVALANCHEPICKTYPE INTEGER, ZCLOUDKINDSUBTYPE INTEGER, ZCLOUDRECOVERYSTATE INTEGER, ZCLOUDSTATERECOVERYATTEMPTSCOUNT INTEGER, ZDATECREATEDSOURCE INTEGER, ZDEFERREDPROCESSINGCANDIDATEOPTIONS INTEGER, ZDESTINATIONASSETCOPYSTATE INTEGER, ZDUPLICATEDETECTORPERCEPTUALPROCESSINGSTATE INTEGER, ZEMBEDDEDTHUMBNAILHEIGHT INTEGER, ZEMBEDDEDTHUMBNAILLENGTH INTEGER, ZEMBEDDEDTHUMBNAILOFFSET INTEGER, ZEMBEDDEDTHUMBNAILWIDTH INTEGER, ZFACEANALYSISVERSION INTEGER, ZIMPORTEDBY INTEGER, ZINFERREDTIMEZONEOFFSET INTEGER, ZLOCATIONHASH INTEGER, ZORIGINALFILESIZE INTEGER, ZORIGINALHEIGHT INTEGER, ZORIGINALORIENTATION INTEGER, ZORIGINALRESOURCECHOICE INTEGER, ZORIGINALWIDTH INTEGER, ZPENDINGPLAYCOUNT INTEGER, ZPENDINGSHARECOUNT INTEGER, ZPENDINGVIEWCOUNT INTEGER, ZPLAYCOUNT INTEGER, ZPTPTRASHEDSTATE INTEGER, ZREVERSELOCATIONDATAISVALID INTEGER, ZSCENEANALYSISISFROMPREVIEW INTEGER, ZSCENEANALYSISVERSION INTEGER, ZSHARECOUNT INTEGER, ZSHARETYPE INTEGER, ZSHIFTEDLOCATIONISVALID INTEGER, ZSYNDICATIONHISTORY INTEGER, ZTIMEZONEOFFSET INTEGER, ZUPLOADATTEMPTS INTEGER, ZVARIATIONSUGGESTIONSTATES INTEGER, ZVIDEOCPDISPLAYTIMESCALE INTEGER, ZVIDEOCPDISPLAYVALUE INTEGER, ZVIDEOCPDURATIONTIMESCALE INTEGER, ZVIEWCOUNT INTEGER, ZASSET INTEGER, ZASSETDESCRIPTION INTEGER, ZEDITEDIPTCATTRIBUTES INTEGER, ZMEDIAMETADATA INTEGER, ZSCENEPRINT INTEGER, ZUNMANAGEDADJUSTMENT INTEGER, ZALTERNATEIMPORTIMAGEDATE TIMESTAMP, ZGPSHORIZONTALACCURACY FLOAT, ZLASTUPLOADATTEMPTDATE TIMESTAMP, ZLASTVIEWEDDATE TIMESTAMP, ZSCENEANALYSISTIMESTAMP TIMESTAMP, ZACCESSIBILITYDESCRIPTION VARCHAR, ZADJUSTEDFINGERPRINT VARCHAR, ZDEFERREDPHOTOIDENTIFIER VARCHAR, ZEDITORBUNDLEID VARCHAR, ZEXIFTIMESTAMPSTRING VARCHAR, ZIMPORTSESSIONID VARCHAR, ZIMPORTEDBYBUNDLEIDENTIFIER VARCHAR, ZIMPORTEDBYDISPLAYNAME VARCHAR, ZMASTERFINGERPRINT VARCHAR, ZMEDIAMETADATATYPE VARCHAR, ZMONTAGE VARCHAR, ZORIGINALASSETSUUID VARCHAR, ZORIGINALFILENAME VARCHAR, ZORIGINATINGASSETIDENTIFIER VARCHAR, ZPHOTOSTREAMTAGID VARCHAR, ZPUBLICGLOBALUUID VARCHAR, ZSHAREORIGINATOR VARCHAR, ZSOURCEASSETFORDUPLICATIONIDENTIFIER VARCHAR, ZSOURCEASSETFORDUPLICATIONSCOPEIDENTIFIER VARCHAR, ZSPATIALOVERCAPTUREGROUPIDENTIFIER VARCHAR, ZSYNDICATIONIDENTIFIER VARCHAR, ZTIMEZONENAME VARCHAR, ZTITLE VARCHAR, ZLIBRARYSCOPEASSETCONTRIBUTORSTOUPDATE BLOB, ZDISTANCEIDENTITY BLOB, ZFACEREGIONS BLOB, ZOBJECTSALIENCYRECTSDATA BLOB, ZORIGINALHASH BLOB, ZPLACEANNOTATIONDATA BLOB, ZREVERSELOCATIONDATA BLOB, ZSHIFTEDLOCATIONDATA BLOB );
CREATE TABLE Z_1KEYWORDS ( Z_1ASSETATTRIBUTES INTEGER, Z_41KEYWORDS INTEGER, PRIMARY KEY (Z_1ASSETATTRIBUTES, Z_41KEYWORDS) );
CREATE TABLE ZALBUMLIST ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZIDENTIFIER INTEGER, ZNEEDSREORDERINGNUMBER INTEGER, ZUUID VARCHAR );
CREATE TABLE ZASSET ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZACTIVELIBRARYSCOPEPARTICIPATIONSTATE INTEGER, ZAVALANCHEPICKTYPE INTEGER, ZBUNDLESCOPE INTEGER, ZCAMERAPROCESSINGADJUSTMENTSTATE INTEGER, ZCLOUDDELETESTATE INTEGER, ZCLOUDDOWNLOADREQUESTS INTEGER, ZCLOUDHASCOMMENTSBYME INTEGER, ZCLOUDHASCOMMENTSCONVERSATION INTEGER, ZCLOUDHASUNSEENCOMMENTS INTEGER, ZCLOUDISDELETABLE INTEGER, ZCLOUDISMYASSET INTEGER, ZCLOUDLOCALSTATE INTEGER, ZCLOUDPLACEHOLDERKIND INTEGER, ZCOMPLETE INTEGER, ZDEFERREDPROCESSINGNEEDED INTEGER, ZDEPTHTYPE INTEGER, ZDERIVEDCAMERACAPTUREDEVICE INTEGER, ZDUPLICATEASSETVISIBILITYSTATE INTEGER, ZFACEAREAPOINTS INTEGER, ZFAVORITE INTEGER, ZHASADJUSTMENTS INTEGER, ZHDRTYPE INTEGER, ZHEIGHT INTEGER, ZHIDDEN INTEGER, ZHIGHFRAMERATESTATE INTEGER, ZISMAGICCARPET INTEGER, ZKIND INTEGER, ZKINDSUBTYPE INTEGER, ZLIBRARYSCOPESHARESTATE INTEGER, ZORIENTATION INTEGER, ZPACKEDACCEPTABLECROPRECT INTEGER, ZPACKEDBADGEATTRIBUTES INTEGER, ZPACKEDPREFERREDCROPRECT INTEGER, ZPLAYBACKSTYLE INTEGER, ZPLAYBACKVARIATION INTEGER, ZSAVEDASSETTYPE INTEGER, ZSEARCHINDEXREBUILDSTATE INTEGER, ZSPATIALTYPE INTEGER, ZSYNDICATIONSTATE INTEGER, ZTHUMBNAILINDEX INTEGER, ZTRASHEDREASON INTEGER, ZTRASHEDSTATE INTEGER, ZVIDEOCPDURATIONVALUE INTEGER, ZVIDEOCPVISIBILITYSTATE INTEGER, ZVIDEODEFERREDPROCESSINGNEEDED INTEGER, ZVIDEOKEYFRAMETIMESCALE INTEGER, ZVIDEOKEYFRAMEVALUE INTEGER, ZVISIBILITYSTATE INTEGER, ZWIDTH INTEGER, ZADDITIONALATTRIBUTES INTEGER, ZCLOUDFEEDASSETSENTRY INTEGER, ZCOMPUTEDATTRIBUTES INTEGER, ZCONVERSATION INTEGER, ZDAYGROUPHIGHLIGHTBEINGASSETS INTEGER, ZDAYGROUPHIGHLIGHTBEINGEXTENDEDASSETS INTEGER, ZDAYGROUPHIGHLIGHTBEINGKEYASSETPRIVATE INTEGER, ZDAYGROUPHIGHLIGHTBEINGKEYASSETSHARED INTEGER, ZDAYGROUPHIGHLIGHTBEINGSUMMARYASSETS INTEGER, ZDUPLICATEMETADATAMATCHINGALBUM INTEGER, ZDUPLICATEPERCEPTUALMATCHINGALBUM INTEGER, ZEXTENDEDATTRIBUTES INTEGER, ZHIGHLIGHTBEINGASSETS INTEGER, ZHIGHLIGHTBEINGEXTENDEDASSETS INTEGER, ZHIGHLIGHTBEINGKEYASSETPRIVATE INTEGER, ZHIGHLIGHTBEINGKEYASSETSHARED INTEGER, ZHIGHLIGHTBEINGSUMMARYASSETS INTEGER, ZIMPORTSESSION INTEGER, ZLIBRARYSCOPE INTEGER, ZMASTER INTEGER, ZMEDIAANALYSISATTRIBUTES INTEGER, ZMOMENT INTEGER, ZMOMENTSHARE INTEGER, ZMONTHHIGHLIGHTBEINGKEYASSETPRIVATE INTEGER, ZMONTHHIGHLIGHTBEINGKEYASSETSHARED INTEGER, ZPHOTOANALYSISATTRIBUTES INTEGER, ZTRASHEDBYPARTICIPANT INTEGER, ZYEARHIGHLIGHTBEINGKEYASSETPRIVATE INTEGER, ZYEARHIGHLIGHTBEINGKEYASSETSHARED INTEGER, Z_FOK_CLOUDFEEDASSETSENTRY INTEGER, ZADDEDDATE TIMESTAMP, ZADJUSTMENTTIMESTAMP TIMESTAMP, ZANALYSISSTATEMODIFICATIONDATE TIMESTAMP, ZCLOUDBATCHPUBLISHDATE TIMESTAMP, ZCLOUDLASTVIEWEDCOMMENTDATE TIMESTAMP, ZCLOUDSERVERPUBLISHDATE TIMESTAMP, ZCURATIONSCORE FLOAT, ZDATECREATED TIMESTAMP, ZDURATION FLOAT, ZFACEADJUSTMENTVERSION TIMESTAMP, ZHDRGAIN FLOAT, ZHIGHLIGHTVISIBILITYSCORE FLOAT, ZICONICSCORE FLOAT, ZLASTSHAREDDATE TIMESTAMP, ZLATITUDE FLOAT, ZLONGITUDE FLOAT, ZMODIFICATIONDATE TIMESTAMP, ZOVERALLAESTHETICSCORE FLOAT, ZPROMOTIONSCORE FLOAT, ZSORTTOKEN FLOAT, ZSTICKERCONFIDENCESCORE FLOAT, ZTRASHEDDATE TIMESTAMP, ZAVALANCHEUUID VARCHAR, ZCLOUDASSETGUID VARCHAR, ZCLOUDBATCHID VARCHAR, ZCLOUDCOLLECTIONGUID VARCHAR, ZCLOUDOWNERHASHEDPERSONID VARCHAR, ZDELETEREASON VARCHAR, ZDIRECTORY VARCHAR, ZFILENAME VARCHAR, ZMEDIAGROUPUUID VARCHAR, ZORIGINALCOLORSPACE VARCHAR, ZUNIFORMTYPEIDENTIFIER VARCHAR, ZUUID VARCHAR, ZIMAGEREQUESTHINTS BLOB, ZLOCATIONDATA BLOB , ZCOMPUTESYNCATTRIBUTES INTEGER);
CREATE TABLE Z_3SUGGESTIONSBEINGREPRESENTATIVEASSETS ( Z_3REPRESENTATIVEASSETS1 INTEGER, Z_59SUGGESTIONSBEINGREPRESENTATIVEASSETS INTEGER, PRIMARY KEY (Z_3REPRESENTATIVEASSETS1, Z_59SUGGESTIONSBEINGREPRESENTATIVEASSETS) );
CREATE TABLE Z_3HIGHLIGHTSBEINGADAPTIVEEXPLICITLYREMOVEDASSETS ( Z_3ADAPTIVEEXPLICITLYREMOVEDASSETS INTEGER, Z_51HIGHLIGHTSBEINGADAPTIVEEXPLICITLYREMOVEDASSETS INTEGER, PRIMARY KEY (Z_3ADAPTIVEEXPLICITLYREMOVEDASSETS, Z_51HIGHLIGHTSBEINGADAPTIVEEXPLICITLYREMOVEDASSETS) );
CREATE TABLE Z_3MEMORIESBEINGCURATEDASSETS ( Z_3CURATEDASSETS INTEGER, Z_45MEMORIESBEINGCURATEDASSETS INTEGER, PRIMARY KEY (Z_3CURATEDASSETS, Z_45MEMORIESBEINGCURATEDASSETS) );
CREATE TABLE Z_3MEMORIESBEINGMOVIECURATEDASSETS ( Z_3MOVIECURATEDASSETS INTEGER, Z_45MEMORIESBEINGMOVIECURATEDASSETS INTEGER, PRIMARY KEY (Z_3MOVIECURATEDASSETS, Z_45MEMORIESBEINGMOVIECURATEDASSETS) );
CREATE TABLE Z_3HIGHLIGHTSBEINGADAPTIVEEXTENDEDASSETS ( Z_3ADAPTIVEEXTENDEDASSETS INTEGER, Z_51HIGHLIGHTSBEINGADAPTIVEEXTENDEDASSETS INTEGER, PRIMARY KEY (Z_3ADAPTIVEEXTENDEDASSETS, Z_51HIGHLIGHTSBEINGADAPTIVEEXTENDEDASSETS) );
CREATE TABLE Z_3HIGHLIGHTSBEINGADAPTIVEASSETS ( Z_3ADAPTIVEASSETS INTEGER, Z_51HIGHLIGHTSBEINGADAPTIVEASSETS INTEGER, PRIMARY KEY (Z_3ADAPTIVEASSETS, Z_51HIGHLIGHTSBEINGADAPTIVEASSETS) );
CREATE TABLE Z_3SUGGESTIONSBEINGKEYASSETS ( Z_3KEYASSETS INTEGER, Z_59SUGGESTIONSBEINGKEYASSETS INTEGER, PRIMARY KEY (Z_3KEYASSETS, Z_59SUGGESTIONSBEINGKEYASSETS) );
CREATE TABLE Z_3MEMORIESBEINGREPRESENTATIVEASSETS ( Z_3REPRESENTATIVEASSETS INTEGER, Z_45MEMORIESBEINGREPRESENTATIVEASSETS INTEGER, PRIMARY KEY (Z_3REPRESENTATIVEASSETS, Z_45MEMORIESBEINGREPRESENTATIVEASSETS) );
CREATE TABLE Z_3HIGHLIGHTSBEINGADAPTIVESUMMARYASSETS ( Z_3ADAPTIVESUMMARYASSETS INTEGER, Z_51HIGHLIGHTSBEINGADAPTIVESUMMARYASSETS INTEGER, PRIMARY KEY (Z_3ADAPTIVESUMMARYASSETS, Z_51HIGHLIGHTSBEINGADAPTIVESUMMARYASSETS) );
CREATE TABLE Z_3MEMORIESBEINGUSERCURATEDASSETS ( Z_3USERCURATEDASSETS INTEGER, Z_45MEMORIESBEINGUSERCURATEDASSETS INTEGER, PRIMARY KEY (Z_3USERCURATEDASSETS, Z_45MEMORIESBEINGUSERCURATEDASSETS) );
CREATE TABLE Z_3HIGHLIGHTSBEINGADAPTIVEEXPLICITLYADDEDASSETS ( Z_3ADAPTIVEEXPLICITLYADDEDASSETS INTEGER, Z_51HIGHLIGHTSBEINGADAPTIVEEXPLICITLYADDEDASSETS INTEGER, PRIMARY KEY (Z_3ADAPTIVEEXPLICITLYADDEDASSETS, Z_51HIGHLIGHTSBEINGADAPTIVEEXPLICITLYADDEDASSETS) );
CREATE TABLE Z_3MEMORIESBEINGCUSTOMUSERASSETS ( Z_3CUSTOMUSERASSETS INTEGER, Z_45MEMORIESBEINGCUSTOMUSERASSETS INTEGER, Z_FOK_3CUSTOMUSERASSETS INTEGER, PRIMARY KEY (Z_3CUSTOMUSERASSETS, Z_45MEMORIESBEINGCUSTOMUSERASSETS) );
CREATE TABLE Z_3MEMORIESBEINGEXTENDEDCURATEDASSETS ( Z_3EXTENDEDCURATEDASSETS INTEGER, Z_45MEMORIESBEINGEXTENDEDCURATEDASSETS INTEGER, PRIMARY KEY (Z_3EXTENDEDCURATEDASSETS, Z_45MEMORIESBEINGEXTENDEDCURATEDASSETS) );
CREATE TABLE ZASSETANALYSISSTATE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZANALYSISSTATE INTEGER, ZWORKERFLAGS INTEGER, ZWORKERTYPE INTEGER, ZASSET INTEGER, ZIGNOREUNTILDATE TIMESTAMP, ZLASTIGNOREDDATE TIMESTAMP, ZSORTTOKEN FLOAT, ZASSETUUID VARCHAR );
CREATE TABLE ZASSETCONTRIBUTOR ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZPARTICIPANT INTEGER, Z3LIBRARYSCOPEASSETCONTRIBUTORS INTEGER );
CREATE TABLE ZASSETDESCRIPTION ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZASSETATTRIBUTES INTEGER, ZLONGDESCRIPTION VARCHAR );
CREATE TABLE ZCHARACTERRECOGNITIONATTRIBUTES ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZALGORITHMVERSION INTEGER, ZMEDIAANALYSISASSETATTRIBUTES INTEGER, ZADJUSTMENTVERSION TIMESTAMP, ZCHARACTERRECOGNITIONDATA BLOB, ZMACHINEREADABLECODEDATA BLOB );
CREATE TABLE ZCLOUDFEEDENTRY ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZENTRYPRIORITYNUMBER INTEGER, ZENTRYTYPENUMBER INTEGER, ZENTRYDATE TIMESTAMP, ZENTRYALBUMGUID VARCHAR, ZENTRYINVITATIONRECORDGUID VARCHAR, ZENTRYCLOUDASSETGUID VARCHAR );
CREATE TABLE ZCLOUDMASTER ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCLOUDLOCALSTATE INTEGER, ZFULLSIZEJPEGSOURCE INTEGER, ZIMPORTEDBY INTEGER, ZORIGINALORIENTATION INTEGER, ZPLACEHOLDERSTATE INTEGER, ZVIDEOFRAMERATE INTEGER, ZMEDIAMETADATA INTEGER, ZMOMENTSHARE INTEGER, ZCREATIONDATE TIMESTAMP, ZIMPORTDATE TIMESTAMP, ZCLOUDMASTERGUID VARCHAR, ZCODECNAME VARCHAR, ZIMPORTSESSIONID VARCHAR, ZIMPORTEDBYBUNDLEIDENTIFIER VARCHAR, ZIMPORTEDBYDISPLAYNAME VARCHAR, ZMEDIAMETADATATYPE VARCHAR, ZORIGINALFILENAME VARCHAR, ZORIGINATINGASSETIDENTIFIER VARCHAR, ZSOURCEMASTERFORDUPLICATIONIDENTIFIER VARCHAR, ZSOURCEMASTERFORDUPLICATIONSCOPEIDENTIFIER VARCHAR, ZUNIFORMTYPEIDENTIFIER VARCHAR );
CREATE TABLE ZCLOUDMASTERMEDIAMETADATA ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZADDITIONALASSETATTRIBUTES INTEGER, ZCLOUDMASTER INTEGER, ZDATA BLOB );
CREATE TABLE ZCLOUDRESOURCE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCLOUDLOCALSTATE INTEGER, ZFILESIZE INTEGER, ZHEIGHT INTEGER, ZISAVAILABLE INTEGER, ZISLOCALLYAVAILABLE INTEGER, ZPREFETCHCOUNT INTEGER, ZSOURCETYPE INTEGER, ZTYPE INTEGER, ZWIDTH INTEGER, ZASSET INTEGER, ZCLOUDMASTER INTEGER, ZDATECREATED TIMESTAMP, ZLASTONDEMANDDOWNLOADDATE TIMESTAMP, ZLASTPREFETCHDATE TIMESTAMP, ZPRUNEDAT TIMESTAMP, ZASSETUUID VARCHAR, ZFILEPATH VARCHAR, ZFINGERPRINT VARCHAR, ZITEMIDENTIFIER VARCHAR, ZUNIFORMTYPEIDENTIFIER VARCHAR );
CREATE TABLE ZCLOUDSHAREDALBUMINVITATIONRECORD ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZINVITATIONSTATE INTEGER, ZINVITATIONSTATELOCAL INTEGER, ZINVITEEEMAILKEY INTEGER, ZISMINE INTEGER, ZALBUM INTEGER, Z_FOK_ALBUM INTEGER, ZINVITEESUBSCRIPTIONDATE TIMESTAMP, ZALBUMGUID VARCHAR, ZCLOUDGUID VARCHAR, ZINVITEEFIRSTNAME VARCHAR, ZINVITEEFULLNAME VARCHAR, ZINVITEEHASHEDPERSONID VARCHAR, ZINVITEELASTNAME VARCHAR, ZUUID VARCHAR );
CREATE TABLE ZCLOUDSHAREDCOMMENT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZISBATCHCOMMENT INTEGER, ZISCAPTION INTEGER, ZISDELETABLE INTEGER, ZISLIKE INTEGER, ZISMYCOMMENT INTEGER, ZCLOUDFEEDCOMMENTENTRY INTEGER, ZCLOUDFEEDLIKECOMMENTENTRY INTEGER, ZCOMMENTEDASSET INTEGER, ZLIKEDASSET INTEGER, Z_FOK_CLOUDFEEDCOMMENTENTRY INTEGER, Z_FOK_CLOUDFEEDLIKECOMMENTENTRY INTEGER, ZCOMMENTCLIENTDATE TIMESTAMP, ZCOMMENTDATE TIMESTAMP, ZCLOUDGUID VARCHAR, ZCOMMENTTEXT VARCHAR, ZCOMMENTTYPE VARCHAR, ZCOMMENTERHASHEDPERSONID VARCHAR );
CREATE TABLE ZCOMPUTEDASSETATTRIBUTES ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZASSET INTEGER, ZBEHAVIORALSCORE FLOAT, ZFAILURESCORE FLOAT, ZHARMONIOUSCOLORSCORE FLOAT, ZIMMERSIVENESSSCORE FLOAT, ZINTERACTIONSCORE FLOAT, ZINTERESTINGSUBJECTSCORE FLOAT, ZINTRUSIVEOBJECTPRESENCESCORE FLOAT, ZLIVELYCOLORSCORE FLOAT, ZLOWLIGHT FLOAT, ZNOISESCORE FLOAT, ZPLEASANTCAMERATILTSCORE FLOAT, ZPLEASANTCOMPOSITIONSCORE FLOAT, ZPLEASANTLIGHTINGSCORE FLOAT, ZPLEASANTPATTERNSCORE FLOAT, ZPLEASANTPERSPECTIVESCORE FLOAT, ZPLEASANTPOSTPROCESSINGSCORE FLOAT, ZPLEASANTREFLECTIONSSCORE FLOAT, ZPLEASANTSYMMETRYSCORE FLOAT, ZSHARPLYFOCUSEDSUBJECTSCORE FLOAT, ZTASTEFULLYBLURREDSCORE FLOAT, ZWELLCHOSENSUBJECTSCORE FLOAT, ZWELLFRAMEDSUBJECTSCORE FLOAT, ZWELLTIMEDSHOTSCORE FLOAT );
CREATE TABLE ZDEFERREDREBUILDFACE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCLOUDNAMESOURCE INTEGER, ZCLUSTERREJECTED INTEGER, ZFACEALGORITHMVERSION INTEGER, ZHIDDEN INTEGER, ZMANUAL INTEGER, ZNAMESOURCE INTEGER, ZREJECTED INTEGER, ZREPRESENTATIVE INTEGER, ZCENTERX FLOAT, ZCENTERY FLOAT, ZSIZE FLOAT, ZASSETCLOUDGUID VARCHAR, ZASSETUUID VARCHAR, ZFACEUUID VARCHAR, ZPERSONUUID VARCHAR, ZUUID VARCHAR );
CREATE TABLE ZDETECTEDFACE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZAGETYPE INTEGER, ZASSETVISIBLE INTEGER, ZCLOUDLOCALSTATE INTEGER, ZCLOUDNAMESOURCE INTEGER, ZCLUSTERSEQUENCENUMBER INTEGER, ZCONFIRMEDFACECROPGENERATIONSTATE INTEGER, ZDETECTIONTYPE INTEGER, ZETHNICITYTYPE INTEGER, ZEYEMAKEUPTYPE INTEGER, ZEYESSTATE INTEGER, ZFACEALGORITHMVERSION INTEGER, ZFACEEXPRESSIONTYPE INTEGER, ZFACIALHAIRTYPE INTEGER, ZGAZETYPE INTEGER, ZGENDERTYPE INTEGER, ZGLASSESTYPE INTEGER, ZHAIRCOLORTYPE INTEGER, ZHAIRTYPE INTEGER, ZHASFACEMASK INTEGER, ZHASSMILE INTEGER, ZHEADGEARTYPE INTEGER, ZHIDDEN INTEGER, ZISINTRASH INTEGER, ZISLEFTEYECLOSED INTEGER, ZISRIGHTEYECLOSED INTEGER, ZLIPMAKEUPTYPE INTEGER, ZMANUAL INTEGER, ZNAMESOURCE INTEGER, ZPOSETYPE INTEGER, ZQUALITYMEASURE INTEGER, ZSKINTONETYPE INTEGER, ZSMILETYPE INTEGER, ZSOURCEHEIGHT INTEGER, ZSOURCEWIDTH INTEGER, ZTRAININGTYPE INTEGER, ZVIPMODELTYPE INTEGER, ZVUOBSERVATIONID INTEGER, ZASSETFORFACE INTEGER, ZASSETFORTEMPORALDETECTEDFACES INTEGER, ZASSETFORTORSO INTEGER, ZFACECROP INTEGER, ZFACEGROUP INTEGER, ZFACEGROUPBEINGKEYFACE INTEGER, ZFACEPRINT INTEGER, ZPERSONBEINGKEYFACE INTEGER, ZPERSONFORFACE INTEGER, ZPERSONFORTEMPORALDETECTEDFACES INTEGER, ZPERSONFORTORSO INTEGER, ZADJUSTMENTVERSION TIMESTAMP, ZBLURSCORE FLOAT, ZBODYCENTERX FLOAT, ZBODYCENTERY FLOAT, ZBODYHEIGHT FLOAT, ZBODYWIDTH FLOAT, ZCENTERX FLOAT, ZCENTERY FLOAT, ZDURATION FLOAT, ZGAZEANGLE FLOAT, ZGAZECENTERX FLOAT, ZGAZECENTERY FLOAT, ZGAZECONFIDENCE FLOAT, ZPOSEYAW FLOAT, ZQUALITY FLOAT, ZROLL FLOAT, ZSIZE FLOAT, ZSTARTTIME FLOAT, ZGAZERECTSTRING VARCHAR, ZGROUPINGIDENTIFIER VARCHAR, ZMASTERIDENTIFIER VARCHAR, ZUUID VARCHAR );
CREATE TABLE IF NOT EXISTS "Z_19REJECTEDPERSONS" ( Z_19REJECTEDFACES INTEGER, Z_48REJECTEDPERSONS INTEGER, PRIMARY KEY (Z_19REJECTEDFACES, Z_48REJECTEDPERSONS) );
CREATE TABLE IF NOT EXISTS "Z_19REJECTEDPERSONSNEEDINGFACECROPS" ( Z_19REJECTEDFACESNEEDINGFACECROPS INTEGER, Z_48REJECTEDPERSONSNEEDINGFACECROPS INTEGER, PRIMARY KEY (Z_19REJECTEDFACESNEEDINGFACECROPS, Z_48REJECTEDPERSONSNEEDINGFACECROPS) );
CREATE TABLE IF NOT EXISTS "Z_19CLUSTERREJECTEDPERSONS" ( Z_19CLUSTERREJECTEDFACES INTEGER, Z_48CLUSTERREJECTEDPERSONS INTEGER, PRIMARY KEY (Z_19CLUSTERREJECTEDFACES, Z_48CLUSTERREJECTEDPERSONS) );
CREATE TABLE ZDETECTEDFACEGROUP ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZPERSONBUILDERSTATE INTEGER, ZUNNAMEDFACECOUNT INTEGER, ZASSOCIATEDPERSON INTEGER, ZKEYFACE INTEGER, ZUUID VARCHAR );
CREATE TABLE ZDETECTEDFACEPRINT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZFACEPRINTVERSION INTEGER, ZFACE INTEGER, ZDATA BLOB );
CREATE TABLE ZDETECTIONTRAIT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZTYPE INTEGER, ZVALUE INTEGER, ZDETECTION INTEGER, ZDURATION FLOAT, ZSCORE FLOAT, ZSTARTTIME FLOAT );
CREATE TABLE ZEDITEDIPTCATTRIBUTES ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZASSETATTRIBUTES INTEGER, ZACTIONADVISED VARCHAR, ZAUDIODURATION VARCHAR, ZAUDIOOUTCUE VARCHAR, ZAUDIOSAMPLINGRATE VARCHAR, ZAUDIOSAMPLINGRES VARCHAR, ZAUDIOTYPE VARCHAR, ZBYLINE VARCHAR, ZBYLINETITLE VARCHAR, ZCAPTION VARCHAR, ZCATEGORY VARCHAR, ZCIADRCITY VARCHAR, ZCIADRCTRY VARCHAR, ZCIADREXTADR VARCHAR, ZCIADRPCODE VARCHAR, ZCIADRREGION VARCHAR, ZCIEMAILWORK VARCHAR, ZCITELWORK VARCHAR, ZCIURLWORK VARCHAR, ZCITY VARCHAR, ZCONTACT VARCHAR, ZCONTENTLOCATIONCODE VARCHAR, ZCONTENTLOCATIONNAME VARCHAR, ZCOPYRIGHTNOTICE VARCHAR, ZCOUNTRYPRIMARYLOCATIONCODE VARCHAR, ZCOUNTRYPRIMARYLOCATIONNAME VARCHAR, ZCREATORCONTACTINFO VARCHAR, ZCREDIT VARCHAR, ZDATECREATED VARCHAR, ZDIGITALCREATIONDATE VARCHAR, ZDIGITALCREATIONTIME VARCHAR, ZEDITSTATUS VARCHAR, ZEDITORIALUPDATE VARCHAR, ZEXPIRATIONDATE VARCHAR, ZEXPIRATIONTIME VARCHAR, ZFIXTUREIDENTIFIER VARCHAR, ZHEADLINE VARCHAR, ZIMAGEORIENTATION VARCHAR, ZIMAGETYPE VARCHAR, ZKEYWORDS VARCHAR, ZLANGUAGEIDENTIFIER VARCHAR, ZOBJECTATTRIBUTEREFERENCE VARCHAR, ZOBJECTCYCLE VARCHAR, ZOBJECTNAME VARCHAR, ZOBJECTTYPEREFERENCE VARCHAR, ZORIGINALTRANSMISSIONREFERENCE VARCHAR, ZORIGINATINGPROGRAM VARCHAR, ZPROGRAMVERSION VARCHAR, ZPROVINCESTATE VARCHAR, ZREFERENCEDATE VARCHAR, ZREFERENCENUMBER VARCHAR, ZREFERENCESERVICE VARCHAR, ZRELEASEDATE VARCHAR, ZRELEASETIME VARCHAR, ZSCENE VARCHAR, ZSOURCE VARCHAR, ZSPECIALINSTRUCTIONS VARCHAR, ZSTARRATING VARCHAR, ZSUBLOCATION VARCHAR, ZSUBJECTREFERENCE VARCHAR, ZSUPPLEMENTALCATEGORY VARCHAR, ZTIMECREATED VARCHAR, ZURGENCY VARCHAR, ZUSAGETERMS VARCHAR, ZWRITEREDITOR VARCHAR, ZDATA BLOB );
CREATE TABLE ZEXTENDEDATTRIBUTES ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZFLASHFIRED INTEGER, ZFOCALLENGTHIN35MM INTEGER, ZISO INTEGER, ZMETERINGMODE INTEGER, ZORIENTATION INTEGER, ZSAMPLERATE INTEGER, ZSLUSHPRESET INTEGER, ZSLUSHVERSION INTEGER, ZTIMEZONEOFFSET INTEGER, ZTRACKFORMAT INTEGER, ZWHITEBALANCE INTEGER, ZASSET INTEGER, ZAPERTURE FLOAT, ZBITRATE FLOAT, ZDATECREATED TIMESTAMP, ZDIGITALZOOMRATIO FLOAT, ZDURATION FLOAT, ZEXPOSUREBIAS FLOAT, ZFOCALLENGTH FLOAT, ZFPS FLOAT, ZLATITUDE FLOAT, ZLONGITUDE FLOAT, ZSHUTTERSPEED FLOAT, ZSLUSHSCENEBIAS FLOAT, ZSLUSHWARMTHBIAS FLOAT, ZCAMERAMAKE VARCHAR, ZCAMERAMODEL VARCHAR, ZCODEC VARCHAR, ZLENSMODEL VARCHAR, ZTIMEZONENAME VARCHAR );
CREATE TABLE ZFACECROP ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCLOUDDELETESTATE INTEGER, ZCLOUDLOCALSTATE INTEGER, ZCLOUDTYPE INTEGER, ZSTATE INTEGER, ZTYPE INTEGER, ZASSET INTEGER, ZFACE INTEGER, ZPERSON INTEGER, ZINVALIDMERGECANDIDATEPERSONUUID VARCHAR, ZUUID VARCHAR, ZRESOURCEDATA BLOB );
CREATE TABLE ZFILESYSTEMBOOKMARK ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZRESOURCE INTEGER, ZPATHRELATIVETOVOLUME VARCHAR, ZBOOKMARKDATA BLOB );
CREATE TABLE ZFILESYSTEMVOLUME ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZNAME VARCHAR, ZUUID VARCHAR, ZVOLUMEUUIDSTRING VARCHAR );
CREATE TABLE ZGENERICALBUM ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCACHEDCOUNT INTEGER, ZCACHEDPHOTOSCOUNT INTEGER, ZCACHEDVIDEOSCOUNT INTEGER, ZCLOUDDELETESTATE INTEGER, ZCLOUDLOCALSTATE INTEGER, ZCUSTOMSORTASCENDING INTEGER, ZCUSTOMSORTKEY INTEGER, ZISPINNED INTEGER, ZISPROTOTYPE INTEGER, ZKIND INTEGER, ZPENDINGITEMSCOUNT INTEGER, ZPENDINGITEMSTYPE INTEGER, ZPRIVACYSTATE INTEGER, ZSYNCEVENTORDERKEY INTEGER, ZTRASHEDSTATE INTEGER, ZCUSTOMKEYASSET INTEGER, ZKEYASSET INTEGER, ZPARENTFOLDER INTEGER, ZSECONDARYKEYASSET INTEGER, ZTERTIARYKEYASSET INTEGER, ZSEARCHINDEXREBUILDSTATE INTEGER, ZCLOUDALBUMSUBTYPE INTEGER, ZCLOUDMULTIPLECONTRIBUTORSENABLED INTEGER, ZCLOUDMULTIPLECONTRIBUTORSENABLEDLOCAL INTEGER, ZCLOUDNOTIFICATIONSENABLED INTEGER, ZCLOUDOWNEREMAILKEY INTEGER, ZCLOUDOWNERISWHITELISTED INTEGER, ZCLOUDPUBLICURLENABLED INTEGER, ZCLOUDPUBLICURLENABLEDLOCAL INTEGER, ZCLOUDRELATIONSHIPSTATE INTEGER, ZCLOUDRELATIONSHIPSTATELOCAL INTEGER, ZHASUNSEENCONTENT INTEGER, ZISOWNED INTEGER, ZUNSEENASSETSCOUNT INTEGER, ZDUPLICATETYPE INTEGER, ZPROCESSINGVERSION INTEGER, ZKEYASSETFACEIDENTIFIER INTEGER, ZKEYASSETFACETHUMBNAILINDEX INTEGER, ZSYNDICATE INTEGER, ZSEARCHINDEXREBUILDSTATE1 INTEGER, Z_FOK_PARENTFOLDER INTEGER, ZCREATIONDATE TIMESTAMP, ZENDDATE TIMESTAMP, ZSTARTDATE TIMESTAMP, ZTRASHEDDATE TIMESTAMP, ZCLOUDCREATIONDATE TIMESTAMP, ZCLOUDLASTCONTRIBUTIONDATE TIMESTAMP, ZCLOUDLASTINTERESTINGCHANGEDATE TIMESTAMP, ZCLOUDSUBSCRIPTIONDATE TIMESTAMP, ZCLOUDGUID VARCHAR, ZIMPORTSESSIONID VARCHAR, ZIMPORTEDBYBUNDLEIDENTIFIER VARCHAR, ZTITLE VARCHAR, ZUUID VARCHAR, ZCLOUDOWNERFIRSTNAME VARCHAR, ZCLOUDOWNERFULLNAME VARCHAR, ZCLOUDOWNERHASHEDPERSONID VARCHAR, ZCLOUDOWNERLASTNAME VARCHAR, ZCLOUDPERSONID VARCHAR, ZPUBLICURL VARCHAR, ZPROJECTDOCUMENTTYPE VARCHAR, ZPROJECTEXTENSIONIDENTIFIER VARCHAR, ZPROJECTRENDERUUID VARCHAR, ZCUSTOMQUERYTYPE VARCHAR, ZCLOUDMETADATA BLOB, ZUSERQUERYDATA BLOB, ZPROJECTDATA BLOB, ZCUSTOMQUERYPARAMETERS BLOB );
CREATE TABLE IF NOT EXISTS "Z_28ALBUMLISTS" ( Z_28ALBUMS INTEGER, Z_2ALBUMLISTS INTEGER, Z_FOK_28ALBUMS INTEGER, PRIMARY KEY (Z_28ALBUMS, Z_2ALBUMLISTS) );
CREATE TABLE IF NOT EXISTS "Z_29ASSETS" ( Z_29ALBUMS INTEGER, Z_3ASSETS INTEGER, Z_FOK_3ASSETS INTEGER, PRIMARY KEY (Z_29ALBUMS, Z_3ASSETS) );
CREATE TABLE ZGLOBALKEYVALUE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZBOOLVALUE INTEGER, ZINTEGERVALUE INTEGER, ZTYPE INTEGER, ZDATEVALUE TIMESTAMP, ZDOUBLEVALUE FLOAT, ZKEY VARCHAR, ZSTRINGVALUE VARCHAR, ZANYVALUE BLOB );
CREATE TABLE ZINTERNALRESOURCE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCLOUDDELETESTATE INTEGER, ZCLOUDLOCALSTATE INTEGER, ZCLOUDPREFETCHCOUNT INTEGER, ZCLOUDSOURCETYPE INTEGER, ZDATALENGTH INTEGER, ZDATASTORECLASSID INTEGER, ZDATASTORESUBTYPE INTEGER, ZFILEID INTEGER, ZLOCALAVAILABILITY INTEGER, ZLOCALAVAILABILITYTARGET INTEGER, ZPTPTRASHEDSTATE INTEGER, ZRECIPEID INTEGER, ZREMOTEAVAILABILITY INTEGER, ZREMOTEAVAILABILITYTARGET INTEGER, ZRESOURCETYPE INTEGER, ZSIDECARINDEX INTEGER, ZTRASHEDSTATE INTEGER, ZUNORIENTEDHEIGHT INTEGER, ZUNORIENTEDWIDTH INTEGER, ZUTICONFORMANCEHINT INTEGER, ZVERSION INTEGER, ZASSET INTEGER, ZFILESYSTEMBOOKMARK INTEGER, ZFILESYSTEMVOLUME INTEGER, ZTRANSIENTCLOUDMASTER INTEGER, ZCLOUDLASTONDEMANDDOWNLOADDATE TIMESTAMP, ZCLOUDLASTPREFETCHDATE TIMESTAMP, ZCLOUDMASTERDATECREATED TIMESTAMP, ZCLOUDPRUNEDAT TIMESTAMP, ZTRASHEDDATE TIMESTAMP, ZCLOUDDELETEASSETUUIDWITHRESOURCETYPE VARCHAR, ZCODECFOURCHARCODENAME VARCHAR, ZCOMPACTUTI VARCHAR, ZFINGERPRINT VARCHAR, ZDATASTOREKEYDATA BLOB );
CREATE TABLE ZKEYWORD ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZSHORTCUT VARCHAR, ZTITLE VARCHAR, ZUUID VARCHAR );
CREATE TABLE ZLEGACYFACE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZIDENTIFIER INTEGER, ZASSET INTEGER, ZALBUMUUID VARCHAR, ZRELATIVERECTVALUE BLOB );
CREATE TABLE ZLIMITEDLIBRARYFETCHFILTER ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZAPPLICATIONIDENTIFIER VARCHAR, ZDESIGNATEDREQUIREMENT VARCHAR, ZFETCHFILTERDATA BLOB );
CREATE TABLE ZMEDIAANALYSISASSETATTRIBUTES ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZANIMATEDSTICKERRANGEDURATIONTIMESCALE INTEGER, ZANIMATEDSTICKERRANGEDURATIONVALUE INTEGER, ZANIMATEDSTICKERRANGESTARTTIMESCALE INTEGER, ZANIMATEDSTICKERRANGESTARTVALUE INTEGER, ZAUDIOCLASSIFICATION INTEGER, ZBESTVIDEORANGEDURATIONTIMESCALE INTEGER, ZBESTVIDEORANGEDURATIONVALUE INTEGER, ZBESTVIDEORANGESTARTTIMESCALE INTEGER, ZBESTVIDEORANGESTARTVALUE INTEGER, ZFACECOUNT INTEGER, ZMEDIAANALYSISVERSION INTEGER, ZPACKEDBESTPLAYBACKRECT INTEGER, ZPROBABLEROTATIONDIRECTION INTEGER, ZSCREENTIMEDEVICEIMAGESENSITIVITY INTEGER, ZSYNDICATIONPROCESSINGVALUE INTEGER, ZSYNDICATIONPROCESSINGVERSION INTEGER, ZVAANALYSISVERSION INTEGER, ZASSET INTEGER, ZCHARACTERRECOGNITIONATTRIBUTES INTEGER, ZVISUALSEARCHATTRIBUTES INTEGER, ZACTIVITYSCORE FLOAT, ZAUDIOSCORE FLOAT, ZAUTOPLAYSUGGESTIONSCORE FLOAT, ZBLURRINESSSCORE FLOAT, ZEXPOSURESCORE FLOAT, ZMEDIAANALYSISTIMESTAMP TIMESTAMP, ZPROBABLEROTATIONDIRECTIONCONFIDENCE FLOAT, ZSETTLINGEFFECTSCORE FLOAT, ZVAANALYSISTIMESTAMP TIMESTAMP, ZVIDEOSCORE FLOAT, ZVIDEOSTICKERSUGGESTIONSCORE FLOAT, ZWALLPAPERSCORE FLOAT, ZCOLORNORMALIZATIONDATA BLOB );
CREATE TABLE ZMEMORY ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCATEGORY INTEGER, ZCLOUDDELETESTATE INTEGER, ZCLOUDLOCALSTATE INTEGER, ZFAVORITE INTEGER, ZFEATUREDSTATE INTEGER, ZNOTIFICATIONSTATE INTEGER, ZPENDINGPLAYCOUNT INTEGER, ZPENDINGSHARECOUNT INTEGER, ZPENDINGSTATE INTEGER, ZPENDINGVIEWCOUNT INTEGER, ZPHOTOSGRAPHVERSION INTEGER, ZPLAYCOUNT INTEGER, ZREJECTED INTEGER, ZSEARCHINDEXREBUILDSTATE INTEGER, ZSHARECOUNT INTEGER, ZSHARINGCOMPOSITION INTEGER, ZSTORYCOLORGRADEKIND INTEGER, ZSTORYSERIALIZEDTITLECATEGORY INTEGER, ZSUBCATEGORY INTEGER, ZSYNDICATEDCONTENTSTATE INTEGER, ZUSERACTIONOPTIONS INTEGER, ZVIEWCOUNT INTEGER, ZKEYASSET INTEGER, ZCREATIONDATE TIMESTAMP, ZLASTENRICHMENTDATE TIMESTAMP, ZLASTMOVIEPLAYEDDATE TIMESTAMP, ZLASTVIEWEDDATE TIMESTAMP, ZSCORE FLOAT, ZGRAPHMEMORYIDENTIFIER VARCHAR, ZSUBTITLE VARCHAR, ZTITLE VARCHAR, ZUUID VARCHAR, ZMOVIEASSETSTATE BLOB, ZASSETLISTPREDICATE BLOB, ZBLACKLISTEDFEATURE BLOB, ZMOVIEDATA BLOB, ZPHOTOSGRAPHDATA BLOB );
CREATE TABLE ZMIGRATIONHISTORY ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCPLENABLED INTEGER, ZFORCEREBUILDREASON INTEGER, ZINDEX INTEGER, ZMIGRATIONTYPE INTEGER, ZMODELVERSION INTEGER, ZORIGIN INTEGER, ZSOURCEMODELVERSION INTEGER, ZINITIALSYNCDATE TIMESTAMP, ZMIGRATIONDATE TIMESTAMP, ZDEVICEUNIQUEID VARCHAR, ZFRAMEWORKUUID VARCHAR, ZHARDWAREMODEL VARCHAR, ZOSVERSION VARCHAR, ZSTOREUUID VARCHAR, ZGLOBALKEYVALUES BLOB );
CREATE TABLE ZMOMENT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCACHEDCOUNT INTEGER, ZCACHEDCOUNTSHARED INTEGER, ZCACHEDPHOTOSCOUNT INTEGER, ZCACHEDVIDEOSCOUNT INTEGER, ZORIGINATORSTATE INTEGER, ZPROCESSEDLOCATION INTEGER, ZSHARINGCOMPOSITION INTEGER, ZTIMEZONEOFFSET INTEGER, ZTRASHEDSTATE INTEGER, ZHIGHLIGHT INTEGER, ZAGGREGATIONSCORE FLOAT, ZAPPROXIMATELATITUDE FLOAT, ZAPPROXIMATELONGITUDE FLOAT, ZENDDATE TIMESTAMP, ZGPSHORIZONTALACCURACY FLOAT, ZMODIFICATIONDATE TIMESTAMP, ZREPRESENTATIVEDATE TIMESTAMP, ZSTARTDATE TIMESTAMP, ZSUBTITLE VARCHAR, ZTITLE VARCHAR, ZUUID VARCHAR, ZLOCALIZEDLOCATIONNAMES BLOB );
CREATE TABLE ZPERSON ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZAGETYPE INTEGER, ZASSETSORTORDER INTEGER, ZCLOUDDELETESTATE INTEGER, ZCLOUDDETECTIONTYPE INTEGER, ZCLOUDLOCALSTATE INTEGER, ZCLOUDVERIFIEDTYPE INTEGER, ZDETECTIONTYPE INTEGER, ZFACECOUNT INTEGER, ZGENDERTYPE INTEGER, ZINPERSONNAMINGMODEL INTEGER, ZKEYFACEPICKSOURCE INTEGER, ZMANUALORDER INTEGER, ZQUESTIONTYPE INTEGER, ZSUGGESTEDFORCLIENTTYPE INTEGER, ZTYPE INTEGER, ZVERIFIEDTYPE INTEGER, ZASSOCIATEDFACEGROUP INTEGER, ZKEYFACE INTEGER, ZMERGETARGETPERSON INTEGER, ZSHAREPARTICIPANT INTEGER, ZMERGECANDIDATECONFIDENCE FLOAT, ZDISPLAYNAME VARCHAR, ZFULLNAME VARCHAR, ZMDID VARCHAR, ZPERSONUUID VARCHAR, ZPERSONURI VARCHAR, ZCONTACTMATCHINGDICTIONARY BLOB );
CREATE TABLE IF NOT EXISTS "Z_48MERGECANDIDATES" ( Z_48MERGECANDIDATES INTEGER, REFLEXIVE INTEGER, PRIMARY KEY (Z_48MERGECANDIDATES, REFLEXIVE) );
CREATE TABLE IF NOT EXISTS "Z_48INVALIDMERGECANDIDATES" ( Z_48INVALIDMERGECANDIDATES INTEGER, REFLEXIVE INTEGER, PRIMARY KEY (Z_48INVALIDMERGECANDIDATES, REFLEXIVE) );
CREATE TABLE IF NOT EXISTS "Z_48MERGECANDIDATESWITHCONFIDENCE" ( Z_48MERGECANDIDATESWITHCONFIDENCE INTEGER, REFLEXIVE INTEGER, PRIMARY KEY (Z_48MERGECANDIDATESWITHCONFIDENCE, REFLEXIVE) );
CREATE TABLE ZPERSONREFERENCE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZASSETATTRIBUTES INTEGER, ZPERSON INTEGER, ZPERSONUUID VARCHAR, ZPERSONDATA BLOB );
CREATE TABLE ZPHOTOANALYSISASSETATTRIBUTES ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZWALLPAPERPROPERTIESVERSION INTEGER, ZASSET INTEGER, ZWALLPAPERPROPERTIESTIMESTAMP TIMESTAMP, ZWALLPAPERPROPERTIESDATA BLOB );
CREATE TABLE ZPHOTOSHIGHLIGHT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZADAPTIVEMERGEPOLICY INTEGER, ZADAPTIVEVISIBILITYSTATE INTEGER, ZASSETSCOUNT INTEGER, ZASSETSCOUNTSHARED INTEGER, ZCATEGORY INTEGER, ZCLOUDDELETESTATE INTEGER, ZCLOUDLOCALSTATE INTEGER, ZDAYGROUPASSETSCOUNT INTEGER, ZDAYGROUPASSETSCOUNTSHARED INTEGER, ZDAYGROUPEXTENDEDASSETSCOUNT INTEGER, ZDAYGROUPEXTENDEDASSETSCOUNTSHARED INTEGER, ZDAYGROUPSUMMARYASSETSCOUNT INTEGER, ZDAYGROUPSUMMARYASSETSCOUNTSHARED INTEGER, ZENDTIMEZONEOFFSET INTEGER, ZENRICHMENTSTATE INTEGER, ZENRICHMENTVERSION INTEGER, ZEXTENDEDCOUNT INTEGER, ZEXTENDEDCOUNTSHARED INTEGER, ZFAVORITE INTEGER, ZHIGHLIGHTVERSION INTEGER, ZKIND INTEGER, ZMIXEDSHARINGCOMPOSITIONKEYASSETRELATIONSHIP INTEGER, ZMOOD INTEGER, ZPHOTOASSETSSUGGESTEDBYPHOTOSCOUNT INTEGER, ZSEARCHINDEXREBUILDSTATE INTEGER, ZSHARINGCOMPOSITION INTEGER, ZSTARTTIMEZONEOFFSET INTEGER, ZSUMMARYCOUNT INTEGER, ZSUMMARYCOUNTSHARED INTEGER, ZTYPE INTEGER, ZVIDEOASSETSSUGGESTEDBYPHOTOSCOUNT INTEGER, ZVISIBILITYSTATE INTEGER, ZVISIBILITYSTATEMIXED INTEGER, ZVISIBILITYSTATESHARED INTEGER, ZADAPTIVEKEYASSETPRIVATE INTEGER, ZADAPTIVEKEYASSETPRIVATEUSEREDITED INTEGER, ZADAPTIVEKEYASSETSHARED INTEGER, ZADAPTIVEKEYASSETSHAREDUSEREDITED INTEGER, ZDAYGROUPKEYASSETPRIVATE INTEGER, ZDAYGROUPKEYASSETSHARED INTEGER, ZKEYASSETPRIVATE INTEGER, ZKEYASSETSHARED INTEGER, ZMONTHKEYASSETPRIVATE INTEGER, ZMONTHKEYASSETSHARED INTEGER, ZPARENTDAYGROUPPHOTOSHIGHLIGHT INTEGER, ZPARENTPHOTOSHIGHLIGHT INTEGER, ZYEARKEYASSETPRIVATE INTEGER, ZYEARKEYASSETSHARED INTEGER, ZENDDATE TIMESTAMP, ZLASTENRICHMENTDATE TIMESTAMP, ZPROMOTIONSCORE FLOAT, ZSTARTDATE TIMESTAMP, ZSUBTITLE VARCHAR, ZSUBTITLEMIXED VARCHAR, ZSUBTITLESHARED VARCHAR, ZTITLE VARCHAR, ZTITLEMIXED VARCHAR, ZTITLESHARED VARCHAR, ZUUID VARCHAR, ZVERBOSESMARTDESCRIPTION VARCHAR, ZVERBOSESMARTDESCRIPTIONMIXED VARCHAR, ZVERBOSESMARTDESCRIPTIONSHARED VARCHAR, ZVERBOSESMARTDESCRIPTIONUSEREDITED VARCHAR );
CREATE TABLE ZQUESTION ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZDISPLAYTYPE INTEGER, ZENTITYTYPE INTEGER, ZQUESTIONVERSION INTEGER, ZSTATE INTEGER, ZTYPE INTEGER, ZCREATIONDATE TIMESTAMP, ZSCORE FLOAT, ZENTITYIDENTIFIER VARCHAR, ZUUID VARCHAR, ZADDITIONALINFO BLOB );
CREATE TABLE ZSCENECLASSIFICATION ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCLASSIFICATIONTYPE INTEGER, ZPACKEDBOUNDINGBOXRECT INTEGER, ZSCENEIDENTIFIER INTEGER, ZASSETATTRIBUTES INTEGER, ZASSETATTRIBUTESFORTEMPORALSCENECLASSIFICATIONS INTEGER, ZCONFIDENCE FLOAT, ZDURATION FLOAT, ZSTARTTIME FLOAT );
CREATE TABLE ZSCENEPRINT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZADDITIONALASSETATTRIBUTES INTEGER, ZDATA BLOB, ZDUPLICATEMATCHINGALTERNATEDATA BLOB, ZDUPLICATEMATCHINGDATA BLOB );
CREATE TABLE ZSHARE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCLOUDDELETESTATE INTEGER, ZLOCALPUBLISHSTATE INTEGER, ZPUBLICPERMISSION INTEGER, ZSCOPETYPE INTEGER, ZSTATUS INTEGER, ZTRASHEDSTATE INTEGER, ZAUTOSHAREPOLICY INTEGER, ZCLOUDITEMCOUNT INTEGER, ZCLOUDLOCALSTATE INTEGER, ZCLOUDPHOTOCOUNT INTEGER, ZCLOUDVIDEOCOUNT INTEGER, ZCOUNTOFASSETSADDEDBYCAMERASMARTSHARING INTEGER, ZEXITSOURCE INTEGER, ZEXITSTATE INTEGER, ZEXITTYPE INTEGER, ZPARTICIPANTCLOUDUPDATESTATE INTEGER, ZPREVIEWSTATE INTEGER, ZSCOPESYNCINGSTATE INTEGER, ZASSETCOUNT INTEGER, ZFORCESYNCATTEMPTED INTEGER, ZPHOTOSCOUNT INTEGER, ZSHOULDIGNOREBUDGETS INTEGER, ZSHOULDNOTIFYONUPLOADCOMPLETION INTEGER, ZUPLOADEDPHOTOSCOUNT INTEGER, ZUPLOADEDVIDEOSCOUNT INTEGER, ZVIDEOSCOUNT INTEGER, ZCREATIONDATE TIMESTAMP, ZEXPIRYDATE TIMESTAMP, ZTRASHEDDATE TIMESTAMP, ZLASTPARTICIPANTASSETTRASHNOTIFICATIONDATE TIMESTAMP, ZLASTPARTICIPANTASSETTRASHNOTIFICATIONVIEWEDDATE TIMESTAMP, ZENDDATE TIMESTAMP, ZSTARTDATE TIMESTAMP, ZSCOPEIDENTIFIER VARCHAR, ZTITLE VARCHAR, ZUUID VARCHAR, ZORIGINATINGSCOPEIDENTIFIER VARCHAR, ZSHAREURL VARCHAR, ZRULESDATA BLOB, ZPREVIEWDATA BLOB, ZTHUMBNAILIMAGEDATA BLOB );
CREATE TABLE ZSHAREPARTICIPANT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZACCEPTANCESTATUS INTEGER, ZEXITSTATE INTEGER, ZISCURRENTUSER INTEGER, ZPERMISSION INTEGER, ZROLE INTEGER, ZPERSON INTEGER, ZSHARE INTEGER, Z55_SHARE INTEGER, ZEMAILADDRESS VARCHAR, ZPARTICIPANTID VARCHAR, ZPHONENUMBER VARCHAR, ZUSERIDENTIFIER VARCHAR, ZUUID VARCHAR, ZNAMECOMPONENTS BLOB );
CREATE TABLE ZSUGGESTION ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZAVAILABLEFEATURES INTEGER, ZCACHEDCOUNT INTEGER, ZCACHEDPHOTOSCOUNT INTEGER, ZCACHEDVIDEOSCOUNT INTEGER, ZCLOUDDELETESTATE INTEGER, ZCLOUDLOCALSTATE INTEGER, ZFEATUREDSTATE INTEGER, ZNOTIFICATIONSTATE INTEGER, ZSHARINGCOMPOSITION INTEGER, ZSTATE INTEGER, ZSUBTYPE INTEGER, ZTYPE INTEGER, ZVERSION INTEGER, ZACTIVATIONDATE TIMESTAMP, ZCREATIONDATE TIMESTAMP, ZENDDATE TIMESTAMP, ZEXPUNGEDATE TIMESTAMP, ZRELEVANTUNTILDATE TIMESTAMP, ZSTARTDATE TIMESTAMP, ZSUBTITLE VARCHAR, ZSUGGESTIONCONTEXT VARCHAR, ZTITLE VARCHAR, ZUUID VARCHAR, ZACTIONDATA BLOB, ZFEATURESDATA BLOB );
CREATE TABLE ZUNMANAGEDADJUSTMENT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZADJUSTMENTBASEIMAGEFORMAT INTEGER, ZADJUSTMENTRENDERTYPES INTEGER, ZASSETATTRIBUTES INTEGER, ZADJUSTMENTTIMESTAMP TIMESTAMP, ZADJUSTMENTFORMATIDENTIFIER VARCHAR, ZADJUSTMENTFORMATVERSION VARCHAR, ZEDITORLOCALIZEDNAME VARCHAR, ZOTHERADJUSTMENTSFINGERPRINT VARCHAR, ZSIMILARTOORIGINALADJUSTMENTSFINGERPRINT VARCHAR, ZUUID VARCHAR );
CREATE TABLE ZUSERFEEDBACK ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCLOUDDELETESTATE INTEGER, ZCLOUDLOCALSTATE INTEGER, ZCREATIONTYPE INTEGER, ZFEATURE INTEGER, ZTYPE INTEGER, ZMEMORY INTEGER, ZPERSON INTEGER, ZLASTMODIFIEDDATE TIMESTAMP, ZCONTEXT VARCHAR, ZUUID VARCHAR );
CREATE TABLE ZVISUALSEARCHATTRIBUTES ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZALGORITHMVERSION INTEGER, ZSTICKERCONFIDENCEALGORITHMVERSION INTEGER, ZMEDIAANALYSISASSETATTRIBUTES INTEGER, ZADJUSTMENTVERSION TIMESTAMP, ZSTICKERCONFIDENCESCORE FLOAT, ZVISUALSEARCHDATA BLOB );
CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZASSET_INDEX ON ZADDITIONALASSETATTRIBUTES (ZASSET);
CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZASSETDESCRIPTION_INDEX ON ZADDITIONALASSETATTRIBUTES (ZASSETDESCRIPTION);
CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZEDITEDIPTCATTRIBUTES_INDEX ON ZADDITIONALASSETATTRIBUTES (ZEDITEDIPTCATTRIBUTES);
CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZMEDIAMETADATA_INDEX ON ZADDITIONALASSETATTRIBUTES (ZMEDIAMETADATA);
CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZSCENEPRINT_INDEX ON ZADDITIONALASSETATTRIBUTES (ZSCENEPRINT);
CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZUNMANAGEDADJUSTMENT_INDEX ON ZADDITIONALASSETATTRIBUTES (ZUNMANAGEDADJUSTMENT);
CREATE INDEX Z_1KEYWORDS_Z_40KEYWORDS_INDEX ON Z_1KEYWORDS (Z_41KEYWORDS, Z_1ASSETATTRIBUTES);
CREATE INDEX Z_AdditionalAssetAttributes_byAdjustedFingerPrintIndex ON ZADDITIONALASSETATTRIBUTES (ZADJUSTEDFINGERPRINT COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_byAllowedForAnalysisIndex ON ZADDITIONALASSETATTRIBUTES (ZALLOWEDFORANALYSIS COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_byCameraCaptureDeviceIndex ON ZADDITIONALASSETATTRIBUTES (ZCAMERACAPTUREDEVICE COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_byImportedByBundleIdentifierIndex ON ZADDITIONALASSETATTRIBUTES (ZIMPORTEDBYBUNDLEIDENTIFIER COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_byLocationHashIndex ON ZADDITIONALASSETATTRIBUTES (ZLOCATIONHASH COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_byMasterFingerPrintIndex ON ZADDITIONALASSETATTRIBUTES (ZMASTERFINGERPRINT COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_byOriginalAssetsUUIDIndex ON ZADDITIONALASSETATTRIBUTES (ZORIGINALASSETSUUID COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_byOriginalHashIndex ON ZADDITIONALASSETATTRIBUTES (ZORIGINALHASH COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_byPublicGlobalUUIDIndex ON ZADDITIONALASSETATTRIBUTES (ZPUBLICGLOBALUUID COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_byReverseLocationDataIsValidIndex ON ZADDITIONALASSETATTRIBUTES (ZREVERSELOCATIONDATAISVALID COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_byShiftedLocationIsValidIndex ON ZADDITIONALASSETATTRIBUTES (ZSHIFTEDLOCATIONISVALID COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_byUploadAttemptsIndex ON ZADDITIONALASSETATTRIBUTES (ZUPLOADATTEMPTS COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_byOriginalFileSize ON ZADDITIONALASSETATTRIBUTES (ZORIGINALFILESIZE COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_bySyndicationIdentifierIndex ON ZADDITIONALASSETATTRIBUTES (ZSYNDICATIONIDENTIFIER COLLATE BINARY ASC) WHERE ZSYNDICATIONIDENTIFIER IS NOT NULL;
CREATE INDEX Z_AdditionalAssetAttributes_forFaceAnalysisProgress ON ZADDITIONALASSETATTRIBUTES (ZALLOWEDFORANALYSIS COLLATE BINARY ASC, ZFACEANALYSISVERSION COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_forSceneAnalysisProgress ON ZADDITIONALASSETATTRIBUTES (ZALLOWEDFORANALYSIS COLLATE BINARY ASC, ZSCENEANALYSISVERSION COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_forRecentlyViewed ON ZADDITIONALASSETATTRIBUTES (ZLASTVIEWEDDATE COLLATE BINARY ASC);
CREATE INDEX Z_AlbumList_byIdentifierIndex ON ZALBUMLIST (ZIDENTIFIER COLLATE BINARY ASC);
CREATE INDEX Z_AlbumList_byUuidIndex ON ZALBUMLIST (ZUUID COLLATE BINARY ASC);
CREATE INDEX ZASSET_ZADDITIONALATTRIBUTES_INDEX ON ZASSET (ZADDITIONALATTRIBUTES);
CREATE INDEX ZASSET_ZCLOUDFEEDASSETSENTRY_INDEX ON ZASSET (ZCLOUDFEEDASSETSENTRY);
CREATE INDEX ZASSET_ZCOMPUTEDATTRIBUTES_INDEX ON ZASSET (ZCOMPUTEDATTRIBUTES);
CREATE INDEX ZASSET_ZCONVERSATION_INDEX ON ZASSET (ZCONVERSATION);
CREATE INDEX ZASSET_ZDAYGROUPHIGHLIGHTBEINGASSETS_INDEX ON ZASSET (ZDAYGROUPHIGHLIGHTBEINGASSETS);
CREATE INDEX ZASSET_ZDAYGROUPHIGHLIGHTBEINGEXTENDEDASSETS_INDEX ON ZASSET (ZDAYGROUPHIGHLIGHTBEINGEXTENDEDASSETS);
CREATE INDEX ZASSET_ZDAYGROUPHIGHLIGHTBEINGKEYASSETPRIVATE_INDEX ON ZASSET (ZDAYGROUPHIGHLIGHTBEINGKEYASSETPRIVATE);
CREATE INDEX ZASSET_ZDAYGROUPHIGHLIGHTBEINGKEYASSETSHARED_INDEX ON ZASSET (ZDAYGROUPHIGHLIGHTBEINGKEYASSETSHARED);
CREATE INDEX ZASSET_ZDAYGROUPHIGHLIGHTBEINGSUMMARYASSETS_INDEX ON ZASSET (ZDAYGROUPHIGHLIGHTBEINGSUMMARYASSETS);
CREATE INDEX ZASSET_ZDUPLICATEMETADATAMATCHINGALBUM_INDEX ON ZASSET (ZDUPLICATEMETADATAMATCHINGALBUM);
CREATE INDEX ZASSET_ZDUPLICATEPERCEPTUALMATCHINGALBUM_INDEX ON ZASSET (ZDUPLICATEPERCEPTUALMATCHINGALBUM);
CREATE INDEX ZASSET_ZEXTENDEDATTRIBUTES_INDEX ON ZASSET (ZEXTENDEDATTRIBUTES);
CREATE INDEX ZASSET_ZHIGHLIGHTBEINGASSETS_INDEX ON ZASSET (ZHIGHLIGHTBEINGASSETS);
CREATE INDEX ZASSET_ZHIGHLIGHTBEINGEXTENDEDASSETS_INDEX ON ZASSET (ZHIGHLIGHTBEINGEXTENDEDASSETS);
CREATE INDEX ZASSET_ZHIGHLIGHTBEINGKEYASSETPRIVATE_INDEX ON ZASSET (ZHIGHLIGHTBEINGKEYASSETPRIVATE);
CREATE INDEX ZASSET_ZHIGHLIGHTBEINGKEYASSETSHARED_INDEX ON ZASSET (ZHIGHLIGHTBEINGKEYASSETSHARED);
CREATE INDEX ZASSET_ZHIGHLIGHTBEINGSUMMARYASSETS_INDEX ON ZASSET (ZHIGHLIGHTBEINGSUMMARYASSETS);
CREATE INDEX ZASSET_ZIMPORTSESSION_INDEX ON ZASSET (ZIMPORTSESSION);
CREATE INDEX ZASSET_ZLIBRARYSCOPE_INDEX ON ZASSET (ZLIBRARYSCOPE);
CREATE INDEX ZASSET_ZMASTER_INDEX ON ZASSET (ZMASTER);
CREATE INDEX ZASSET_ZMEDIAANALYSISATTRIBUTES_INDEX ON ZASSET (ZMEDIAANALYSISATTRIBUTES);
CREATE INDEX ZASSET_ZMOMENT_INDEX ON ZASSET (ZMOMENT);
CREATE INDEX ZASSET_ZMOMENTSHARE_INDEX ON ZASSET (ZMOMENTSHARE);
CREATE INDEX ZASSET_ZMONTHHIGHLIGHTBEINGKEYASSETPRIVATE_INDEX ON ZASSET (ZMONTHHIGHLIGHTBEINGKEYASSETPRIVATE);
CREATE INDEX ZASSET_ZMONTHHIGHLIGHTBEINGKEYASSETSHARED_INDEX ON ZASSET (ZMONTHHIGHLIGHTBEINGKEYASSETSHARED);
CREATE INDEX ZASSET_ZPHOTOANALYSISATTRIBUTES_INDEX ON ZASSET (ZPHOTOANALYSISATTRIBUTES);
CREATE INDEX ZASSET_ZTRASHEDBYPARTICIPANT_INDEX ON ZASSET (ZTRASHEDBYPARTICIPANT);
CREATE INDEX ZASSET_ZYEARHIGHLIGHTBEINGKEYASSETPRIVATE_INDEX ON ZASSET (ZYEARHIGHLIGHTBEINGKEYASSETPRIVATE);
CREATE INDEX ZASSET_ZYEARHIGHLIGHTBEINGKEYASSETSHARED_INDEX ON ZASSET (ZYEARHIGHLIGHTBEINGKEYASSETSHARED);
CREATE INDEX Z_3SUGGESTIONSBEINGREPRESENTATIVEASSETS_Z_58SUGGESTIONSBEINGREPRESENTATIVEASSETS_INDEX ON Z_3SUGGESTIONSBEINGREPRESENTATIVEASSETS (Z_59SUGGESTIONSBEINGREPRESENTATIVEASSETS, Z_3REPRESENTATIVEASSETS1);
CREATE INDEX Z_3HIGHLIGHTSBEINGADAPTIVEEXPLICITLYREMOVEDASSETS_Z_50HIGHLIGHTSBEINGADAPTIVEEXPLICITLYREMOVEDASSETS_INDEX ON Z_3HIGHLIGHTSBEINGADAPTIVEEXPLICITLYREMOVEDASSETS (Z_51HIGHLIGHTSBEINGADAPTIVEEXPLICITLYREMOVEDASSETS, Z_3ADAPTIVEEXPLICITLYREMOVEDASSETS);
CREATE INDEX Z_3MEMORIESBEINGCURATEDASSETS_Z_44MEMORIESBEINGCURATEDASSETS_INDEX ON Z_3MEMORIESBEINGCURATEDASSETS (Z_45MEMORIESBEINGCURATEDASSETS, Z_3CURATEDASSETS);
CREATE INDEX Z_3MEMORIESBEINGMOVIECURATEDASSETS_Z_44MEMORIESBEINGMOVIECURATEDASSETS_INDEX ON Z_3MEMORIESBEINGMOVIECURATEDASSETS (Z_45MEMORIESBEINGMOVIECURATEDASSETS, Z_3MOVIECURATEDASSETS);
CREATE INDEX Z_3HIGHLIGHTSBEINGADAPTIVEEXTENDEDASSETS_Z_50HIGHLIGHTSBEINGADAPTIVEEXTENDEDASSETS_INDEX ON Z_3HIGHLIGHTSBEINGADAPTIVEEXTENDEDASSETS (Z_51HIGHLIGHTSBEINGADAPTIVEEXTENDEDASSETS, Z_3ADAPTIVEEXTENDEDASSETS);
CREATE INDEX Z_3HIGHLIGHTSBEINGADAPTIVEASSETS_Z_50HIGHLIGHTSBEINGADAPTIVEASSETS_INDEX ON Z_3HIGHLIGHTSBEINGADAPTIVEASSETS (Z_51HIGHLIGHTSBEINGADAPTIVEASSETS, Z_3ADAPTIVEASSETS);
CREATE INDEX Z_3SUGGESTIONSBEINGKEYASSETS_Z_58SUGGESTIONSBEINGKEYASSETS_INDEX ON Z_3SUGGESTIONSBEINGKEYASSETS (Z_59SUGGESTIONSBEINGKEYASSETS, Z_3KEYASSETS);
CREATE INDEX Z_3MEMORIESBEINGREPRESENTATIVEASSETS_Z_44MEMORIESBEINGREPRESENTATIVEASSETS_INDEX ON Z_3MEMORIESBEINGREPRESENTATIVEASSETS (Z_45MEMORIESBEINGREPRESENTATIVEASSETS, Z_3REPRESENTATIVEASSETS);
CREATE INDEX Z_3HIGHLIGHTSBEINGADAPTIVESUMMARYASSETS_Z_50HIGHLIGHTSBEINGADAPTIVESUMMARYASSETS_INDEX ON Z_3HIGHLIGHTSBEINGADAPTIVESUMMARYASSETS (Z_51HIGHLIGHTSBEINGADAPTIVESUMMARYASSETS, Z_3ADAPTIVESUMMARYASSETS);
CREATE INDEX Z_3MEMORIESBEINGUSERCURATEDASSETS_Z_44MEMORIESBEINGUSERCURATEDASSETS_INDEX ON Z_3MEMORIESBEINGUSERCURATEDASSETS (Z_45MEMORIESBEINGUSERCURATEDASSETS, Z_3USERCURATEDASSETS);
CREATE INDEX Z_3HIGHLIGHTSBEINGADAPTIVEEXPLICITLYADDEDASSETS_Z_50HIGHLIGHTSBEINGADAPTIVEEXPLICITLYADDEDASSETS_INDEX ON Z_3HIGHLIGHTSBEINGADAPTIVEEXPLICITLYADDEDASSETS (Z_51HIGHLIGHTSBEINGADAPTIVEEXPLICITLYADDEDASSETS, Z_3ADAPTIVEEXPLICITLYADDEDASSETS);
CREATE INDEX Z_3MEMORIESBEINGCUSTOMUSERASSETS_Z_44MEMORIESBEINGCUSTOMUSERASSETS_INDEX ON Z_3MEMORIESBEINGCUSTOMUSERASSETS (Z_45MEMORIESBEINGCUSTOMUSERASSETS, Z_3CUSTOMUSERASSETS);
CREATE INDEX Z_3MEMORIESBEINGEXTENDEDCURATEDASSETS_Z_44MEMORIESBEINGEXTENDEDCURATEDASSETS_INDEX ON Z_3MEMORIESBEINGEXTENDEDCURATEDASSETS (Z_45MEMORIESBEINGEXTENDEDCURATEDASSETS, Z_3EXTENDEDCURATEDASSETS);
CREATE INDEX ZASSETANALYSISSTATE_ZASSET_INDEX ON ZASSETANALYSISSTATE (ZASSET);
CREATE INDEX Z_AssetAnalysisState_bySortTokenIndex ON ZASSETANALYSISSTATE (ZSORTTOKEN COLLATE BINARY ASC);
CREATE INDEX Z_AssetAnalysisState_byWorkerTypeIndex ON ZASSETANALYSISSTATE (ZWORKERTYPE COLLATE BINARY ASC);
CREATE INDEX Z_AssetAnalysisState_compoundIndex ON ZASSETANALYSISSTATE (ZWORKERTYPE COLLATE BINARY ASC, ZSORTTOKEN COLLATE BINARY ASC);
CREATE INDEX Z_AssetAnalysisState_compoundIndex1 ON ZASSETANALYSISSTATE (ZANALYSISSTATE COLLATE BINARY ASC, ZWORKERTYPE COLLATE BINARY ASC, ZASSET COLLATE BINARY ASC);
CREATE INDEX ZASSETCONTRIBUTOR_ZPARTICIPANT_INDEX ON ZASSETCONTRIBUTOR (ZPARTICIPANT);
CREATE INDEX ZASSETCONTRIBUTOR_Z3LIBRARYSCOPEASSETCONTRIBUTORS_INDEX ON ZASSETCONTRIBUTOR (Z3LIBRARYSCOPEASSETCONTRIBUTORS);
CREATE INDEX ZASSETDESCRIPTION_ZASSETATTRIBUTES_INDEX ON ZASSETDESCRIPTION (ZASSETATTRIBUTES);
CREATE INDEX ZCHARACTERRECOGNITIONATTRIBUTES_ZMEDIAANALYSISASSETATTRIBUTES_INDEX ON ZCHARACTERRECOGNITIONATTRIBUTES (ZMEDIAANALYSISASSETATTRIBUTES);
CREATE INDEX ZCLOUDFEEDENTRY_Z_ENT_INDEX ON ZCLOUDFEEDENTRY (Z_ENT);
CREATE INDEX Z_CloudFeedEntry_byEntryDateIndex ON ZCLOUDFEEDENTRY (ZENTRYDATE COLLATE BINARY ASC);
CREATE INDEX Z_CloudFeedEntry_byEntryTypeNumberIndex ON ZCLOUDFEEDENTRY (ZENTRYTYPENUMBER COLLATE BINARY ASC);
CREATE INDEX Z_CloudFeedEntry_compoundIndex ON ZCLOUDFEEDENTRY (ZENTRYDATE COLLATE BINARY ASC, ZENTRYPRIORITYNUMBER COLLATE BINARY ASC, ZENTRYTYPENUMBER COLLATE BINARY ASC);
CREATE INDEX Z_CloudFeedEntry_compoundIndex1 ON ZCLOUDFEEDENTRY (Z_ENT COLLATE BINARY ASC, ZENTRYDATE COLLATE BINARY ASC);
CREATE INDEX ZCLOUDMASTER_ZMEDIAMETADATA_INDEX ON ZCLOUDMASTER (ZMEDIAMETADATA);
CREATE INDEX ZCLOUDMASTER_ZMOMENTSHARE_INDEX ON ZCLOUDMASTER (ZMOMENTSHARE);
CREATE INDEX Z_CloudMaster_byCloudLocalStateIndex ON ZCLOUDMASTER (ZCLOUDLOCALSTATE COLLATE BINARY ASC);
CREATE INDEX Z_CloudMaster_byCloudMasterGUIDIndex ON ZCLOUDMASTER (ZCLOUDMASTERGUID COLLATE BINARY ASC);
CREATE INDEX ZCLOUDMASTERMEDIAMETADATA_ZADDITIONALASSETATTRIBUTES_INDEX ON ZCLOUDMASTERMEDIAMETADATA (ZADDITIONALASSETATTRIBUTES);
CREATE INDEX ZCLOUDMASTERMEDIAMETADATA_ZCLOUDMASTER_INDEX ON ZCLOUDMASTERMEDIAMETADATA (ZCLOUDMASTER);
CREATE INDEX ZCLOUDRESOURCE_ZASSET_INDEX ON ZCLOUDRESOURCE (ZASSET);
CREATE INDEX ZCLOUDRESOURCE_ZCLOUDMASTER_INDEX ON ZCLOUDRESOURCE (ZCLOUDMASTER);
CREATE INDEX Z_CloudResource_byAssetUuidIndex ON ZCLOUDRESOURCE (ZASSETUUID COLLATE BINARY ASC);
CREATE INDEX Z_CloudResource_byDateCreatedIndex ON ZCLOUDRESOURCE (ZDATECREATED COLLATE BINARY ASC);
CREATE INDEX Z_CloudResource_byIsAvailableIndex ON ZCLOUDRESOURCE (ZISAVAILABLE COLLATE BINARY ASC);
CREATE INDEX Z_CloudResource_byIsLocallyAvailableIndex ON ZCLOUDRESOURCE (ZISLOCALLYAVAILABLE COLLATE BINARY ASC);
CREATE INDEX Z_CloudResource_byTypeIndex ON ZCLOUDRESOURCE (ZTYPE COLLATE BINARY ASC);
CREATE INDEX Z_CloudResource_compoundIndex ON ZCLOUDRESOURCE (ZTYPE COLLATE BINARY ASC, ZISLOCALLYAVAILABLE COLLATE BINARY ASC, ZISAVAILABLE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZLASTONDEMANDDOWNLOADDATE COLLATE BINARY ASC, ZLASTPREFETCHDATE COLLATE BINARY ASC);
CREATE INDEX ZCLOUDSHAREDALBUMINVITATIONRECORD_ZALBUM_INDEX ON ZCLOUDSHAREDALBUMINVITATIONRECORD (ZALBUM);
CREATE INDEX ZCLOUDSHAREDCOMMENT_ZCLOUDFEEDCOMMENTENTRY_INDEX ON ZCLOUDSHAREDCOMMENT (ZCLOUDFEEDCOMMENTENTRY);
CREATE INDEX ZCLOUDSHAREDCOMMENT_ZCLOUDFEEDLIKECOMMENTENTRY_INDEX ON ZCLOUDSHAREDCOMMENT (ZCLOUDFEEDLIKECOMMENTENTRY);
CREATE INDEX ZCLOUDSHAREDCOMMENT_ZCOMMENTEDASSET_INDEX ON ZCLOUDSHAREDCOMMENT (ZCOMMENTEDASSET);
CREATE INDEX ZCLOUDSHAREDCOMMENT_ZLIKEDASSET_INDEX ON ZCLOUDSHAREDCOMMENT (ZLIKEDASSET);
CREATE INDEX Z_CloudSharedComment_byCloudGUIDIndex ON ZCLOUDSHAREDCOMMENT (ZCLOUDGUID COLLATE BINARY ASC);
CREATE INDEX Z_CloudSharedComment_byCommentDateIndex ON ZCLOUDSHAREDCOMMENT (ZCOMMENTDATE COLLATE BINARY ASC);
CREATE INDEX ZCOMPUTEDASSETATTRIBUTES_ZASSET_INDEX ON ZCOMPUTEDASSETATTRIBUTES (ZASSET);
CREATE INDEX Z_DeferredRebuildFace_byAssetCloudGUIDIndex ON ZDEFERREDREBUILDFACE (ZASSETCLOUDGUID COLLATE BINARY ASC);
CREATE INDEX ZDETECTEDFACE_ZASSETFORFACE_INDEX ON ZDETECTEDFACE (ZASSETFORFACE);
CREATE INDEX ZDETECTEDFACE_ZASSETFORTEMPORALDETECTEDFACES_INDEX ON ZDETECTEDFACE (ZASSETFORTEMPORALDETECTEDFACES);
CREATE INDEX ZDETECTEDFACE_ZASSETFORTORSO_INDEX ON ZDETECTEDFACE (ZASSETFORTORSO);
CREATE INDEX ZDETECTEDFACE_ZFACECROP_INDEX ON ZDETECTEDFACE (ZFACECROP);
CREATE INDEX ZDETECTEDFACE_ZFACEGROUP_INDEX ON ZDETECTEDFACE (ZFACEGROUP);
CREATE INDEX ZDETECTEDFACE_ZFACEGROUPBEINGKEYFACE_INDEX ON ZDETECTEDFACE (ZFACEGROUPBEINGKEYFACE);
CREATE INDEX ZDETECTEDFACE_ZFACEPRINT_INDEX ON ZDETECTEDFACE (ZFACEPRINT);
CREATE INDEX ZDETECTEDFACE_ZPERSONBEINGKEYFACE_INDEX ON ZDETECTEDFACE (ZPERSONBEINGKEYFACE);
CREATE INDEX ZDETECTEDFACE_ZPERSONFORFACE_INDEX ON ZDETECTEDFACE (ZPERSONFORFACE);
CREATE INDEX ZDETECTEDFACE_ZPERSONFORTEMPORALDETECTEDFACES_INDEX ON ZDETECTEDFACE (ZPERSONFORTEMPORALDETECTEDFACES);
CREATE INDEX ZDETECTEDFACE_ZPERSONFORTORSO_INDEX ON ZDETECTEDFACE (ZPERSONFORTORSO);
CREATE INDEX Z_18REJECTEDPERSONS_Z_47REJECTEDPERSONS_INDEX ON "Z_19REJECTEDPERSONS" (Z_48REJECTEDPERSONS, Z_19REJECTEDFACES);
CREATE INDEX Z_18REJECTEDPERSONSNEEDINGFACECROPS_Z_47REJECTEDPERSONSNEEDINGFACECROPS_INDEX ON "Z_19REJECTEDPERSONSNEEDINGFACECROPS" (Z_48REJECTEDPERSONSNEEDINGFACECROPS, Z_19REJECTEDFACESNEEDINGFACECROPS);
CREATE INDEX Z_18CLUSTERREJECTEDPERSONS_Z_47CLUSTERREJECTEDPERSONS_INDEX ON "Z_19CLUSTERREJECTEDPERSONS" (Z_48CLUSTERREJECTEDPERSONS, Z_19CLUSTERREJECTEDFACES);
CREATE INDEX Z_DetectedFace_byCloudLocalStateIndex ON ZDETECTEDFACE (ZCLOUDLOCALSTATE COLLATE BINARY ASC);
CREATE INDEX Z_DetectedFace_byClusterSequenceNumberIndex ON ZDETECTEDFACE (ZCLUSTERSEQUENCENUMBER COLLATE BINARY ASC);
CREATE INDEX Z_DetectedFace_byUuidIndex ON ZDETECTEDFACE (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_DetectedFace_byVuObservationIDIndex ON ZDETECTEDFACE (ZVUOBSERVATIONID COLLATE BINARY ASC);
CREATE INDEX ZDETECTEDFACEGROUP_ZASSOCIATEDPERSON_INDEX ON ZDETECTEDFACEGROUP (ZASSOCIATEDPERSON);
CREATE INDEX ZDETECTEDFACEGROUP_ZKEYFACE_INDEX ON ZDETECTEDFACEGROUP (ZKEYFACE);
CREATE INDEX Z_DetectedFaceGroup_byPersonBuilderStateIndex ON ZDETECTEDFACEGROUP (ZPERSONBUILDERSTATE COLLATE BINARY ASC);
CREATE INDEX ZDETECTEDFACEPRINT_ZFACE_INDEX ON ZDETECTEDFACEPRINT (ZFACE);
CREATE INDEX ZDETECTIONTRAIT_ZDETECTION_INDEX ON ZDETECTIONTRAIT (ZDETECTION);
CREATE INDEX ZEDITEDIPTCATTRIBUTES_ZASSETATTRIBUTES_INDEX ON ZEDITEDIPTCATTRIBUTES (ZASSETATTRIBUTES);
CREATE INDEX ZEXTENDEDATTRIBUTES_ZASSET_INDEX ON ZEXTENDEDATTRIBUTES (ZASSET);
CREATE INDEX ZFACECROP_ZASSET_INDEX ON ZFACECROP (ZASSET);
CREATE INDEX ZFACECROP_ZFACE_INDEX ON ZFACECROP (ZFACE);
CREATE INDEX ZFACECROP_ZPERSON_INDEX ON ZFACECROP (ZPERSON);
CREATE INDEX Z_FaceCrop_byCloudLocalStateIndex ON ZFACECROP (ZCLOUDLOCALSTATE COLLATE BINARY ASC);
CREATE INDEX Z_FaceCrop_byStateIndex ON ZFACECROP (ZSTATE COLLATE BINARY ASC);
CREATE INDEX Z_FaceCrop_byUuidIndex ON ZFACECROP (ZUUID COLLATE BINARY ASC);
CREATE INDEX ZFILESYSTEMBOOKMARK_ZRESOURCE_INDEX ON ZFILESYSTEMBOOKMARK (ZRESOURCE);
CREATE INDEX Z_FileSystemVolume_byUuidIndex ON ZFILESYSTEMVOLUME (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_FileSystemVolume_byVolumeUuidStringIndex ON ZFILESYSTEMVOLUME (ZVOLUMEUUIDSTRING COLLATE BINARY ASC);
CREATE INDEX ZGENERICALBUM_ZCUSTOMKEYASSET_INDEX ON ZGENERICALBUM (ZCUSTOMKEYASSET);
CREATE INDEX ZGENERICALBUM_ZKEYASSET_INDEX ON ZGENERICALBUM (ZKEYASSET);
CREATE INDEX ZGENERICALBUM_ZPARENTFOLDER_INDEX ON ZGENERICALBUM (ZPARENTFOLDER);
CREATE INDEX ZGENERICALBUM_ZSECONDARYKEYASSET_INDEX ON ZGENERICALBUM (ZSECONDARYKEYASSET);
CREATE INDEX ZGENERICALBUM_ZTERTIARYKEYASSET_INDEX ON ZGENERICALBUM (ZTERTIARYKEYASSET);
CREATE INDEX Z_27ALBUMLISTS_Z_2ALBUMLISTS_INDEX ON "Z_28ALBUMLISTS" (Z_2ALBUMLISTS, Z_28ALBUMS);
CREATE INDEX ZGENERICALBUM_Z_ENT_INDEX ON ZGENERICALBUM (Z_ENT);
CREATE INDEX Z_GenericAlbum_byCloudGUIDIndex ON ZGENERICALBUM (ZCLOUDGUID COLLATE BINARY ASC);
CREATE INDEX Z_GenericAlbum_byCloudLocalStateIndex ON ZGENERICALBUM (ZCLOUDLOCALSTATE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAlbum_byImportSessionIDIndex ON ZGENERICALBUM (ZIMPORTSESSIONID COLLATE BINARY ASC);
CREATE INDEX Z_GenericAlbum_byKindIndex ON ZGENERICALBUM (ZKIND COLLATE BINARY ASC, Z_ENT COLLATE BINARY ASC);
CREATE INDEX Z_GenericAlbum_bySyncEventOrderKeyIndex ON ZGENERICALBUM (ZSYNCEVENTORDERKEY COLLATE BINARY ASC);
CREATE INDEX Z_GenericAlbum_byUuidIndex ON ZGENERICALBUM (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_28ASSETS_Z_3ASSETS_INDEX ON "Z_29ASSETS" (Z_3ASSETS, Z_29ALBUMS);
CREATE INDEX Z_Album_bySearchIndexRebuildState ON ZGENERICALBUM (ZSEARCHINDEXREBUILDSTATE COLLATE BINARY ASC) WHERE ZSEARCHINDEXREBUILDSTATE = 1;
CREATE INDEX Z_FetchingAlbum_bySearchIndexRebuildState ON ZGENERICALBUM (ZSEARCHINDEXREBUILDSTATE1 COLLATE BINARY ASC) WHERE ZSEARCHINDEXREBUILDSTATE1 = 1;
CREATE INDEX Z_GlobalKeyValue_byKeyIndex ON ZGLOBALKEYVALUE (ZKEY COLLATE BINARY ASC);
CREATE UNIQUE INDEX Z_GlobalKeyValue_UNIQUE_key ON ZGLOBALKEYVALUE (ZKEY COLLATE BINARY ASC);
CREATE INDEX ZINTERNALRESOURCE_ZASSET_INDEX ON ZINTERNALRESOURCE (ZASSET);
CREATE INDEX ZINTERNALRESOURCE_ZFILESYSTEMBOOKMARK_INDEX ON ZINTERNALRESOURCE (ZFILESYSTEMBOOKMARK);
CREATE INDEX ZINTERNALRESOURCE_ZFILESYSTEMVOLUME_INDEX ON ZINTERNALRESOURCE (ZFILESYSTEMVOLUME);
CREATE INDEX ZINTERNALRESOURCE_ZTRANSIENTCLOUDMASTER_INDEX ON ZINTERNALRESOURCE (ZTRANSIENTCLOUDMASTER);
CREATE INDEX Z_InternalResource_byCloudMasterDateCreatedIndex ON ZINTERNALRESOURCE (ZCLOUDMASTERDATECREATED COLLATE BINARY ASC);
CREATE INDEX Z_InternalResource_byFileIDIndex ON ZINTERNALRESOURCE (ZFILEID COLLATE BINARY ASC);
CREATE INDEX Z_InternalResource_byLocalAvailabilityIndex ON ZINTERNALRESOURCE (ZLOCALAVAILABILITY COLLATE BINARY ASC, ZLOCALAVAILABILITYTARGET COLLATE BINARY ASC, ZRECIPEID COLLATE BINARY ASC);
CREATE INDEX Z_InternalResource_compoundIndex ON ZINTERNALRESOURCE (ZTRASHEDDATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC);
CREATE INDEX Z_InternalResource_compoundIndex1 ON ZINTERNALRESOURCE (ZDATASTORECLASSID COLLATE BINARY ASC, ZDATASTORESUBTYPE COLLATE BINARY ASC, ZLOCALAVAILABILITY COLLATE BINARY ASC, ZREMOTEAVAILABILITY COLLATE BINARY ASC, ZASSET COLLATE BINARY ASC);
CREATE INDEX Z_InternalResource_forCloudPrefetch ON ZINTERNALRESOURCE (ZDATASTORECLASSID COLLATE BINARY ASC, ZREMOTEAVAILABILITY COLLATE BINARY ASC, ZLOCALAVAILABILITY COLLATE BINARY ASC, ZDATASTORESUBTYPE COLLATE BINARY ASC, ZVERSION COLLATE BINARY ASC, ZCLOUDMASTERDATECREATED COLLATE BINARY DESC) WHERE (ZDATASTORECLASSID = 0 AND ZREMOTEAVAILABILITY = 1 AND ZLOCALAVAILABILITY = -1);
CREATE INDEX Z_InternalResource_forCloudPrefetchThumbs ON ZINTERNALRESOURCE (ZASSET COLLATE BINARY ASC, ZDATASTORECLASSID COLLATE BINARY ASC, ZDATASTORESUBTYPE COLLATE BINARY ASC, ZVERSION COLLATE BINARY ASC) WHERE (ZDATASTORECLASSID = 0 AND ZDATASTORESUBTYPE = 5);
CREATE UNIQUE INDEX Z_InternalResource_UNIQUE_asset_resourceType_version_recipeID_compactUTI ON ZINTERNALRESOURCE (ZASSET COLLATE BINARY ASC, ZRESOURCETYPE COLLATE BINARY ASC, ZVERSION COLLATE BINARY ASC, ZRECIPEID COLLATE BINARY ASC, ZCOMPACTUTI COLLATE BINARY ASC);
CREATE INDEX Z_Keyword_byTitleIndex ON ZKEYWORD (ZTITLE COLLATE BINARY ASC);
CREATE INDEX Z_Keyword_byUuidIndex ON ZKEYWORD (ZUUID COLLATE BINARY ASC);
CREATE UNIQUE INDEX Z_Keyword_UNIQUE_title ON ZKEYWORD (ZTITLE COLLATE BINARY ASC);
CREATE INDEX ZLEGACYFACE_ZASSET_INDEX ON ZLEGACYFACE (ZASSET);
CREATE INDEX Z_LegacyFace_byAlbumUUIDIndex ON ZLEGACYFACE (ZALBUMUUID COLLATE BINARY ASC);
CREATE INDEX Z_LegacyFace_byIdentifierIndex ON ZLEGACYFACE (ZIDENTIFIER COLLATE BINARY ASC);
CREATE UNIQUE INDEX Z_LimitedLibraryFetchFilter_UNIQUE_applicationIdentifier ON ZLIMITEDLIBRARYFETCHFILTER (ZAPPLICATIONIDENTIFIER COLLATE BINARY ASC);
CREATE INDEX ZMEDIAANALYSISASSETATTRIBUTES_ZASSET_INDEX ON ZMEDIAANALYSISASSETATTRIBUTES (ZASSET);
CREATE INDEX ZMEDIAANALYSISASSETATTRIBUTES_ZCHARACTERRECOGNITIONATTRIBUTES_INDEX ON ZMEDIAANALYSISASSETATTRIBUTES (ZCHARACTERRECOGNITIONATTRIBUTES);
CREATE INDEX ZMEDIAANALYSISASSETATTRIBUTES_ZVISUALSEARCHATTRIBUTES_INDEX ON ZMEDIAANALYSISASSETATTRIBUTES (ZVISUALSEARCHATTRIBUTES);
CREATE INDEX ZMEMORY_ZKEYASSET_INDEX ON ZMEMORY (ZKEYASSET);
CREATE INDEX Z_Memory_byCloudLocalStateIndex ON ZMEMORY (ZCLOUDLOCALSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Memory_byLastMoviePlayedDateIndex ON ZMEMORY (ZLASTMOVIEPLAYEDDATE COLLATE BINARY ASC);
CREATE INDEX Z_Memory_byLastViewedDateIndex ON ZMEMORY (ZLASTVIEWEDDATE COLLATE BINARY ASC);
CREATE INDEX Z_Memory_byPendingIndex ON ZMEMORY (ZPENDINGSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Memory_byUuidIndex ON ZMEMORY (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_Memory_compoundIndex ON ZMEMORY (ZCREATIONDATE COLLATE BINARY DESC, ZREJECTED COLLATE BINARY DESC, ZFEATUREDSTATE COLLATE BINARY ASC, ZPENDINGSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Memory_byFeaturedState ON ZMEMORY (ZFEATUREDSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Memory_byNonNilBlacklistedFeature ON ZMEMORY (ZBLACKLISTEDFEATURE COLLATE BINARY ASC) WHERE ZBLACKLISTEDFEATURE IS NOT NULL;
CREATE INDEX Z_Memory_byNonNilGraphMemoryIdentifier ON ZMEMORY (ZGRAPHMEMORYIDENTIFIER COLLATE BINARY ASC) WHERE ZGRAPHMEMORYIDENTIFIER IS NOT NULL;
CREATE INDEX Z_Memory_bySearchIndexRebuildState ON ZMEMORY (ZSEARCHINDEXREBUILDSTATE COLLATE BINARY ASC) WHERE ZSEARCHINDEXREBUILDSTATE = 1;
CREATE INDEX Z_MigrationHistory_byMigrationDateIndex ON ZMIGRATIONHISTORY (ZMIGRATIONDATE COLLATE BINARY ASC);
CREATE INDEX Z_MigrationHistory_byIndexIndex ON ZMIGRATIONHISTORY (ZINDEX COLLATE BINARY ASC);
CREATE UNIQUE INDEX Z_MigrationHistory_UNIQUE_index ON ZMIGRATIONHISTORY (ZINDEX COLLATE BINARY ASC);
CREATE INDEX ZMOMENT_ZHIGHLIGHT_INDEX ON ZMOMENT (ZHIGHLIGHT);
CREATE INDEX Z_Moment_byEndDateIndex ON ZMOMENT (ZENDDATE COLLATE BINARY ASC);
CREATE INDEX Z_Moment_byRepresentativeDateIndex ON ZMOMENT (ZREPRESENTATIVEDATE COLLATE BINARY ASC);
CREATE INDEX Z_Moment_byStartDateIndex ON ZMOMENT (ZSTARTDATE COLLATE BINARY ASC);
CREATE INDEX Z_Moment_byTrashedStateIndex ON ZMOMENT (ZTRASHEDSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Moment_byUuidIndex ON ZMOMENT (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_Moment_compoundIndex ON ZMOMENT (ZSTARTDATE COLLATE BINARY ASC, ZENDDATE COLLATE BINARY ASC);
CREATE INDEX ZPERSON_ZASSOCIATEDFACEGROUP_INDEX ON ZPERSON (ZASSOCIATEDFACEGROUP);
CREATE INDEX ZPERSON_ZKEYFACE_INDEX ON ZPERSON (ZKEYFACE);
CREATE INDEX ZPERSON_ZMERGETARGETPERSON_INDEX ON ZPERSON (ZMERGETARGETPERSON);
CREATE INDEX ZPERSON_ZSHAREPARTICIPANT_INDEX ON ZPERSON (ZSHAREPARTICIPANT);
CREATE INDEX Z_47MERGECANDIDATES_REFLEXIVE_INDEX ON "Z_48MERGECANDIDATES" (REFLEXIVE, Z_48MERGECANDIDATES);
CREATE INDEX Z_47INVALIDMERGECANDIDATES_REFLEXIVE_INDEX ON "Z_48INVALIDMERGECANDIDATES" (REFLEXIVE, Z_48INVALIDMERGECANDIDATES);
CREATE INDEX Z_47MERGECANDIDATESWITHCONFIDENCE_REFLEXIVE_INDEX ON "Z_48MERGECANDIDATESWITHCONFIDENCE" (REFLEXIVE, Z_48MERGECANDIDATESWITHCONFIDENCE);
CREATE INDEX Z_Person_byCloudLocalStateAndVerifiedType ON ZPERSON (ZCLOUDLOCALSTATE COLLATE BINARY ASC, ZVERIFIEDTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Person_byFaceCountIndex ON ZPERSON (ZFACECOUNT COLLATE BINARY ASC);
CREATE INDEX Z_Person_byManualOrderIndex ON ZPERSON (ZMANUALORDER COLLATE BINARY ASC);
CREATE INDEX Z_Person_forPersonUriFetch ON ZPERSON (ZPERSONURI COLLATE BINARY ASC, ZFACECOUNT COLLATE BINARY ASC);
CREATE INDEX Z_Person_byPersonUUIDIndex ON ZPERSON (ZPERSONUUID COLLATE BINARY ASC);
CREATE INDEX Z_Person_byTypeIndex ON ZPERSON (ZTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Person_byVerifiedTypeIndex ON ZPERSON (ZVERIFIEDTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Person_compoundIndex ON ZPERSON (ZVERIFIEDTYPE COLLATE BINARY ASC, ZFACECOUNT COLLATE BINARY ASC, ZTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Person_bySuggestedForClientType ON ZPERSON (ZSUGGESTEDFORCLIENTTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Person_byMdIDIndex ON ZPERSON (ZMDID COLLATE BINARY ASC) WHERE ZMDID IS NOT NULL;
CREATE INDEX ZPERSONREFERENCE_ZASSETATTRIBUTES_INDEX ON ZPERSONREFERENCE (ZASSETATTRIBUTES);
CREATE INDEX ZPERSONREFERENCE_ZPERSON_INDEX ON ZPERSONREFERENCE (ZPERSON);
CREATE INDEX ZPHOTOANALYSISASSETATTRIBUTES_ZASSET_INDEX ON ZPHOTOANALYSISASSETATTRIBUTES (ZASSET);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZADAPTIVEKEYASSETPRIVATE_INDEX ON ZPHOTOSHIGHLIGHT (ZADAPTIVEKEYASSETPRIVATE);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZADAPTIVEKEYASSETPRIVATEUSEREDITED_INDEX ON ZPHOTOSHIGHLIGHT (ZADAPTIVEKEYASSETPRIVATEUSEREDITED);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZADAPTIVEKEYASSETSHARED_INDEX ON ZPHOTOSHIGHLIGHT (ZADAPTIVEKEYASSETSHARED);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZADAPTIVEKEYASSETSHAREDUSEREDITED_INDEX ON ZPHOTOSHIGHLIGHT (ZADAPTIVEKEYASSETSHAREDUSEREDITED);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZDAYGROUPKEYASSETPRIVATE_INDEX ON ZPHOTOSHIGHLIGHT (ZDAYGROUPKEYASSETPRIVATE);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZDAYGROUPKEYASSETSHARED_INDEX ON ZPHOTOSHIGHLIGHT (ZDAYGROUPKEYASSETSHARED);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZKEYASSETPRIVATE_INDEX ON ZPHOTOSHIGHLIGHT (ZKEYASSETPRIVATE);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZKEYASSETSHARED_INDEX ON ZPHOTOSHIGHLIGHT (ZKEYASSETSHARED);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZMONTHKEYASSETPRIVATE_INDEX ON ZPHOTOSHIGHLIGHT (ZMONTHKEYASSETPRIVATE);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZMONTHKEYASSETSHARED_INDEX ON ZPHOTOSHIGHLIGHT (ZMONTHKEYASSETSHARED);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZPARENTDAYGROUPPHOTOSHIGHLIGHT_INDEX ON ZPHOTOSHIGHLIGHT (ZPARENTDAYGROUPPHOTOSHIGHLIGHT);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZPARENTPHOTOSHIGHLIGHT_INDEX ON ZPHOTOSHIGHLIGHT (ZPARENTPHOTOSHIGHLIGHT);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZYEARKEYASSETPRIVATE_INDEX ON ZPHOTOSHIGHLIGHT (ZYEARKEYASSETPRIVATE);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZYEARKEYASSETSHARED_INDEX ON ZPHOTOSHIGHLIGHT (ZYEARKEYASSETSHARED);
CREATE INDEX Z_PhotosHighlight_byKindIndex ON ZPHOTOSHIGHLIGHT (ZKIND COLLATE BINARY ASC);
CREATE INDEX Z_PhotosHighlight_byUuidIndex ON ZPHOTOSHIGHLIGHT (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_PhotosHighlight_byDateRangeAndKind ON ZPHOTOSHIGHLIGHT (ZKIND COLLATE BINARY ASC, ZSTARTDATE COLLATE BINARY ASC, ZENDDATE COLLATE BINARY ASC);
CREATE INDEX Z_PhotosHighlight_bySearchIndexRebuildState ON ZPHOTOSHIGHLIGHT (ZSEARCHINDEXREBUILDSTATE COLLATE BINARY ASC) WHERE ZSEARCHINDEXREBUILDSTATE = 1;
CREATE INDEX Z_Question_byUuidIndex ON ZQUESTION (ZUUID COLLATE BINARY ASC);
CREATE INDEX ZSCENECLASSIFICATION_ZASSETATTRIBUTES_INDEX ON ZSCENECLASSIFICATION (ZASSETATTRIBUTES);
CREATE INDEX ZSCENECLASSIFICATION_ZASSETATTRIBUTESFORTEMPORALSCENECLASSIFICATIONS_INDEX ON ZSCENECLASSIFICATION (ZASSETATTRIBUTESFORTEMPORALSCENECLASSIFICATIONS);
CREATE INDEX Z_SceneClassification_bySceneIdentifierAndConfidence ON ZSCENECLASSIFICATION (ZSCENEIDENTIFIER COLLATE BINARY ASC, ZCONFIDENCE COLLATE BINARY ASC);
CREATE INDEX Z_SceneClassification_forSceneClassificationsByAsset ON ZSCENECLASSIFICATION (ZASSETATTRIBUTES COLLATE BINARY ASC, ZSCENEIDENTIFIER COLLATE BINARY ASC, ZCONFIDENCE COLLATE BINARY ASC, ZPACKEDBOUNDINGBOXRECT COLLATE BINARY ASC);
CREATE INDEX ZSCENEPRINT_ZADDITIONALASSETATTRIBUTES_INDEX ON ZSCENEPRINT (ZADDITIONALASSETATTRIBUTES);
CREATE INDEX ZSHARE_Z_ENT_INDEX ON ZSHARE (Z_ENT);
CREATE INDEX Z_Share_byUuidIndex ON ZSHARE (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_Share_byCreationDate ON ZSHARE (Z_ENT COLLATE BINARY ASC, ZCREATIONDATE COLLATE BINARY ASC);
CREATE INDEX Z_Share_byShareURLIndex ON ZSHARE (ZSHAREURL COLLATE BINARY ASC);
CREATE UNIQUE INDEX Z_Share_UNIQUE_scopeIdentifier ON ZSHARE (ZSCOPEIDENTIFIER COLLATE BINARY ASC);
CREATE INDEX ZSHAREPARTICIPANT_ZPERSON_INDEX ON ZSHAREPARTICIPANT (ZPERSON);
CREATE INDEX ZSHAREPARTICIPANT_ZSHARE_INDEX ON ZSHAREPARTICIPANT (ZSHARE);
CREATE INDEX Z_ShareParticipant_byUuidIndex ON ZSHAREPARTICIPANT (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_Suggestion_byStateIndex ON ZSUGGESTION (ZSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Suggestion_byCreationDate ON ZSUGGESTION (ZCREATIONDATE COLLATE BINARY DESC);
CREATE INDEX Z_Suggestion_byFeaturedState ON ZSUGGESTION (ZFEATUREDSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Suggestion_notDeniedByType ON ZSUGGESTION (ZTYPE COLLATE BINARY ASC) WHERE ZSTATE <> 4;
CREATE INDEX Z_Suggestion_notDeniedBySubtype ON ZSUGGESTION (ZSUBTYPE COLLATE BINARY ASC) WHERE ZSTATE <> 4;
CREATE INDEX ZUNMANAGEDADJUSTMENT_ZASSETATTRIBUTES_INDEX ON ZUNMANAGEDADJUSTMENT (ZASSETATTRIBUTES);
CREATE INDEX ZUSERFEEDBACK_ZMEMORY_INDEX ON ZUSERFEEDBACK (ZMEMORY);
CREATE INDEX ZUSERFEEDBACK_ZPERSON_INDEX ON ZUSERFEEDBACK (ZPERSON);
CREATE INDEX Z_UserFeedback_byFeatureIndex ON ZUSERFEEDBACK (ZFEATURE COLLATE BINARY ASC);
CREATE INDEX Z_UserFeedback_byTypeIndex ON ZUSERFEEDBACK (ZTYPE COLLATE BINARY ASC);
CREATE INDEX Z_UserFeedback_byUuidIndex ON ZUSERFEEDBACK (ZUUID COLLATE BINARY ASC);
CREATE INDEX ZVISUALSEARCHATTRIBUTES_ZMEDIAANALYSISASSETATTRIBUTES_INDEX ON ZVISUALSEARCHATTRIBUTES (ZMEDIAANALYSISASSETATTRIBUTES);
CREATE VIRTUAL TABLE Z_RT_Asset_boundedByRect USING RTREE (Z_PK INTEGER PRIMARY KEY, ZLATITUDE_MIN FLOAT, ZLATITUDE_MAX FLOAT, ZLONGITUDE_MIN FLOAT, ZLONGITUDE_MAX FLOAT)
/* Z_RT_Asset_boundedByRect(Z_PK,ZLATITUDE_MIN,ZLATITUDE_MAX,ZLONGITUDE_MIN,ZLONGITUDE_MAX) */;
CREATE TABLE IF NOT EXISTS "Z_RT_Asset_boundedByRect_rowid"(rowid INTEGER PRIMARY KEY,nodeno);
CREATE TABLE IF NOT EXISTS "Z_RT_Asset_boundedByRect_node"(nodeno INTEGER PRIMARY KEY,data);
CREATE TABLE IF NOT EXISTS "Z_RT_Asset_boundedByRect_parent"(nodeno INTEGER PRIMARY KEY,parentnode);
CREATE TRIGGER Z_RT_Asset_boundedByRect_INSERT AFTER INSERT ON ZASSET FOR EACH ROW BEGIN INSERT OR REPLACE INTO Z_RT_Asset_boundedByRect (Z_PK, ZLATITUDE_MIN, ZLATITUDE_MAX, ZLONGITUDE_MIN, ZLONGITUDE_MAX) VALUES (NEW.Z_PK, NEW.ZLATITUDE ,NEW.ZLATITUDE, NEW.ZLONGITUDE, NEW.ZLONGITUDE) ; END;
CREATE TRIGGER Z_RT_Asset_boundedByRect_UPDATE AFTER UPDATE ON ZASSET FOR EACH ROW BEGIN DELETE FROM Z_RT_Asset_boundedByRect WHERE Z_PK = NEW.Z_PK ; INSERT INTO Z_RT_Asset_boundedByRect (Z_PK, ZLATITUDE_MIN, ZLATITUDE_MAX, ZLONGITUDE_MIN, ZLONGITUDE_MAX) VALUES (NEW.Z_PK, NEW.ZLATITUDE ,NEW.ZLATITUDE, NEW.ZLONGITUDE, NEW.ZLONGITUDE) ; END;
CREATE TRIGGER Z_RT_Asset_boundedByRect_DELETE AFTER DELETE ON ZASSET FOR EACH ROW BEGIN DELETE FROM Z_RT_Asset_boundedByRect WHERE Z_PK = OLD.Z_PK ; END;
CREATE TABLE Z_METADATA (Z_VERSION INTEGER PRIMARY KEY, Z_UUID VARCHAR(255), Z_PLIST BLOB);
CREATE TABLE Z_MODELCACHE (Z_CONTENT BLOB);
CREATE TABLE ACHANGE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCHANGETYPE INTEGER, ZENTITY INTEGER, ZENTITYPK INTEGER, ZTRANSACTIONID INTEGER, ZCOLUMNS BLOB, ZTOMBSTONE0 BLOB, ZTOMBSTONE1 BLOB, ZTOMBSTONE2 BLOB, ZTOMBSTONE3 BLOB, ZTOMBSTONE4 BLOB, ZTOMBSTONE5 BLOB );
CREATE TABLE ATRANSACTION ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZAUTHORTS INTEGER, ZBUNDLEIDTS INTEGER, ZCONTEXTNAMETS INTEGER, ZPROCESSIDTS INTEGER, ZTIMESTAMP FLOAT, ZAUTHOR VARCHAR, ZBUNDLEID VARCHAR, ZCONTEXTNAME VARCHAR, ZPROCESSID VARCHAR, ZQUERYGEN BLOB );
CREATE TABLE ATRANSACTIONSTRING ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZNAME VARCHAR );
CREATE INDEX ACHANGE_ZTRANSACTIONID_INDEX ON ACHANGE (ZTRANSACTIONID);
CREATE INDEX ATRANSACTION_ZAUTHORTS_INDEX ON ATRANSACTION (ZAUTHORTS);
CREATE INDEX ATRANSACTION_ZBUNDLEIDTS_INDEX ON ATRANSACTION (ZBUNDLEIDTS);
CREATE INDEX ATRANSACTION_ZCONTEXTNAMETS_INDEX ON ATRANSACTION (ZCONTEXTNAMETS);
CREATE INDEX ATRANSACTION_ZPROCESSIDTS_INDEX ON ATRANSACTION (ZPROCESSIDTS);
CREATE INDEX Z_TRANSACTION_TransactionAuthorIndex ON ATRANSACTION (ZAUTHOR COLLATE BINARY ASC);
CREATE INDEX Z_TRANSACTION_TransactionTimestampIndex ON ATRANSACTION (ZTIMESTAMP COLLATE BINARY ASC);
CREATE UNIQUE INDEX Z_TRANSACTIONSTRING_UNIQUE_NAME ON ATRANSACTIONSTRING (ZNAME COLLATE BINARY ASC);
CREATE INDEX RADAR_10322662_INDEX ON "Z_29ASSETS" (Z_29ALBUMS, Z_3ASSETS, Z_FOK_3ASSETS);
CREATE INDEX RADAR_22158684_INDEX ON "Z_29ASSETS" (Z_29ALBUMS, Z_FOK_3ASSETS, Z_3ASSETS);
CREATE TABLE ZCOMPUTESYNCATTRIBUTES ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZLOCALANALYSISMAJORVERSION INTEGER, ZLOCALANALYSISSTAGE INTEGER, ZASSET INTEGER, ZCLOUDCOMPUTESTATELASTUPDATEDDATE TIMESTAMP, ZCLOUDCOMPUTESTATEADJUSTMENTFINGERPRINT VARCHAR, ZCLOUDCOMPUTESTATEVERSION VARCHAR );
CREATE INDEX Z_1KEYWORDS_Z_41KEYWORDS_INDEX ON Z_1KEYWORDS (Z_41KEYWORDS, Z_1ASSETATTRIBUTES);
CREATE INDEX ZASSET_ZCOMPUTESYNCATTRIBUTES_INDEX ON ZASSET (ZCOMPUTESYNCATTRIBUTES);
CREATE INDEX Z_3SUGGESTIONSBEINGREPRESENTATIVEASSETS_Z_59SUGGESTIONSBEINGREPRESENTATIVEASSETS_INDEX ON Z_3SUGGESTIONSBEINGREPRESENTATIVEASSETS (Z_59SUGGESTIONSBEINGREPRESENTATIVEASSETS, Z_3REPRESENTATIVEASSETS1);
CREATE INDEX Z_3HIGHLIGHTSBEINGADAPTIVEEXPLICITLYREMOVEDASSETS_Z_51HIGHLIGHTSBEINGADAPTIVEEXPLICITLYREMOVEDASSETS_INDEX ON Z_3HIGHLIGHTSBEINGADAPTIVEEXPLICITLYREMOVEDASSETS (Z_51HIGHLIGHTSBEINGADAPTIVEEXPLICITLYREMOVEDASSETS, Z_3ADAPTIVEEXPLICITLYREMOVEDASSETS);
CREATE INDEX Z_3MEMORIESBEINGCURATEDASSETS_Z_45MEMORIESBEINGCURATEDASSETS_INDEX ON Z_3MEMORIESBEINGCURATEDASSETS (Z_45MEMORIESBEINGCURATEDASSETS, Z_3CURATEDASSETS);
CREATE INDEX Z_3MEMORIESBEINGMOVIECURATEDASSETS_Z_45MEMORIESBEINGMOVIECURATEDASSETS_INDEX ON Z_3MEMORIESBEINGMOVIECURATEDASSETS (Z_45MEMORIESBEINGMOVIECURATEDASSETS, Z_3MOVIECURATEDASSETS);
CREATE INDEX Z_3HIGHLIGHTSBEINGADAPTIVEEXTENDEDASSETS_Z_51HIGHLIGHTSBEINGADAPTIVEEXTENDEDASSETS_INDEX ON Z_3HIGHLIGHTSBEINGADAPTIVEEXTENDEDASSETS (Z_51HIGHLIGHTSBEINGADAPTIVEEXTENDEDASSETS, Z_3ADAPTIVEEXTENDEDASSETS);
CREATE INDEX Z_3HIGHLIGHTSBEINGADAPTIVEASSETS_Z_51HIGHLIGHTSBEINGADAPTIVEASSETS_INDEX ON Z_3HIGHLIGHTSBEINGADAPTIVEASSETS (Z_51HIGHLIGHTSBEINGADAPTIVEASSETS, Z_3ADAPTIVEASSETS);
CREATE INDEX Z_3SUGGESTIONSBEINGKEYASSETS_Z_59SUGGESTIONSBEINGKEYASSETS_INDEX ON Z_3SUGGESTIONSBEINGKEYASSETS (Z_59SUGGESTIONSBEINGKEYASSETS, Z_3KEYASSETS);
CREATE INDEX Z_3MEMORIESBEINGREPRESENTATIVEASSETS_Z_45MEMORIESBEINGREPRESENTATIVEASSETS_INDEX ON Z_3MEMORIESBEINGREPRESENTATIVEASSETS (Z_45MEMORIESBEINGREPRESENTATIVEASSETS, Z_3REPRESENTATIVEASSETS);
CREATE INDEX Z_3HIGHLIGHTSBEINGADAPTIVESUMMARYASSETS_Z_51HIGHLIGHTSBEINGADAPTIVESUMMARYASSETS_INDEX ON Z_3HIGHLIGHTSBEINGADAPTIVESUMMARYASSETS (Z_51HIGHLIGHTSBEINGADAPTIVESUMMARYASSETS, Z_3ADAPTIVESUMMARYASSETS);
CREATE INDEX Z_3MEMORIESBEINGUSERCURATEDASSETS_Z_45MEMORIESBEINGUSERCURATEDASSETS_INDEX ON Z_3MEMORIESBEINGUSERCURATEDASSETS (Z_45MEMORIESBEINGUSERCURATEDASSETS, Z_3USERCURATEDASSETS);
CREATE INDEX Z_3HIGHLIGHTSBEINGADAPTIVEEXPLICITLYADDEDASSETS_Z_51HIGHLIGHTSBEINGADAPTIVEEXPLICITLYADDEDASSETS_INDEX ON Z_3HIGHLIGHTSBEINGADAPTIVEEXPLICITLYADDEDASSETS (Z_51HIGHLIGHTSBEINGADAPTIVEEXPLICITLYADDEDASSETS, Z_3ADAPTIVEEXPLICITLYADDEDASSETS);
CREATE INDEX Z_3MEMORIESBEINGCUSTOMUSERASSETS_Z_45MEMORIESBEINGCUSTOMUSERASSETS_INDEX ON Z_3MEMORIESBEINGCUSTOMUSERASSETS (Z_45MEMORIESBEINGCUSTOMUSERASSETS, Z_3CUSTOMUSERASSETS);
CREATE INDEX Z_3MEMORIESBEINGEXTENDEDCURATEDASSETS_Z_45MEMORIESBEINGEXTENDEDCURATEDASSETS_INDEX ON Z_3MEMORIESBEINGEXTENDEDCURATEDASSETS (Z_45MEMORIESBEINGEXTENDEDCURATEDASSETS, Z_3EXTENDEDCURATEDASSETS);
CREATE INDEX Z_Asset_byAddedDateIndex ON ZASSET (ZADDEDDATE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byAvalanchePickTypeIndex ON ZASSET (ZAVALANCHEPICKTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byAvalancheUUIDIndex ON ZASSET (ZAVALANCHEUUID COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byCloudAssetGUIDIndex ON ZASSET (ZCLOUDASSETGUID COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byCloudPlaceholderKindIndex ON ZASSET (ZCLOUDPLACEHOLDERKIND COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byCompleteIndex ON ZASSET (ZCOMPLETE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byCustomRenderedValueIndex ON ZASSET (ZHDRTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byDateCreatedIndex ON ZASSET (ZDATECREATED COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byKindIndex ON ZASSET (ZKIND COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byLastSharedDateIndex ON ZASSET (ZLASTSHAREDDATE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byMediaGroupUUIDIndex ON ZASSET (ZMEDIAGROUPUUID COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byPlaybackStyleIndex ON ZASSET (ZPLAYBACKSTYLE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byPlaybackVariationIndex ON ZASSET (ZPLAYBACKVARIATION COLLATE BINARY ASC);
CREATE INDEX Z_Asset_bySavedAssetTypeIndex ON ZASSET (ZSAVEDASSETTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_bySortTokenIndex ON ZASSET (ZSORTTOKEN COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byThumbnailIndexIndex ON ZASSET (ZTHUMBNAILINDEX COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byUniformTypeIdentifierIndex ON ZASSET (ZUNIFORMTYPEIDENTIFIER COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byUuidIndex ON ZASSET (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_Asset_byVisibilityStateIndex ON ZASSET (ZVISIBILITYSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_compoundIndex1 ON ZASSET (ZCLOUDASSETGUID COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_compoundIndex2 ON ZASSET (ZDIRECTORY COLLATE BINARY ASC, ZFILENAME COLLATE BINARY ASC);
CREATE INDEX Z_Asset_compoundIndex3 ON ZASSET (ZCLOUDLOCALSTATE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC);
CREATE INDEX Z_Asset_compoundIndex4 ON ZASSET (ZHIDDEN COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_compoundIndex5 ON ZASSET (ZTRASHEDSTATE COLLATE BINARY ASC, ZTRASHEDDATE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_compoundIndex6 ON ZASSET (ZADDEDDATE COLLATE BINARY ASC, ZSORTTOKEN COLLATE BINARY ASC);
CREATE INDEX Z_Asset_forUserLibraryAlbumAndPhotoPicker ON ZASSET (ZADDEDDATE COLLATE BINARY ASC, ZSORTTOKEN COLLATE BINARY ASC, ZACTIVELIBRARYSCOPEPARTICIPATIONSTATE COLLATE BINARY ASC, ZKIND COLLATE BINARY ASC, ZKINDSUBTYPE COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC, ZFAVORITE COLLATE BINARY ASC, ZPLAYBACKSTYLE COLLATE BINARY ASC, ZDUPLICATEASSETVISIBILITYSTATE COLLATE BINARY ASC, ZSTICKERCONFIDENCESCORE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_compoundIndex8 ON ZASSET (ZTRASHEDSTATE COLLATE BINARY ASC, ZCLOUDLOCALSTATE COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_compoundIndex9 ON ZASSET (ZKIND COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZCLOUDLOCALSTATE COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_forFavoritesAlbum ON ZASSET (ZFAVORITE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC) WHERE ZFAVORITE = 1;
CREATE INDEX Z_Asset_forVideosAlbum ON ZASSET (ZPLAYBACKSTYLE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZKIND COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC) WHERE ZPLAYBACKSTYLE = 4;
CREATE INDEX Z_Asset_forPlacesAlbum ON ZASSET (ZDATECREATED COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC, ZLATITUDE COLLATE BINARY ASC, ZLONGITUDE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_forKindSubtypeAlbums ON ZASSET (ZKINDSUBTYPE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZKIND COLLATE BINARY ASC, ZPLAYBACKSTYLE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC) WHERE ZKINDSUBTYPE <> 0;
CREATE INDEX Z_Asset_compoundIndex14 ON ZASSET (ZSAVEDASSETTYPE COLLATE BINARY ASC, ZCLOUDPLACEHOLDERKIND COLLATE BINARY ASC, ZCLOUDSERVERPUBLISHDATE COLLATE BINARY ASC, ZCLOUDBATCHPUBLISHDATE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC);
CREATE INDEX Z_Asset_compoundIndex15 ON ZASSET (ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZLOCATIONDATA COLLATE BINARY ASC);
CREATE INDEX Z_Asset_compoundIndex16 ON ZASSET (ZIMPORTSESSION COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_compoundIndex17 ON ZASSET (ZCLOUDHASUNSEENCOMMENTS COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_forAllPhotos ON ZASSET (ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZKIND COLLATE BINARY ASC, ZKINDSUBTYPE COLLATE BINARY ASC, ZPLAYBACKSTYLE COLLATE BINARY ASC, ZDUPLICATEASSETVISIBILITYSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_forAllPhotosDayGroups ON ZASSET (ZDAYGROUPHIGHLIGHTBEINGEXTENDEDASSETS COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZACTIVELIBRARYSCOPEPARTICIPATIONSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_forAllPhotosByLibraryScopeParticipationState ON ZASSET (ZACTIVELIBRARYSCOPEPARTICIPATIONSTATE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZKIND COLLATE BINARY ASC, ZKINDSUBTYPE COLLATE BINARY ASC, ZPLAYBACKSTYLE COLLATE BINARY ASC, ZDUPLICATEASSETVISIBILITYSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_forAllPhotosPrivateOnly ON ZASSET (ZACTIVELIBRARYSCOPEPARTICIPATIONSTATE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZKIND COLLATE BINARY ASC, ZKINDSUBTYPE COLLATE BINARY ASC, ZPLAYBACKSTYLE COLLATE BINARY ASC, ZDUPLICATEASSETVISIBILITYSTATE COLLATE BINARY ASC) WHERE ZACTIVELIBRARYSCOPEPARTICIPATIONSTATE = 0;
CREATE INDEX Z_Asset_forAllPhotosHavingImportSession ON ZASSET (ZIMPORTSESSION COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC) WHERE ZIMPORTSESSION IS NOT NULL;
CREATE INDEX Z_Asset_forAllPhotosPartOfDuplicatedSet ON ZASSET (ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZDUPLICATEASSETVISIBILITYSTATE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC) WHERE ZDUPLICATEASSETVISIBILITYSTATE <> 0;
CREATE INDEX Z_Asset_forCPLThumbnailPrefetch ON ZASSET (ZTHUMBNAILINDEX COLLATE BINARY DESC, ZCLOUDLOCALSTATE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY DESC, ZHASADJUSTMENTS COLLATE BINARY ASC) WHERE (ZTHUMBNAILINDEX = -1 AND ZCLOUDLOCALSTATE = 1);
CREATE INDEX Z_Asset_forPHThumbnailAsset ON ZASSET (ZTHUMBNAILINDEX COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC, ZCLOUDPLACEHOLDERKIND COLLATE BINARY ASC);
CREATE INDEX Z_Asset_compoundIndex19 ON ZASSET (ZDEFERREDPROCESSINGNEEDED COLLATE BINARY ASC, ZKIND COLLATE BINARY ASC);
CREATE INDEX Z_Asset_forAllPhotosDays ON ZASSET (ZHIGHLIGHTBEINGEXTENDEDASSETS COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC) WHERE ZHIGHLIGHTBEINGEXTENDEDASSETS IS NOT NULL;
CREATE INDEX Z_Asset_forSelfiesAlbum ON ZASSET (ZDERIVEDCAMERACAPTUREDEVICE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC) WHERE ZDERIVEDCAMERACAPTUREDEVICE = 1;
CREATE INDEX Z_Asset_forSpatialAlbum ON ZASSET (ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZKIND COLLATE BINARY ASC, ZKINDSUBTYPE COLLATE BINARY ASC, ZPLAYBACKSTYLE COLLATE BINARY ASC, ZDUPLICATEASSETVISIBILITYSTATE COLLATE BINARY ASC) WHERE ZSPATIALTYPE <> 0;
CREATE INDEX Z_Asset_forPortraitAlbum ON ZASSET (ZDEPTHTYPE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC) WHERE ZDEPTHTYPE <> 0;
CREATE INDEX Z_Asset_forRAWAlbum ON ZASSET (ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZPACKEDBADGEATTRIBUTES COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZKIND COLLATE BINARY ASC, ZKINDSUBTYPE COLLATE BINARY ASC, ZPLAYBACKSTYLE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC) WHERE ZPACKEDBADGEATTRIBUTES > 1;
CREATE INDEX Z_Asset_forMagicCarpetAlbum ON ZASSET (ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZISMAGICCARPET COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC) WHERE ZISMAGICCARPET = 1;
CREATE INDEX Z_Asset_forUnableToUploadAlbum ON ZASSET (ZCLOUDLOCALSTATE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC) WHERE (ZCLOUDLOCALSTATE = 2 OR ZCLOUDLOCALSTATE = 4);
CREATE INDEX Z_Asset_bySearchIndexRebuildState ON ZASSET (ZSEARCHINDEXREBUILDSTATE COLLATE BINARY ASC) WHERE ZSEARCHINDEXREBUILDSTATE = 1;
CREATE INDEX Z_Asset_byActiveLibraryScopeParticipationAndShareState ON ZASSET (ZACTIVELIBRARYSCOPEPARTICIPATIONSTATE COLLATE BINARY ASC, ZLIBRARYSCOPESHARESTATE COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY DESC);
CREATE INDEX Z_Asset_forSharingSuggestionsAlbum ON ZASSET (ZLIBRARYSCOPESHARESTATE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC) WHERE (ZLIBRARYSCOPESHARESTATE = 2 OR ZLIBRARYSCOPESHARESTATE = 16 OR ZLIBRARYSCOPESHARESTATE = 65538 OR ZLIBRARYSCOPESHARESTATE = 65552);
CREATE INDEX Z_Asset_forRecentlyEdited ON ZASSET (ZADJUSTMENTTIMESTAMP COLLATE BINARY ASC);
CREATE INDEX Z_Asset_forAllPhotosFilteredBySavedAssetType ON ZASSET (ZDATECREATED COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC, ZKIND COLLATE BINARY ASC, ZKINDSUBTYPE COLLATE BINARY ASC, ZPLAYBACKSTYLE COLLATE BINARY ASC, ZFAVORITE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC, ZDUPLICATEASSETVISIBILITYSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Asset_forAllPhotosFilteredByHasAdjustments ON ZASSET (ZHASADJUSTMENTS COLLATE BINARY ASC, ZKIND COLLATE BINARY ASC, ZFAVORITE COLLATE BINARY ASC, ZDATECREATED COLLATE BINARY ASC, ZHIDDEN COLLATE BINARY ASC, ZSAVEDASSETTYPE COLLATE BINARY ASC, ZVISIBILITYSTATE COLLATE BINARY ASC, ZCOMPLETE COLLATE BINARY ASC, Z_PK COLLATE BINARY ASC, ZADDEDDATE COLLATE BINARY ASC, ZTRASHEDSTATE COLLATE BINARY ASC, ZAVALANCHEPICKTYPE COLLATE BINARY ASC);
CREATE INDEX ZCOMPUTESYNCATTRIBUTES_ZASSET_INDEX ON ZCOMPUTESYNCATTRIBUTES (ZASSET);
CREATE INDEX Z_19REJECTEDPERSONS_Z_48REJECTEDPERSONS_INDEX ON Z_19REJECTEDPERSONS (Z_48REJECTEDPERSONS, Z_19REJECTEDFACES);
CREATE INDEX Z_19REJECTEDPERSONSNEEDINGFACECROPS_Z_48REJECTEDPERSONSNEEDINGFACECROPS_INDEX ON Z_19REJECTEDPERSONSNEEDINGFACECROPS (Z_48REJECTEDPERSONSNEEDINGFACECROPS, Z_19REJECTEDFACESNEEDINGFACECROPS);
CREATE INDEX Z_19CLUSTERREJECTEDPERSONS_Z_48CLUSTERREJECTEDPERSONS_INDEX ON Z_19CLUSTERREJECTEDPERSONS (Z_48CLUSTERREJECTEDPERSONS, Z_19CLUSTERREJECTEDFACES);
CREATE INDEX Z_28ALBUMLISTS_Z_2ALBUMLISTS_INDEX ON Z_28ALBUMLISTS (Z_2ALBUMLISTS, Z_28ALBUMS);
CREATE INDEX Z_29ASSETS_Z_3ASSETS_INDEX ON Z_29ASSETS (Z_3ASSETS, Z_29ALBUMS);
CREATE INDEX Z_48MERGECANDIDATES_REFLEXIVE_INDEX ON Z_48MERGECANDIDATES (REFLEXIVE, Z_48MERGECANDIDATES);
CREATE INDEX Z_48INVALIDMERGECANDIDATES_REFLEXIVE_INDEX ON Z_48INVALIDMERGECANDIDATES (REFLEXIVE, Z_48INVALIDMERGECANDIDATES);
CREATE INDEX Z_48MERGECANDIDATESWITHCONFIDENCE_REFLEXIVE_INDEX ON Z_48MERGECANDIDATESWITHCONFIDENCE (REFLEXIVE, Z_48MERGECANDIDATESWITHCONFIDENCE);
CREATE TABLE Z_PRIMARYKEY (Z_ENT INTEGER PRIMARY KEY, Z_NAME VARCHAR, Z_SUPER INTEGER, Z_MAX INTEGER);
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZASSET_INSERT_INCREMENT AFTER INSERT ON ZASSET 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 = ZASSETFORFACE; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE', Z_ENT, Z_PK, 'ZASSETVISIBLE', ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE ZASSETFORFACE = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZASSET_UPDATE_INCREMENT AFTER UPDATE OF ZTRASHEDSTATE, ZVISIBILITYSTATE, ZHIDDEN ON ZASSET 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 = ZASSETFORFACE; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE', Z_ENT, Z_PK, 'ZASSETVISIBLE', ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE ZASSETFORFACE = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZASSET_UPDATE_DECREMENT AFTER UPDATE OF ZTRASHEDSTATE, ZVISIBILITYSTATE, ZHIDDEN ON ZASSET 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 = ZASSETFORFACE; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE', Z_ENT, Z_PK, 'ZASSETVISIBLE', ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE ZASSETFORFACE = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZASSET_DELETE_DECREMENT AFTER DELETE ON ZASSET 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 = ZASSETFORFACE; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE', Z_ENT, Z_PK, 'ZASSETVISIBLE', ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE ZASSETFORFACE = OLD.Z_PK; END;
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZASSET_ZDETECTEDFACE_INSERT_INCREMENT AFTER INSERT ON ZDETECTEDFACE FOR EACH ROW BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = (SELECT COUNT(Z_PK) FROM ZASSET WHERE (Z_PK = NEW.ZASSETFORFACE) AND (ZTRASHEDSTATE == 0 AND ZVISIBILITYSTATE == 0 AND ZHIDDEN == 0)) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE', Z_ENT, Z_PK, 'ZASSETVISIBLE', ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE Z_PK = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZASSET_ZASSETFORFACE_UPDATE_TO_NULL AFTER UPDATE OF ZASSETFORFACE ON ZDETECTEDFACE WHEN (NEW.ZASSETFORFACE IS NULL AND OLD.ZASSETFORFACE IS NOT NULL) BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = 0 WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE', Z_ENT, Z_PK, 'ZASSETVISIBLE', ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE Z_PK = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZASSET_ZASSETFORFACE_UPDATE_INCREMENT AFTER UPDATE OF ZASSETFORFACE ON ZDETECTEDFACE WHEN ((NEW.ZASSETFORFACE IS NOT NULL AND OLD.ZASSETFORFACE IS NULL) OR (NEW.ZASSETFORFACE != OLD.ZASSETFORFACE)) BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = (SELECT COUNT(Z_PK) FROM ZASSET WHERE Z_PK = NEW.ZASSETFORFACE AND (ZTRASHEDSTATE == 0 AND ZVISIBILITYSTATE == 0 AND ZHIDDEN == 0)) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE', Z_ENT, Z_PK, 'ZASSETVISIBLE', ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE Z_PK = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_INSERT_INCREMENT AFTER INSERT ON ZDETECTEDFACE FOR EACH ROW WHEN NEW.ZHIDDEN == 0 AND NEW.ZASSETVISIBLE == 1 AND NEW.ZCENTERX != 0 BEGIN UPDATE ZPERSON SET ZFACECOUNT = IFNULL(ZFACECOUNT,0) + 1 WHERE NEW.ZPERSONFORFACE = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON', Z_ENT, Z_PK, 'ZFACECOUNT', ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.ZPERSONFORFACE; END;
CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_UPDATE_INCREMENT AFTER UPDATE OF ZHIDDEN, ZASSETVISIBLE, ZCENTERX ON ZDETECTEDFACE FOR EACH ROW WHEN (NEW.ZHIDDEN == 0 AND NEW.ZASSETVISIBLE == 1 AND NEW.ZCENTERX != 0) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZASSETVISIBLE != OLD.ZASSETVISIBLE OR NEW.ZCENTERX != OLD.ZCENTERX) AND (NEW.ZPERSONFORFACE == OLD.ZPERSONFORFACE) BEGIN UPDATE ZPERSON SET ZFACECOUNT = IFNULL(ZFACECOUNT,0) + 1 WHERE NEW.ZPERSONFORFACE = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON', Z_ENT, Z_PK, 'ZFACECOUNT', ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.ZPERSONFORFACE; END;
CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_UPDATE_DECREMENT AFTER UPDATE OF ZHIDDEN, ZASSETVISIBLE, ZCENTERX ON ZDETECTEDFACE FOR EACH ROW WHEN (OLD.ZHIDDEN == 0 AND OLD.ZASSETVISIBLE == 1 AND OLD.ZCENTERX != 0) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZASSETVISIBLE != OLD.ZASSETVISIBLE OR NEW.ZCENTERX != OLD.ZCENTERX) AND (OLD.ZPERSONFORFACE == NEW.ZPERSONFORFACE) BEGIN UPDATE ZPERSON SET ZFACECOUNT = MAX(0,IFNULL(ZFACECOUNT,0) - 1) WHERE OLD.ZPERSONFORFACE = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON', Z_ENT, Z_PK, 'ZFACECOUNT', ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.ZPERSONFORFACE; END;
CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_DELETE_DECREMENT AFTER DELETE ON ZDETECTEDFACE FOR EACH ROW WHEN OLD.ZHIDDEN == 0 AND OLD.ZASSETVISIBLE == 1 AND OLD.ZCENTERX != 0 BEGIN UPDATE ZPERSON SET ZFACECOUNT = MAX(0,IFNULL(ZFACECOUNT,0) - 1) WHERE OLD.ZPERSONFORFACE = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON', Z_ENT, Z_PK, 'ZFACECOUNT', ZFACECOUNT) FROM ZPERSON WHERE Z_PK = OLD.ZPERSONFORFACE; END;
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 (ZPERSONFORFACE = NEW.Z_PK) AND (ZHIDDEN == 0 AND ZASSETVISIBLE == 1 AND ZCENTERX != 0)) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON', Z_ENT, Z_PK, 'ZFACECOUNT', ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_ZPERSONFORFACE_UPDATE_INCREMENT AFTER UPDATE OF ZPERSONFORFACE ON ZDETECTEDFACE WHEN (NEW.ZHIDDEN == 0 AND NEW.ZASSETVISIBLE == 1 AND NEW.ZCENTERX != 0) AND ((NEW.ZPERSONFORFACE IS NOT NULL AND OLD.ZPERSONFORFACE IS NULL) OR (NEW.ZPERSONFORFACE != OLD.ZPERSONFORFACE)) BEGIN UPDATE ZPERSON SET ZFACECOUNT = IFNULL(ZFACECOUNT,0) + 1 WHERE Z_PK = NEW.ZPERSONFORFACE; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON', Z_ENT, Z_PK, 'ZFACECOUNT', ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.ZPERSONFORFACE; END;
CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_ZPERSONFORFACE_UPDATE_DECREMENT AFTER UPDATE OF ZPERSONFORFACE ON ZDETECTEDFACE WHEN (OLD.ZHIDDEN == 0 AND OLD.ZASSETVISIBLE == 1 AND OLD.ZCENTERX != 0) AND ((OLD.ZPERSONFORFACE IS NOT NULL AND NEW.ZPERSONFORFACE IS NULL) OR (NEW.ZPERSONFORFACE != OLD.ZPERSONFORFACE)) BEGIN UPDATE ZPERSON SET ZFACECOUNT = MAX(0,IFNULL(ZFACECOUNT,0) - 1) WHERE Z_PK = OLD.ZPERSONFORFACE; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON', Z_ENT, Z_PK, 'ZFACECOUNT', ZFACECOUNT) FROM ZPERSON WHERE Z_PK = OLD.ZPERSONFORFACE; END;
CREATE TRIGGER Z_DA_ZASSET_Asset_derivedCameraCaptureDevice_SOURCE_INSERT AFTER INSERT ON ZASSET FOR EACH ROW BEGIN UPDATE ZASSET SET ZDERIVEDCAMERACAPTUREDEVICE = (SELECT ZCAMERACAPTUREDEVICE FROM ZADDITIONALASSETATTRIBUTES WHERE Z_PK = NEW.ZADDITIONALATTRIBUTES) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataDATriggerInsertUpdatedAffectedObjectValue('ZASSET', Z_ENT, Z_PK, 'derivedCameraCaptureDevice', ZDERIVEDCAMERACAPTUREDEVICE) FROM ZASSET WHERE Z_PK = NEW.Z_PK; END;
CREATE TRIGGER Z_DA_ZASSET_Asset_derivedCameraCaptureDevice_SOURCE_UPDATE AFTER UPDATE OF ZADDITIONALATTRIBUTES ON ZASSET FOR EACH ROW BEGIN UPDATE ZASSET SET ZDERIVEDCAMERACAPTUREDEVICE = (SELECT ZCAMERACAPTUREDEVICE FROM ZADDITIONALASSETATTRIBUTES WHERE Z_PK = NEW.ZADDITIONALATTRIBUTES) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataDATriggerUpdatedAffectedObjectValue('ZASSET', Z_ENT, Z_PK, 'derivedCameraCaptureDevice', ZDERIVEDCAMERACAPTUREDEVICE) FROM ZASSET WHERE Z_PK = NEW.Z_PK; END;
CREATE TRIGGER Z_DA_ZADDITIONALASSETATTRIBUTES_Asset_derivedCameraCaptureDevice_PARAMETER_INSERT AFTER INSERT ON ZADDITIONALASSETATTRIBUTES FOR EACH ROW BEGIN UPDATE ZASSET SET ZDERIVEDCAMERACAPTUREDEVICE = NEW.ZCAMERACAPTUREDEVICE WHERE ZADDITIONALATTRIBUTES = NEW.Z_PK; SELECT NSCoreDataDATriggerInsertUpdatedAffectedObjectValue('ZASSET', Z_ENT, Z_PK, 'derivedCameraCaptureDevice', ZDERIVEDCAMERACAPTUREDEVICE) FROM ZASSET WHERE ZADDITIONALATTRIBUTES = NEW.Z_PK; END;
CREATE TRIGGER Z_DA_ZADDITIONALASSETATTRIBUTES_Asset_derivedCameraCaptureDevice_PARAMETER_UPDATE AFTER UPDATE OF ZCAMERACAPTUREDEVICE ON ZADDITIONALASSETATTRIBUTES FOR EACH ROW BEGIN UPDATE ZASSET SET ZDERIVEDCAMERACAPTUREDEVICE = NEW.ZCAMERACAPTUREDEVICE WHERE ZADDITIONALATTRIBUTES = NEW.Z_PK; SELECT NSCoreDataDATriggerUpdatedAffectedObjectValue('ZASSET', Z_ENT, Z_PK, 'derivedCameraCaptureDevice', ZDERIVEDCAMERACAPTUREDEVICE) FROM ZASSET WHERE ZADDITIONALATTRIBUTES = NEW.Z_PK; END;
Clone this wiki locally