-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.sql
27 lines (27 loc) · 4.47 KB
/
schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
CREATE TABLE ZSFCHANGE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZORDER INTEGER, ZTOKEN VARCHAR );
CREATE TABLE ZSFCHANGEITEM ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZITEMDELETED INTEGER, ZCHANGE INTEGER, ZITEMENTITY VARCHAR, ZUNIQUEIDENTIFIER VARCHAR );
CREATE TABLE ZSFEXTERNALCHANGES ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZITEMCHANGE INTEGER, ZITEMENTITY VARCHAR, ZITEMOBJECTID VARCHAR );
CREATE TABLE ZSFINTERNALCHANGES ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZITEMCHANGE INTEGER, ZCHANGETYPE VARCHAR, ZITEMOBJECTID VARCHAR );
CREATE TABLE ZSFNOTE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZARCHIVED INTEGER, ZENCRYPTED INTEGER, ZHASFILES INTEGER, ZHASIMAGES INTEGER, ZHASSOURCECODE INTEGER, ZLOCKED INTEGER, ZORDER INTEGER, ZPERMANENTLYDELETED INTEGER, ZPINNED INTEGER, ZSHOWNINTODAYWIDGET INTEGER, ZSKIPSYNC INTEGER, ZTODOCOMPLETED INTEGER, ZTODOINCOMPLETED INTEGER, ZTRASHED INTEGER, ZVERSION INTEGER, ZPASSWORD INTEGER, ZSERVERDATA INTEGER, ZARCHIVEDDATE TIMESTAMP, ZCONFLICTUNIQUEIDENTIFIERDATE TIMESTAMP, ZCREATIONDATE TIMESTAMP, ZLOCKEDDATE TIMESTAMP, ZMODIFICATIONDATE TIMESTAMP, ZORDERDATE TIMESTAMP, ZPINNEDDATE TIMESTAMP, ZTRASHEDDATE TIMESTAMP, ZCONFLICTUNIQUEIDENTIFIER VARCHAR, ZENCRYPTIONUNIQUEIDENTIFIER VARCHAR, ZLASTEDITINGDEVICE VARCHAR, ZSUBTITLE VARCHAR, ZTEXT VARCHAR, ZTITLE VARCHAR, ZUNIQUEIDENTIFIER VARCHAR, ZENCRYPTEDDATA BLOB, ZVECTORCLOCK BLOB );
CREATE TABLE Z_5TAGS ( Z_5NOTES INTEGER, Z_13TAGS INTEGER, PRIMARY KEY (Z_5NOTES, Z_13TAGS) );
CREATE TABLE ZSFNOTEBACKLINK ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZLOCATION INTEGER, ZVERSION INTEGER, ZLINKEDBY INTEGER, ZLINKINGTO INTEGER, ZMODIFICATIONDATE TIMESTAMP, ZTITLE VARCHAR, ZUNIQUEIDENTIFIER VARCHAR, ZSERVERDATA BLOB );
CREATE TABLE ZSFNOTEFILE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZDOWNLOADED INTEGER, ZFILESIZE INTEGER, ZINDEX INTEGER, ZPERMANENTLYDELETED INTEGER, ZSKIPSYNC INTEGER, ZUNUSED INTEGER, ZUPLOADED INTEGER, ZVERSION INTEGER, ZNOTE INTEGER, ZSERVERDATA INTEGER, ZANIMATED INTEGER, ZHEIGHT INTEGER, ZWIDTH INTEGER, ZDURATION INTEGER, ZHEIGHT1 INTEGER, ZWIDTH1 INTEGER, ZCREATIONDATE TIMESTAMP, ZINSERTIONDATE TIMESTAMP, ZMODIFICATIONDATE TIMESTAMP, ZSEARCHTEXTDATE TIMESTAMP, ZUNUSEDDATE TIMESTAMP, ZUPLOADEDDATE TIMESTAMP, ZFILENAME VARCHAR, ZLASTEDITINGDEVICE VARCHAR, ZNORMALIZEDFILEEXTENSION VARCHAR, ZSEARCHTEXT VARCHAR, ZUNIQUEIDENTIFIER VARCHAR );
CREATE TABLE ZSFNOTEFILESERVERDATA ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZFILE INTEGER, Z7_FILE INTEGER, ZSYSTEMFIELDS BLOB );
CREATE TABLE ZSFNOTESERVERDATA ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZNOTE INTEGER, ZSYSTEMFIELDS BLOB );
CREATE TABLE ZSFNOTETAG ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZISROOT INTEGER, ZPINNED INTEGER, ZSORTING INTEGER, ZSORTINGDIRECTION INTEGER, ZVERSION INTEGER, ZMODIFICATIONDATE TIMESTAMP, ZPINNEDDATE TIMESTAMP, ZSORTINGDATE TIMESTAMP, ZSORTINGDIRECTIONDATE TIMESTAMP, ZTAGCONDATE TIMESTAMP, ZTAGCON VARCHAR, ZTITLE VARCHAR, ZUNIQUEIDENTIFIER VARCHAR, ZSERVERDATA BLOB );
CREATE TABLE ZSFPASSWORD ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZBIOMETRY INTEGER, ZENCRYPTIONVERSION INTEGER, ZCREATIONDATE TIMESTAMP, ZCREATIONDEVICE VARCHAR, ZUNIQUEIDENTIFIER VARCHAR, ZENCRYPTEDDATA BLOB, ZHINT BLOB );
CREATE TABLE ZSFSERVERMETADATA ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZNOTEZONESUBSCRIPTIONID VARCHAR, ZNOTEZONEIDDATA BLOB, ZSERVERCHANGETOKENDATA BLOB );
CREATE INDEX ZSFCHANGEITEM_ZCHANGE_INDEX ON ZSFCHANGEITEM (ZCHANGE);
CREATE INDEX ZSFNOTE_ZPASSWORD_INDEX ON ZSFNOTE (ZPASSWORD);
CREATE INDEX ZSFNOTE_ZSERVERDATA_INDEX ON ZSFNOTE (ZSERVERDATA);
CREATE INDEX Z_5TAGS_Z_13TAGS_INDEX ON Z_5TAGS (Z_13TAGS, Z_5NOTES);
CREATE INDEX ZSFNOTEBACKLINK_ZLINKEDBY_INDEX ON ZSFNOTEBACKLINK (ZLINKEDBY);
CREATE INDEX ZSFNOTEBACKLINK_ZLINKINGTO_INDEX ON ZSFNOTEBACKLINK (ZLINKINGTO);
CREATE INDEX ZSFNOTEFILE_ZNOTE_INDEX ON ZSFNOTEFILE (ZNOTE);
CREATE INDEX ZSFNOTEFILE_ZSERVERDATA_INDEX ON ZSFNOTEFILE (ZSERVERDATA);
CREATE INDEX ZSFNOTEFILE_Z_ENT_INDEX ON ZSFNOTEFILE (Z_ENT);
CREATE INDEX ZSFNOTEFILESERVERDATA_ZFILE_INDEX ON ZSFNOTEFILESERVERDATA (ZFILE);
CREATE INDEX ZSFNOTESERVERDATA_ZNOTE_INDEX ON ZSFNOTESERVERDATA (ZNOTE);
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);