1
0

schema.sql 910 B

12345678910111213141516171819202122232425262728
  1. -- This is the database schema for PostgreSQL.
  2. create table collection (
  3. path varchar primary key not null,
  4. parent_path varchar references collection (path));
  5. create table item (
  6. name varchar primary key not null,
  7. tag varchar not null,
  8. collection_path varchar references collection (path) not null);
  9. create table header (
  10. key varchar not null,
  11. value varchar not null,
  12. collection_path varchar references collection (path) not null,
  13. primary key (key, collection_path));
  14. create table line (
  15. key varchar not null,
  16. value varchar not null,
  17. item_name varchar references item (name) not null,
  18. timestamp timestamp not null);
  19. create table property (
  20. key varchar not null,
  21. value varchar not null,
  22. collection_path varchar references collection (path) not null,
  23. primary key (key, collection_path));