dbschema.json 915 B

123456789101112131415161718192021222324252627282930313233343536
  1. {
  2. "db_name": "ZeroMail",
  3. "db_file": "data/users/zeromail.db",
  4. "version": 2,
  5. "maps": {
  6. ".+/data.json": {
  7. "to_table": [
  8. {"node": "message", "table": "message", "key_col": "date_added", "val_col": "encrypted"},
  9. {"node": "secret", "table": "secret", "key_col": "date_added", "val_col": "encrypted"}
  10. ]
  11. },
  12. ".+/content.json": {
  13. "to_keyvalue": [ "cert_user_id" ]
  14. }
  15. },
  16. "tables": {
  17. "message": {
  18. "cols": [
  19. ["date_added", "INTEGER"],
  20. ["encrypted", "TEXT"],
  21. ["json_id", "INTEGER REFERENCES json (json_id)"]
  22. ],
  23. "indexes": ["CREATE UNIQUE INDEX message_key ON message(json_id, date_added)"],
  24. "schema_changed": 3
  25. },
  26. "secret": {
  27. "cols": [
  28. ["date_added", "INTEGER"],
  29. ["encrypted", "TEXT"],
  30. ["json_id", "INTEGER REFERENCES json (json_id)"]
  31. ],
  32. "indexes": ["CREATE UNIQUE INDEX secret_key ON secret(json_id, date_added)"],
  33. "schema_changed": 3
  34. }
  35. }
  36. }