notes_11.2.sql 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. CREATE TABLE ZACCOUNT (
  2. Z_PK INTEGER PRIMARY KEY,
  3. Z_ENT INTEGER,
  4. Z_OPT INTEGER,
  5. ZDIDCHOOSETOMIGRATE INTEGER,
  6. ZTYPE INTEGER,
  7. ZDEFAULTSTORE INTEGER,
  8. ZACCOUNTIDENTIFIER VARCHAR,
  9. ZCONSTRAINTSPATH VARCHAR,
  10. ZNAME VARCHAR
  11. );
  12. CREATE TABLE ZNEXTID (
  13. Z_PK INTEGER PRIMARY KEY,
  14. Z_ENT INTEGER,
  15. Z_OPT INTEGER,
  16. ZCOUNTER INTEGER
  17. );
  18. CREATE TABLE ZNOTE (
  19. Z_PK INTEGER PRIMARY KEY,
  20. Z_ENT INTEGER,
  21. Z_OPT INTEGER,
  22. ZCONTAINSCJK INTEGER,
  23. ZCONTENTTYPE INTEGER,
  24. ZDELETEDFLAG INTEGER,
  25. ZEXTERNALFLAGS INTEGER,
  26. ZEXTERNALSEQUENCENUMBER INTEGER,
  27. ZEXTERNALSERVERINTID INTEGER,
  28. ZINTEGERID INTEGER,
  29. ZISBOOKKEEPINGENTRY INTEGER,
  30. ZBODY INTEGER,
  31. ZSTORE INTEGER,
  32. ZCREATIONDATE TIMESTAMP,
  33. ZMODIFICATIONDATE TIMESTAMP,
  34. ZAUTHOR VARCHAR,
  35. ZGUID VARCHAR,
  36. ZSERVERID VARCHAR,
  37. ZSUMMARY VARCHAR,
  38. ZTITLE VARCHAR
  39. );
  40. CREATE TABLE ZNOTEATTACHMENT (
  41. Z_PK INTEGER PRIMARY KEY,
  42. Z_ENT INTEGER,
  43. Z_OPT INTEGER,
  44. ZNOTE INTEGER,
  45. ZCONTENTID VARCHAR,
  46. ZFILENAME VARCHAR,
  47. ZMIMETYPE VARCHAR
  48. );
  49. CREATE TABLE ZNOTEBODY (
  50. Z_PK INTEGER PRIMARY KEY,
  51. Z_ENT INTEGER,
  52. Z_OPT INTEGER,
  53. ZOWNER INTEGER,
  54. ZCONTENT VARCHAR,
  55. ZEXTERNALCONTENTREF VARCHAR,
  56. ZEXTERNALREPRESENTATION BLOB
  57. );
  58. CREATE TABLE ZNOTECHANGE (
  59. Z_PK INTEGER PRIMARY KEY,
  60. Z_ENT INTEGER,
  61. Z_OPT INTEGER,
  62. ZCHANGETYPE INTEGER,
  63. ZSTORE INTEGER,
  64. ZNOTEINTEGERIDS BLOB,
  65. ZNOTESERVERIDS BLOB,
  66. ZNOTESERVERINTIDS BLOB
  67. );
  68. CREATE TABLE ZPROPERTY (
  69. Z_PK INTEGER PRIMARY KEY,
  70. Z_ENT INTEGER,
  71. Z_OPT INTEGER,
  72. ZPROPERTYKEY VARCHAR,
  73. ZPROPERTYVALUE BLOB
  74. );
  75. CREATE TABLE ZSTORE (
  76. Z_PK INTEGER PRIMARY KEY,
  77. Z_ENT INTEGER,
  78. Z_OPT INTEGER,
  79. ZACCOUNT INTEGER,
  80. ZEXTERNALIDENTIFIER VARCHAR,
  81. ZNAME VARCHAR,
  82. ZSYNCANCHOR VARCHAR
  83. );
  84. CREATE INDEX ZACCOUNT_ZDEFAULTSTORE_INDEX ON ZACCOUNT (ZDEFAULTSTORE);
  85. CREATE INDEX ZNOTE_ZBODY_INDEX ON ZNOTE (ZBODY);
  86. CREATE INDEX ZNOTE_ZSTORE_INDEX ON ZNOTE (ZSTORE);
  87. CREATE INDEX Z_Note_integerId ON ZNOTE (ZINTEGERID COLLATE BINARY ASC);
  88. CREATE INDEX ZNOTEATTACHMENT_ZNOTE_INDEX ON ZNOTEATTACHMENT (ZNOTE);
  89. CREATE INDEX ZNOTEBODY_ZOWNER_INDEX ON ZNOTEBODY (ZOWNER);
  90. CREATE INDEX ZNOTECHANGE_ZSTORE_INDEX ON ZNOTECHANGE (ZSTORE);
  91. CREATE INDEX ZSTORE_ZACCOUNT_INDEX ON ZSTORE (ZACCOUNT);
  92. CREATE TABLE Z_PRIMARYKEY (
  93. Z_ENT INTEGER PRIMARY KEY,
  94. Z_NAME VARCHAR,
  95. Z_SUPER INTEGER,
  96. Z_MAX INTEGER
  97. );
  98. CREATE TABLE Z_METADATA (
  99. Z_VERSION INTEGER PRIMARY KEY,
  100. Z_UUID VARCHAR(255),
  101. Z_PLIST BLOB
  102. );
  103. CREATE TABLE Z_MODELCACHE (
  104. Z_CONTENT BLOB);