From: Reedy Date: Wed, 29 Nov 2017 21:02:22 +0000 (+0000) Subject: Add ip_changes to postgres/tables.sql X-Git-Tag: 1.31.0-rc.0~1360^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=70951d1971a3a338a3cb7cd2837fc6ba213d416b Add ip_changes to postgres/tables.sql Follow-up Ic11c64813ee04e8520771bfa156f8e51404273e7 Bug: T177258 Change-Id: I69a278c1928ed91ef5cbe5b66e590eef629a2981 --- diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql index d6d2f24c11..da9c86486a 100644 --- a/maintenance/postgres/tables.sql +++ b/maintenance/postgres/tables.sql @@ -158,6 +158,17 @@ CREATE TABLE revision_comment_temp ( ); CREATE UNIQUE INDEX revcomment_rev ON revision_comment_temp (revcomment_rev); +CREATE SEQUENCE ip_changes_ipc_rev_id_seq; + +CREATE TABLE ip_changes ( + ipc_rev_id INTEGER PRIMARY KEY NOT NULL DEFAULT nextval('ip_changes_ipc_rev_id_seq'), + ipc_rev_timestamp TIMESTAMPTZ NOT NULL, + ipc_hex BYTEA NOT NULL DEFAULT '' +); + +CREATE INDEX ipc_rev_timestamp ON ip_changes (ipc_rev_timestamp); +CREATE INDEX ipc_hex_time ON ip_changes (ipc_hex,ipc_rev_timestamp); + CREATE SEQUENCE text_old_id_seq; CREATE TABLE pagecontent ( -- replaces reserved word 'text' old_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('text_old_id_seq'),