r111191 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111190‎ | r111191 | r111192 >
Date:19:36, 10 February 2012
Author:werdna
Status:deferred
Tags:
Comment:
(bug 26539) Update PG schema. Patch by Andrew Zaborowski
Modified paths:
  • /trunk/extensions/LiquidThreads/lqt.pg.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/lqt.pg.sql
@@ -2,25 +2,26 @@
33
44 BEGIN;
55
6 -CREATE SEQUENCE thread_thread_id_seq;
 6+CREATE SEQUENCE thread_thread_id;
77 CREATE TABLE thread (
8 - thread_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('thread_thread_id_seq'),
9 - thread_root INTEGER NOT NULL,
 8+ thread_id INTEGER NULL PRIMARY KEY DEFAULT nextval('thread_thread_id'),
 9+ thread_root INTEGER NOT NULL UNIQUE,
1010 thread_ancestor INTEGER NOT NULL,
11 - thread_parent INTEGER NOT NULL,
12 - thread_summary_page INTEGER NOT NULL,
 11+ thread_parent INTEGER NULL,
 12+ thread_summary_page INTEGER NULL,
1313 thread_subject TEXT NULL,
1414 thread_author_id INTEGER NULL,
1515 thread_author_name TEXT NULL,
16 - thread_modified TIMESTAMPTZ NULL DEFAULT now(),
17 - thread_created TIMESTAMPTZ NULL DEFAULT now(),
 16+ thread_modified TIMESTAMPTZ NOT NULL DEFAULT now(),
 17+ thread_created TIMESTAMPTZ NOT NULL DEFAULT now(),
1818 thread_editedness SMALLINT NOT NULL DEFAULT 0,
1919 thread_article_namespace SMALLINT NOT NULL,
2020 thread_article_title TEXT NOT NULL,
2121 thread_article_id INTEGER NOT NULL,
2222 thread_type SMALLINT NOT NULL DEFAULT 0,
2323 thread_sortkey TEXT NOT NULL DEFAULT '',
24 - thread_replies INTEGER NOT NULL DEFAULT -1
 24+ thread_replies INTEGER NOT NULL DEFAULT -1,
 25+ thread_signature varchar(255) NULL
2526 );
2627
2728 CREATE UNIQUE INDEX thread_root_page ON thread(thread_root);
@@ -38,7 +39,7 @@
3940 hthread_revision INTEGER NOT NULL,
4041 hthread_contents TEXT NOT NULL,
4142 hthread_change_type INTEGER NOT NULL,
42 - hthread_change_object INTEGER NOT NULL
 43+ hthread_change_object INTEGER NULL
4344 );
4445 CREATE UNIQUE INDEX historical_thread_unique ON historical_thread(hthread_id, hthread_revision);
4546
@@ -49,9 +50,9 @@
5051 );
5152 CREATE UNIQUE INDEX user_message_state_unique ON user_message_state(ums_user, ums_thread);
5253
53 -CREATE SEQUENCE thread_history_th_id_seq;
 54+CREATE SEQUENCE thread_history_th_id;
5455 CREATE TABLE thread_history (
55 - th_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('thread_history_th_id_seq'),
 56+ th_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('thread_history_th_id'),
5657 th_thread INTEGER NOT NULL,
5758 th_timestamp TEXT NOT NULL,
5859 th_user INTEGER NOT NULL,

Status & tagging log