notes_6.1.6.sql 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. CREATE TABLE ZACCOUNT (
  2. Z_PK INTEGER PRIMARY KEY,
  3. Z_ENT INTEGER,
  4. Z_OPT INTEGER,
  5. ZTYPE INTEGER,
  6. ZDEFAULTSTORE INTEGER,
  7. ZACCOUNTIDENTIFIER VARCHAR,
  8. ZCONSTRAINTSPATH VARCHAR,
  9. ZNAME VARCHAR );
  10. CREATE INDEX ZACCOUNT_ZDEFAULTSTORE_INDEX ON ZACCOUNT (ZDEFAULTSTORE);
  11. CREATE TABLE ZNEXTID (
  12. Z_PK INTEGER PRIMARY KEY,
  13. Z_ENT INTEGER,
  14. Z_OPT INTEGER,
  15. ZCOUNTER INTEGER );
  16. CREATE TABLE ZNOTE (
  17. Z_PK INTEGER PRIMARY KEY,
  18. Z_ENT INTEGER,
  19. Z_OPT INTEGER,
  20. ZCONTAINSCJK INTEGER,
  21. ZCONTENTTYPE INTEGER,
  22. ZDELETEDFLAG INTEGER,
  23. ZEXTERNALFLAGS INTEGER,
  24. ZEXTERNALSERVERINTID INTEGER,
  25. ZINTEGERID INTEGER,
  26. ZISBOOKKEEPINGENTRY INTEGER,
  27. ZBODY INTEGER,
  28. ZSTORE INTEGER,
  29. ZCREATIONDATE TIMESTAMP,
  30. ZMODIFICATIONDATE TIMESTAMP,
  31. ZAUTHOR VARCHAR,
  32. ZGUID VARCHAR,
  33. ZSERVERID VARCHAR,
  34. ZSUMMARY VARCHAR,
  35. ZTITLE VARCHAR );
  36. CREATE INDEX ZNOTE_ZINTEGERID_INDEX ON ZNOTE (ZINTEGERID);
  37. CREATE INDEX ZNOTE_ZBODY_INDEX ON ZNOTE (ZBODY);
  38. CREATE INDEX ZNOTE_ZSTORE_INDEX ON ZNOTE (ZSTORE);
  39. CREATE TABLE ZNOTEBODY (
  40. Z_PK INTEGER PRIMARY KEY,
  41. Z_ENT INTEGER,
  42. Z_OPT INTEGER,
  43. ZOWNER INTEGER,
  44. ZCONTENT VARCHAR,
  45. ZEXTERNALCONTENTREF VARCHAR,
  46. ZEXTERNALREPRESENTATION BLOB );
  47. CREATE INDEX ZNOTEBODY_ZOWNER_INDEX ON ZNOTEBODY (ZOWNER);
  48. CREATE TABLE ZNOTECHANGE (
  49. Z_PK INTEGER PRIMARY KEY,
  50. Z_ENT INTEGER,
  51. Z_OPT INTEGER,
  52. ZCHANGETYPE INTEGER,
  53. ZSTORE INTEGER,
  54. ZNOTEINTEGERIDS BLOB,
  55. ZNOTESERVERIDS BLOB,
  56. ZNOTESERVERINTIDS BLOB );
  57. CREATE INDEX ZNOTECHANGE_ZSTORE_INDEX ON ZNOTECHANGE (ZSTORE);
  58. CREATE TABLE ZPROPERTY (
  59. Z_PK INTEGER PRIMARY KEY,
  60. Z_ENT INTEGER,
  61. Z_OPT INTEGER,
  62. ZPROPERTYKEY VARCHAR,
  63. ZPROPERTYVALUE BLOB );
  64. CREATE TABLE ZSTORE (
  65. Z_PK INTEGER PRIMARY KEY,
  66. Z_ENT INTEGER,
  67. Z_OPT INTEGER,
  68. ZACCOUNT INTEGER,
  69. ZEXTERNALIDENTIFIER VARCHAR,
  70. ZNAME VARCHAR,
  71. ZSYNCANCHOR VARCHAR );
  72. CREATE INDEX ZSTORE_ZACCOUNT_INDEX ON ZSTORE (ZACCOUNT);
  73. CREATE TABLE Z_PRIMARYKEY (
  74. Z_ENT INTEGER PRIMARY KEY,
  75. Z_NAME VARCHAR,
  76. Z_SUPER INTEGER,
  77. Z_MAX INTEGER);
  78. CREATE TABLE Z_METADATA (
  79. Z_VERSION INTEGER PRIMARY KEY,
  80. Z_UUID VARCHAR(255),
  81. Z_PLIST BLOB);