Fork de wikipp, le moteur de wiki en c++, basé sur cppcms. Le fork ajoute la langue française
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

postgresql.sql 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. begin;
  2. drop table if exists history;
  3. drop table if exists pages;
  4. drop table if exists users;
  5. drop table if exists options;
  6. create table options (
  7. lang varchar(16) not null,
  8. name varchar(32) not null,
  9. value text not null,
  10. unique(lang,name)
  11. );
  12. create table users (
  13. id serial primary key not null,
  14. username varchar(32) unique not null,
  15. password varchar(32) not null
  16. ) ;
  17. create table pages (
  18. id serial primary key not null,
  19. lang varchar(16) not null,
  20. slug varchar(128) not null,
  21. title varchar(256) not null,
  22. content text not null,
  23. sidebar text not null,
  24. users_only integer not null,
  25. unique (lang,slug)
  26. );
  27. create table history (
  28. id integer not null,
  29. version integer not null,
  30. created timestamp not null,
  31. author varchar(32) not null,
  32. title varchar(256) not null,
  33. content text not null,
  34. sidebar text not null,
  35. unique(id,version),
  36. foreign key(id) references pages(id),
  37. primary key(id,version)
  38. );
  39. create index history_timeline on history(created);
  40. commit;