Index: trunk/phase3/maintenance/postgres/tables.sql |
— | — | @@ -4,8 +4,7 @@ |
5 | 5 | -- This is the PostgreSQL version. |
6 | 6 | -- For information about each table, please see the notes in maintenance/tables.sql |
7 | 7 | -- Please make sure all dollar-quoting uses $mw$ at the start of the line |
| 8 | +-- TODO: Change CHAR/SMALLINT to BOOL (still used in a non-bool fashion in PHP code) |
8 | 9 | |
9 | 10 | BEGIN; |
10 | 11 | SET client_min_messages = 'ERROR'; |
— | — | @@ -290,8 +289,9 @@ |
291 | 290 | CREATE INDEX oi_sha1 ON oldimage (oi_sha1); |
292 | 291 | |
293 | 292 | |
| 293 | +CREATE SEQUENCE filearchive_fa_id_seq; |
294 | 294 | CREATE TABLE filearchive ( |
295 | | - fa_id SERIAL NOT NULL PRIMARY KEY, |
| 295 | + fa_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('filearchive_fa_id_seq'), |
296 | 296 | fa_name TEXT NOT NULL, |
297 | 297 | fa_archive_name TEXT, |
298 | 298 | fa_storage_group TEXT, |
— | — | @@ -438,8 +438,9 @@ |
439 | 439 | CREATE INDEX logging_page_time ON logging (log_namespace, log_title, log_timestamp); |
440 | 440 | |
441 | 441 | |
| 442 | +CREATE SEQUENCE trackbacks_tb_id_seq; |
442 | 443 | CREATE TABLE trackbacks ( |
443 | | - tb_id SERIAL NOT NULL PRIMARY KEY, |
| 444 | + tb_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('trackbacks_tb_id_seq'), |
444 | 445 | tb_page INTEGER REFERENCES page(page_id) ON DELETE CASCADE, |
445 | 446 | tb_title TEXT NOT NULL, |
446 | 447 | tb_url TEXT NOT NULL, |