table Auxiliary Auxiliary 2 CREATE TABLE Auxiliary( lock CHAR(1) PRIMARY KEY NOT NULL DEFAULT 'X' CHECK (lock='X'), version INTEGER NOT NULL DEFAULT 2) index sqlite_autoindex_Auxiliary_1 Auxiliary 3 table Users Users 4 CREATE TABLE Users( id INTEGER PRIMARY KEY NOT NULL UNIQUE, username TEXT DEFAULT NULL, email TEXT DEFAULT NULL, name TEXT DEFAULT NULL, timezone TEXT DEFAULT NULL, privilege INTEGER DEFAULT NULL, serviceLevel INTEGER DEFAULT NULL, userCreationTimestamp INTEGER DEFAULT NULL, userModificationTimestamp INTEGER DEFAULT NULL, userIsDirty INTEGER NOT NULL, userIsLocal INTEGER NOT NULL, userDeletionTimestamp INTEGER DEFAULT NULL, userIsActive INTEGER DEFAULT NULL, userShardId TEXT DEFAULT NULL, userPhotoUrl TEXT DEFAULT NULL, userPhotoLastUpdateTimestamp INTEGER DEFAULT NULL) index sqlite_autoindex_Users_1 Users 5 index UsersDeletionTimestampIndex Users 6 CREATE INDEX UsersDeletionTimestampIndex ON Users(userDeletionTimestamp) table UserAttributes UserAttributes 7 CREATE TABLE UserAttributes( id REFERENCES Users(id) ON UPDATE CASCADE, defaultLocationName TEXT DEFAULT NULL, defaultLatitude REAL DEFAULT NULL, defaultLongitude REAL DEFAULT NULL, preactivation INTEGER DEFAULT NULL, incomingEmailAddress TEXT DEFAULT NULL, comments TEXT DEFAULT NULL, dateAgreedToTermsOfService INTEGER DEFAULT NULL, maxReferrals INTEGER DEFAULT NULL, referralCount INTEGER DEFAULT NULL, refererCode TEXT DEFAULT NULL, sentEmailDate INTEGER DEFAULT NULL, sentEmailCount INTEGER DEFAULT NULL, dailyEmailLimit INTEGER DEFAULT NULL, emailOptOutDate INTEGER DEFAULT NULL, partnerEmailOptInDate INTEGER DEFAULT NULL, preferredLanguage TEXT DEFAULT NULL, preferredCountry TEXT DEFAULT NULL, clipFullPage INTEGER DEFAULT NULL, twitterUserName TEXT DEFAULT NULL, twitterId TEXT DEFAULT NULL, groupName TEXT DEFAULT NULL, recognitionLanguage TEXT DEFAULT NULL, referralProof TEXT DEFAULT NULL, educationalDiscount INTEGER DEFAULT NULL, businessAddress TEXT DEFAULT NULL, hideSponsorBilling INTEGER DEFAULT NULL, useEmailAutoFiling INTEGER DEFAULT NULL, reminderEmailConfig INTEGER DEFAULT NULL, emailAddressLastConfirmed INTEGER DEFAULT NULL, passwordUpdated INTEGER DEFAULT NULL, salesforcePushEnabled INTEGER DEFAULT NULL, shouldLogClientEvent INTEGER DEFAULT NULL) index UserAttributesByIdIndex UserAttributes 8 CREATE INDEX UserAttributesByIdIndex ON UserAttributes(id) table UserAttributesViewedPromotions UserAttributesViewedPromotions 9 CREATE TABLE UserAttributesViewedPromotions( id REFERENCES Users(id) ON UPDATE CASCADE, promotion TEXT DEFAULT NULL) index UserAttributesViewedPromotionsByIdIndex UserAttributesViewedPromotions 11 CREATE INDEX UserAttributesViewedPromotionsByIdIndex ON UserAttributesViewedPromotions(id) table UserAttributesRecentMailedAddresses UserAttributesRecentMailedAddresses 13 CREATE TABLE UserAttributesRecentMailedAddresses( id REFERENCES Users(id) ON UPDATE CASCADE, address TEXT DEFAULT NULL) index UserAttributesRecentMailedAddressesByIdIndex UserAttributesRecentMailedAddresses 14 CREATE INDEX UserAttributesRecentMailedAddressesByIdIndex ON UserAttributesRecentMailedAddresses(id) table Accounting Accounting 15 CREATE TABLE Accounting( id REFERENCES Users(id) ON UPDATE CASCADE, uploadLimitEnd INTEGER DEFAULT NULL, uploadLimitNextMonth INTEGER DEFAULT NULL, premiumServiceStatus INTEGER DEFAULT NULL, premiumOrderNumber TEXT DEFAULT NULL, premiumCommerceService TEXT DEFAULT NULL, premiumServiceStart INTEGER DEFAULT NULL, premiumServiceSKU TEXT DEFAULT NULL, lastSuccessfulCharge INTEGER DEFAULT NULL, lastFailedCharge INTEGER DEFAULT NULL, lastFailedChargeReason TEXT DEFAULT NULL, nextPaymentDue INTEGER DEFAULT NULL, premiumLockUntil INTEGER DEFAULT NULL, updated INTEGER DEFAULT NULL, premiumSubscriptionNumber TEXT DEFAULT NULL, lastRequestedCharge INTEGER DEFAULT NULL, currency TEXT DEFAULT NULL, unitPrice INTEGER DEFAULT NULL, unitDiscount INTEGER DEFAULT NULL, nextChargeDate INTEGER DEFAULT NULL, availablePoints INTEGER DEFAULT NULL) index AccountingByIdIndex Accounting 16 CREATE INDEX AccountingByIdIndex ON Accounting(id) table AccountLimits AccountLimits 17 CREATE TABLE AccountLimits( id REFERENCES Users(id) ON UPDATE CASCADE, userMailLimitDaily INTEGER DEFAULT NULL, noteSizeMax INTEGER DEFAULT NULL, resourceSizeMax INTEGER DEFAULT NULL, userLinkedNotebookMax INTEGER DEFAULT NULL, uploadLimit INTEGER DEFAULT NULL, userNoteCountMax INTEGER DEFAULT NULL, userNotebookCountMax INTEGER DEFAULT NULL, userTagCountMax INTEGER DEFAULT NULL, noteTagCountMax INTEGER DEFAULT NULL, userSavedSearchesMax INTEGER DEFAULT NULL, noteResourceCountMax INTEGER DEFAULT NULL) index AccountLimitsByIdIndex AccountLimits 18 CREATE INDEX AccountLimitsByIdIndex ON AccountLimits(id) table BusinessUserInfo BusinessUserInfo 19 CREATE TABLE BusinessUserInfo( id REFERENCES Users(id) ON UPDATE CASCADE, businessId INTEGER DEFAULT NULL, businessName TEXT DEFAULT NULL, role INTEGER DEFAULT NULL, businessInfoEmail TEXT DEFAULT NULL) index BusinessUserInfoByIdIndex BusinessUserInfo 20 CREATE INDEX BusinessUserInfoByIdIndex ON BusinessUserInfo(id) trigger on_user_delete_trigger Users 0 CREATE TRIGGER on_user_delete_trigger BEFORE DELETE ON Users BEGIN DELETE FROM UserAttributes WHERE id=OLD.id; DELETE FROM UserAttributesViewedPromotions WHERE id=OLD.id; DELETE FROM UserAttributesRecentMailedAddresses WHERE id=OLD.id; DELETE FROM Accounting WHERE id=OLD.id; DELETE FROM AccountLimits WHERE id=OLD.id; DELETE FROM BusinessUserInfo WHERE id=OLD.id; END table LinkedNotebooks LinkedNotebooks 21 CREATE TABLE LinkedNotebooks( guid TEXT PRIMARY KEY NOT NULL UNIQUE, updateSequenceNumber INTEGER DEFAULT NULL, isDirty INTEGER DEFAULT NULL, shareName TEXT DEFAULT NULL, username TEXT DEFAULT NULL, shardId TEXT DEFAULT NULL, sharedNotebookGlobalId TEXT DEFAULT NULL, uri TEXT DEFAULT NULL, noteStoreUrl TEXT DEFAULT NULL, webApiUrlPrefix TEXT DEFAULT NULL, stack TEXT DEFAULT NULL, businessId INTEGER DEFAULT NULL) index sqlite_autoindex_LinkedNotebooks_1 LinkedNotebooks 22 table Notebooks Notebooks 24 CREATE TABLE Notebooks( localUid TEXT PRIMARY KEY NOT NULL UNIQUE, guid TEXT DEFAULT NULL UNIQUE, linkedNotebookGuid REFERENCES LinkedNotebooks(guid) ON UPDATE CASCADE, updateSequenceNumber INTEGER DEFAULT NULL, notebookName TEXT DEFAULT NULL, notebookNameUpper TEXT DEFAULT NULL, creationTimestamp INTEGER DEFAULT NULL, modificationTimestamp INTEGER DEFAULT NULL, isDirty INTEGER NOT NULL, isLocal INTEGER NOT NULL, isDefault INTEGER DEFAULT NULL UNIQUE, isLastUsed INTEGER DEFAULT NULL UNIQUE, isFavorited INTEGER DEFAULT NULL, publishingUri TEXT DEFAULT NULL, publishingNoteSortOrder INTEGER DEFAULT NULL, publishingAscendingSort INTEGER DEFAULT NULL, publicDescription TEXT DEFAULT NULL, isPublished INTEGER DEFAULT NULL, stack TEXT DEFAULT NULL, businessNotebookDescription TEXT DEFAULT NULL, businessNotebookPrivilegeLevel INTEGER DEFAULT NULL, businessNotebookIsRecommended INTEGER DEFAULT NULL, contactId INTEGER DEFAULT NULL, recipientReminderNotifyEmail INTEGER DEFAULT NULL, recipientReminderNotifyInApp INTEGER DEFAULT NULL, recipientInMyList INTEGER DEFAULT NULL, recipientStack TEXT DEFAULT NULL, UNIQUE(localUid, guid), UNIQUE(notebookNameUpper, linkedNotebookGuid) ) index sqlite_autoindex_Notebooks_1 Notebooks 25 index sqlite_autoindex_Notebooks_2 Notebooks 26 index sqlite_autoindex_Notebooks_3 Notebooks 27 index sqlite_autoindex_Notebooks_4 Notebooks 28 index sqlite_autoindex_Notebooks_5 Notebooks 29 index sqlite_autoindex_Notebooks_6 Notebooks 30 table NotebookFTS NotebookFTS 0 CREATE VIRTUAL TABLE NotebookFTS USING FTS4(content="Notebooks", localUid, guid, notebookName) table NotebookFTS_segments NotebookFTS_segments 31 CREATE TABLE 'NotebookFTS_segments'(blockid INTEGER PRIMARY KEY, block BLOB) table NotebookFTS_segdir NotebookFTS_segdir 32 CREATE TABLE 'NotebookFTS_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,leaves_end_block INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx)) index sqlite_autoindex_NotebookFTS_segdir_1 NotebookFTS_segdir 33 table NotebookFTS_docsize NotebookFTS_docsize 34 CREATE TABLE 'NotebookFTS_docsize'(docid INTEGER PRIMARY KEY, size BLOB) table NotebookFTS_stat NotebookFTS_stat 35 CREATE TABLE 'NotebookFTS_stat'(id INTEGER PRIMARY KEY, value BLOB) trigger NotebookFTS_BeforeDeleteTrigger Notebooks 0 CREATE TRIGGER NotebookFTS_BeforeDeleteTrigger BEFORE DELETE ON Notebooks BEGIN DELETE FROM NotebookFTS WHERE localUid=old.localUid; END trigger NotebookFTS_AfterInsertTrigger Notebooks 0 CREATE TRIGGER NotebookFTS_AfterInsertTrigger AFTER INSERT ON Notebooks BEGIN INSERT INTO NotebookFTS(NotebookFTS) VALUES('rebuild'); END index NotebookByLinkedNotebookGuidIndex Notebooks 37 CREATE INDEX NotebookByLinkedNotebookGuidIndex ON Notebooks(linkedNotebookGuid) index NotebookByIsDirtyIndex Notebooks 38 CREATE INDEX NotebookByIsDirtyIndex ON Notebooks(isDirty) index NotebookByIsFavoritedIndex Notebooks 39 CREATE INDEX NotebookByIsFavoritedIndex ON Notebooks(isFavorited) table NotebookRestrictions NotebookRestrictions 40 CREATE TABLE NotebookRestrictions( localUid REFERENCES Notebooks(localUid) ON UPDATE CASCADE, noReadNotes INTEGER DEFAULT NULL, noCreateNotes INTEGER DEFAULT NULL, noUpdateNotes INTEGER DEFAULT NULL, noExpungeNotes INTEGER DEFAULT NULL, noShareNotes INTEGER DEFAULT NULL, noEmailNotes INTEGER DEFAULT NULL, noSendMessageToRecipients INTEGER DEFAULT NULL, noUpdateNotebook INTEGER DEFAULT NULL, noExpungeNotebook INTEGER DEFAULT NULL, noSetDefaultNotebook INTEGER DEFAULT NULL, noSetNotebookStack INTEGER DEFAULT NULL, noPublishToPublic INTEGER DEFAULT NULL, noPublishToBusinessLibrary INTEGER DEFAULT NULL, noCreateTags INTEGER DEFAULT NULL, noUpdateTags INTEGER DEFAULT NULL, noExpungeTags INTEGER DEFAULT NULL, noSetParentTag INTEGER DEFAULT NULL, noCreateSharedNotebooks INTEGER DEFAULT NULL, noShareNotesWithBusiness INTEGER DEFAULT NULL, noRenameNotebook INTEGER DEFAULT NULL, updateWhichSharedNotebookRestrictions INTEGER DEFAULT NULL, expungeWhichSharedNotebookRestrictions INTEGER DEFAULT NULL ) index NotebookRestrictionsByLocalUidIndex NotebookRestrictions 41 CREATE INDEX NotebookRestrictionsByLocalUidIndex ON NotebookRestrictions(localUid) table SharedNotebooks SharedNotebooks 42 CREATE TABLE SharedNotebooks( sharedNotebookShareId INTEGER PRIMARY KEY NOT NULL UNIQUE, sharedNotebookUserId INTEGER DEFAULT NULL, sharedNotebookNotebookGuid REFERENCES Notebooks(guid) ON UPDATE CASCADE, sharedNotebookEmail TEXT DEFAULT NULL, sharedNotebookIdentityId INTEGER DEFAULT NULL, sharedNotebookCreationTimestamp INTEGER DEFAULT NULL, sharedNotebookModificationTimestamp INTEGER DEFAULT NULL, sharedNotebookGlobalId TEXT DEFAULT NULL, sharedNotebookUsername TEXT DEFAULT NULL, sharedNotebookPrivilegeLevel INTEGER DEFAULT NULL, sharedNotebookRecipientReminderNotifyEmail INTEGER DEFAULT NULL, sharedNotebookRecipientReminderNotifyInApp INTEGER DEFAULT NULL, sharedNotebookSharerUserId INTEGER DEFAULT NULL, sharedNotebookRecipientUsername TEXT DEFAULT NULL, sharedNotebookRecipientUserId INTEGER DEFAULT NULL, sharedNotebookRecipientIdentityId INTEGER DEFAULT NULL, sharedNotebookAssignmentTimestamp INTEGER DEFAULT NULL, indexInNotebook INTEGER DEFAULT NULL, UNIQUE(sharedNotebookShareId, sharedNotebookNotebookGuid) ON CONFLICT REPLACE) index sqlite_autoindex_SharedNotebooks_1 SharedNotebooks 43 index sqlite_autoindex_SharedNotebooks_2 SharedNotebooks 44 table Notes Notes 46 CREATE TABLE Notes( localUid TEXT PRIMARY KEY NOT NULL UNIQUE, guid TEXT DEFAULT NULL UNIQUE, updateSequenceNumber INTEGER DEFAULT NULL, isDirty INTEGER NOT NULL, isLocal INTEGER NOT NULL, isFavorited INTEGER NOT NULL, title TEXT DEFAULT NULL, titleNormalized TEXT DEFAULT NULL, content TEXT DEFAULT NULL, contentLength INTEGER DEFAULT NULL, contentHash TEXT DEFAULT NULL, contentPlainText TEXT DEFAULT NULL, contentListOfWords TEXT DEFAULT NULL, contentContainsFinishedToDo INTEGER DEFAULT NULL, contentContainsUnfinishedToDo INTEGER DEFAULT NULL, contentContainsEncryption INTEGER DEFAULT NULL, creationTimestamp INTEGER DEFAULT NULL, modificationTimestamp INTEGER DEFAULT NULL, deletionTimestamp INTEGER DEFAULT NULL, isActive INTEGER DEFAULT NULL, hasAttributes INTEGER NOT NULL, thumbnail BLOB DEFAULT NULL, notebookLocalUid REFERENCES Notebooks(localUid) ON UPDATE CASCADE, notebookGuid REFERENCES Notebooks(guid) ON UPDATE CASCADE, subjectDate INTEGER DEFAULT NULL, latitude REAL DEFAULT NULL, longitude REAL DEFAULT NULL, altitude REAL DEFAULT NULL, author TEXT DEFAULT NULL, source TEXT DEFAULT NULL, sourceURL TEXT DEFAULT NULL, sourceApplication TEXT DEFAULT NULL, shareDate INTEGER DEFAULT NULL, reminderOrder INTEGER DEFAULT NULL, reminderDoneTime INTEGER DEFAULT NULL, reminderTime INTEGER DEFAULT NULL, placeName TEXT DEFAULT NULL, contentClass TEXT DEFAULT NULL, lastEditedBy TEXT DEFAULT NULL, creatorId INTEGER DEFAULT NULL, lastEditorId INTEGER DEFAULT NULL, sharedWithBusiness INTEGER DEFAULT NULL, conflictSourceNoteGuid TEXT DEFAULT NULL, noteTitleQuality INTEGER DEFAULT NULL, applicationDataKeysOnly TEXT DEFAULT NULL, applicationDataKeysMap TEXT DEFAULT NULL, applicationDataValues TEXT DEFAULT NULL, classificationKeys TEXT DEFAULT NULL, classificationValues TEXT DEFAULT NULL, UNIQUE(localUid, guid)) index sqlite_autoindex_Notes_1 Notes 47 index sqlite_autoindex_Notes_2 Notes 48 index sqlite_autoindex_Notes_3 Notes 49 trigger Notes_AfterInsertNotebookTrigger Notebooks 0 CREATE TRIGGER Notes_AfterInsertNotebookTrigger AFTER INSERT ON Notebooks BEGIN UPDATE Notes SET notebookGuid = new.guid WHERE notebookLocalUid=new.localUid; END table SharedNotes SharedNotes 51 CREATE TABLE SharedNotes( sharedNoteNoteGuid REFERENCES Notes(guid) ON UPDATE CASCADE, sharedNoteSharerUserId INTEGER DEFAULT NULL, sharedNoteRecipientIdentityId INTEGER DEFAULT NULL UNIQUE, sharedNoteRecipientContactName TEXT DEFAULT NULL, sharedNoteRecipientContactId TEXT DEFAULT NULL, sharedNoteRecipientContactType INTEGER DEFAULT NULL, sharedNoteRecipientContactPhotoUrl TEXT DEFAULT NULL, sharedNoteRecipientContactPhotoLastUpdated INTEGER DEFAULT NULL, sharedNoteRecipientContactMessagingPermit BLOB DEFAULT NULL, sharedNoteRecipientContactMessagingPermitExpires INTEGER DEFAULT NULL, sharedNoteRecipientUserId INTEGER DEFAULT NULL, sharedNoteRecipientDeactivated INTEGER DEFAULT NULL, sharedNoteRecipientSameBusiness INTEGER DEFAULT NULL, sharedNoteRecipientBlocked INTEGER DEFAULT NULL, sharedNoteRecipientUserConnected INTEGER DEFAULT NULL, sharedNoteRecipientEventId INTEGER DEFAULT NULL, sharedNotePrivilegeLevel INTEGER DEFAULT NULL, sharedNoteCreationTimestamp INTEGER DEFAULT NULL, sharedNoteModificationTimestamp INTEGER DEFAULT NULL, sharedNoteAssignmentTimestamp INTEGER DEFAULT NULL, indexInNote INTEGER DEFAULT NULL, UNIQUE(sharedNoteNoteGuid, sharedNoteRecipientIdentityId) ON CONFLICT REPLACE) index sqlite_autoindex_SharedNotes_1 SharedNotes 52 index sqlite_autoindex_SharedNotes_2 SharedNotes 53 table NoteRestrictions NoteRestrictions 55 CREATE TABLE NoteRestrictions( noteLocalUid REFERENCES Notes(localUid) ON UPDATE CASCADE, noUpdateNoteTitle INTEGER DEFAULT NULL, noUpdateNoteContent INTEGER DEFAULT NULL, noEmailNote INTEGER DEFAULT NULL, noShareNote INTEGER DEFAULT NULL, noShareNotePublicly INTEGER DEFAULT NULL) index NoteRestrictionsByNoteLocalUid NoteRestrictions 56 CREATE INDEX NoteRestrictionsByNoteLocalUid ON NoteRestrictions(noteLocalUid) table NoteLimits NoteLimits 57 CREATE TABLE NoteLimits( noteLocalUid REFERENCES Notes(localUid) ON UPDATE CASCADE, noteResourceCountMax INTEGER DEFAULT NULL, uploadLimit INTEGER DEFAULT NULL, resourceSizeMax INTEGER DEFAULT NULL, noteSizeMax INTEGER DEFAULT NULL, uploaded INTEGER DEFAULT NULL) index NotesNotebooks Notes 58 CREATE INDEX NotesNotebooks ON Notes(notebookLocalUid) index NotesNotebookGuidIndex Notes 59 CREATE INDEX NotesNotebookGuidIndex ON Notes(notebookGuid) index NotesIsDirtyIndex Notes 60 CREATE INDEX NotesIsDirtyIndex ON Notes(isDirty) index NotesIsFavoritedIndex Notes 61 CREATE INDEX NotesIsFavoritedIndex ON Notes(isFavorited) table NoteFTS NoteFTS 0 CREATE VIRTUAL TABLE NoteFTS USING FTS4(content="Notes", localUid, titleNormalized, contentListOfWords, contentContainsFinishedToDo, contentContainsUnfinishedToDo, contentContainsEncryption, creationTimestamp, modificationTimestamp, isActive, notebookLocalUid, notebookGuid, subjectDate, latitude, longitude, altitude, author, source, sourceApplication, reminderOrder, reminderDoneTime, reminderTime, placeName, contentClass, applicationDataKeysOnly, applicationDataKeysMap, applicationDataValues) table NoteFTS_segments NoteFTS_segments 62 CREATE TABLE 'NoteFTS_segments'(blockid INTEGER PRIMARY KEY, block BLOB) table NoteFTS_segdir NoteFTS_segdir 63 CREATE TABLE 'NoteFTS_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,leaves_end_block INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx)) index sqlite_autoindex_NoteFTS_segdir_1 NoteFTS_segdir 64 table NoteFTS_docsize NoteFTS_docsize 65 CREATE TABLE 'NoteFTS_docsize'(docid INTEGER PRIMARY KEY, size BLOB) table NoteFTS_stat NoteFTS_stat 66 CREATE TABLE 'NoteFTS_stat'(id INTEGER PRIMARY KEY, value BLOB) trigger NoteFTS_BeforeDeleteTrigger Notes 0 CREATE TRIGGER NoteFTS_BeforeDeleteTrigger BEFORE DELETE ON Notes BEGIN DELETE FROM NoteFTS WHERE localUid=old.localUid; END trigger NoteFTS_AfterInsertTrigger Notes 0 CREATE TRIGGER NoteFTS_AfterInsertTrigger AFTER INSERT ON Notes BEGIN INSERT INTO NoteFTS(NoteFTS) VALUES('rebuild'); END trigger on_notebook_delete_trigger Notebooks 0 CREATE TRIGGER on_notebook_delete_trigger BEFORE DELETE ON Notebooks BEGIN DELETE FROM NotebookRestrictions WHERE NotebookRestrictions.localUid=OLD.localUid; DELETE FROM SharedNotebooks WHERE SharedNotebooks.sharedNotebookNotebookGuid=OLD.guid; DELETE FROM Notes WHERE Notes.notebookLocalUid=OLD.localUid; END table Resources Resources 68 CREATE TABLE Resources( resourceLocalUid TEXT PRIMARY KEY NOT NULL UNIQUE, resourceGuid TEXT DEFAULT NULL UNIQUE, noteLocalUid REFERENCES Notes(localUid) ON UPDATE CASCADE, noteGuid REFERENCES Notes(guid) ON UPDATE CASCADE, resourceUpdateSequenceNumber INTEGER DEFAULT NULL, resourceIsDirty INTEGER NOT NULL, dataSize INTEGER DEFAULT NULL, dataHash TEXT DEFAULT NULL, mime TEXT DEFAULT NULL, width INTEGER DEFAULT NULL, height INTEGER DEFAULT NULL, recognitionDataBody TEXT DEFAULT NULL, recognitionDataSize INTEGER DEFAULT NULL, recognitionDataHash TEXT DEFAULT NULL, alternateDataSize INTEGER DEFAULT NULL, alternateDataHash TEXT DEFAULT NULL, resourceIndexInNote INTEGER DEFAULT NULL, UNIQUE(resourceLocalUid, resourceGuid)) index sqlite_autoindex_Resources_1 Resources 69 index sqlite_autoindex_Resources_2 Resources 70 index sqlite_autoindex_Resources_3 Resources 71 index ResourceNoteGuidIndex Resources 72 CREATE INDEX ResourceNoteGuidIndex ON Resources(noteGuid) index ResourceMimeIndex Resources 73 CREATE INDEX ResourceMimeIndex ON Resources(mime) trigger Notes_AfterInsertResourcesTrigger Notes 0 CREATE TRIGGER Notes_AfterInsertResourcesTrigger AFTER INSERT ON Notes BEGIN UPDATE Resources SET noteGuid = new.guid WHERE noteLocalUid = new.localUid; END table ResourceDataBodyVersionIds ResourceDataBodyVersionIds 74 CREATE TABLE ResourceDataBodyVersionIds( resourceLocalUid TEXT PRIMARY KEY NOT NULL UNIQUE, versionId TEXT NOT NULL) index sqlite_autoindex_ResourceDataBodyVersionIds_1 ResourceDataBodyVersionIds 75 table ResourceAlternateDataBodyVersionIds ResourceAlternateDataBodyVersionIds 76 CREATE TABLE ResourceAlternateDataBodyVersionIds( resourceLocalUid TEXT PRIMARY KEY NOT NULL UNIQUE, versionId TEXT NOT NULL) index sqlite_autoindex_ResourceAlternateDataBodyVersionIds_1 ResourceAlternateDataBodyVersionIds 77 table ResourceRecognitionData ResourceRecognitionData 78 CREATE TABLE ResourceRecognitionData( resourceLocalUid REFERENCES Resources(resourceLocalUid) ON UPDATE CASCADE, noteLocalUid REFERENCES Notes(localUid) ON UPDATE CASCADE, recognitionData TEXT DEFAULT NULL) index ResourceRecognitionDataIndex ResourceRecognitionData 79 CREATE INDEX ResourceRecognitionDataIndex ON ResourceRecognitionData(recognitionData) table ResourceRecognitionDataFTS ResourceRecognitionDataFTS 0 CREATE VIRTUAL TABLE ResourceRecognitionDataFTS USING FTS4(content="ResourceRecognitionData", resourceLocalUid, noteLocalUid, recognitionData) table ResourceRecognitionDataFTS_segments ResourceRecognitionDataFTS_segments 80 CREATE TABLE 'ResourceRecognitionDataFTS_segments'(blockid INTEGER PRIMARY KEY, block BLOB) table ResourceRecognitionDataFTS_segdir ResourceRecognitionDataFTS_segdir 82 CREATE TABLE 'ResourceRecognitionDataFTS_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,leaves_end_block INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx)) index sqlite_autoindex_ResourceRecognitionDataFTS_segdir_1 ResourceRecognitionDataFTS_segdir 83 table ResourceRecognitionDataFTS_docsize ResourceRecognitionDataFTS_docsize 84 CREATE TABLE 'ResourceRecognitionDataFTS_docsize'(docid INTEGER PRIMARY KEY, size BLOB) table ResourceRecognitionDataFTS_stat ResourceRecognitionDataFTS_stat 85 CREATE TABLE 'ResourceRecognitionDataFTS_stat'(id INTEGER PRIMARY KEY, value BLOB) trigger ResourceRecognitionDataFTS_BeforeDeleteTrigger ResourceRecognitionData 0 CREATE TRIGGER ResourceRecognitionDataFTS_BeforeDeleteTrigger BEFORE DELETE ON ResourceRecognitionData BEGIN DELETE FROM ResourceRecognitionDataFTS WHERE recognitionData=old.recognitionData; END trigger ResourceRecognitionDataFTS_AfterInsertTrigger ResourceRecognitionData 0 CREATE TRIGGER ResourceRecognitionDataFTS_AfterInsertTrigger AFTER INSERT ON ResourceRecognitionData BEGIN INSERT INTO ResourceRecognitionDataFTS(ResourceRecognitionDataFTS) VALUES('rebuild'); END table ResourceMimeFTS ResourceMimeFTS 0 CREATE VIRTUAL TABLE ResourceMimeFTS USING FTS4(content="Resources", resourceLocalUid, mime) table ResourceMimeFTS_segments ResourceMimeFTS_segments 86 CREATE TABLE 'ResourceMimeFTS_segments'(blockid INTEGER PRIMARY KEY, block BLOB) table ResourceMimeFTS_segdir ResourceMimeFTS_segdir 87 CREATE TABLE 'ResourceMimeFTS_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,leaves_end_block INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx)) index sqlite_autoindex_ResourceMimeFTS_segdir_1 ResourceMimeFTS_segdir 88 table ResourceMimeFTS_docsize ResourceMimeFTS_docsize 89 CREATE TABLE 'ResourceMimeFTS_docsize'(docid INTEGER PRIMARY KEY, size BLOB) table ResourceMimeFTS_stat ResourceMimeFTS_stat 90 CREATE TABLE 'ResourceMimeFTS_stat'(id INTEGER PRIMARY KEY, value BLOB) trigger ResourceMimeFTS_BeforeDeleteTrigger Resources 0 CREATE TRIGGER ResourceMimeFTS_BeforeDeleteTrigger BEFORE DELETE ON Resources BEGIN DELETE FROM ResourceMimeFTS WHERE mime=old.mime; END trigger ResourceMimeFTS_AfterInsertTrigger Resources 0 CREATE TRIGGER ResourceMimeFTS_AfterInsertTrigger AFTER INSERT ON Resources BEGIN INSERT INTO ResourceMimeFTS(ResourceMimeFTS) VALUES('rebuild'); END index ResourceNote Resources 91 CREATE INDEX ResourceNote ON Resources(noteLocalUid) table ResourceAttributes ResourceAttributes 92 CREATE TABLE ResourceAttributes( resourceLocalUid REFERENCES Resources(resourceLocalUid) ON UPDATE CASCADE, resourceSourceURL TEXT DEFAULT NULL, timestamp INTEGER DEFAULT NULL, resourceLatitude REAL DEFAULT NULL, resourceLongitude REAL DEFAULT NULL, resourceAltitude REAL DEFAULT NULL, cameraMake TEXT DEFAULT NULL, cameraModel TEXT DEFAULT NULL, clientWillIndex INTEGER DEFAULT NULL, fileName TEXT DEFAULT NULL, attachment INTEGER DEFAULT NULL, UNIQUE(resourceLocalUid) ) index sqlite_autoindex_ResourceAttributes_1 ResourceAttributes 93 table ResourceAttributesApplicationDataKeysOnly ResourceAttributesApplicationDataKeysOnly 94 CREATE TABLE ResourceAttributesApplicationDataKeysOnly( resourceLocalUid REFERENCES Resources(resourceLocalUid) ON UPDATE CASCADE, resourceKey TEXT DEFAULT NULL, UNIQUE(resourceLocalUid, resourceKey)) index sqlite_autoindex_ResourceAttributesApplicationDataKeysOnly_1 ResourceAttributesApplicationDataKeysOnly 95 table ResourceAttributesApplicationDataFullMap ResourceAttributesApplicationDataFullMap 97 CREATE TABLE ResourceAttributesApplicationDataFullMap( resourceLocalUid REFERENCES Resources(resourceLocalUid) ON UPDATE CASCADE, resourceMapKey TEXT DEFAULT NULL, resourceValue TEXT DEFAULT NULL, UNIQUE(resourceLocalUid, resourceMapKey) ON CONFLICT REPLACE) index sqlite_autoindex_ResourceAttributesApplicationDataFullMap_1 ResourceAttributesApplicationDataFullMap 98 table NoteResources NoteResources 99 CREATE TABLE NoteResources( localNote REFERENCES Notes(localUid) ON UPDATE CASCADE, note REFERENCES Notes(guid) ON UPDATE CASCADE, localResource REFERENCES Resources(resourceLocalUid) ON UPDATE CASCADE, resource REFERENCES Resources(resourceGuid) ON UPDATE CASCADE, UNIQUE(localNote, localResource) ON CONFLICT REPLACE) index sqlite_autoindex_NoteResources_1 NoteResources 100 index NoteResourcesNote NoteResources 101 CREATE INDEX NoteResourcesNote ON NoteResources(localNote) index NoteResourcesResource NoteResources 102 CREATE INDEX NoteResourcesResource ON NoteResources(localResource) trigger Notes_AfterInsertNoteResourcesTrigger Notes 0 CREATE TRIGGER Notes_AfterInsertNoteResourcesTrigger AFTER INSERT ON Notes BEGIN UPDATE NoteResources SET note = new.guid WHERE localNote = new.localUid; END trigger Resources_AfterInsertNoteResourcesTrigger Resources 0 CREATE TRIGGER Resources_AfterInsertNoteResourcesTrigger AFTER INSERT ON Resources BEGIN UPDATE NoteResources SET resource = new.resourceGuid WHERE localResource = new.resourceLocalUid; END table Tags Tags 103 CREATE TABLE Tags( localUid TEXT PRIMARY KEY NOT NULL UNIQUE, guid TEXT DEFAULT NULL UNIQUE, linkedNotebookGuid REFERENCES LinkedNotebooks(guid) ON UPDATE CASCADE, updateSequenceNumber INTEGER DEFAULT NULL, name TEXT DEFAULT NULL, nameLower TEXT DEFAULT NULL, parentGuid REFERENCES Tags(guid) ON UPDATE CASCADE DEFAULT NULL, parentLocalUid REFERENCES Tags(localUid) ON UPDATE CASCADE DEFAULT NULL, isDirty INTEGER NOT NULL, isLocal INTEGER NOT NULL, isFavorited INTEGER NOT NULL, UNIQUE(localUid, guid), UNIQUE(nameLower, linkedNotebookGuid) ) index sqlite_autoindex_Tags_1 Tags 104 index sqlite_autoindex_Tags_2 Tags 105 index sqlite_autoindex_Tags_3 Tags 106 index sqlite_autoindex_Tags_4 Tags 107 index TagNameUpperIndex Tags 108 CREATE INDEX TagNameUpperIndex ON Tags(nameLower) index TagLinkedNotebookGuidIndex Tags 109 CREATE INDEX TagLinkedNotebookGuidIndex ON Tags(linkedNotebookGuid) index TagParentLocalUidIndex Tags 110 CREATE INDEX TagParentLocalUidIndex ON Tags(parentLocalUid) index TagIsDirtyIndex Tags 111 CREATE INDEX TagIsDirtyIndex ON Tags(isDirty) index TagIsFavoritedIndex Tags 112 CREATE INDEX TagIsFavoritedIndex ON Tags(isFavorited) trigger Tags_AfterInsertParentGuidTrigger Tags 0 CREATE TRIGGER Tags_AfterInsertParentGuidTrigger AFTER INSERT ON Tags BEGIN UPDATE Tags SET parentGuid = new.guid WHERE parentLocalUid = new.localUid; END table TagFTS TagFTS 0 CREATE VIRTUAL TABLE TagFTS USING FTS4(content="Tags", localUid, guid, nameLower) table TagFTS_segments TagFTS_segments 113 CREATE TABLE 'TagFTS_segments'(blockid INTEGER PRIMARY KEY, block BLOB) table TagFTS_segdir TagFTS_segdir 114 CREATE TABLE 'TagFTS_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,leaves_end_block INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx)) index sqlite_autoindex_TagFTS_segdir_1 TagFTS_segdir 115 table TagFTS_docsize TagFTS_docsize 117 CREATE TABLE 'TagFTS_docsize'(docid INTEGER PRIMARY KEY, size BLOB) table TagFTS_stat TagFTS_stat 118 CREATE TABLE 'TagFTS_stat'(id INTEGER PRIMARY KEY, value BLOB) trigger TagFTS_BeforeDeleteTrigger Tags 0 CREATE TRIGGER TagFTS_BeforeDeleteTrigger BEFORE DELETE ON Tags BEGIN DELETE FROM TagFTS WHERE localUid=old.localUid; END trigger TagFTS_AfterInsertTrigger Tags 0 CREATE TRIGGER TagFTS_AfterInsertTrigger AFTER INSERT ON Tags BEGIN INSERT INTO TagFTS(TagFTS) VALUES('rebuild'); END table NoteTags NoteTags 119 CREATE TABLE NoteTags( localNote REFERENCES Notes(localUid) ON UPDATE CASCADE, note REFERENCES Notes(guid) ON UPDATE CASCADE, localTag REFERENCES Tags(localUid) ON UPDATE CASCADE, tag REFERENCES Tags(guid) ON UPDATE CASCADE, tagIndexInNote INTEGER DEFAULT NULL, UNIQUE(localNote, localTag) ON CONFLICT REPLACE) index sqlite_autoindex_NoteTags_1 NoteTags 120 index NoteTagsNote NoteTags 121 CREATE INDEX NoteTagsNote ON NoteTags(localNote) index NoteTagsTag NoteTags 122 CREATE INDEX NoteTagsTag ON NoteTags(localTag) trigger Notes_AfterInsertNoteTagsTrigger Notes 0 CREATE TRIGGER Notes_AfterInsertNoteTagsTrigger AFTER INSERT ON Notes BEGIN UPDATE NoteTags SET note = new.guid WHERE localNote = new.localUid; END trigger Tags_AfterInsertNoteTagsTrigger Tags 0 CREATE TRIGGER Tags_AfterInsertNoteTagsTrigger AFTER INSERT ON Tags BEGIN UPDATE NoteTags SET tag = new.guid WHERE localTag = new.localUid; END table SavedSearches SavedSearches 123 CREATE TABLE SavedSearches( localUid TEXT PRIMARY KEY NOT NULL UNIQUE, guid TEXT DEFAULT NULL UNIQUE, name TEXT DEFAULT NULL, nameLower TEXT DEFAULT NULL UNIQUE, query TEXT DEFAULT NULL, format INTEGER DEFAULT NULL, updateSequenceNumber INTEGER DEFAULT NULL, isDirty INTEGER NOT NULL, isLocal INTEGER NOT NULL, includeAccount INTEGER DEFAULT NULL, includePersonalLinkedNotebooks INTEGER DEFAULT NULL, includeBusinessLinkedNotebooks INTEGER DEFAULT NULL, isFavorited INTEGER NOT NULL, UNIQUE(localUid, guid)) index sqlite_autoindex_SavedSearches_1 SavedSearches 124 index sqlite_autoindex_SavedSearches_2 SavedSearches 125 index sqlite_autoindex_SavedSearches_3 SavedSearches 126 index sqlite_autoindex_SavedSearches_4 SavedSearches 127 index SavedSearchesIsDirtyIndex SavedSearches 128 CREATE INDEX SavedSearchesIsDirtyIndex ON SavedSearches(isDirty) index SavedSearchesIsFavoritedIndex SavedSearches 129 CREATE INDEX SavedSearchesIsFavoritedIndex ON SavedSearches(isFavorited) trigger on_linked_notebook_delete_trigger LinkedNotebooks 0 CREATE TRIGGER on_linked_notebook_delete_trigger BEFORE DELETE ON LinkedNotebooks BEGIN DELETE FROM Notebooks WHERE Notebooks.linkedNotebookGuid=OLD.guid; DELETE FROM Tags WHERE Tags.linkedNotebookGuid=OLD.guid; END trigger on_note_delete_trigger Notes 0 CREATE TRIGGER on_note_delete_trigger BEFORE DELETE ON Notes BEGIN DELETE FROM Resources WHERE Resources.noteLocalUid=OLD.localUid; DELETE FROM ResourceRecognitionData WHERE ResourceRecognitionData.noteLocalUid=OLD.localUid; DELETE FROM NoteTags WHERE NoteTags.localNote=OLD.localUid; DELETE FROM NoteResources WHERE NoteResources.localNote=OLD.localUid; DELETE FROM SharedNotes WHERE SharedNotes.sharedNoteNoteGuid=OLD.guid; DELETE FROM NoteRestrictions WHERE NoteRestrictions.noteLocalUid=OLD.localUid; DELETE FROM NoteLimits WHERE NoteLimits.noteLocalUid=OLD.localUid; END trigger on_resource_delete_trigger Resources 0 CREATE TRIGGER on_resource_delete_trigger BEFORE DELETE ON Resources BEGIN DELETE FROM ResourceRecognitionData WHERE ResourceRecognitionData.resourceLocalUid=OLD.resourceLocalUid; DELETE FROM ResourceAttributes WHERE ResourceAttributes.resourceLocalUid=OLD.resourceLocalUid; DELETE FROM ResourceAttributesApplicationDataKeysOnly WHERE ResourceAttributesApplicationDataKeysOnly.resourceLocalUid=OLD.resourceLocalUid; DELETE FROM ResourceAttributesApplicationDataFullMap WHERE ResourceAttributesApplicationDataFullMap.resourceLocalUid=OLD.resourceLocalUid; DELETE FROM NoteResources WHERE NoteResources.localResource=OLD.resourceLocalUid; END trigger on_tag_delete_trigger Tags 0 CREATE TRIGGER on_tag_delete_trigger BEFORE DELETE ON Tags BEGIN DELETE FROM NoteTags WHERE NoteTags.localTag=OLD.localUid; END