Original: https://www.mediawiki.org/wiki/Extension:Comments Das hier ist eine an https://znil.net angepasste Version.
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.

comments.postgres.sql 1.1KB

12345678910111213141516171819202122232425262728
  1. -- PostgreSQL variant of Comments' database schema
  2. -- This is probably crazy, but so is PostgreSQL. I've never used PGSQL so
  3. -- there's a fair chance that the code is full of bugs, stupid things or both.
  4. -- Please feel free to submit patches or just go ahead and fix it.
  5. --
  6. -- Tested at SQLFiddle.com against PostgreSQL 8.3.20 & 9.1.9 and at least this
  7. -- builds. Doesn't guarantee anything, though.
  8. --
  9. -- Author: Jack Phoenix
  10. -- Date: 24 July 2013
  11. DROP SEQUENCE IF EXISTS Comments_CommentID_seq CASCADE;
  12. CREATE SEQUENCE Comments_CommentID_seq MINVALUE 0 START WITH 0;
  13. CREATE TABLE Comments (
  14. CommentID INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('Comments_CommentID_seq'),
  15. Comment_Page_ID INTEGER NOT NULL DEFAULT 0,
  16. Comment_user_id INTEGER NOT NULL DEFAULT 0,
  17. Comment_Username TEXT NOT NULL DEFAULT '',
  18. Comment_Text TEXT NOT NULL,
  19. Comment_Date TIMESTAMPTZ NOT NULL DEFAULT now(),
  20. Comment_Parent_ID INTEGER NOT NULL DEFAULT 0,
  21. Comment_IP TEXT NOT NULL DEFAULT ''
  22. );
  23. CREATE INDEX comment_page_id_index ON Comments (Comment_Page_ID);
  24. CREATE INDEX wiki_user_id ON Comments (Comment_user_id);
  25. CREATE INDEX wiki_user_name ON Comments (Comment_Username);