-
Notifications
You must be signed in to change notification settings - Fork 100
iOS 12.5.7 (16H81) Photos.sqlite schema
Rhet Turnbull edited this page Apr 2, 2024
·
1 revision
CREATE TABLE ZADDITIONALASSETATTRIBUTES (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZALLOWEDFORANALYSIS INTEGER,
ZCAMERACAPTUREDEVICE INTEGER,
ZCLOUDAVALANCHEPICKTYPE INTEGER,
ZCLOUDGROUPINGSTATE INTEGER,
ZCLOUDKINDSUBTYPE INTEGER,
ZCLOUDRECOVERYSTATE INTEGER,
ZCLOUDSTATERECOVERYATTEMPTSCOUNT INTEGER,
ZDESTINATIONASSETCOPYSTATE INTEGER,
ZEMBEDDEDTHUMBNAILHEIGHT INTEGER,
ZEMBEDDEDTHUMBNAILLENGTH INTEGER,
ZEMBEDDEDTHUMBNAILOFFSET INTEGER,
ZEMBEDDEDTHUMBNAILWIDTH INTEGER,
ZEXTERNALUSAGEINTENT INTEGER,
ZIMPORTEDBY 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,
ZSCENEANALYSISVERSION INTEGER,
ZSHARECOUNT INTEGER,
ZSHARETYPE INTEGER,
ZSHIFTEDLOCATIONISVALID INTEGER,
ZTIMEZONEOFFSET INTEGER,
ZUPLOADATTEMPTS INTEGER,
ZVARIATIONSUGGESTIONSTATES INTEGER,
ZVIDEOCPDISPLAYTIMESCALE INTEGER,
ZVIDEOCPDISPLAYVALUE INTEGER,
ZVIDEOCPDURATIONTIMESCALE INTEGER,
ZVIEWCOUNT INTEGER,
ZASSET INTEGER,
Z30_ASSET INTEGER,
ZASSETDESCRIPTION INTEGER,
ZSCENEPRINT INTEGER,
ZUNMANAGEDADJUSTMENT INTEGER,
ZALTERNATEIMPORTIMAGEDATE TIMESTAMP,
ZLASTUPLOADATTEMPTDATE TIMESTAMP,
ZSCENEANALYSISTIMESTAMP TIMESTAMP,
ZADJUSTEDFINGERPRINT VARCHAR,
ZCREATORBUNDLEID VARCHAR,
ZCUSTOMCOLLECTIONNAME VARCHAR,
ZCUSTOMCOLLECTIONUUID VARCHAR,
ZCUSTOMMOMENTNAME VARCHAR,
ZCUSTOMMOMENTUUID VARCHAR,
ZEDITORBUNDLEID VARCHAR,
ZEXIFTIMESTAMPSTRING VARCHAR,
ZIMPORTSESSIONID VARCHAR,
ZMASTERFINGERPRINT VARCHAR,
ZMONTAGE VARCHAR,
ZORIGINALASSETSUUID VARCHAR,
ZORIGINALFILENAME VARCHAR,
ZORIGINATINGASSETIDENTIFIER VARCHAR,
ZPUBLICGLOBALUUID VARCHAR,
ZSHAREORIGINATOR VARCHAR,
ZTIMEZONENAME VARCHAR,
ZTITLE VARCHAR,
ZDISTANCEIDENTITY BLOB,
ZFACEREGIONS BLOB,
ZORIGINALHASH BLOB,
ZPLACEANNOTATIONDATA BLOB,
ZREVERSELOCATIONDATA BLOB,
ZSHIFTEDLOCATIONDATA BLOB
);
CREATE TABLE Z_1KEYWORDS (
Z_1ASSETATTRIBUTES INTEGER,
Z_34KEYWORDS INTEGER,
PRIMARY KEY (Z_1ASSETATTRIBUTES, Z_34KEYWORDS)
);
CREATE TABLE ZADJUSTMENT (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZIDENTIFIER INTEGER,
ZASSET INTEGER,
Z30_ASSET INTEGER,
Z_FOK_ASSET INTEGER,
ZFILTERNAME VARCHAR,
ZFILTERSETTINGS BLOB
);
CREATE TABLE ZALBUMLIST (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZIDENTIFIER INTEGER,
ZNEEDSREORDERINGNUMBER INTEGER,
ZUUID VARCHAR
);
CREATE TABLE ZASSETANALYSISSTATE (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZANALYSISSTATE INTEGER,
ZWORKERFLAGS INTEGER,
ZWORKERTYPE INTEGER,
ZASSET INTEGER,
Z30_ASSET INTEGER,
ZIGNOREUNTILDATE TIMESTAMP,
ZLASTIGNOREDDATE TIMESTAMP,
ZSORTTOKEN FLOAT,
ZASSETUUID VARCHAR
);
CREATE TABLE ZASSETDESCRIPTION (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZASSETATTRIBUTES INTEGER,
ZLONGDESCRIPTION VARCHAR
);
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,
ZMEDIAMETADATATYPE VARCHAR,
ZORIGINALFILENAME VARCHAR,
ZORIGINATINGASSETIDENTIFIER VARCHAR,
ZUNIFORMTYPEIDENTIFIER VARCHAR
);
CREATE TABLE ZCLOUDMASTERMEDIAMETADATA (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT 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,
Z30_ASSET 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
);
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,
Z30_COMMENTEDASSET INTEGER,
ZLIKEDASSET INTEGER,
Z30_LIKEDASSET INTEGER,
Z_FOK_LIKEDASSET INTEGER,
Z_FOK_CLOUDFEEDCOMMENTENTRY INTEGER,
Z_FOK_COMMENTEDASSET INTEGER,
Z_FOK_CLOUDFEEDLIKECOMMENTENTRY INTEGER,
ZCOMMENTCLIENTDATE TIMESTAMP,
ZCOMMENTDATE TIMESTAMP,
ZCLOUDGUID VARCHAR,
ZCOMMENTTEXT VARCHAR,
ZCOMMENTTYPE VARCHAR,
ZCOMMENTERHASHEDPERSONID VARCHAR
);
CREATE TABLE ZCODEC (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZFOURCHARCODENAME VARCHAR
);
CREATE TABLE ZCOLORSPACE (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZCOLORSPACENAME VARCHAR
);
CREATE TABLE ZCOMPUTEDASSETATTRIBUTES (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZASSET INTEGER,
Z30_ASSET INTEGER,
ZFAILURESCORE FLOAT,
ZHARMONIOUSCOLORSCORE FLOAT,
ZIMMERSIVENESSSCORE 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,
ZPERSONUUID VARCHAR
);
CREATE TABLE ZDETECTEDFACE (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZAGETYPE INTEGER,
ZASSETVISIBLE INTEGER,
ZBALDTYPE INTEGER,
ZCLOUDLOCALSTATE INTEGER,
ZCLOUDNAMESOURCE INTEGER,
ZCLUSTERSEQUENCENUMBER INTEGER,
ZCONFIRMEDFACECROPGENERATIONSTATE INTEGER,
ZEYEMAKEUPTYPE INTEGER,
ZEYESSTATE INTEGER,
ZFACEALGORITHMVERSION INTEGER,
ZFACIALHAIRTYPE INTEGER,
ZGENDERTYPE INTEGER,
ZGLASSESTYPE INTEGER,
ZHAIRCOLORTYPE INTEGER,
ZHASSMILE INTEGER,
ZHIDDEN INTEGER,
ZISINTRASH INTEGER,
ZISLEFTEYECLOSED INTEGER,
ZISRIGHTEYECLOSED INTEGER,
ZLIPMAKEUPTYPE INTEGER,
ZMANUAL INTEGER,
ZNAMESOURCE INTEGER,
ZQUALITYMEASURE INTEGER,
ZSMILETYPE INTEGER,
ZSOURCEHEIGHT INTEGER,
ZSOURCEWIDTH INTEGER,
ZTRAININGTYPE INTEGER,
ZASSET INTEGER,
Z30_ASSET INTEGER,
ZFACECROP INTEGER,
ZFACEGROUP INTEGER,
ZFACEGROUPBEINGKEYFACE INTEGER,
ZFACEPRINT INTEGER,
ZPERSON INTEGER,
ZPERSONBEINGKEYFACE INTEGER,
ZADJUSTMENTVERSION TIMESTAMP,
ZBLURSCORE FLOAT,
ZCENTERX FLOAT,
ZCENTERY FLOAT,
ZLEFTEYEX FLOAT,
ZLEFTEYEY FLOAT,
ZMOUTHX FLOAT,
ZMOUTHY FLOAT,
ZPOSEYAW FLOAT,
ZRIGHTEYEX FLOAT,
ZRIGHTEYEY FLOAT,
ZSIZE FLOAT,
ZGROUPINGIDENTIFIER VARCHAR,
ZMASTERIDENTIFIER VARCHAR,
ZUUID VARCHAR
);
CREATE TABLE Z_18CLUSTERREJECTEDPERSONS (
Z_18CLUSTERREJECTEDFACES INTEGER,
Z_42CLUSTERREJECTEDPERSONS INTEGER,
PRIMARY KEY (Z_18CLUSTERREJECTEDFACES, Z_42CLUSTERREJECTEDPERSONS)
);
CREATE TABLE Z_18REJECTEDPERSONS (
Z_18REJECTEDFACES INTEGER,
Z_42REJECTEDPERSONS INTEGER,
PRIMARY KEY (Z_18REJECTEDFACES, Z_42REJECTEDPERSONS)
);
CREATE TABLE Z_18REJECTEDPERSONSNEEDINGFACECROPS (
Z_18REJECTEDFACESNEEDINGFACECROPS INTEGER,
Z_42REJECTEDPERSONSNEEDINGFACECROPS INTEGER,
PRIMARY KEY (Z_18REJECTEDFACESNEEDINGFACECROPS, Z_42REJECTEDPERSONSNEEDINGFACECROPS)
);
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 ZFACECROP (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZCLOUDDELETESTATE INTEGER,
ZCLOUDLOCALSTATE INTEGER,
ZCLOUDTYPE INTEGER,
ZSTATE INTEGER,
ZTYPE INTEGER,
ZASSET INTEGER,
Z30_ASSET INTEGER,
ZFACE INTEGER,
ZPERSON INTEGER,
ZINVALIDMERGECANDIDATEPERSONUUID VARCHAR,
ZUUID VARCHAR,
ZRESOURCEDATA BLOB
);
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,
ZKIND INTEGER,
ZPENDINGITEMSCOUNT INTEGER,
ZPENDINGITEMSTYPE INTEGER,
ZSYNCEVENTORDERKEY INTEGER,
ZTRASHEDSTATE INTEGER,
ZCUSTOMKEYASSET INTEGER,
Z30_CUSTOMKEYASSET INTEGER,
ZKEYASSET INTEGER,
Z30_KEYASSET INTEGER,
ZPARENTFOLDER INTEGER,
ZSECONDARYKEYASSET INTEGER,
Z30_SECONDARYKEYASSET INTEGER,
ZTERTIARYKEYASSET INTEGER,
Z30_TERTIARYKEYASSET 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,
ZKEYASSETFACEIDENTIFIER INTEGER,
ZKEYASSETFACETHUMBNAILINDEX INTEGER,
Z_FOK_PARENTFOLDER INTEGER,
ZENDDATE TIMESTAMP,
ZSTARTDATE TIMESTAMP,
ZTRASHEDDATE TIMESTAMP,
ZCLOUDCREATIONDATE TIMESTAMP,
ZCLOUDLASTCONTRIBUTIONDATE TIMESTAMP,
ZCLOUDLASTINTERESTINGCHANGEDATE TIMESTAMP,
ZCLOUDSUBSCRIPTIONDATE TIMESTAMP,
ZCLOUDGUID VARCHAR,
ZIMPORTSESSIONID VARCHAR,
ZTITLE VARCHAR,
ZUUID VARCHAR,
ZCLOUDOWNERFIRSTNAME VARCHAR,
ZCLOUDOWNERFULLNAME VARCHAR,
ZCLOUDOWNERHASHEDPERSONID VARCHAR,
ZCLOUDOWNERLASTNAME VARCHAR,
ZCLOUDPERSONID VARCHAR,
ZPUBLICURL VARCHAR,
ZCUSTOMQUERYTYPE VARCHAR,
ZCLOUDMETADATA BLOB,
ZCUSTOMQUERYPARAMETERS BLOB
);
CREATE TABLE Z_22ALBUMLISTS (
Z_22ALBUMS INTEGER,
Z_3ALBUMLISTS INTEGER,
Z_FOK_22ALBUMS INTEGER,
PRIMARY KEY (Z_22ALBUMS, Z_3ALBUMLISTS)
);
CREATE TABLE Z_23ASSETS (
Z_23ALBUMS INTEGER,
Z_30ASSETS INTEGER,
Z_FOK_30ASSETS INTEGER,
PRIMARY KEY (Z_23ALBUMS, Z_30ASSETS)
);
CREATE TABLE ZGENERICASSET (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZAVALANCHEPICKTYPE INTEGER,
ZCLOUDDELETESTATE INTEGER,
ZCLOUDDOWNLOADREQUESTS INTEGER,
ZCLOUDHASCOMMENTSBYME INTEGER,
ZCLOUDHASCOMMENTSCONVERSATION INTEGER,
ZCLOUDHASUNSEENCOMMENTS INTEGER,
ZCLOUDISDELETABLE INTEGER,
ZCLOUDISMYASSET INTEGER,
ZCLOUDLOCALSTATE INTEGER,
ZCLOUDPLACEHOLDERKIND INTEGER,
ZCOMPLETE INTEGER,
ZCUSTOMRENDEREDVALUE INTEGER,
ZDEPTHSTATES INTEGER,
ZFACEAREAPOINTS INTEGER,
ZFAVORITE INTEGER,
ZGROUPINGSTATE INTEGER,
ZHASADJUSTMENTS INTEGER,
ZHEIGHT INTEGER,
ZHIDDEN INTEGER,
ZKIND INTEGER,
ZKINDSUBTYPE INTEGER,
ZLOCALRESOURCESSTATE INTEGER,
ZORIENTATION INTEGER,
ZPACKEDACCEPTABLECROPRECT INTEGER,
ZPACKEDPREFERREDCROPRECT INTEGER,
ZPLAYBACKSTYLE INTEGER,
ZPLAYBACKVARIATION INTEGER,
ZSAVEDASSETTYPE INTEGER,
ZTHUMBNAILINDEX INTEGER,
ZTRASHEDSTATE INTEGER,
ZVIDEOCPDURATIONVALUE INTEGER,
ZVIDEOCPVISIBILITYSTATE INTEGER,
ZVISIBILITYSTATE INTEGER,
ZWIDTH INTEGER,
ZADDITIONALATTRIBUTES INTEGER,
ZCLOUDFEEDASSETSENTRY INTEGER,
ZCOMPUTEDATTRIBUTES INTEGER,
ZHIGHLIGHTBEINGASSETS INTEGER,
ZHIGHLIGHTBEINGEXTENDEDASSETS INTEGER,
ZHIGHLIGHTBEINGKEYASSET INTEGER,
ZHIGHLIGHTBEINGOVERVIEWASSETS INTEGER,
ZHIGHLIGHTBEINGSUMMARYASSETS INTEGER,
ZIMPORTSESSION INTEGER,
ZMASTER INTEGER,
ZMEDIAANALYSISATTRIBUTES INTEGER,
ZMOMENT INTEGER,
ZMOMENTSHARE INTEGER,
ZSEARCHDATA INTEGER,
ZSOURCEASSETFORDUPLICATION INTEGER,
Z30_SOURCEASSETFORDUPLICATION INTEGER,
Z_FOK_IMPORTSESSION INTEGER,
Z_FOK_CLOUDFEEDASSETSENTRY INTEGER,
Z_FOK_MOMENT INTEGER,
ZADDEDDATE TIMESTAMP,
ZADJUSTMENTTIMESTAMP TIMESTAMP,
ZCLOUDBATCHPUBLISHDATE TIMESTAMP,
ZCLOUDLASTVIEWEDCOMMENTDATE TIMESTAMP,
ZCLOUDSERVERPUBLISHDATE TIMESTAMP,
ZCURATIONSCORE FLOAT,
ZDATECREATED TIMESTAMP,
ZDURATION FLOAT,
ZFACEADJUSTMENTVERSION TIMESTAMP,
ZHDRGAIN FLOAT,
ZHIGHLIGHTCURATIONSCORE FLOAT,
ZLASTSHAREDDATE TIMESTAMP,
ZLATITUDE FLOAT,
ZLONGITUDE FLOAT,
ZMODIFICATIONDATE TIMESTAMP,
ZOVERALLAESTHETICSCORE FLOAT,
ZPROMOTIONSCORE FLOAT,
ZSORTTOKEN FLOAT,
ZTRASHEDDATE TIMESTAMP,
ZAVALANCHEUUID VARCHAR,
ZCLOUDASSETGUID VARCHAR,
ZCLOUDBATCHID VARCHAR,
ZCLOUDCOLLECTIONGUID VARCHAR,
ZCLOUDOWNERHASHEDPERSONID VARCHAR,
ZDIRECTORY VARCHAR,
ZFILENAME VARCHAR,
ZGROUPINGUUID VARCHAR,
ZMEDIAGROUPUUID VARCHAR,
ZORIGINALCOLORSPACE VARCHAR,
ZUNIFORMTYPEIDENTIFIER VARCHAR,
ZUUID VARCHAR,
ZIMAGEREQUESTHINTS BLOB,
ZLOCATIONDATA BLOB
);
CREATE TABLE Z_30SUGGESTIONSBEINGREPRESENTATIVEASSETS (
Z_30REPRESENTATIVEASSETS1 INTEGER,
Z_50SUGGESTIONSBEINGREPRESENTATIVEASSETS INTEGER,
PRIMARY KEY (Z_30REPRESENTATIVEASSETS1, Z_50SUGGESTIONSBEINGREPRESENTATIVEASSETS)
);
CREATE TABLE Z_30SUGGESTIONSBEINGKEYASSETS (
Z_30KEYASSETS INTEGER,
Z_50SUGGESTIONSBEINGKEYASSETS INTEGER,
PRIMARY KEY (Z_30KEYASSETS, Z_50SUGGESTIONSBEINGKEYASSETS)
);
CREATE TABLE Z_30MEMORIESBEINGREPRESENTATIVEASSETS (
Z_30REPRESENTATIVEASSETS INTEGER,
Z_37MEMORIESBEINGREPRESENTATIVEASSETS INTEGER,
PRIMARY KEY (Z_30REPRESENTATIVEASSETS, Z_37MEMORIESBEINGREPRESENTATIVEASSETS)
);
CREATE TABLE Z_30MEMORIESBEINGMOVIECURATEDASSETS (
Z_30MOVIECURATEDASSETS INTEGER,
Z_37MEMORIESBEINGMOVIECURATEDASSETS INTEGER,
PRIMARY KEY (Z_30MOVIECURATEDASSETS, Z_37MEMORIESBEINGMOVIECURATEDASSETS)
);
CREATE TABLE Z_30MEMORIESBEINGCURATEDASSETS (
Z_30CURATEDASSETS INTEGER,
Z_37MEMORIESBEINGCURATEDASSETS INTEGER,
PRIMARY KEY (Z_30CURATEDASSETS, Z_37MEMORIESBEINGCURATEDASSETS)
);
CREATE TABLE Z_30MEMORIESBEINGEXTENDEDCURATEDASSETS (
Z_30EXTENDEDCURATEDASSETS INTEGER,
Z_37MEMORIESBEINGEXTENDEDCURATEDASSETS INTEGER,
PRIMARY KEY (Z_30EXTENDEDCURATEDASSETS, Z_37MEMORIESBEINGEXTENDEDCURATEDASSETS)
);
CREATE TABLE ZINTERNALRESOURCE (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZDATALENGTH INTEGER,
ZDATASTOREID INTEGER,
ZDATASTORESUBTYPE INTEGER,
ZLOCALAVAILABILITY INTEGER,
ZLOCALAVAILABILITYTARGET INTEGER,
ZORIENTATION INTEGER,
ZQUALITYSORTVALUE INTEGER,
ZRECIPEID INTEGER,
ZREMOTEAVAILABILITY INTEGER,
ZREMOTEAVAILABILITYTARGET INTEGER,
ZRESOURCETYPE INTEGER,
ZUNORIENTEDHEIGHT INTEGER,
ZUNORIENTEDWIDTH INTEGER,
ZVERSION INTEGER,
ZASSET INTEGER,
Z30_ASSET INTEGER,
ZCLOUDATTRIBUTES INTEGER,
ZCLOUDMASTER INTEGER,
ZCODEC INTEGER,
ZCOLORSPACE INTEGER,
ZUNIFORMTYPEIDENTIFIER INTEGER,
ZFINGERPRINT VARCHAR,
ZDATASTOREKEYDATA BLOB
);
CREATE TABLE ZINTERNALRESOURCECLOUDATTRIBUTES (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZCLOUDLOCALSTATE INTEGER,
ZPREFETCHCOUNT INTEGER,
ZRESOURCE INTEGER,
ZDATECREATED TIMESTAMP,
ZLASTONDEMANDDOWNLOADDATE TIMESTAMP,
ZLASTPREFETCHDATE TIMESTAMP,
ZPRUNEDAT TIMESTAMP,
ZITEMIDENTIFIER VARCHAR
);
CREATE TABLE ZKEYWORD (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZTITLE VARCHAR
);
CREATE TABLE ZLEGACYFACE (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZIDENTIFIER INTEGER,
ZASSET INTEGER,
Z30_ASSET INTEGER,
ZALBUMUUID VARCHAR,
ZRELATIVERECTVALUE BLOB
);
CREATE TABLE ZMEDIAANALYSISASSETATTRIBUTES (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZBESTKEYFRAMETIMESCALE INTEGER,
ZBESTKEYFRAMEVALUE INTEGER,
ZBESTVIDEORANGEDURATIONTIMESCALE INTEGER,
ZBESTVIDEORANGEDURATIONVALUE INTEGER,
ZBESTVIDEORANGESTARTTIMESCALE INTEGER,
ZBESTVIDEORANGESTARTVALUE INTEGER,
ZFACECOUNT INTEGER,
ZMEDIAANALYSISVERSION INTEGER,
ZASSET INTEGER,
Z30_ASSET INTEGER,
ZACTIVITYSCORE FLOAT,
ZAUTOPLAYSUGGESTIONSCORE FLOAT,
ZBLURRINESSSCORE FLOAT,
ZEXPOSURESCORE FLOAT,
ZMEDIAANALYSISTIMESTAMP TIMESTAMP,
ZVIDEOSCORE FLOAT
);
CREATE TABLE ZMEMORY (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZCATEGORY INTEGER,
ZCLOUDDELETESTATE INTEGER,
ZCLOUDLOCALSTATE INTEGER,
ZFAVORITE INTEGER,
ZNOTIFICATIONSTATE INTEGER,
ZPENDING INTEGER,
ZPENDINGPLAYCOUNT INTEGER,
ZPENDINGSHARECOUNT INTEGER,
ZPENDINGVIEWCOUNT INTEGER,
ZPHOTOSGRAPHVERSION INTEGER,
ZPLAYCOUNT INTEGER,
ZREJECTED INTEGER,
ZSHARECOUNT INTEGER,
ZSUBCATEGORY INTEGER,
ZUSERCREATED INTEGER,
ZVIEWCOUNT INTEGER,
ZKEYASSET INTEGER,
Z30_KEYASSET INTEGER,
ZCREATIONDATE TIMESTAMP,
ZLASTMOVIEPLAYEDDATE TIMESTAMP,
ZLASTVIEWEDDATE TIMESTAMP,
ZSCORE FLOAT,
ZSUBTITLE VARCHAR,
ZTITLE VARCHAR,
ZUUID VARCHAR,
ZMOVIEASSETSTATE BLOB,
ZASSETLISTPREDICATE BLOB,
ZBLACKLISTEDFEATURE BLOB,
ZMOVIEDATA BLOB,
ZPHOTOSGRAPHDATA BLOB
);
CREATE TABLE ZMOMENT (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZCACHEDCOUNT INTEGER,
ZCACHEDPHOTOSCOUNT INTEGER,
ZCACHEDVIDEOSCOUNT INTEGER,
ZGENERATIONTYPE INTEGER,
ZREVERSELOCATIONDATACONTAINSLOCATION INTEGER,
ZREVERSELOCATIONDATAISVALID INTEGER,
ZTRASHEDSTATE INTEGER,
ZUSEDLOCATIONSOFINTEREST INTEGER,
ZHIGHLIGHT INTEGER,
ZMEGAMOMENTLIST INTEGER,
ZYEARMOMENTLIST INTEGER,
Z_FOK_MEGAMOMENTLIST INTEGER,
Z_FOK_YEARMOMENTLIST INTEGER,
ZAPPROXIMATELATITUDE FLOAT,
ZAPPROXIMATELONGITUDE FLOAT,
ZENDDATE TIMESTAMP,
ZMODIFICATIONDATE TIMESTAMP,
ZREPRESENTATIVEDATE TIMESTAMP,
ZSTARTDATE TIMESTAMP,
ZTITLE VARCHAR,
ZTITLE2 VARCHAR,
ZTITLE3 VARCHAR,
ZUUID VARCHAR,
ZREVERSELOCATIONDATA BLOB
);
CREATE TABLE ZMOMENTLIST (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZGENERATIONTYPE INTEGER,
ZGRANULARITYLEVEL INTEGER,
ZREVERSELOCATIONDATACONTAINSLOCATION INTEGER,
ZREVERSELOCATIONDATAISVALID INTEGER,
ZSORTINDEX INTEGER,
ZTRASHEDSTATE INTEGER,
ZENDDATE TIMESTAMP,
ZREPRESENTATIVEDATE TIMESTAMP,
ZSTARTDATE TIMESTAMP,
ZTITLE VARCHAR,
ZTITLE2 VARCHAR,
ZTITLE3 VARCHAR,
ZUUID VARCHAR,
ZREVERSELOCATIONDATA BLOB
);
CREATE TABLE ZMOMENTSHARE (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZASSETCOUNT INTEGER,
ZCLOUDDELETESTATE INTEGER,
ZLOCALPUBLISHSTATE INTEGER,
ZMODE INTEGER,
ZPHOTOSCOUNT INTEGER,
ZSHOULDIGNOREBUDGETS INTEGER,
ZSHOULDNOTIFYONUPLOADCOMPLETION INTEGER,
ZSTATUS INTEGER,
ZTRASHEDSTATE INTEGER,
ZUPLOADEDPHOTOSCOUNT INTEGER,
ZUPLOADEDVIDEOSCOUNT INTEGER,
ZVIDEOSCOUNT INTEGER,
ZCREATIONDATE TIMESTAMP,
ZENDDATE TIMESTAMP,
ZEXPIRYDATE TIMESTAMP,
ZSTARTDATE TIMESTAMP,
ZORIGINATINGSCOPEIDENTIFIER VARCHAR,
ZSCOPEIDENTIFIER VARCHAR,
ZTITLE VARCHAR,
ZUUID VARCHAR,
ZSHAREURL VARCHAR,
ZPREVIEWDATA BLOB,
ZTHUMBNAILIMAGEDATA BLOB
);
CREATE TABLE ZMOMENTSHAREPARTICIPANT (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZSTATUS INTEGER,
ZTYPE INTEGER,
ZMOMENTSHARE INTEGER,
ZEMAILADDRESS VARCHAR,
ZPHONENUMBER VARCHAR,
ZUSERIDENTIFIER VARCHAR,
ZUUID VARCHAR
);
CREATE TABLE ZPERSON (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZCLOUDDELETESTATE INTEGER,
ZCLOUDLOCALSTATE INTEGER,
ZCLOUDVERIFIEDTYPE INTEGER,
ZFACECOUNT INTEGER,
ZINPERSONNAMINGMODEL INTEGER,
ZKEYFACEPICKSOURCE INTEGER,
ZMANUALORDER INTEGER,
ZTYPE INTEGER,
ZVERIFIEDTYPE INTEGER,
ZASSOCIATEDFACEGROUP INTEGER,
ZKEYFACE INTEGER,
ZMERGETARGETPERSON INTEGER,
ZDISPLAYNAME VARCHAR,
ZFULLNAME VARCHAR,
ZPERSONUUID VARCHAR,
ZPERSONURI VARCHAR,
ZCONTACTMATCHINGDICTIONARY BLOB
);
CREATE TABLE Z_42MERGECANDIDATES (
Z_42MERGECANDIDATES INTEGER,
REFLEXIVE INTEGER,
PRIMARY KEY (Z_42MERGECANDIDATES, REFLEXIVE)
);
CREATE TABLE Z_42INVALIDMERGECANDIDATES (
Z_42INVALIDMERGECANDIDATES INTEGER,
REFLEXIVE INTEGER,
PRIMARY KEY (Z_42INVALIDMERGECANDIDATES, 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 ZPHOTOSHIGHLIGHT (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZASSETSCOUNT INTEGER,
ZCATEGORY INTEGER,
ZENRICHMENTSTATE INTEGER,
ZEXTENDEDCOUNT INTEGER,
ZISCURATED INTEGER,
ZMOOD INTEGER,
ZOVERVIEWCOUNT INTEGER,
ZSUMMARYCOUNT INTEGER,
ZTIMEZONEOFFSET INTEGER,
ZTYPE INTEGER,
ZCOLLECTION INTEGER,
ZKEYASSET INTEGER,
Z30_KEYASSET INTEGER,
ZENDDATE TIMESTAMP,
ZPROMOTIONSCORE FLOAT,
ZSTARTDATE TIMESTAMP,
ZSUBTITLE VARCHAR,
ZTITLE VARCHAR,
ZUUID VARCHAR
);
CREATE TABLE ZPHOTOSHIGHLIGHTCOLLECTION (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZENDDATE TIMESTAMP,
ZSTARTDATE TIMESTAMP,
ZTITLE VARCHAR,
ZUUID VARCHAR
);
CREATE TABLE ZSCENECLASSIFICATION (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZSCENEIDENTIFIER INTEGER,
ZASSETATTRIBUTES INTEGER,
ZCONFIDENCE FLOAT
);
CREATE TABLE ZSCENEPRINT (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZADDITIONALASSETATTRIBUTES INTEGER,
ZDATA BLOB
);
CREATE TABLE ZSEARCHDATA (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZVALID INTEGER,
ZASSET INTEGER,
Z30_ASSET INTEGER,
ZDATA BLOB
);
CREATE TABLE ZSIDECARFILE (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZCOMPRESSEDSIZE INTEGER,
ZINDEX INTEGER,
ZPTPTRASHEDSTATE INTEGER,
ZASSET INTEGER,
Z30_ASSET INTEGER,
ZCAPTUREDATE TIMESTAMP,
ZMODIFICATIONDATE TIMESTAMP,
ZFILENAME VARCHAR,
ZORIGINALFILENAME VARCHAR,
ZUNIFORMTYPEIDENTIFIER VARCHAR
);
CREATE TABLE ZSUGGESTION (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZCACHEDCOUNT INTEGER,
ZCACHEDPHOTOSCOUNT INTEGER,
ZCACHEDVIDEOSCOUNT INTEGER,
ZCLOUDDELETESTATE INTEGER,
ZCLOUDLOCALSTATE INTEGER,
ZNOTIFICATIONSTATE INTEGER,
ZSTATE INTEGER,
ZSUBTYPE INTEGER,
ZTYPE INTEGER,
ZVERSION INTEGER,
ZACTIVATIONDATE TIMESTAMP,
ZCREATIONDATE TIMESTAMP,
ZENDDATE TIMESTAMP,
ZEXPUNGEDATE TIMESTAMP,
ZRELEVANTUNTILDATE TIMESTAMP,
ZSTARTDATE TIMESTAMP,
ZSUBTITLE VARCHAR,
ZTITLE VARCHAR,
ZUUID VARCHAR,
ZACTIONDATA BLOB,
ZFEATURESDATA BLOB
);
CREATE TABLE ZUNIFORMTYPEIDENTIFIER (
Z_PK INTEGER PRIMARY KEY,
Z_ENT INTEGER,
Z_OPT INTEGER,
ZIDENTIFIER VARCHAR
);
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 INDEX ZADDITIONALASSETATTRIBUTES_ZASSET_INDEX ON ZADDITIONALASSETATTRIBUTES (ZASSET);
CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZASSETDESCRIPTION_INDEX ON ZADDITIONALASSETATTRIBUTES (ZASSETDESCRIPTION);
CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZSCENEPRINT_INDEX ON ZADDITIONALASSETATTRIBUTES (ZSCENEPRINT);
CREATE INDEX ZADDITIONALASSETATTRIBUTES_ZUNMANAGEDADJUSTMENT_INDEX ON ZADDITIONALASSETATTRIBUTES (ZUNMANAGEDADJUSTMENT);
CREATE INDEX Z_1KEYWORDS_Z_34KEYWORDS_INDEX ON Z_1KEYWORDS (Z_34KEYWORDS, Z_1ASSETATTRIBUTES);
CREATE INDEX Z_AdditionalAssetAttributes_adjustedFingerPrint ON ZADDITIONALASSETATTRIBUTES (ZADJUSTEDFINGERPRINT COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_allowedForAnalysis ON ZADDITIONALASSETATTRIBUTES (ZALLOWEDFORANALYSIS COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_cameraCaptureDevice ON ZADDITIONALASSETATTRIBUTES (ZCAMERACAPTUREDEVICE COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_creatorBundleID ON ZADDITIONALASSETATTRIBUTES (ZCREATORBUNDLEID COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_locationHash ON ZADDITIONALASSETATTRIBUTES (ZLOCATIONHASH COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_masterFingerPrint ON ZADDITIONALASSETATTRIBUTES (ZMASTERFINGERPRINT COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_originalAssetsUUID ON ZADDITIONALASSETATTRIBUTES (ZORIGINALASSETSUUID COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_originalHash ON ZADDITIONALASSETATTRIBUTES (ZORIGINALHASH COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_publicGlobalUUID ON ZADDITIONALASSETATTRIBUTES (ZPUBLICGLOBALUUID COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_reverseLocationDataIsValid ON ZADDITIONALASSETATTRIBUTES (ZREVERSELOCATIONDATAISVALID COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_shiftedLocationIsValid ON ZADDITIONALASSETATTRIBUTES (ZSHIFTEDLOCATIONISVALID COLLATE BINARY ASC);
CREATE INDEX Z_AdditionalAssetAttributes_uploadAttempts ON ZADDITIONALASSETATTRIBUTES (ZUPLOADATTEMPTS COLLATE BINARY ASC);
CREATE INDEX ZADJUSTMENT_ZASSET_INDEX ON ZADJUSTMENT (ZASSET);
CREATE INDEX Z_AlbumList_identifier ON ZALBUMLIST (ZIDENTIFIER COLLATE BINARY ASC);
CREATE INDEX Z_AlbumList_uuid ON ZALBUMLIST (ZUUID COLLATE BINARY ASC);
CREATE INDEX ZASSETANALYSISSTATE_ZASSET_INDEX ON ZASSETANALYSISSTATE (ZASSET);
CREATE INDEX Z_AssetAnalysisState_sortToken ON ZASSETANALYSISSTATE (ZSORTTOKEN COLLATE BINARY ASC);
CREATE INDEX Z_AssetAnalysisState_workerType ON ZASSETANALYSISSTATE (ZWORKERTYPE COLLATE BINARY ASC);
CREATE INDEX Z_AssetAnalysisState_workerType_sortToken ON ZASSETANALYSISSTATE (ZWORKERTYPE COLLATE BINARY ASC, ZSORTTOKEN COLLATE BINARY ASC);
CREATE INDEX Z_AssetAnalysisState_analysisState_workerType_asset ON ZASSETANALYSISSTATE (ZANALYSISSTATE COLLATE BINARY ASC, ZWORKERTYPE COLLATE BINARY ASC, ZASSET COLLATE BINARY ASC);
CREATE INDEX ZASSETDESCRIPTION_ZASSETATTRIBUTES_INDEX ON ZASSETDESCRIPTION (ZASSETATTRIBUTES);
CREATE INDEX ZCLOUDFEEDENTRY_Z_ENT_INDEX ON ZCLOUDFEEDENTRY (Z_ENT);
CREATE INDEX Z_CloudFeedEntry_entryDate ON ZCLOUDFEEDENTRY (ZENTRYDATE COLLATE BINARY ASC);
CREATE INDEX Z_CloudFeedEntry_entryTypeNumber ON ZCLOUDFEEDENTRY (ZENTRYTYPENUMBER COLLATE BINARY ASC);
CREATE INDEX Z_CloudFeedEntry_entryDate_entryPriorityNumber_entryTypeNumber ON ZCLOUDFEEDENTRY (ZENTRYDATE COLLATE BINARY ASC,
ZENTRYPRIORITYNUMBER COLLATE BINARY ASC,
ZENTRYTYPENUMBER COLLATE BINARY ASC);
CREATE INDEX Z_CloudFeedEntry_entity_entryDate 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_cloudLocalState ON ZCLOUDMASTER (ZCLOUDLOCALSTATE COLLATE BINARY ASC);
CREATE INDEX Z_CloudMaster_cloudMasterGUID ON ZCLOUDMASTER (ZCLOUDMASTERGUID COLLATE BINARY ASC);
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_assetUuid ON ZCLOUDRESOURCE (ZASSETUUID COLLATE BINARY ASC);
CREATE INDEX Z_CloudResource_dateCreated ON ZCLOUDRESOURCE (ZDATECREATED COLLATE BINARY ASC);
CREATE INDEX Z_CloudResource_isAvailable ON ZCLOUDRESOURCE (ZISAVAILABLE COLLATE BINARY ASC);
CREATE INDEX Z_CloudResource_isLocallyAvailable ON ZCLOUDRESOURCE (ZISLOCALLYAVAILABLE COLLATE BINARY ASC);
CREATE INDEX Z_CloudResource_type ON ZCLOUDRESOURCE (ZTYPE COLLATE BINARY ASC);
CREATE INDEX Z_CloudResource_type_isLocallyAvailable_isAvailable_dateCreated_lastOnDemandDownloadDate_lastPrefetchDate 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_cloudGUID ON ZCLOUDSHAREDCOMMENT (ZCLOUDGUID COLLATE BINARY ASC);
CREATE INDEX Z_Codec_fourCharCodeName ON ZCODEC (ZFOURCHARCODENAME COLLATE BINARY ASC);
CREATE INDEX Z_ColorSpace_colorSpaceName ON ZCOLORSPACE (ZCOLORSPACENAME COLLATE BINARY ASC);
CREATE INDEX ZCOMPUTEDASSETATTRIBUTES_ZASSET_INDEX ON ZCOMPUTEDASSETATTRIBUTES (ZASSET);
CREATE INDEX Z_DeferredRebuildFace_assetCloudGUID ON ZDEFERREDREBUILDFACE (ZASSETCLOUDGUID COLLATE BINARY ASC);
CREATE INDEX ZDETECTEDFACE_ZASSET_INDEX ON ZDETECTEDFACE (ZASSET);
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_ZPERSON_INDEX ON ZDETECTEDFACE (ZPERSON);
CREATE INDEX ZDETECTEDFACE_ZPERSONBEINGKEYFACE_INDEX ON ZDETECTEDFACE (ZPERSONBEINGKEYFACE);
CREATE INDEX Z_18CLUSTERREJECTEDPERSONS_Z_42CLUSTERREJECTEDPERSONS_INDEX ON Z_18CLUSTERREJECTEDPERSONS (Z_42CLUSTERREJECTEDPERSONS,
Z_18CLUSTERREJECTEDFACES);
CREATE INDEX Z_18REJECTEDPERSONS_Z_42REJECTEDPERSONS_INDEX ON Z_18REJECTEDPERSONS (Z_42REJECTEDPERSONS,
Z_18REJECTEDFACES);
CREATE INDEX Z_18REJECTEDPERSONSNEEDINGFACECROPS_Z_42REJECTEDPERSONSNEEDINGFACECROPS_INDEX ON Z_18REJECTEDPERSONSNEEDINGFACECROPS (Z_42REJECTEDPERSONSNEEDINGFACECROPS,
Z_18REJECTEDFACESNEEDINGFACECROPS);
CREATE INDEX Z_DetectedFace_cloudLocalState ON ZDETECTEDFACE (ZCLOUDLOCALSTATE COLLATE BINARY ASC);
CREATE INDEX Z_DetectedFace_clusterSequenceNumber ON ZDETECTEDFACE (ZCLUSTERSEQUENCENUMBER COLLATE BINARY ASC);
CREATE INDEX Z_DetectedFace_uuid ON ZDETECTEDFACE (ZUUID COLLATE BINARY ASC);
CREATE INDEX ZDETECTEDFACEGROUP_ZASSOCIATEDPERSON_INDEX ON ZDETECTEDFACEGROUP (ZASSOCIATEDPERSON);
CREATE INDEX ZDETECTEDFACEGROUP_ZKEYFACE_INDEX ON ZDETECTEDFACEGROUP (ZKEYFACE);
CREATE INDEX Z_DetectedFaceGroup_personBuilderState ON ZDETECTEDFACEGROUP (ZPERSONBUILDERSTATE COLLATE BINARY ASC);
CREATE INDEX ZDETECTEDFACEPRINT_ZFACE_INDEX ON ZDETECTEDFACEPRINT (ZFACE);
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_cloudLocalState ON ZFACECROP (ZCLOUDLOCALSTATE COLLATE BINARY ASC);
CREATE INDEX Z_FaceCrop_state ON ZFACECROP (ZSTATE COLLATE BINARY ASC);
CREATE INDEX Z_FaceCrop_uuid ON ZFACECROP (ZUUID 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_22ALBUMLISTS_Z_3ALBUMLISTS_INDEX ON Z_22ALBUMLISTS (Z_3ALBUMLISTS,
Z_22ALBUMS);
CREATE INDEX ZGENERICALBUM_Z_ENT_INDEX ON ZGENERICALBUM (Z_ENT);
CREATE INDEX Z_GenericAlbum_cloudGUID ON ZGENERICALBUM (ZCLOUDGUID COLLATE BINARY ASC);
CREATE INDEX Z_GenericAlbum_cloudLocalState ON ZGENERICALBUM (ZCLOUDLOCALSTATE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAlbum_importSessionID ON ZGENERICALBUM (ZIMPORTSESSIONID COLLATE BINARY ASC);
CREATE INDEX Z_GenericAlbum_kind ON ZGENERICALBUM (ZKIND COLLATE BINARY ASC);
CREATE INDEX Z_GenericAlbum_syncEventOrderKey ON ZGENERICALBUM (ZSYNCEVENTORDERKEY COLLATE BINARY ASC);
CREATE INDEX Z_GenericAlbum_uuid ON ZGENERICALBUM (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_23ASSETS_Z_30ASSETS_INDEX ON Z_23ASSETS (Z_30ASSETS,
Z_23ALBUMS);
CREATE INDEX ZGENERICASSET_ZADDITIONALATTRIBUTES_INDEX ON ZGENERICASSET (ZADDITIONALATTRIBUTES);
CREATE INDEX ZGENERICASSET_ZCLOUDFEEDASSETSENTRY_INDEX ON ZGENERICASSET (ZCLOUDFEEDASSETSENTRY);
CREATE INDEX ZGENERICASSET_ZCOMPUTEDATTRIBUTES_INDEX ON ZGENERICASSET (ZCOMPUTEDATTRIBUTES);
CREATE INDEX ZGENERICASSET_ZHIGHLIGHTBEINGASSETS_INDEX ON ZGENERICASSET (ZHIGHLIGHTBEINGASSETS);
CREATE INDEX ZGENERICASSET_ZHIGHLIGHTBEINGEXTENDEDASSETS_INDEX ON ZGENERICASSET (ZHIGHLIGHTBEINGEXTENDEDASSETS);
CREATE INDEX ZGENERICASSET_ZHIGHLIGHTBEINGKEYASSET_INDEX ON ZGENERICASSET (ZHIGHLIGHTBEINGKEYASSET);
CREATE INDEX ZGENERICASSET_ZHIGHLIGHTBEINGOVERVIEWASSETS_INDEX ON ZGENERICASSET (ZHIGHLIGHTBEINGOVERVIEWASSETS);
CREATE INDEX ZGENERICASSET_ZHIGHLIGHTBEINGSUMMARYASSETS_INDEX ON ZGENERICASSET (ZHIGHLIGHTBEINGSUMMARYASSETS);
CREATE INDEX ZGENERICASSET_ZIMPORTSESSION_INDEX ON ZGENERICASSET (ZIMPORTSESSION);
CREATE INDEX ZGENERICASSET_ZMASTER_INDEX ON ZGENERICASSET (ZMASTER);
CREATE INDEX ZGENERICASSET_ZMEDIAANALYSISATTRIBUTES_INDEX ON ZGENERICASSET (ZMEDIAANALYSISATTRIBUTES);
CREATE INDEX ZGENERICASSET_ZMOMENT_INDEX ON ZGENERICASSET (ZMOMENT);
CREATE INDEX ZGENERICASSET_ZMOMENTSHARE_INDEX ON ZGENERICASSET (ZMOMENTSHARE);
CREATE INDEX ZGENERICASSET_ZSEARCHDATA_INDEX ON ZGENERICASSET (ZSEARCHDATA);
CREATE INDEX ZGENERICASSET_ZSOURCEASSETFORDUPLICATION_INDEX ON ZGENERICASSET (ZSOURCEASSETFORDUPLICATION);
CREATE INDEX Z_30SUGGESTIONSBEINGREPRESENTATIVEASSETS_Z_50SUGGESTIONSBEINGREPRESENTATIVEASSETS_INDEX ON Z_30SUGGESTIONSBEINGREPRESENTATIVEASSETS (Z_50SUGGESTIONSBEINGREPRESENTATIVEASSETS,
Z_30REPRESENTATIVEASSETS1);
CREATE INDEX Z_30SUGGESTIONSBEINGKEYASSETS_Z_50SUGGESTIONSBEINGKEYASSETS_INDEX ON Z_30SUGGESTIONSBEINGKEYASSETS (Z_50SUGGESTIONSBEINGKEYASSETS,
Z_30KEYASSETS);
CREATE INDEX Z_30MEMORIESBEINGREPRESENTATIVEASSETS_Z_37MEMORIESBEINGREPRESENTATIVEASSETS_INDEX ON Z_30MEMORIESBEINGREPRESENTATIVEASSETS (Z_37MEMORIESBEINGREPRESENTATIVEASSETS,
Z_30REPRESENTATIVEASSETS);
CREATE INDEX Z_30MEMORIESBEINGMOVIECURATEDASSETS_Z_37MEMORIESBEINGMOVIECURATEDASSETS_INDEX ON Z_30MEMORIESBEINGMOVIECURATEDASSETS (Z_37MEMORIESBEINGMOVIECURATEDASSETS,
Z_30MOVIECURATEDASSETS);
CREATE INDEX Z_30MEMORIESBEINGCURATEDASSETS_Z_37MEMORIESBEINGCURATEDASSETS_INDEX ON Z_30MEMORIESBEINGCURATEDASSETS (Z_37MEMORIESBEINGCURATEDASSETS,
Z_30CURATEDASSETS);
CREATE INDEX Z_30MEMORIESBEINGEXTENDEDCURATEDASSETS_Z_37MEMORIESBEINGEXTENDEDCURATEDASSETS_INDEX ON Z_30MEMORIESBEINGEXTENDEDCURATEDASSETS (Z_37MEMORIESBEINGEXTENDEDCURATEDASSETS,
Z_30EXTENDEDCURATEDASSETS);
CREATE INDEX ZGENERICASSET_Z_ENT_INDEX ON ZGENERICASSET (Z_ENT);
CREATE INDEX Z_GenericAsset_addedDate ON ZGENERICASSET (ZADDEDDATE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_avalanchePickType ON ZGENERICASSET (ZAVALANCHEPICKTYPE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_avalancheUUID ON ZGENERICASSET (ZAVALANCHEUUID COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_cloudAssetGUID ON ZGENERICASSET (ZCLOUDASSETGUID COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_cloudPlaceholderKind ON ZGENERICASSET (ZCLOUDPLACEHOLDERKIND COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_complete ON ZGENERICASSET (ZCOMPLETE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_customRenderedValue ON ZGENERICASSET (ZCUSTOMRENDEREDVALUE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_dateCreated ON ZGENERICASSET (ZDATECREATED COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_depthStates ON ZGENERICASSET (ZDEPTHSTATES COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_favorite ON ZGENERICASSET (ZFAVORITE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_groupingUUID ON ZGENERICASSET (ZGROUPINGUUID COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_kind ON ZGENERICASSET (ZKIND COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_kindSubtype ON ZGENERICASSET (ZKINDSUBTYPE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_lastSharedDate ON ZGENERICASSET (ZLASTSHAREDDATE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_mediaGroupUUID ON ZGENERICASSET (ZMEDIAGROUPUUID COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_playbackStyle ON ZGENERICASSET (ZPLAYBACKSTYLE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_playbackVariation ON ZGENERICASSET (ZPLAYBACKVARIATION COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_savedAssetType ON ZGENERICASSET (ZSAVEDASSETTYPE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_sortToken ON ZGENERICASSET (ZSORTTOKEN COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_thumbnailIndex ON ZGENERICASSET (ZTHUMBNAILINDEX COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_uniformTypeIdentifier ON ZGENERICASSET (ZUNIFORMTYPEIDENTIFIER COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_uuid ON ZGENERICASSET (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_visibilityState ON ZGENERICASSET (ZVISIBILITYSTATE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_kind_entity ON ZGENERICASSET (ZKIND COLLATE BINARY ASC,
Z_ENT COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_cloudAssetGUID_savedAssetType ON ZGENERICASSET (ZCLOUDASSETGUID COLLATE BINARY ASC,
ZSAVEDASSETTYPE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_directory_filename ON ZGENERICASSET (ZDIRECTORY COLLATE BINARY ASC,
ZFILENAME COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_cloudLocalState_dateCreated ON ZGENERICASSET (ZCLOUDLOCALSTATE COLLATE BINARY ASC,
ZDATECREATED COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_hidden_visibilityState ON ZGENERICASSET (ZHIDDEN COLLATE BINARY ASC,
ZVISIBILITYSTATE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_trashedState_trashedDate ON ZGENERICASSET (ZTRASHEDSTATE COLLATE BINARY ASC,
ZTRASHEDDATE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_addedDate_sortToken ON ZGENERICASSET (ZADDEDDATE COLLATE BINARY ASC,
ZSORTTOKEN COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_addedDate_sortToken_kind_savedAssetType_visibilityState_trashedState_hidden_avalanchePickType_complete_entity ON ZGENERICASSET (ZADDEDDATE COLLATE BINARY ASC,
ZSORTTOKEN COLLATE BINARY ASC,
ZKIND 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,
Z_ENT COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_trashedState_cloudLocalState_savedAssetType ON ZGENERICASSET (ZTRASHEDSTATE COLLATE BINARY ASC,
ZCLOUDLOCALSTATE COLLATE BINARY ASC,
ZSAVEDASSETTYPE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_kind_trashedState_cloudLocalState_savedAssetType ON ZGENERICASSET (ZKIND COLLATE BINARY ASC,
ZTRASHEDSTATE COLLATE BINARY ASC,
ZCLOUDLOCALSTATE COLLATE BINARY ASC,
ZSAVEDASSETTYPE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_favorite_dateCreated_addedDate_filename_visibilityState_complete_trashedState_hidden_savedAssetType_avalanchePickType ON ZGENERICASSET (ZFAVORITE COLLATE BINARY ASC,
ZDATECREATED COLLATE BINARY ASC,
ZADDEDDATE COLLATE BINARY ASC,
ZFILENAME 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);
CREATE INDEX Z_GenericAsset_playbackStyle_dateCreated_addedDate_filename_visibilityState_complete_trashedState_hidden_savedAssetType_avalanchePickType ON ZGENERICASSET (ZPLAYBACKSTYLE COLLATE BINARY ASC,
ZDATECREATED COLLATE BINARY ASC,
ZADDEDDATE COLLATE BINARY ASC,
ZFILENAME 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);
CREATE INDEX Z_GenericAsset_latitude_longitude_trashedState_hidden_avalanchePickType_savedAssetType ON ZGENERICASSET (ZLATITUDE COLLATE BINARY ASC,
ZLONGITUDE COLLATE BINARY ASC,
ZTRASHEDSTATE COLLATE BINARY ASC,
ZHIDDEN COLLATE BINARY ASC,
ZAVALANCHEPICKTYPE COLLATE BINARY ASC,
ZSAVEDASSETTYPE COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_kindSubtype_dateCreated_addedDate_filename ON ZGENERICASSET (ZKINDSUBTYPE COLLATE BINARY ASC,
ZDATECREATED COLLATE BINARY ASC,
ZADDEDDATE COLLATE BINARY ASC,
ZFILENAME COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_savedAssetType_cloudPlaceholderKind_cloudServerPublishDate_cloudBatchPublishDate_dateCreated ON ZGENERICASSET (ZSAVEDASSETTYPE COLLATE BINARY ASC,
ZCLOUDPLACEHOLDERKIND COLLATE BINARY ASC,
ZCLOUDSERVERPUBLISHDATE COLLATE BINARY ASC,
ZCLOUDBATCHPUBLISHDATE COLLATE BINARY ASC,
ZDATECREATED COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_savedAssetType_visibilityState_hidden_trashedState_locationData ON ZGENERICASSET (ZSAVEDASSETTYPE COLLATE BINARY ASC,
ZVISIBILITYSTATE COLLATE BINARY ASC,
ZHIDDEN COLLATE BINARY ASC,
ZTRASHEDSTATE COLLATE BINARY ASC,
ZLOCATIONDATA COLLATE BINARY ASC);
CREATE INDEX Z_GenericAsset_importSession_savedAssetType_visibilityState_hidden_trashedState_avalanchePickType_entity ON ZGENERICASSET (ZIMPORTSESSION COLLATE BINARY ASC,
ZSAVEDASSETTYPE COLLATE BINARY ASC,
ZVISIBILITYSTATE COLLATE BINARY ASC,
ZHIDDEN COLLATE BINARY ASC,
ZTRASHEDSTATE COLLATE BINARY ASC,
ZAVALANCHEPICKTYPE COLLATE BINARY ASC,
Z_ENT COLLATE BINARY ASC);
CREATE INDEX ZINTERNALRESOURCE_ZASSET_INDEX ON ZINTERNALRESOURCE (ZASSET);
CREATE INDEX ZINTERNALRESOURCE_ZCLOUDATTRIBUTES_INDEX ON ZINTERNALRESOURCE (ZCLOUDATTRIBUTES);
CREATE INDEX ZINTERNALRESOURCE_ZCLOUDMASTER_INDEX ON ZINTERNALRESOURCE (ZCLOUDMASTER);
CREATE INDEX ZINTERNALRESOURCE_ZCODEC_INDEX ON ZINTERNALRESOURCE (ZCODEC);
CREATE INDEX ZINTERNALRESOURCE_ZCOLORSPACE_INDEX ON ZINTERNALRESOURCE (ZCOLORSPACE);
CREATE INDEX ZINTERNALRESOURCE_ZUNIFORMTYPEIDENTIFIER_INDEX ON ZINTERNALRESOURCE (ZUNIFORMTYPEIDENTIFIER);
CREATE INDEX Z_InternalResource_resourceType_version_recipeID_uniformTypeIdentifier_orientation_unorientedWidth_unorientedHeight_asset ON ZINTERNALRESOURCE (ZRESOURCETYPE COLLATE BINARY ASC,
ZVERSION COLLATE BINARY ASC,
ZRECIPEID COLLATE BINARY ASC,
ZUNIFORMTYPEIDENTIFIER COLLATE BINARY ASC,
ZORIENTATION COLLATE BINARY ASC,
ZUNORIENTEDWIDTH COLLATE BINARY ASC,
ZUNORIENTEDHEIGHT COLLATE BINARY ASC,
ZASSET COLLATE BINARY ASC);
CREATE INDEX ZINTERNALRESOURCECLOUDATTRIBUTES_ZRESOURCE_INDEX ON ZINTERNALRESOURCECLOUDATTRIBUTES (ZRESOURCE);
CREATE INDEX Z_Keyword_title ON ZKEYWORD (ZTITLE 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_albumUUID ON ZLEGACYFACE (ZALBUMUUID COLLATE BINARY ASC);
CREATE INDEX Z_LegacyFace_identifier ON ZLEGACYFACE (ZIDENTIFIER COLLATE BINARY ASC);
CREATE INDEX ZMEDIAANALYSISASSETATTRIBUTES_ZASSET_INDEX ON ZMEDIAANALYSISASSETATTRIBUTES (ZASSET);
CREATE INDEX ZMEMORY_ZKEYASSET_INDEX ON ZMEMORY (ZKEYASSET);
CREATE INDEX Z_Memory_cloudLocalState ON ZMEMORY (ZCLOUDLOCALSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Memory_lastMoviePlayedDate ON ZMEMORY (ZLASTMOVIEPLAYEDDATE COLLATE BINARY ASC);
CREATE INDEX Z_Memory_lastViewedDate ON ZMEMORY (ZLASTVIEWEDDATE COLLATE BINARY ASC);
CREATE INDEX Z_Memory_pending ON ZMEMORY (ZPENDING COLLATE BINARY ASC);
CREATE INDEX Z_Memory_uuid ON ZMEMORY (ZUUID COLLATE BINARY ASC);
CREATE INDEX ZMOMENT_ZHIGHLIGHT_INDEX ON ZMOMENT (ZHIGHLIGHT);
CREATE INDEX ZMOMENT_ZMEGAMOMENTLIST_INDEX ON ZMOMENT (ZMEGAMOMENTLIST);
CREATE INDEX ZMOMENT_ZYEARMOMENTLIST_INDEX ON ZMOMENT (ZYEARMOMENTLIST);
CREATE INDEX Z_Moment_endDate ON ZMOMENT (ZENDDATE COLLATE BINARY ASC);
CREATE INDEX Z_Moment_representativeDate ON ZMOMENT (ZREPRESENTATIVEDATE COLLATE BINARY ASC);
CREATE INDEX Z_Moment_reverseLocationDataIsValid ON ZMOMENT (ZREVERSELOCATIONDATAISVALID COLLATE BINARY ASC);
CREATE INDEX Z_Moment_startDate ON ZMOMENT (ZSTARTDATE COLLATE BINARY ASC);
CREATE INDEX Z_Moment_trashedState ON ZMOMENT (ZTRASHEDSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Moment_uuid ON ZMOMENT (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_Moment_startDate_endDate ON ZMOMENT (ZSTARTDATE COLLATE BINARY ASC,
ZENDDATE COLLATE BINARY ASC);
CREATE INDEX Z_MomentList_granularityLevel ON ZMOMENTLIST (ZGRANULARITYLEVEL COLLATE BINARY ASC);
CREATE INDEX Z_MomentList_representativeDate ON ZMOMENTLIST (ZREPRESENTATIVEDATE COLLATE BINARY ASC);
CREATE INDEX Z_MomentList_reverseLocationDataIsValid ON ZMOMENTLIST (ZREVERSELOCATIONDATAISVALID COLLATE BINARY ASC);
CREATE INDEX Z_MomentList_sortIndex ON ZMOMENTLIST (ZSORTINDEX COLLATE BINARY ASC);
CREATE INDEX Z_MomentList_trashedState ON ZMOMENTLIST (ZTRASHEDSTATE COLLATE BINARY ASC);
CREATE INDEX Z_MomentList_uuid ON ZMOMENTLIST (ZUUID COLLATE BINARY ASC);
CREATE INDEX Z_MomentList_granularityLevel_sortIndex ON ZMOMENTLIST (ZGRANULARITYLEVEL COLLATE BINARY ASC,
ZSORTINDEX COLLATE BINARY ASC);
CREATE INDEX Z_MomentList_reverseLocationDataIsValid_granularityLevel ON ZMOMENTLIST (ZREVERSELOCATIONDATAISVALID COLLATE BINARY ASC,
ZGRANULARITYLEVEL COLLATE BINARY ASC);
CREATE INDEX Z_MomentShare_shareURL ON ZMOMENTSHARE (ZSHAREURL COLLATE BINARY ASC);
CREATE INDEX Z_MomentShare_uuid ON ZMOMENTSHARE (ZUUID COLLATE BINARY ASC);
CREATE INDEX ZMOMENTSHAREPARTICIPANT_ZMOMENTSHARE_INDEX ON ZMOMENTSHAREPARTICIPANT (ZMOMENTSHARE);
CREATE INDEX Z_MomentShareParticipant_uuid ON ZMOMENTSHAREPARTICIPANT (ZUUID 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 Z_42MERGECANDIDATES_REFLEXIVE_INDEX ON Z_42MERGECANDIDATES (REFLEXIVE,
Z_42MERGECANDIDATES);
CREATE INDEX Z_42INVALIDMERGECANDIDATES_REFLEXIVE_INDEX ON Z_42INVALIDMERGECANDIDATES (REFLEXIVE,
Z_42INVALIDMERGECANDIDATES);
CREATE INDEX Z_Person_cloudLocalState ON ZPERSON (ZCLOUDLOCALSTATE COLLATE BINARY ASC);
CREATE INDEX Z_Person_faceCount ON ZPERSON (ZFACECOUNT COLLATE BINARY ASC);
CREATE INDEX Z_Person_manualOrder ON ZPERSON (ZMANUALORDER COLLATE BINARY ASC);
CREATE INDEX Z_Person_personUri ON ZPERSON (ZPERSONURI COLLATE BINARY ASC);
CREATE INDEX Z_Person_personUUID ON ZPERSON (ZPERSONUUID COLLATE BINARY ASC);
CREATE INDEX Z_Person_type ON ZPERSON (ZTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Person_verifiedType ON ZPERSON (ZVERIFIEDTYPE COLLATE BINARY ASC);
CREATE INDEX Z_Person_verifiedType_faceCount_type ON ZPERSON (ZVERIFIEDTYPE COLLATE BINARY ASC,
ZFACECOUNT COLLATE BINARY ASC,
ZTYPE COLLATE BINARY ASC);
CREATE INDEX ZPERSONREFERENCE_ZASSETATTRIBUTES_INDEX ON ZPERSONREFERENCE (ZASSETATTRIBUTES);
CREATE INDEX ZPERSONREFERENCE_ZPERSON_INDEX ON ZPERSONREFERENCE (ZPERSON);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZCOLLECTION_INDEX ON ZPHOTOSHIGHLIGHT (ZCOLLECTION);
CREATE INDEX ZPHOTOSHIGHLIGHT_ZKEYASSET_INDEX ON ZPHOTOSHIGHLIGHT (ZKEYASSET);
CREATE INDEX Z_PhotosHighlight_uuid ON ZPHOTOSHIGHLIGHT (ZUUID COLLATE BINARY ASC);
CREATE INDEX ZSCENECLASSIFICATION_ZASSETATTRIBUTES_INDEX ON ZSCENECLASSIFICATION (ZASSETATTRIBUTES);
CREATE INDEX Z_SceneClassification_sceneIdentifier ON ZSCENECLASSIFICATION (ZSCENEIDENTIFIER COLLATE BINARY ASC);
CREATE INDEX Z_SceneClassification_sceneIdentifier_confidence ON ZSCENECLASSIFICATION (ZSCENEIDENTIFIER COLLATE BINARY ASC,
ZCONFIDENCE COLLATE BINARY ASC);
CREATE INDEX ZSCENEPRINT_ZADDITIONALASSETATTRIBUTES_INDEX ON ZSCENEPRINT (ZADDITIONALASSETATTRIBUTES);
CREATE INDEX ZSEARCHDATA_ZASSET_INDEX ON ZSEARCHDATA (ZASSET);
CREATE INDEX Z_SearchData_valid ON ZSEARCHDATA (ZVALID COLLATE BINARY ASC);
CREATE INDEX ZSIDECARFILE_ZASSET_INDEX ON ZSIDECARFILE (ZASSET);
CREATE INDEX Z_Suggestion_state ON ZSUGGESTION (ZSTATE COLLATE BINARY ASC);
CREATE INDEX Z_UniformTypeIdentifier_identifier ON ZUNIFORMTYPEIDENTIFIER (ZIDENTIFIER COLLATE BINARY ASC);
CREATE INDEX ZUNMANAGEDADJUSTMENT_ZASSETATTRIBUTES_INDEX ON ZUNMANAGEDADJUSTMENT (ZASSETATTRIBUTES);
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_INSERT_INCREMENT AFTER INSERT ON ZGENERICASSET FOR EACH ROW WHEN NEW.ZTRASHEDSTATE == 0 AND NEW.ZVISIBILITYSTATE == 0 AND NEW.ZHIDDEN == 0 BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = IFNULL(ZASSETVISIBLE,0) + 1 WHERE NEW.Z_PK = ZASSET; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
Z_ENT,
Z_PK,
'ZASSETVISIBLE',
ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE ZASSET = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_UPDATE_INCREMENT AFTER UPDATE OF ZTRASHEDSTATE,
ZVISIBILITYSTATE,
ZHIDDEN ON ZGENERICASSET FOR EACH ROW WHEN (NEW.ZTRASHEDSTATE == 0 AND NEW.ZVISIBILITYSTATE == 0 AND NEW.ZHIDDEN == 0) AND (NEW.ZTRASHEDSTATE != OLD.ZTRASHEDSTATE OR NEW.ZVISIBILITYSTATE != OLD.ZVISIBILITYSTATE OR NEW.ZHIDDEN != OLD.ZHIDDEN) BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = IFNULL(ZASSETVISIBLE,0) + 1 WHERE NEW.Z_PK = ZASSET; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
Z_ENT,
Z_PK,
'ZASSETVISIBLE',
ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE ZASSET = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_UPDATE_DECREMENT AFTER UPDATE OF ZTRASHEDSTATE,
ZVISIBILITYSTATE,
ZHIDDEN ON ZGENERICASSET FOR EACH ROW WHEN (OLD.ZTRASHEDSTATE == 0 AND OLD.ZVISIBILITYSTATE == 0 AND OLD.ZHIDDEN == 0) AND (NEW.ZTRASHEDSTATE != OLD.ZTRASHEDSTATE OR NEW.ZVISIBILITYSTATE != OLD.ZVISIBILITYSTATE OR NEW.ZHIDDEN != OLD.ZHIDDEN) BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = MAX(0,IFNULL(ZASSETVISIBLE,0) - 1) WHERE OLD.Z_PK = ZASSET; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
Z_ENT,
Z_PK,
'ZASSETVISIBLE',
ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE ZASSET = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_DELETE_DECREMENT AFTER DELETE ON ZGENERICASSET FOR EACH ROW WHEN OLD.ZTRASHEDSTATE == 0 AND OLD.ZVISIBILITYSTATE == 0 AND OLD.ZHIDDEN == 0 BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = MAX(0,IFNULL(ZASSETVISIBLE,0) - 1) WHERE OLD.Z_PK = ZASSET; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
Z_ENT,
Z_PK,
'ZASSETVISIBLE',
ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE ZASSET = OLD.Z_PK; END;
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_ZDETECTEDFACE_INSERT_INCREMENT AFTER INSERT ON ZDETECTEDFACE FOR EACH ROW BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = (SELECT COUNT(Z_PK) FROM ZGENERICASSET WHERE (Z_PK = NEW.ZASSET) AND (ZTRASHEDSTATE == 0 AND ZVISIBILITYSTATE == 0 AND ZHIDDEN == 0)) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
Z_ENT,
Z_PK,
'ZASSETVISIBLE',
ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE Z_PK = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_ZASSET_UPDATE_TO_NULL AFTER UPDATE OF ZASSET ON ZDETECTEDFACE WHEN (NEW.ZASSET IS NULL AND OLD.ZASSET IS NOT NULL) BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = 0 WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
Z_ENT,
Z_PK,
'ZASSETVISIBLE',
ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE Z_PK = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZDETECTEDFACE_ZASSETVISIBLE_ZGENERICASSET_ZASSET_UPDATE_INCREMENT AFTER UPDATE OF ZASSET ON ZDETECTEDFACE WHEN ((NEW.ZASSET IS NOT NULL AND OLD.ZASSET IS NULL) OR (NEW.ZASSET != OLD.ZASSET)) BEGIN UPDATE ZDETECTEDFACE SET ZASSETVISIBLE = (SELECT COUNT(Z_PK) FROM ZGENERICASSET WHERE Z_PK = NEW.ZASSET AND (ZTRASHEDSTATE == 0 AND ZVISIBILITYSTATE == 0 AND ZHIDDEN == 0)) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZDETECTEDFACE',
Z_ENT,
Z_PK,
'ZASSETVISIBLE',
ZASSETVISIBLE) FROM ZDETECTEDFACE WHERE Z_PK = NEW.Z_PK; END;
CREATE VIRTUAL TABLE Z_RT_GenericAsset_boundedByRect USING RTREE (Z_PK INTEGER PRIMARY KEY,
ZLATITUDE_MIN FLOAT,
ZLATITUDE_MAX FLOAT,
ZLONGITUDE_MIN FLOAT,
ZLONGITUDE_MAX FLOAT)
/* Z_RT_GenericAsset_boundedByRect(Z_PK,ZLATITUDE_MIN,ZLATITUDE_MAX,ZLONGITUDE_MIN,ZLONGITUDE_MAX) */;
CREATE TABLE IF NOT EXISTS "Z_RT_GenericAsset_boundedByRect_rowid"(rowid INTEGER PRIMARY KEY,nodeno);
CREATE TABLE IF NOT EXISTS "Z_RT_GenericAsset_boundedByRect_node"(nodeno INTEGER PRIMARY KEY,data);
CREATE TABLE IF NOT EXISTS "Z_RT_GenericAsset_boundedByRect_parent"(nodeno INTEGER PRIMARY KEY,parentnode);
CREATE TRIGGER Z_RT_GenericAsset_boundedByRect_INSERT AFTER INSERT ON ZGENERICASSET FOR EACH ROW BEGIN INSERT OR REPLACE INTO Z_RT_GenericAsset_boundedByRect (Z_PK,
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_GenericAsset_boundedByRect_UPDATE AFTER UPDATE ON ZGENERICASSET FOR EACH ROW BEGIN DELETE FROM Z_RT_GenericAsset_boundedByRect WHERE Z_PK = NEW.Z_PK ; INSERT INTO Z_RT_GenericAsset_boundedByRect (Z_PK,
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_GenericAsset_boundedByRect_DELETE AFTER DELETE ON ZGENERICASSET FOR EACH ROW BEGIN DELETE FROM Z_RT_GenericAsset_boundedByRect WHERE Z_PK = OLD.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 BEGIN UPDATE ZPERSON SET ZFACECOUNT = IFNULL(ZFACECOUNT,0) + 1 WHERE NEW.ZPERSON = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
Z_ENT,
Z_PK,
'ZFACECOUNT',
ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.ZPERSON; END;
CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_UPDATE_INCREMENT AFTER UPDATE OF ZHIDDEN,
ZASSETVISIBLE ON ZDETECTEDFACE FOR EACH ROW WHEN (NEW.ZHIDDEN == 0 AND NEW.ZASSETVISIBLE == 1) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZASSETVISIBLE != OLD.ZASSETVISIBLE) AND (NEW.ZPERSON == OLD.ZPERSON) BEGIN UPDATE ZPERSON SET ZFACECOUNT = IFNULL(ZFACECOUNT,0) + 1 WHERE NEW.ZPERSON = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
Z_ENT,
Z_PK,
'ZFACECOUNT',
ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.ZPERSON; END;
CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_UPDATE_DECREMENT AFTER UPDATE OF ZHIDDEN,
ZASSETVISIBLE ON ZDETECTEDFACE FOR EACH ROW WHEN (OLD.ZHIDDEN == 0 AND OLD.ZASSETVISIBLE == 1) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZASSETVISIBLE != OLD.ZASSETVISIBLE) AND (OLD.ZPERSON == NEW.ZPERSON) BEGIN UPDATE ZPERSON SET ZFACECOUNT = MAX(0,IFNULL(ZFACECOUNT,0) - 1) WHERE OLD.ZPERSON = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
Z_ENT,
Z_PK,
'ZFACECOUNT',
ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.ZPERSON; END;
CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_DELETE_DECREMENT AFTER DELETE ON ZDETECTEDFACE FOR EACH ROW WHEN OLD.ZHIDDEN == 0 AND OLD.ZASSETVISIBLE == 1 BEGIN UPDATE ZPERSON SET ZFACECOUNT = MAX(0,IFNULL(ZFACECOUNT,0) - 1) WHERE OLD.ZPERSON = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
Z_ENT,
Z_PK,
'ZFACECOUNT',
ZFACECOUNT) FROM ZPERSON WHERE Z_PK = OLD.ZPERSON; 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 (ZPERSON = NEW.Z_PK) AND (ZHIDDEN == 0 AND ZASSETVISIBLE == 1)) 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_ZPERSON_UPDATE_INCREMENT AFTER UPDATE OF ZPERSON ON ZDETECTEDFACE WHEN (NEW.ZHIDDEN == 0 AND NEW.ZASSETVISIBLE == 1) AND ((NEW.ZPERSON IS NOT NULL AND OLD.ZPERSON IS NULL) OR (NEW.ZPERSON != OLD.ZPERSON)) BEGIN UPDATE ZPERSON SET ZFACECOUNT = IFNULL(ZFACECOUNT,0) + 1 WHERE Z_PK = NEW.ZPERSON; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
Z_ENT,
Z_PK,
'ZFACECOUNT',
ZFACECOUNT) FROM ZPERSON WHERE Z_PK = NEW.ZPERSON; END;
CREATE TRIGGER ZT_ZPERSON_ZFACECOUNT_ZDETECTEDFACE_ZPERSON_UPDATE_DECREMENT AFTER UPDATE OF ZPERSON ON ZDETECTEDFACE WHEN (OLD.ZHIDDEN == 0 AND OLD.ZASSETVISIBLE == 1) AND ((OLD.ZPERSON IS NOT NULL AND NEW.ZPERSON IS NULL) OR (NEW.ZPERSON != OLD.ZPERSON)) BEGIN UPDATE ZPERSON SET ZFACECOUNT = MAX(0,IFNULL(ZFACECOUNT,0) - 1) WHERE Z_PK = OLD.ZPERSON; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPERSON',
Z_ENT,
Z_PK,
'ZFACECOUNT',
ZFACECOUNT) FROM ZPERSON WHERE Z_PK = OLD.ZPERSON; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZASSETSCOUNT_ZGENERICASSET_INSERT_INCREMENT AFTER INSERT ON ZGENERICASSET FOR EACH ROW WHEN NEW.ZHIDDEN == 0 AND NEW.ZTRASHEDSTATE == 0 BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZASSETSCOUNT = IFNULL(ZASSETSCOUNT,0) + 1 WHERE NEW.ZHIGHLIGHTBEINGASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZASSETSCOUNT',
ZASSETSCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZASSETSCOUNT_ZGENERICASSET_UPDATE_INCREMENT AFTER UPDATE OF ZHIDDEN,
ZTRASHEDSTATE ON ZGENERICASSET FOR EACH ROW WHEN (NEW.ZHIDDEN == 0 AND NEW.ZTRASHEDSTATE == 0) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZTRASHEDSTATE != OLD.ZTRASHEDSTATE) AND (NEW.ZHIGHLIGHTBEINGASSETS == OLD.ZHIGHLIGHTBEINGASSETS) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZASSETSCOUNT = IFNULL(ZASSETSCOUNT,0) + 1 WHERE NEW.ZHIGHLIGHTBEINGASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZASSETSCOUNT',
ZASSETSCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZASSETSCOUNT_ZGENERICASSET_UPDATE_DECREMENT AFTER UPDATE OF ZHIDDEN,
ZTRASHEDSTATE ON ZGENERICASSET FOR EACH ROW WHEN (OLD.ZHIDDEN == 0 AND OLD.ZTRASHEDSTATE == 0) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZTRASHEDSTATE != OLD.ZTRASHEDSTATE) AND (OLD.ZHIGHLIGHTBEINGASSETS == NEW.ZHIGHLIGHTBEINGASSETS) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZASSETSCOUNT = MAX(0,IFNULL(ZASSETSCOUNT,0) - 1) WHERE OLD.ZHIGHLIGHTBEINGASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZASSETSCOUNT',
ZASSETSCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZASSETSCOUNT_ZGENERICASSET_DELETE_DECREMENT AFTER DELETE ON ZGENERICASSET FOR EACH ROW WHEN OLD.ZHIDDEN == 0 AND OLD.ZTRASHEDSTATE == 0 BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZASSETSCOUNT = MAX(0,IFNULL(ZASSETSCOUNT,0) - 1) WHERE OLD.ZHIGHLIGHTBEINGASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZASSETSCOUNT',
ZASSETSCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = OLD.ZHIGHLIGHTBEINGASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZASSETSCOUNT_ZGENERICASSET_ZPHOTOSHIGHLIGHT_INSERT_INCREMENT AFTER INSERT ON ZPHOTOSHIGHLIGHT FOR EACH ROW BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZASSETSCOUNT = (SELECT COUNT(Z_PK) FROM ZGENERICASSET WHERE (ZHIGHLIGHTBEINGASSETS = NEW.Z_PK) AND (ZHIDDEN == 0 AND ZTRASHEDSTATE == 0)) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZASSETSCOUNT',
ZASSETSCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZASSETSCOUNT_ZGENERICASSET_ZHIGHLIGHTBEINGASSETS_UPDATE_INCREMENT AFTER UPDATE OF ZHIGHLIGHTBEINGASSETS ON ZGENERICASSET WHEN (NEW.ZHIDDEN == 0 AND NEW.ZTRASHEDSTATE == 0) AND ((NEW.ZHIGHLIGHTBEINGASSETS IS NOT NULL AND OLD.ZHIGHLIGHTBEINGASSETS IS NULL) OR (NEW.ZHIGHLIGHTBEINGASSETS != OLD.ZHIGHLIGHTBEINGASSETS)) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZASSETSCOUNT = IFNULL(ZASSETSCOUNT,0) + 1 WHERE Z_PK = NEW.ZHIGHLIGHTBEINGASSETS; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZASSETSCOUNT',
ZASSETSCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZASSETSCOUNT_ZGENERICASSET_ZHIGHLIGHTBEINGASSETS_UPDATE_DECREMENT AFTER UPDATE OF ZHIGHLIGHTBEINGASSETS ON ZGENERICASSET WHEN (OLD.ZHIDDEN == 0 AND OLD.ZTRASHEDSTATE == 0) AND ((OLD.ZHIGHLIGHTBEINGASSETS IS NOT NULL AND NEW.ZHIGHLIGHTBEINGASSETS IS NULL) OR (NEW.ZHIGHLIGHTBEINGASSETS != OLD.ZHIGHLIGHTBEINGASSETS)) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZASSETSCOUNT = MAX(0,IFNULL(ZASSETSCOUNT,0) - 1) WHERE Z_PK = OLD.ZHIGHLIGHTBEINGASSETS; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZASSETSCOUNT',
ZASSETSCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = OLD.ZHIGHLIGHTBEINGASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZEXTENDEDCOUNT_ZGENERICASSET_INSERT_INCREMENT AFTER INSERT ON ZGENERICASSET FOR EACH ROW WHEN NEW.ZHIDDEN == 0 AND NEW.ZTRASHEDSTATE == 0 BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZEXTENDEDCOUNT = IFNULL(ZEXTENDEDCOUNT,0) + 1 WHERE NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZEXTENDEDCOUNT',
ZEXTENDEDCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZEXTENDEDCOUNT_ZGENERICASSET_UPDATE_INCREMENT AFTER UPDATE OF ZHIDDEN,
ZTRASHEDSTATE ON ZGENERICASSET FOR EACH ROW WHEN (NEW.ZHIDDEN == 0 AND NEW.ZTRASHEDSTATE == 0) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZTRASHEDSTATE != OLD.ZTRASHEDSTATE) AND (NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS == OLD.ZHIGHLIGHTBEINGEXTENDEDASSETS) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZEXTENDEDCOUNT = IFNULL(ZEXTENDEDCOUNT,0) + 1 WHERE NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZEXTENDEDCOUNT',
ZEXTENDEDCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZEXTENDEDCOUNT_ZGENERICASSET_UPDATE_DECREMENT AFTER UPDATE OF ZHIDDEN,
ZTRASHEDSTATE ON ZGENERICASSET FOR EACH ROW WHEN (OLD.ZHIDDEN == 0 AND OLD.ZTRASHEDSTATE == 0) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZTRASHEDSTATE != OLD.ZTRASHEDSTATE) AND (OLD.ZHIGHLIGHTBEINGEXTENDEDASSETS == NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZEXTENDEDCOUNT = MAX(0,IFNULL(ZEXTENDEDCOUNT,0) - 1) WHERE OLD.ZHIGHLIGHTBEINGEXTENDEDASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZEXTENDEDCOUNT',
ZEXTENDEDCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZEXTENDEDCOUNT_ZGENERICASSET_DELETE_DECREMENT AFTER DELETE ON ZGENERICASSET FOR EACH ROW WHEN OLD.ZHIDDEN == 0 AND OLD.ZTRASHEDSTATE == 0 BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZEXTENDEDCOUNT = MAX(0,IFNULL(ZEXTENDEDCOUNT,0) - 1) WHERE OLD.ZHIGHLIGHTBEINGEXTENDEDASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZEXTENDEDCOUNT',
ZEXTENDEDCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = OLD.ZHIGHLIGHTBEINGEXTENDEDASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZEXTENDEDCOUNT_ZGENERICASSET_ZPHOTOSHIGHLIGHT_INSERT_INCREMENT AFTER INSERT ON ZPHOTOSHIGHLIGHT FOR EACH ROW BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZEXTENDEDCOUNT = (SELECT COUNT(Z_PK) FROM ZGENERICASSET WHERE (ZHIGHLIGHTBEINGEXTENDEDASSETS = NEW.Z_PK) AND (ZHIDDEN == 0 AND ZTRASHEDSTATE == 0)) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZEXTENDEDCOUNT',
ZEXTENDEDCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZEXTENDEDCOUNT_ZGENERICASSET_ZHIGHLIGHTBEINGEXTENDEDASSETS_UPDATE_INCREMENT AFTER UPDATE OF ZHIGHLIGHTBEINGEXTENDEDASSETS ON ZGENERICASSET WHEN (NEW.ZHIDDEN == 0 AND NEW.ZTRASHEDSTATE == 0) AND ((NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS IS NOT NULL AND OLD.ZHIGHLIGHTBEINGEXTENDEDASSETS IS NULL) OR (NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS != OLD.ZHIGHLIGHTBEINGEXTENDEDASSETS)) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZEXTENDEDCOUNT = IFNULL(ZEXTENDEDCOUNT,0) + 1 WHERE Z_PK = NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZEXTENDEDCOUNT',
ZEXTENDEDCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZEXTENDEDCOUNT_ZGENERICASSET_ZHIGHLIGHTBEINGEXTENDEDASSETS_UPDATE_DECREMENT AFTER UPDATE OF ZHIGHLIGHTBEINGEXTENDEDASSETS ON ZGENERICASSET WHEN (OLD.ZHIDDEN == 0 AND OLD.ZTRASHEDSTATE == 0) AND ((OLD.ZHIGHLIGHTBEINGEXTENDEDASSETS IS NOT NULL AND NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS IS NULL) OR (NEW.ZHIGHLIGHTBEINGEXTENDEDASSETS != OLD.ZHIGHLIGHTBEINGEXTENDEDASSETS)) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZEXTENDEDCOUNT = MAX(0,IFNULL(ZEXTENDEDCOUNT,0) - 1) WHERE Z_PK = OLD.ZHIGHLIGHTBEINGEXTENDEDASSETS; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZEXTENDEDCOUNT',
ZEXTENDEDCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = OLD.ZHIGHLIGHTBEINGEXTENDEDASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZOVERVIEWCOUNT_ZGENERICASSET_INSERT_INCREMENT AFTER INSERT ON ZGENERICASSET FOR EACH ROW WHEN NEW.ZHIDDEN == 0 AND NEW.ZTRASHEDSTATE == 0 BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZOVERVIEWCOUNT = IFNULL(ZOVERVIEWCOUNT,0) + 1 WHERE NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZOVERVIEWCOUNT',
ZOVERVIEWCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZOVERVIEWCOUNT_ZGENERICASSET_UPDATE_INCREMENT AFTER UPDATE OF ZHIDDEN,
ZTRASHEDSTATE ON ZGENERICASSET FOR EACH ROW WHEN (NEW.ZHIDDEN == 0 AND NEW.ZTRASHEDSTATE == 0) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZTRASHEDSTATE != OLD.ZTRASHEDSTATE) AND (NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS == OLD.ZHIGHLIGHTBEINGOVERVIEWASSETS) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZOVERVIEWCOUNT = IFNULL(ZOVERVIEWCOUNT,0) + 1 WHERE NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZOVERVIEWCOUNT',
ZOVERVIEWCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZOVERVIEWCOUNT_ZGENERICASSET_UPDATE_DECREMENT AFTER UPDATE OF ZHIDDEN,
ZTRASHEDSTATE ON ZGENERICASSET FOR EACH ROW WHEN (OLD.ZHIDDEN == 0 AND OLD.ZTRASHEDSTATE == 0) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZTRASHEDSTATE != OLD.ZTRASHEDSTATE) AND (OLD.ZHIGHLIGHTBEINGOVERVIEWASSETS == NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZOVERVIEWCOUNT = MAX(0,IFNULL(ZOVERVIEWCOUNT,0) - 1) WHERE OLD.ZHIGHLIGHTBEINGOVERVIEWASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZOVERVIEWCOUNT',
ZOVERVIEWCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZOVERVIEWCOUNT_ZGENERICASSET_DELETE_DECREMENT AFTER DELETE ON ZGENERICASSET FOR EACH ROW WHEN OLD.ZHIDDEN == 0 AND OLD.ZTRASHEDSTATE == 0 BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZOVERVIEWCOUNT = MAX(0,IFNULL(ZOVERVIEWCOUNT,0) - 1) WHERE OLD.ZHIGHLIGHTBEINGOVERVIEWASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZOVERVIEWCOUNT',
ZOVERVIEWCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = OLD.ZHIGHLIGHTBEINGOVERVIEWASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZOVERVIEWCOUNT_ZGENERICASSET_ZPHOTOSHIGHLIGHT_INSERT_INCREMENT AFTER INSERT ON ZPHOTOSHIGHLIGHT FOR EACH ROW BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZOVERVIEWCOUNT = (SELECT COUNT(Z_PK) FROM ZGENERICASSET WHERE (ZHIGHLIGHTBEINGOVERVIEWASSETS = NEW.Z_PK) AND (ZHIDDEN == 0 AND ZTRASHEDSTATE == 0)) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZOVERVIEWCOUNT',
ZOVERVIEWCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZOVERVIEWCOUNT_ZGENERICASSET_ZHIGHLIGHTBEINGOVERVIEWASSETS_UPDATE_INCREMENT AFTER UPDATE OF ZHIGHLIGHTBEINGOVERVIEWASSETS ON ZGENERICASSET WHEN (NEW.ZHIDDEN == 0 AND NEW.ZTRASHEDSTATE == 0) AND ((NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS IS NOT NULL AND OLD.ZHIGHLIGHTBEINGOVERVIEWASSETS IS NULL) OR (NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS != OLD.ZHIGHLIGHTBEINGOVERVIEWASSETS)) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZOVERVIEWCOUNT = IFNULL(ZOVERVIEWCOUNT,0) + 1 WHERE Z_PK = NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZOVERVIEWCOUNT',
ZOVERVIEWCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZOVERVIEWCOUNT_ZGENERICASSET_ZHIGHLIGHTBEINGOVERVIEWASSETS_UPDATE_DECREMENT AFTER UPDATE OF ZHIGHLIGHTBEINGOVERVIEWASSETS ON ZGENERICASSET WHEN (OLD.ZHIDDEN == 0 AND OLD.ZTRASHEDSTATE == 0) AND ((OLD.ZHIGHLIGHTBEINGOVERVIEWASSETS IS NOT NULL AND NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS IS NULL) OR (NEW.ZHIGHLIGHTBEINGOVERVIEWASSETS != OLD.ZHIGHLIGHTBEINGOVERVIEWASSETS)) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZOVERVIEWCOUNT = MAX(0,IFNULL(ZOVERVIEWCOUNT,0) - 1) WHERE Z_PK = OLD.ZHIGHLIGHTBEINGOVERVIEWASSETS; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZOVERVIEWCOUNT',
ZOVERVIEWCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = OLD.ZHIGHLIGHTBEINGOVERVIEWASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZSUMMARYCOUNT_ZGENERICASSET_INSERT_INCREMENT AFTER INSERT ON ZGENERICASSET FOR EACH ROW WHEN NEW.ZHIDDEN == 0 AND NEW.ZTRASHEDSTATE == 0 BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZSUMMARYCOUNT = IFNULL(ZSUMMARYCOUNT,0) + 1 WHERE NEW.ZHIGHLIGHTBEINGSUMMARYASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZSUMMARYCOUNT',
ZSUMMARYCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGSUMMARYASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZSUMMARYCOUNT_ZGENERICASSET_UPDATE_INCREMENT AFTER UPDATE OF ZHIDDEN,
ZTRASHEDSTATE ON ZGENERICASSET FOR EACH ROW WHEN (NEW.ZHIDDEN == 0 AND NEW.ZTRASHEDSTATE == 0) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZTRASHEDSTATE != OLD.ZTRASHEDSTATE) AND (NEW.ZHIGHLIGHTBEINGSUMMARYASSETS == OLD.ZHIGHLIGHTBEINGSUMMARYASSETS) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZSUMMARYCOUNT = IFNULL(ZSUMMARYCOUNT,0) + 1 WHERE NEW.ZHIGHLIGHTBEINGSUMMARYASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZSUMMARYCOUNT',
ZSUMMARYCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGSUMMARYASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZSUMMARYCOUNT_ZGENERICASSET_UPDATE_DECREMENT AFTER UPDATE OF ZHIDDEN,
ZTRASHEDSTATE ON ZGENERICASSET FOR EACH ROW WHEN (OLD.ZHIDDEN == 0 AND OLD.ZTRASHEDSTATE == 0) AND (NEW.ZHIDDEN != OLD.ZHIDDEN OR NEW.ZTRASHEDSTATE != OLD.ZTRASHEDSTATE) AND (OLD.ZHIGHLIGHTBEINGSUMMARYASSETS == NEW.ZHIGHLIGHTBEINGSUMMARYASSETS) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZSUMMARYCOUNT = MAX(0,IFNULL(ZSUMMARYCOUNT,0) - 1) WHERE OLD.ZHIGHLIGHTBEINGSUMMARYASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZSUMMARYCOUNT',
ZSUMMARYCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGSUMMARYASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZSUMMARYCOUNT_ZGENERICASSET_DELETE_DECREMENT AFTER DELETE ON ZGENERICASSET FOR EACH ROW WHEN OLD.ZHIDDEN == 0 AND OLD.ZTRASHEDSTATE == 0 BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZSUMMARYCOUNT = MAX(0,IFNULL(ZSUMMARYCOUNT,0) - 1) WHERE OLD.ZHIGHLIGHTBEINGSUMMARYASSETS = Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZSUMMARYCOUNT',
ZSUMMARYCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = OLD.ZHIGHLIGHTBEINGSUMMARYASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZSUMMARYCOUNT_ZGENERICASSET_ZPHOTOSHIGHLIGHT_INSERT_INCREMENT AFTER INSERT ON ZPHOTOSHIGHLIGHT FOR EACH ROW BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZSUMMARYCOUNT = (SELECT COUNT(Z_PK) FROM ZGENERICASSET WHERE (ZHIGHLIGHTBEINGSUMMARYASSETS = NEW.Z_PK) AND (ZHIDDEN == 0 AND ZTRASHEDSTATE == 0)) WHERE Z_PK = NEW.Z_PK; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZSUMMARYCOUNT',
ZSUMMARYCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.Z_PK; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZSUMMARYCOUNT_ZGENERICASSET_ZHIGHLIGHTBEINGSUMMARYASSETS_UPDATE_INCREMENT AFTER UPDATE OF ZHIGHLIGHTBEINGSUMMARYASSETS ON ZGENERICASSET WHEN (NEW.ZHIDDEN == 0 AND NEW.ZTRASHEDSTATE == 0) AND ((NEW.ZHIGHLIGHTBEINGSUMMARYASSETS IS NOT NULL AND OLD.ZHIGHLIGHTBEINGSUMMARYASSETS IS NULL) OR (NEW.ZHIGHLIGHTBEINGSUMMARYASSETS != OLD.ZHIGHLIGHTBEINGSUMMARYASSETS)) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZSUMMARYCOUNT = IFNULL(ZSUMMARYCOUNT,0) + 1 WHERE Z_PK = NEW.ZHIGHLIGHTBEINGSUMMARYASSETS; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZSUMMARYCOUNT',
ZSUMMARYCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = NEW.ZHIGHLIGHTBEINGSUMMARYASSETS; END;
CREATE TRIGGER ZT_ZPHOTOSHIGHLIGHT_ZSUMMARYCOUNT_ZGENERICASSET_ZHIGHLIGHTBEINGSUMMARYASSETS_UPDATE_DECREMENT AFTER UPDATE OF ZHIGHLIGHTBEINGSUMMARYASSETS ON ZGENERICASSET WHEN (OLD.ZHIDDEN == 0 AND OLD.ZTRASHEDSTATE == 0) AND ((OLD.ZHIGHLIGHTBEINGSUMMARYASSETS IS NOT NULL AND NEW.ZHIGHLIGHTBEINGSUMMARYASSETS IS NULL) OR (NEW.ZHIGHLIGHTBEINGSUMMARYASSETS != OLD.ZHIGHLIGHTBEINGSUMMARYASSETS)) BEGIN UPDATE ZPHOTOSHIGHLIGHT SET ZSUMMARYCOUNT = MAX(0,IFNULL(ZSUMMARYCOUNT,0) - 1) WHERE Z_PK = OLD.ZHIGHLIGHTBEINGSUMMARYASSETS; SELECT NSCoreDataTriggerUpdateAffectedObjectValue('ZPHOTOSHIGHLIGHT',
Z_ENT,
Z_PK,
'ZSUMMARYCOUNT',
ZSUMMARYCOUNT) FROM ZPHOTOSHIGHLIGHT WHERE Z_PK = OLD.ZHIGHLIGHTBEINGSUMMARYASSETS; END;
CREATE TABLE Z_PRIMARYKEY (Z_ENT INTEGER PRIMARY KEY,
Z_NAME VARCHAR,
Z_SUPER INTEGER,
Z_MAX INTEGER);
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
);
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_22158684_INDEX ON Z_23ASSETS (Z_23ALBUMS,
Z_FOK_30ASSETS,
Z_30ASSETS);
CREATE INDEX RADAR_10322662_INDEX ON Z_23ASSETS (Z_23ALBUMS,
Z_30ASSETS,
Z_FOK_30ASSETS);
CREATE INDEX RADAR_16835859_INDEX ON ZGENERICASSET (ZMOMENT,
Z_FOK_MOMENT);