/apps/timeline/timeline.sql

http://zoop.googlecode.com/ · SQL · 33 lines · 28 code · 5 blank · 0 comment · 0 complexity · 66fbd0e3de28ac036b10395dc5bd8547 MD5 · raw file

  1. BEGIN;
  2. CREATE TABLE entry
  3. (
  4. id serial primary key,
  5. "start" timestamp with time zone,
  6. "end" timestamp with time zone,
  7. is_duration boolean,
  8. title text
  9. );
  10. CREATE TABLE session_base
  11. (
  12. session_id text NOT NULL PRIMARY KEY,
  13. last_active timestamp with time zone NOT NULL
  14. );
  15. CREATE TABLE session_data
  16. (
  17. session_id text NOT NULL,
  18. key text,
  19. value text,
  20. PRIMARY KEY (session_id, key)
  21. );
  22. create table session_form
  23. (
  24. id serial primary key,
  25. session_id text not null,
  26. fields text not null
  27. );
  28. COMMIT;