diff options
Diffstat (limited to 'maintenance/postgres/archives')
4 files changed, 45 insertions, 0 deletions
diff --git a/maintenance/postgres/archives/patch-l10n_cache.sql b/maintenance/postgres/archives/patch-l10n_cache.sql new file mode 100644 index 00000000..9b39b1b7 --- /dev/null +++ b/maintenance/postgres/archives/patch-l10n_cache.sql @@ -0,0 +1,8 @@ +CREATE TABLE l10n_cache ( + lc_lang TEXT NOT NULL, + lc_key TEXT NOT NULL, + lc_value TEXT NOT NULL +); +CREATE INDEX l10n_cache_lc_lang_key ON l10n_cache (lc_lang, lc_key); + + diff --git a/maintenance/postgres/archives/patch-log_search.sql b/maintenance/postgres/archives/patch-log_search.sql new file mode 100644 index 00000000..20a61fd7 --- /dev/null +++ b/maintenance/postgres/archives/patch-log_search.sql @@ -0,0 +1,9 @@ + +CREATE TABLE log_search ( + ls_field TEXT NOT NULL, + ls_value TEXT NOT NULL, + ls_log_id INTEGER NOT NULL DEFAULT 0 +); + +ALTER TABLE log_search ADD CONSTRAINT log_search_pk PRIMARY KEY(ls_field, ls_value, ls_log_id); +CREATE INDEX ls_log_id ON log_search (ls_log_id); diff --git a/maintenance/postgres/archives/patch-update_sequences.sql b/maintenance/postgres/archives/patch-update_sequences.sql new file mode 100644 index 00000000..a3d30681 --- /dev/null +++ b/maintenance/postgres/archives/patch-update_sequences.sql @@ -0,0 +1,20 @@ +ALTER SEQUENCE rev_rev_id_val RENAME TO revision_rev_id_seq; +ALTER TABLE revision ALTER COLUMN rev_id SET DEFAULT NEXTVAL('revision_rev_id_seq'); + +ALTER SEQUENCE text_old_id_val RENAME TO text_old_id_seq; +ALTER TABLE pagecontent ALTER COLUMN old_id SET DEFAULT nextval('text_old_id_seq'); + +ALTER SEQUENCE category_id_seq RENAME TO category_cat_id_seq; +ALTER TABLE category ALTER COLUMN cat_id SET DEFAULT nextval('category_cat_id_seq'); + +ALTER SEQUENCE ipblocks_ipb_id_val RENAME TO ipblocks_ipb_id_seq; +ALTER TABLE ipblocks ALTER COLUMN ipb_id SET DEFAULT nextval('ipblocks_ipb_id_seq'); + +ALTER SEQUENCE rc_rc_id_seq RENAME TO recentchanges_rc_id_seq; +ALTER TABLE recentchanges ALTER COLUMN rc_id SET DEFAULT nextval('recentchanges_rc_id_seq'); + +ALTER SEQUENCE log_log_id_seq RENAME TO logging_log_id_seq; +ALTER TABLE logging ALTER COLUMN log_id SET DEFAULT nextval('logging_log_id_seq'); + +ALTER SEQUENCE pr_id_val RENAME TO page_restrictions_pr_id_seq; +ALTER TABLE page_restrictions ALTER COLUMN pr_id SET DEFAULT nextval('page_restrictions_pr_id_seq'); diff --git a/maintenance/postgres/archives/patch-user_properties.sql b/maintenance/postgres/archives/patch-user_properties.sql new file mode 100644 index 00000000..b40fa85f --- /dev/null +++ b/maintenance/postgres/archives/patch-user_properties.sql @@ -0,0 +1,8 @@ +CREATE TABLE user_properties( + up_user INTEGER NULL REFERENCES mwuser(user_id) ON DELETE CASCADE, + up_property TEXT NOT NULL, + up_value TEXT +); + +CREATE UNIQUE INDEX user_properties_user_property on user_properties (up_user,up_property); +CREATE INDEX user_properties_property on user_properties (up_property); |