Created
June 22, 2011 11:24
-
-
Save hizel/1039906 to your computer and use it in GitHub Desktop.
sql for upgrade jamwiki from 0.9.5 to 1.0.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create the jam_topic_links table. | |
CREATE TABLE jam_topic_links ( | |
topic_id INTEGER NOT NULL, | |
link_topic_name VARCHAR(200) NOT NULL, | |
CONSTRAINT jam_p_topic_links PRIMARY KEY (topic_id, link_topic_name), | |
CONSTRAINT jam_f_tlink_topic_id FOREIGN KEY (topic_id) REFERENCES jam_topic(topic_id) | |
); | |
-- Create the jam_interwiki table. | |
CREATE TABLE jam_interwiki ( | |
interwiki_prefix VARCHAR(30) NOT NULL, | |
interwiki_pattern VARCHAR(200) NOT NULL, | |
interwiki_type INTEGER NOT NULL, | |
CONSTRAINT jam_p_interw PRIMARY KEY (interwiki_prefix) | |
); | |
-- Add new columns to the jam_virtul_wiki table. | |
alter table jam_virtual_wiki add column logo_image_url VARCHAR(200); | |
alter table jam_virtual_wiki add column site_name VARCHAR(200); | |
alter table jam_virtual_wiki add column meta_description VARCHAR(500); | |
-- Drop the NOT NULL constraint on jam_virtual_wiki.default_topic_name. | |
alter table jam_virtual_wiki alter column default_topic_name drop NOT NULL; | |
-- Add indexes to tables. | |
CREATE INDEX jam_i_topic_links_tnm on jam_topic_links (link_topic_name); | |
CREATE INDEX jam_i_category_cti on jam_category (child_topic_id); | |
CREATE INDEX jam_i_topic_cver on jam_topic (current_version_id); | |
CREATE INDEX jam_i_topic_nmsp on jam_topic (namespace_id); | |
CREATE INDEX jam_i_topic_vwiki on jam_topic (virtual_wiki_id); | |
CREATE INDEX jam_i_topicv_prv on jam_topic_version (previous_topic_version_id); | |
CREATE INDEX jam_i_topicv_udisp on jam_topic_version (wiki_user_display); | |
CREATE INDEX jam_i_topicv_uid on jam_topic_version (wiki_user_id); | |
-- Create the jam_configuration table. | |
CREATE TABLE jam_configuration ( | |
config_key VARCHAR(50) NOT NULL, | |
config_value VARCHAR(500) NOT NULL, | |
CONSTRAINT jam_p_config PRIMARY KEY (config_key) | |
); | |
grant all on jam_interwiki to jamwiki; | |
grant all on jam_topic_links to jamwiki; | |
grant all on jam_configuration to jamwiki; | |
-- после обновления БД, зайти в Special:Maintenance и жамкнуть "Regenerate Topic Metadata Records" | |
-- в /WEB-INF/classes/jamwiki.properties выставить wiki-version в "1.0.4" | |
-- изменен CSS, взять из /WEB-INF/classes/pages/StyleSheet | |
-- обновился поисковой движок, в Special:Maintenance пожать ребилд поискового индекса | |
-- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment