ReleaseTwo Schema Changelog 2006

log of data base changes made to officially released packages

Created by: xing, Last modification: 08 Jun 2018 (16:06 UTC) by spiderr

Bitweaver ReleaseTwo Schema changes 2006


This is the first part of the ongoing Schema changes in ReleaseTwo. For more recent changes, please consult SchemaChangeLog

These are ReleaseTwo database changes. DO NOT USE these changes if you are on ReleaseOne. If you need to know the changes for ReleaseOne, see the ReleaseOneSchemaChangelog.

See also:

DateTableReasonWho
13-OCT-2006 liberty Aliases for liberty content modified to allow composite primary key /lsces
SQL92

CREATE TABLE liberty_aliases( content_id INT NOT NULL, alias_title VARCHAR(190),  CONSTRAINT liberty_aliases_content_fkey FOREIGN KEY (content_id) REFERENCES liberty_content(content_id) );
11-OCT-2006 nexus_plugins NexusPackage cleanup /xing
SQL92

DROP TABLE nexus_plugins;
11-OCT-2006 liberty_meta_data LibertyPackage meta data tables - can be used for Fisheye EXIF, etc. /spider
SQL92

CREATE TABLE liberty_meta_types( meta_type_guid VARCHAR(16) PRIMARY KEY, meta_type_title VARCHAR(250) );
CREATE TABLE liberty_meta_data ( content_id INT NOT NULL, meta_type_guid VARCHAR(16) NOT NULL, meta_key VARCHAR(250) NOT NULL, meta_title VARCHAR(250) NOT NULL, meta_value_short VARCHAR(250), meta_value_long TEXT, CONSTRAINT liberty_meta_content_ref FOREIGN KEY (content_id) REFERENCES liberty_content(content_id), CONSTRAINT liberty_meta_guid_ref FOREIGN KEY (meta_type_guid) REFERENCES liberty_meta_types(meta_type_guid) );
11-OCT-2006 blogs Convert Blogs to Content /spider
SQL92

DELETE FROM liberty_content_types  WHERE content_type_guid = 'bitblog';
INSERT INTO liberty_content_types (content_type_guid, content_description, maintainer_url, handler_class, handler_package, handler_file) VALUES ('bitblog', 'Blog', 'http://www.bitweaver.org', 'BitBlog', 'blogs', 'BitBlog.php');
ALTER TABLE blogs ADD content_id INT;
UPDATE blogs SET content_id = nextval('liberty_content_id_seq');
INSERT INTO liberty_content (content_id, title, data, created, last_modified, user_id, modifier_user_id, format_guid, content_type_guid, content_status_id) (SELECT content_id, title, description, created, last_modified, user_id, user_id, 'tikiwiki', 'bitblog', 50 FROM blogs);
INSERT INTO liberty_content_hits (content_id, hits) (SELECT content_id,hits FROM blogs);
ALTER TABLE blogs RENAME public_blog TO is_public;
ALTER TABLE blogs DROP title;
ALTER TABLE blogs DROP description;
ALTER TABLE blogs DROP created;
ALTER TABLE blogs DROP last_modified;
ALTER TABLE blogs DROP user_id;
ALTER TABLE blogs DROP hits;
ALTER TABLE blogs ADD CONSTRAINT blogs_content_id_ref FOREIGN KEY (content_id) REFERENCES liberty_content(content_id);
ALTER TABLE blogs ALTER content_id SET NOT NULL;
06-OCT-2006 liberty Aliases for liberty content /spider
SQL92

CREATE TABLE liberty_aliases( alias_name VARCHAR(250), content_id INT NOT NULL, CONSTRAINT liberty_aliases_content_fkey FOREIGN KEY (content_id) REFERENCES liberty_content(content_id) );
20-SEP-2006 Liberty Content Status /spider
SQL92

CREATE TABLE liberty_content_status ( content_status_id INT4 NOT NULL PRIMARY KEY, content_status_name VARCHAR(128) NOT NULL );
ALTER TABLE liberty_content ADD COLUMN content_status_id INT4;
ALTER TABLE liberty_content ADD CONSTRAINT libert_content_status_ref FOREIGN KEY (content_status_id) REFERENCES liberty_content_status(content_status_id);
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (-999, 'Deleted');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (-998, 'Spam');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (-201, 'Suspended');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (-100, 'Denied');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (-40, 'Private');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (-30, 'Password Protected');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (-20, 'Group Protected');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (-10, 'Hidden');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (10, 'Draft');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (50, 'Available');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (101, 'Pending Approval');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (102, 'Commercial');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (200, 'Recommended');
INSERT INTO liberty_content_status (content_status_id,content_status_name) VALUES (999, 'Copy Protected');
UPDATE liberty_content SET content_status_id=50;
ALTER TABLE liberty_content ALTER content_status_id SET NOT NULL;
15-SEP-2006 LibertyPackage clean up liberty_action_log table and make use of it in liberty /xing
SQL92

ALTER TABLE liberty_action_log RENAME COLUMN log_action TO log_message;
ALTER TABLE liberty_action_log RENAME COLUMN action_comment TO error_message; -- change column action_error to have a char length limit of 250 chars
ALTER TABLE liberty_action_log ALTER COLUMN error_message TYPE VARCHAR(250);
ALTER TABLE liberty_action_log ALTER content_id DROP NOT NULL;
13-SEP-2006 StarsPackage reverted to original stars version and forked version rating stars to superstars /xing
Please revert all stars changes in here if you want to use bitweaver version of stars or download and use _bit_superstars
09-SEP-2006 StarsPackage remove stars table, add update_count colums to stars_version and stars_history, add indexs to enforce unique constraints /jht001
SQL 92

drop table stars;
ALTER TABLE stars_version ADD COLUMN update_count INT4 default 0;
ALTER TABLE stars_history ADD COLUMN update_count INT4 default 0;
ALTER TABLE stars_version ADD PRIMARY KEY(content_id,version);
ALTER TABLE stars_history ADD PRIMARY KEY(content_id,version,user_id);
06-SEP-2006 FisheyePackage add image position fractional ordering to image galleries /spider
SQL 92

ALTER TABLE fisheye_gallery_image_map RENAME item_position TO old_position;
ALTER TABLE fisheye_gallery_image_map ADD COLUMN item_position FLOAT;
UPDATE fisheye_gallery_image_map SET item_position = old_position;
ALTER TABLE fisheye_gallery_image_map DROP COLUMN old_position;
21-AUG-2006 UsersPackage add password expiration /jht001
SQL 92

ALTER TABLE users_users ADD COLUMN provpass_expires INT8;
21-AUG-2006 StarsPackage add perversion ratings /hash9
SQL 92

CREATE TABLE stars_version ( content_id INTEGER NOT NULL, version INTEGER NOT NULL, rating_count INTEGER, rating INTEGER, CONSTRAINT stars_version_ref FOREIGN KEY (content_id) REFERENCES liberty_content( content_id ));
ALTER TABLE stars_history ADD COLUMN version INTEGER NOT NULL;
18-AUG-2006 LibertyPackage move highly volatile hits columns out of liberty_content and into a separate table /jht001 and /spiderr
SQL 92

CREATE TABLE liberty_content_hits ( content_id INTEGER PRIMARY KEY, hits INTEGER NOT NULL DEFAULT 1, last_hit BIGINT, CONSTRAINT liberty_content_hits_ref FOREIGN KEY (content_id) REFERENCES liberty_content( content_id ));
INSERT INTO liberty_content_hits ( content_id, hits, last_hit ) (SELECT content_id, hits, last_hit FROM liberty_content);
ALTER TABLE liberty_content DROP hits;
ALTER TABLE liberty_content DROP last_hit;
26-JUL-2006 LibertyPackage Add anonymous name to comments /Hash9
SQL 92

ALTER TABLE liberty_comments ADD anon_name VARCHAR(40);
17-JUL-2006 UsersPackage Improve users_cnxn to record user assumption ID /spider
SQL 92

ALTER TABLE users_cnxn ADD assume_from_user_id INT;
10-JUL-2006 multisites added per site content restricitions /nickpalmer
CREATE

CREATE TABLE multisite_content ( multisite_id INTEGER NOT NULL, content_id INTEGER NOT NULL , CONSTRAINT multisite_content_ref FOREIGN KEY (content_id) REFERENCES liberty_content( content_id ) , CONSTRAINT multisite_multisite_ref FOREIGN KEY (multisite_id) REFERENCES multisites( multisite_id ), PRIMARY KEY (multisite_id, content_id) );
INSERT INTO `kernel_config`(`package`,`config_name`,`config_value`) VALUES ('multisites', 'multisites_per_site_content','y');
INSERT INTO `kernel_config`(`package`,`config_name`,`config_value`) VALUES ('multisites', 'multisites_use_jstab','y');
INSERT INTO `kernel_config`(`package`,`config_name`,`config_value`) VALUES ('multistes', 'multisites_limit_member_number','10');
INSERT INTO `users_permissions` (`perm_name`, `perm_desc`, `perm_level`, `package`) VALUES ('p_multisites_restrict_content', 'Can restrict content to certain sites', 'editor', 'multisites');
INSERT INTO `users_permissions` (`perm_name`, `perm_desc`, `perm_level`, `package`) VALUES ('p_multisites_view_restricted', 'Can view all site restricted content', 'admin', 'multisites');
12-JUN-2006 fisheye image comment - no more useful after spider changes /sylvie
SQL 92

OBSOLETE: ALTER TABLE fisheye_gallery ADD COLUMN image_comment VARCHAR(1);
12-MAY-2006 shoutbox record IP /spider
SQL 92

ALTER TABLE shoutbox ADD COLUMN shout_ip VARCHAR(16);
12-MAY-2006users_permissions, users_group_permissionsp_wiki_view_history/sylvie
SQL 92

INSERT INTO `users_permissions` (`perm_name`,`perm_desc`, `perm_level`, `package`) VALUES ('p_wiki_view_history', 'Can view page history', 'basic', 'wiki');
INSERT INTO `users_group_permissions` (`group_id`, `perm_name`) VALUES (-1,'p_wiki_view_history');
8-MAY-2006users_groupsto have a after registration page/sylvie
SQL 92

ALTER TABLE users_groups ADD COLUMN after_registration_page varchar(255);
5-MAY-2006liberty_pluginsadd plugin_path column that plugins can be kept in any directory without having to scan for them when parsing/xing
SQL 92

ALTER TABLE liberty_plugins ADD COLUMN plugin_path varchar(250);
5-MAY-2006liberty_content_prefsrename some liberty_content_prefs column for consistency/xing
SQL 92

ALTER TABLE liberty_content_prefs RENAME COLUMN name TO pref_name;
30-APRIL-2006liberty_content_prefsrename some liberty_content_prefs settings for consistency/xing
SQL 92

UPDATE liberty_content_prefs SET name='users_country' WHERE name='country';
UPDATE liberty_content_prefs SET name='users_homepage' WHERE name='homePage';
UPDATE liberty_content_prefs SET name='users_double_click' WHERE name='user_dbl';
UPDATE liberty_content_prefs SET name='users_bread_crumb' WHERE name='userbreadCrumb';
UPDATE liberty_content_prefs SET name='users_information' WHERE name='user_information';
UPDATE liberty_content_prefs SET name='users_email_display' WHERE name='email is public';
UPDATE liberty_content_prefs SET name='messages_max_records' WHERE name='mess_max_records';
UPDATE liberty_content_prefs SET name='messages_min_priority' WHERE name='minPrio';
UPDATE liberty_content_prefs SET name='messages_alert' WHERE name='message_alert';
19-APRIL-2006kernel_configmore kernel_config settings renamed for consistency/xing
SQL 92

UPDATE kernel_config SET config_name='site_session_lifetime' WHERE config_name='session_lifetime';
UPDATE kernel_config SET config_name='site_use_load_threshold' WHERE config_name='use_load_threshold';
UPDATE kernel_config SET config_name='site_load_threshold' WHERE config_name='load_threshold';
UPDATE kernel_config SET config_name='site_output_obzip' WHERE config_name='output_obzip';
UPDATE kernel_config SET config_name='site_help_popup' WHERE config_name='help_popup';
UPDATE kernel_config SET config_name='site_store_session_db' WHERE config_name='session_db';
UPDATE kernel_config SET config_name='site_use_proxy' WHERE config_name='use_proxy';
UPDATE kernel_config SET config_name='site_proxy_host' WHERE config_name='proxy_host';
UPDATE kernel_config SET config_name='site_proxy_port' WHERE config_name='proxy_port';
UPDATE kernel_config SET config_name='site_user_assigned_modules' WHERE config_name='user_assigned_modules';
UPDATE kernel_config SET config_name='site_http_domain' WHERE config_name='http_domain';
UPDATE kernel_config SET config_name='site_https_domain' WHERE config_name='https_domain';
UPDATE kernel_config SET config_name='site_https_login' WHERE config_name='https_login';
UPDATE kernel_config SET config_name='site_https_login_required' WHERE config_name='https_login_required';
UPDATE kernel_config SET config_name='site_direct_pagination' WHERE config_name='direct_pagination';
UPDATE kernel_config SET config_name='site_edit_help' WHERE config_name='wiki_help';
UPDATE kernel_config SET config_name='site_form_help' WHERE config_name='help_notes';
UPDATE kernel_config SET config_name='site_long_date_format' WHERE config_name='long_date_format';
UPDATE kernel_config SET config_name='site_long_time_format' WHERE config_name='long_time_format';
UPDATE kernel_config SET config_name='site_short_date_format' WHERE config_name='short_date_format';
UPDATE kernel_config SET config_name='site_short_time_format' WHERE config_name='short_time_format';
UPDATE kernel_config SET config_name='site_display_timezone' WHERE config_name='display_timezone';
UPDATE kernel_config SET config_name='site_upload_dir' WHERE config_name='centralized_upload_dir';
UPDATE kernel_config SET config_name='site_temp_dir' WHERE config_name='temp_dir';
UPDATE kernel_config SET config_name='site_http_port' WHERE config_name='http_port';
UPDATE kernel_config SET config_name='site_http_prefix' WHERE config_name='http_prefix';
UPDATE kernel_config SET config_name='site_https_port' WHERE config_name='https_port';
UPDATE kernel_config SET config_name='site_https_prefix' WHERE config_name='https_prefix';
UPDATE kernel_config SET config_name='site_sender_email' WHERE config_name='sender_email';
UPDATE kernel_config SET config_name='site_url_index' WHERE config_name='url_index';
UPDATE kernel_config SET config_name='site_online_help' WHERE config_name='help';
UPDATE kernel_config SET config_name='auth_ldap_userdn' WHERE config_name='users_ldap_userdn';
UPDATE kernel_config SET config_name='auth_ldap_memberisdn' WHERE config_name='users_ldap_memberisdn';
UPDATE kernel_config SET config_name='auth_ldap_groupdn' WHERE config_name='users_ldap_groupdn';
UPDATE kernel_config SET config_name='auth_ldap_basedn' WHERE config_name='users_ldap_basedn';
UPDATE kernel_config SET config_name='auth_ldap_adminuser' WHERE config_name='users_ldap_adminuser';
UPDATE kernel_config SET config_name='auth_ldap_adminpass' WHERE config_name='users_ldap_adminpass';
UPDATE kernel_config SET config_name='auth_ldap_groupattr' WHERE config_name='users_ldap_groupattr';
UPDATE kernel_config SET config_name='auth_ldap_groupoc' WHERE config_name='users_ldap_groupoc';
UPDATE kernel_config SET config_name='auth_ldap_host' WHERE config_name='users_ldap_host';
UPDATE kernel_config SET config_name='auth_ldap_memberattr' WHERE config_name='users_ldap_memberattr';
UPDATE kernel_config SET config_name='auth_ldap_port' WHERE config_name='users_ldap_port';
UPDATE kernel_config SET config_name='auth_ldap_scope' WHERE config_name='users_ldap_scope';
UPDATE kernel_config SET config_name='auth_ldap_userattr' WHERE config_name='users_ldap_userattr';
UPDATE kernel_config SET config_name='auth_ldap_useroc' WHERE config_name='users_ldap_useroc';
UPDATE kernel_config SET config_name='auth_method' WHERE config_name='users_auth_method';
UPDATE kernel_config SET config_name='auth_skip_admin' WHERE config_name='users_auth_skip_admin';
UPDATE kernel_config SET config_name='auth_create_gBitDbUser' WHERE config_name='users_auth_create_gBitDbUser';
UPDATE kernel_config SET config_name='auth_create_user_auth' WHERE config_name='users_auth_create_user_auth';
UPDATE kernel_config SET config_name='webserverauth' WHERE config_name='users_webserverauth';
UPDATE kernel_config SET config_name='count_admin_pvs' WHERE config_name='users_count_admin_pageviews';
UPDATE kernel_config SET config_name='allow_register' WHERE config_name='users_allow_register';
UPDATE kernel_config SET config_name='forgot_pass' WHERE config_name='users_forgot_pass';
UPDATE kernel_config SET config_name='pass_due' WHERE config_name='users_pass_due';
UPDATE kernel_config SET config_name='rememberme' WHERE config_name='users_remember_me';
UPDATE kernel_config SET config_name='remembertime' WHERE config_name='users_remember_time';
UPDATE kernel_config SET config_name='userfiles_quota' WHERE config_name='users_userfiles_quota';
UPDATE kernel_config SET config_name='uf_use_db' WHERE config_name='users_uf_use_db';
UPDATE kernel_config SET config_name='min_pass_length' WHERE config_name='users_min_pass_length';
UPDATE kernel_config SET config_name='change_language' WHERE config_name='users_change_language';
UPDATE kernel_config SET config_name='case_sensitive_login' WHERE config_name='users_case_sensitive_login';
UPDATE kernel_config SET config_name='user_watches' WHERE config_name='users_watches';
UPDATE kernel_config SET config_name='custom_home' WHERE config_name='users_custom_home';
UPDATE kernel_config SET config_name='clear_passwords' WHERE config_name='users_clear_passwords';
UPDATE kernel_config SET config_name='validate_email' WHERE config_name='users_validate_email';
UPDATE kernel_config SET config_name='validate_user' WHERE config_name='users_validate_user';
UPDATE kernel_config SET config_name='use_register_passcode' WHERE config_name='users_register_passcode';
UPDATE kernel_config SET config_name='rnd_num_reg' WHERE config_name='users_random_number_reg';
UPDATE kernel_config SET config_name='register_passcode' WHERE config_name='users_register_passcode';
UPDATE kernel_config SET config_name='pass_chr_num' WHERE config_name='users_pass_chr_num';
UPDATE kernel_config SET config_name='eponymous_groups' WHERE config_name='users_eponymous_groups';
UPDATE kernel_config SET config_name='display_name' WHERE config_name='users_display_name';
17-APRIL-2006kernel_configmore kernel_config settings renamed for consistency/xing
SQL 92

UPDATE kernel_config SET config_name='site_slide_style' WHERE config_name='slide_style';
UPDATE kernel_config SET config_name='site_top_bar_dropdown' WHERE config_name='top_bar_dropdown';
UPDATE kernel_config SET config_name='site_show_all_modules_always' WHERE config_name='modallgroups';
UPDATE kernel_config SET config_name='site_disable_jstabs' WHERE config_name='disable_jstabs';
UPDATE kernel_config SET config_name='site_bot_bar' WHERE config_name='bot_bar';
UPDATE kernel_config SET config_name='site_top_bar' WHERE config_name='top_bar';
UPDATE kernel_config SET config_name='site_left_column' WHERE config_name='left_column';
UPDATE kernel_config SET config_name='site_right_column' WHERE config_name='right_column';
UPDATE kernel_config SET config_name='site_biticon_display_style' WHERE config_name='biticon_display';
UPDATE kernel_config SET config_name='site_disable_fat' WHERE config_name='disable_fat';
UPDATE kernel_config SET config_name='site_hide_my_top_bar_link' WHERE config_name='hide_my_top_bar_link';
UPDATE kernel_config SET config_name='site_collapsible_modules' WHERE config_name='themes_collapsible_modules';
UPDATE kernel_config SET config_name='site_module_controls' WHERE config_name='themes_module_controls';
The above changes will probably require changes to your templates if you have a custom theme. in particular, you will probably have to apply the following changes:

<?php
top_bar_dropdown    
-->   site_top_bar_dropdown
bot_bar             
-->   site_bot_bar
top_bar             
-->   site_top_bar
left_column         
-->   site_left_column
right_column        
-->   site_right_column
?>
14-APRIL-2006kernel_configmore kernel_config settings renamed for consistency/xing
SQL 92

UPDATE kernel_config SET config_name='articles_list_author' WHERE config_name='art_list_author';
UPDATE kernel_config SET config_name='articles_list_date' WHERE config_name='art_list_date';
UPDATE kernel_config SET config_name='articles_list_img' WHERE config_name='art_list_img';
UPDATE kernel_config SET config_name='articles_list_reads' WHERE config_name='art_list_reads';
UPDATE kernel_config SET config_name='articles_list_size' WHERE config_name='art_list_size';
UPDATE kernel_config SET config_name='articles_list_title' WHERE config_name='art_list_title';
UPDATE kernel_config SET config_name='articles_list_topic' WHERE config_name='art_list_topic';
UPDATE kernel_config SET config_name='articles_list_type' WHERE config_name='art_list_type';
UPDATE kernel_config SET config_name='articles_list_expire' WHERE config_name='art_list_expire';
UPDATE kernel_config SET config_name='articles_max_list' WHERE config_name='max_articles';
UPDATE kernel_config SET config_name='articles_rankings' WHERE config_name='cms_rankings';
UPDATE kernel_config SET config_name='articles_submissions' WHERE config_name='article_submissions';
UPDATE kernel_config SET config_name='articles_description_length' WHERE config_name='article_description_length';
UPDATE kernel_config SET config_name='articles_date_threshold' WHERE config_name='article_date_threshold';

UPDATE kernel_config SET config_name='wiki_backlinks' WHERE config_name='backlinks';
UPDATE kernel_config SET config_name='wiki_allow_dup_page_names' WHERE config_name='allow_dup_wiki_page_names';
UPDATE kernel_config SET config_name='wiki_page_title' WHERE config_name='page_title';
UPDATE kernel_config SET config_name='wiki_sandbox' WHERE config_name='sandbox';
UPDATE kernel_config SET config_name='wiki_attachments_use_db' WHERE config_name='w_use_db';
UPDATE kernel_config SET config_name='wiki_attachments_use_dir' WHERE config_name='w_use_dir';
UPDATE kernel_config SET config_name='wiki_warn_on_edit_time' WHERE config_name='warn_on_edit_time';
UPDATE kernel_config SET config_name='wiki_book_show_path' WHERE config_name='wikibook_show_path';
UPDATE kernel_config SET config_name='wiki_book_show_navigation' WHERE config_name='wikibook_show_navigation';
UPDATE kernel_config SET config_name='wiki_min_versions' WHERE config_name='keep_versions';
UPDATE kernel_config SET config_name='wiki_max_versions' WHERE config_name='max_versions';

UPDATE kernel_config SET config_name='messages_site_contact' WHERE config_name='site_contact';
UPDATE kernel_config SET config_name='messages_contact_user' WHERE config_name='contact_user';
UPDATE kernel_config SET config_name='chatterbox_prune_threshold' WHERE config_name='prune_threshold';
UPDATE kernel_config SET config_name='languages_record_untranslated' WHERE config_name='record_untranslated';
UPDATE kernel_config SET config_name='hotwords_new_window' WHERE config_name='hotwords_nw';
UPDATE kernel_config SET config_name='blog_posts_comments' WHERE config_name='blogposts_comments';
UPDATE kernel_config SET config_name='pigeonholes_display_members' WHERE config_name='display_pigeonhole_members';
UPDATE kernel_config SET config_name='pigeonholes_limit_member_number' WHERE config_name='limit_member_number';
UPDATE kernel_config SET config_name='pgv_session_time' WHERE config_name='pgv_session_time';
UPDATE kernel_config SET config_name='pgv_calendar_format' WHERE config_name='calendar_format';
UPDATE kernel_config SET config_name='pgv_default_pedigree_generations' WHERE config_name='default_pedigree_generations';
UPDATE kernel_config SET config_name='pgv_max_pedigree_generations' WHERE config_name='max_pedigree_generations';
UPDATE kernel_config SET config_name='pgv_max_descendancy_generations' WHERE config_name='max_descendancy_generations';
UPDATE kernel_config SET config_name='pgv_use_RIN' WHERE config_name='use_RIN';
UPDATE kernel_config SET config_name='pgv_pedigree_root_id' WHERE config_name='pedigree_root_id';
UPDATE kernel_config SET config_name='pgv_gedcom_prefix_id' WHERE config_name='gedcom_prefix_id';
UPDATE kernel_config SET config_name='pgv_source_prefix_id' WHERE config_name='source_prefix_id';
UPDATE kernel_config SET config_name='pgv_repo_prefix_id' WHERE config_name='repo_prefix_id';
UPDATE kernel_config SET config_name='pgv_fam_prefix_id' WHERE config_name='fam_prefix_id';
UPDATE kernel_config SET config_name='pgv_media_prefix_id' WHERE config_name='media_prefix_id';
UPDATE kernel_config SET config_name='stats_referers' WHERE config_name='referer_stats';
UPDATE kernel_config SET config_name='liberty_cache_images' WHERE config_name='cacheimages';
UPDATE kernel_config SET config_name='liberty_cache_pages' WHERE config_name='cachepages';
UPDATE kernel_config SET config_name='tidbits_banning' WHERE config_name='banning';
UPDATE kernel_config SET config_name='tidbits_userfiles' WHERE config_name='user_files';
UPDATE kernel_config SET config_name='tidbits_userfiles_use_dir' WHERE config_name='uf_use_dir';
UPDATE kernel_config SET config_name='tidbits_tasks' WHERE config_name='feature_tasks';
UPDATE kernel_config SET config_name='tidbits_usermenu' WHERE config_name='usermenu';
UPDATE kernel_config SET config_name='tidbits_bookmarks' WHERE config_name='user_bookmarks';
5-APRIL-2006kernel_configchange kernel_prefs to kernel_config, name => config_name, pref_value=>config_value for consistency and avoid confusion with content_prefs/spider
SQL 92

ALTER TABLE kernel_prefs RENAME TO kernel_config;
ALTER TABLE kernel_config RENAME name TO config_name;
ALTER TABLE kernel_config RENAME pref_value TO config_value;
5-APRIL-2006users_permissionsrename permissions to us a common standard/xing
SQL 92

-- Real databases will need to drop their foreign key
-- ALTER TABLE users_group_permissions DROP CONSTRAINT USERS_GROUP_PERM_PERM_REF;

UPDATE users_permissions SET perm_name='p_shoutbox_view' WHERE perm_name='bit_p_view_shoutbox';
UPDATE users_permissions SET perm_name='p_shoutbox_admin' WHERE perm_name='bit_p_admin_shoutbox';
UPDATE users_permissions SET perm_name='p_shoutbox_post' WHERE perm_name='bit_p_post_shoutbox';

UPDATE users_permissions SET perm_name='p_xmlrpc_send_content' WHERE perm_name='bit_p_send_pages';
UPDATE users_permissions SET perm_name='p_xmlrpc_sendme_content' WHERE perm_name='bit_p_sendme_pages';
UPDATE users_permissions SET perm_name='p_xmlrpc_admin_content' WHERE perm_name='bit_p_admin_received_pages';

UPDATE users_permissions SET perm_name='p_admin' WHERE perm_name='bit_p_admin';
UPDATE users_permissions SET perm_name='p_access_closed_site' WHERE perm_name='bit_p_access_closed_site';

UPDATE users_permissions SET perm_name='p_gatekeeper_create' WHERE perm_name='bit_p_create_gatekeeper';
UPDATE users_permissions SET perm_name='p_gatekeeper_edit' WHERE perm_name='bit_p_gatekeeper_edit';
UPDATE users_permissions SET perm_name='p_gatekeeper_admin' WHERE perm_name='bit_p_gatekeeper_admin';
UPDATE users_permissions SET perm_name='p_gatekeeper_read' WHERE perm_name='bit_p_read_gatekeeper';

UPDATE users_permissions SET perm_name='p_calendar_view' WHERE perm_name='bit_p_view_calendar';

UPDATE users_permissions SET perm_name='p_sample_admin' WHERE perm_name='bit_p_admin_sample';
UPDATE users_permissions SET perm_name='p_sample_create' WHERE perm_name='bit_p_create_sample';
UPDATE users_permissions SET perm_name='p_sample_edit' WHERE perm_name='bit_p_edit_sample';
UPDATE users_permissions SET perm_name='p_sample_read' WHERE perm_name='bit_p_read_sample';
UPDATE users_permissions SET perm_name='p_sample_remove' WHERE perm_name='bit_p_remove_sample';

UPDATE users_permissions SET perm_name='p_categories_admin' WHERE perm_name='bit_p_admin_categories';
UPDATE users_permissions SET perm_name='p_categories_view' WHERE perm_name='bit_p_view_categories';

UPDATE users_permissions SET perm_name='p_tidbits_admin_banning' WHERE perm_name='bit_p_admin_banning';
UPDATE users_permissions SET perm_name='p_tidbits_upload_userfiles' WHERE perm_name='bit_p_userfiles';
UPDATE users_permissions SET perm_name='p_tidbits_create_bookmarks' WHERE perm_name='bit_p_create_bookmarks';
UPDATE users_permissions SET perm_name='p_tidbits_cache_bookmarks' WHERE perm_name='bit_p_cache_bookmarks';
UPDATE users_permissions SET perm_name='p_tidbits_configure_modules' WHERE perm_name='bit_p_configure_modules';
UPDATE users_permissions SET perm_name='p_tidbits_use_usermenu' WHERE perm_name='bit_p_usermenu';
UPDATE users_permissions SET perm_name='p_tidbits_use_tasks' WHERE perm_name='bit_p_tasks';
UPDATE users_permissions SET perm_name='p_tidbits_custom_home_theme' WHERE perm_name='bit_p_custom_home_theme';
UPDATE users_permissions SET perm_name='p_tidbits_custom_home_layout' WHERE perm_name='bit_p_custom_home_layout';
UPDATE users_permissions SET perm_name='p_tidbits_use_custom_css' WHERE perm_name='bit_p_custom_css';
UPDATE users_permissions SET perm_name='p_tidbits_edit_fortune_cookies' WHERE perm_name='bit_p_edit_cookies';

UPDATE users_permissions SET perm_name='p_quota_create' WHERE perm_name='bit_p_create_quota';
UPDATE users_permissions SET perm_name='p_quota_edit' WHERE perm_name='bit_p_quota_edit';
UPDATE users_permissions SET perm_name='p_quota_admin' WHERE perm_name='bit_p_quota_admin';
UPDATE users_permissions SET perm_name='p_quota_read' WHERE perm_name='bit_p_read_quota';

UPDATE users_permissions SET perm_name='p_smileys_use' WHERE perm_name='bit_p_use_smileys';

UPDATE users_permissions SET perm_name='p_chatterbox_use' WHERE perm_name='bit_p_use_chatterbox';

UPDATE users_permissions SET perm_name='p_fisheye_view' WHERE perm_name='bit_p_view_fisheye';
UPDATE users_permissions SET perm_name='p_fisheye_create' WHERE perm_name='bit_p_create_fisheye';
UPDATE users_permissions SET perm_name='p_fisheye_edit' WHERE perm_name='bit_p_edit_fisheye';
UPDATE users_permissions SET perm_name='p_fisheye_upload' WHERE perm_name='bit_p_upload_fisheye';
UPDATE users_permissions SET perm_name='p_fisheye_admin' WHERE perm_name='bit_p_admin_fisheye';
UPDATE users_permissions SET perm_name='p_fisheye_upload_nonimages' WHERE perm_name='bit_p_fisheye_upload_nonimages';

UPDATE users_permissions SET perm_name='p_languages_create' WHERE perm_name='bit_p_create_languages';
UPDATE users_permissions SET perm_name='p_languages_edit' WHERE perm_name='bit_p_edit_languages';
UPDATE users_permissions SET perm_name='p_languages_delete' WHERE perm_name='bit_p_delete_languages';
UPDATE users_permissions SET perm_name='p_languages_edit_master' WHERE perm_name='bit_p_edit_master_strings';
UPDATE users_permissions SET perm_name='p_languages_import' WHERE perm_name='bit_p_import_languages';

UPDATE users_permissions SET perm_name='p_users_assign_group_perms' WHERE perm_name='bit_p_user_group_perms';
UPDATE users_permissions SET perm_name='p_users_assign_group_members' WHERE perm_name='bit_p_user_group_members';
UPDATE users_permissions SET perm_name='p_users_group_subgroups' WHERE perm_name='bit_p_user_group_subgroups';
UPDATE users_permissions SET perm_name='p_users_admin' WHERE perm_name='bit_p_admin_users';
UPDATE users_permissions SET perm_name='p_users_view_icons_and_tools' WHERE perm_name='bit_p_view_tabs_and_tools';
UPDATE users_permissions SET perm_name='p_users_create_personal_groups' WHERE perm_name='bit_p_create_personal_groups';
UPDATE users_permissions SET perm_name='p_users_view_user_list' WHERE perm_name='bit_p_view_user_list';
UPDATE users_permissions SET perm_name='p_users_view_user_homepage' WHERE perm_name='bit_p_view_user_homepage';
UPDATE users_permissions SET perm_name='p_users_edit_user_homepage' WHERE perm_name='bit_p_edit_user_homepage';

UPDATE users_permissions SET perm_name='p_galaxia_admin' WHERE perm_name='bit_p_admin_workflow';
UPDATE users_permissions SET perm_name='p_galaxia_abort_instance' WHERE perm_name='bit_p_abort_instance';
UPDATE users_permissions SET perm_name='p_galaxia_use' WHERE perm_name='bit_p_use_workflow';
UPDATE users_permissions SET perm_name='p_galaxia_exception_instance' WHERE perm_name='bit_p_exception_instance';
UPDATE users_permissions SET perm_name='p_galaxia_send_instance' WHERE perm_name='bit_p_send_instance';

UPDATE users_permissions SET perm_name='p_newsletters_admin' WHERE perm_name='bit_p_admin_newsletters';
UPDATE users_permissions SET perm_name='p_newsletters_create' WHERE perm_name='bit_p_create_newsletters';
UPDATE users_permissions SET perm_name='p_newsletters_create_editions' WHERE perm_name='bit_p_create_editions';
UPDATE users_permissions SET perm_name='p_newsletters_subscribe' WHERE perm_name='bit_p_subscribe_newsletters';
UPDATE users_permissions SET perm_name='p_newsletters_subscribe_email' WHERE perm_name='bit_p_subscribe_email';

UPDATE users_permissions SET perm_name='p_blogs_create' WHERE perm_name='bit_p_create_blogs';
UPDATE users_permissions SET perm_name='p_blogs_create_public_blog' WHERE perm_name='bit_p_create_public_blog';
UPDATE users_permissions SET perm_name='p_blogs_post' WHERE perm_name='bit_p_blog_post';
UPDATE users_permissions SET perm_name='p_blogs_admin' WHERE perm_name='bit_p_blog_admin';
UPDATE users_permissions SET perm_name='p_blogs_view' WHERE perm_name='bit_p_read_blog';

UPDATE users_permissions SET perm_name='p_pdf_generation' WHERE perm_name='bit_p_pdf_generation';

UPDATE users_permissions SET perm_name='p_messages_send' WHERE perm_name='bit_p_messages';

UPDATE users_permissions SET perm_name='p_wiki_edit_dynvar' WHERE perm_name='bit_p_edit_dynvar';
UPDATE users_permissions SET perm_name='p_wiki_edit_page' WHERE perm_name='bit_p_edit';
UPDATE users_permissions SET perm_name='p_wiki_view_page' WHERE perm_name='bit_p_view';
UPDATE users_permissions SET perm_name='p_wiki_remove_page' WHERE perm_name='bit_p_remove';
UPDATE users_permissions SET perm_name='p_wiki_rollback' WHERE perm_name='bit_p_rollback';
UPDATE users_permissions SET perm_name='p_wiki_admin' WHERE perm_name='bit_p_admin_wiki';
UPDATE users_permissions SET perm_name='p_wiki_admin_attachments' WHERE perm_name='bit_p_wiki_admin_attachments';
UPDATE users_permissions SET perm_name='p_wiki_view_attachments' WHERE perm_name='bit_p_wiki_view_attachments';
UPDATE users_permissions SET perm_name='p_wiki_upload_picture' WHERE perm_name='bit_p_upload_picture';
UPDATE users_permissions SET perm_name='p_wiki_save_minor' WHERE perm_name='bit_p_minor';
UPDATE users_permissions SET perm_name='p_wiki_rename_page' WHERE perm_name='bit_p_rename';
UPDATE users_permissions SET perm_name='p_wiki_lock_page' WHERE perm_name='bit_p_lock';
UPDATE users_permissions SET perm_name='p_wiki_edit_book' WHERE perm_name='bit_p_edit_books';
UPDATE users_permissions SET perm_name='p_wiki_admin_book' WHERE perm_name='bit_p_admin_books';
UPDATE users_permissions SET perm_name='p_wiki_edit_copyright' WHERE perm_name='bit_p_edit_copyrights';

UPDATE users_permissions SET perm_name='p_pigeonholes_view' WHERE perm_name='bit_p_view_pigeonholes';
UPDATE users_permissions SET perm_name='p_pigeonholes_insert_member' WHERE perm_name='bit_p_insert_pigeonhole_member';
UPDATE users_permissions SET perm_name='p_pigeonholes_edit' WHERE perm_name='bit_p_edit_pigeonholes';

UPDATE users_permissions SET perm_name='p_stickies_edit' WHERE perm_name='bit_p_stickies_edit';
UPDATE users_permissions SET perm_name='p_stickies_admin' WHERE perm_name='bit_p_stickies_admin';

UPDATE users_permissions SET perm_name='p_stats_view_referer' WHERE perm_name='bit_p_view_referer_stats';
UPDATE users_permissions SET perm_name='p_stats_view' WHERE perm_name='bit_p_view_stats';

UPDATE users_permissions SET perm_name='p_liberty_edit_html_style' WHERE perm_name='bit_p_edit_html_style';
UPDATE users_permissions SET perm_name='p_liberty_post_comments' WHERE perm_name='bit_p_post_comments';
UPDATE users_permissions SET perm_name='p_liberty_read_comments' WHERE perm_name='bit_p_read_comments';
UPDATE users_permissions SET perm_name='p_liberty_remove_comments' WHERE perm_name='bit_p_remove_comments';
UPDATE users_permissions SET perm_name='p_liberty_vote_comments' WHERE perm_name='bit_p_vote_comments';
UPDATE users_permissions SET perm_name='p_liberty_edit_comments' WHERE perm_name='bit_p_edit_comments';
UPDATE users_permissions SET perm_name='p_liberty_attach_attachments' WHERE perm_name='bit_p_content_attachments';
UPDATE users_permissions SET perm_name='p_liberty_detach_attachment' WHERE perm_name='bit_p_detach_attachment';
UPDATE users_permissions SET perm_name='p_liberty_print' WHERE perm_name='bit_p_print';

UPDATE users_permissions SET perm_name='p_articles_edit' WHERE perm_name='bit_p_edit_article';
UPDATE users_permissions SET perm_name='p_articles_remove' WHERE perm_name='bit_p_remove_article';
UPDATE users_permissions SET perm_name='p_articles_read' WHERE perm_name='bit_p_read_article';
UPDATE users_permissions SET perm_name='p_articles_submit' WHERE perm_name='bit_p_submit_article';
UPDATE users_permissions SET perm_name='p_articles_edit_submission' WHERE perm_name='bit_p_edit_submission';
UPDATE users_permissions SET perm_name='p_articles_remove_submission' WHERE perm_name='bit_p_remove_submission';
UPDATE users_permissions SET perm_name='p_articles_approve_submission' WHERE perm_name='bit_p_approve_submission';
UPDATE users_permissions SET perm_name='p_articles_send' WHERE perm_name='bit_p_send_articles';
UPDATE users_permissions SET perm_name='p_articles_sendme' WHERE perm_name='bit_p_sendme_articles';
UPDATE users_permissions SET perm_name='p_articles_auto_approve' WHERE perm_name='bit_p_autoapprove_submission';
UPDATE users_permissions SET perm_name='p_articles_admin' WHERE perm_name='bit_p_admin_articles';

UPDATE users_permissions SET perm_name='p_nexus_insert_item' WHERE perm_name='bit_p_insert_nexus_item';
UPDATE users_permissions SET perm_name='p_nexus_create_menus' WHERE perm_name='bit_p_create_nexus_menus';


UPDATE users_group_permissions SET perm_name='p_shoutbox_view' WHERE perm_name='bit_p_view_shoutbox';
UPDATE users_group_permissions SET perm_name='p_shoutbox_admin' WHERE perm_name='bit_p_admin_shoutbox';
UPDATE users_group_permissions SET perm_name='p_shoutbox_post' WHERE perm_name='bit_p_post_shoutbox';

UPDATE users_group_permissions SET perm_name='p_xmlrpc_send_content' WHERE perm_name='bit_p_send_pages';
UPDATE users_group_permissions SET perm_name='p_xmlrpc_sendme_content' WHERE perm_name='bit_p_sendme_pages';
UPDATE users_group_permissions SET perm_name='p_xmlrpc_admin_content' WHERE perm_name='bit_p_admin_received_pages';

UPDATE users_group_permissions SET perm_name='p_admin' WHERE perm_name='bit_p_admin';
UPDATE users_group_permissions SET perm_name='p_access_closed_site' WHERE perm_name='bit_p_access_closed_site';

UPDATE users_group_permissions SET perm_name='p_gatekeeper_create' WHERE perm_name='bit_p_create_gatekeeper';
UPDATE users_group_permissions SET perm_name='p_gatekeeper_edit' WHERE perm_name='bit_p_gatekeeper_edit';
UPDATE users_group_permissions SET perm_name='p_gatekeeper_admin' WHERE perm_name='bit_p_gatekeeper_admin';
UPDATE users_group_permissions SET perm_name='p_gatekeeper_read' WHERE perm_name='bit_p_read_gatekeeper';

UPDATE users_group_permissions SET perm_name='p_calendar_view' WHERE perm_name='bit_p_view_calendar';

UPDATE users_group_permissions SET perm_name='p_sample_admin' WHERE perm_name='bit_p_admin_sample';
UPDATE users_group_permissions SET perm_name='p_sample_create' WHERE perm_name='bit_p_create_sample';
UPDATE users_group_permissions SET perm_name='p_sample_edit' WHERE perm_name='bit_p_edit_sample';
UPDATE users_group_permissions SET perm_name='p_sample_read' WHERE perm_name='bit_p_read_sample';
UPDATE users_group_permissions SET perm_name='p_sample_remove' WHERE perm_name='bit_p_remove_sample';

UPDATE users_group_permissions SET perm_name='p_categories_admin' WHERE perm_name='bit_p_admin_categories';
UPDATE users_group_permissions SET perm_name='p_categories_view' WHERE perm_name='bit_p_view_categories';

UPDATE users_group_permissions SET perm_name='p_tidbits_admin_banning' WHERE perm_name='bit_p_admin_banning';
UPDATE users_group_permissions SET perm_name='p_tidbits_upload_userfiles' WHERE perm_name='bit_p_userfiles';
UPDATE users_group_permissions SET perm_name='p_tidbits_create_bookmarks' WHERE perm_name='bit_p_create_bookmarks';
UPDATE users_group_permissions SET perm_name='p_tidbits_cache_bookmarks' WHERE perm_name='bit_p_cache_bookmarks';
UPDATE users_group_permissions SET perm_name='p_tidbits_configure_modules' WHERE perm_name='bit_p_configure_modules';
UPDATE users_group_permissions SET perm_name='p_tidbits_use_usermenu' WHERE perm_name='bit_p_usermenu';
UPDATE users_group_permissions SET perm_name='p_tidbits_use_tasks' WHERE perm_name='bit_p_tasks';
UPDATE users_group_permissions SET perm_name='p_tidbits_custom_home_theme' WHERE perm_name='bit_p_custom_home_theme';
UPDATE users_group_permissions SET perm_name='p_tidbits_custom_home_layout' WHERE perm_name='bit_p_custom_home_layout';
UPDATE users_group_permissions SET perm_name='p_tidbits_use_custom_css' WHERE perm_name='bit_p_custom_css';
UPDATE users_group_permissions SET perm_name='p_tidbits_edit_fortune_cookies' WHERE perm_name='bit_p_edit_cookies';

UPDATE users_group_permissions SET perm_name='p_quota_create' WHERE perm_name='bit_p_create_quota';
UPDATE users_group_permissions SET perm_name='p_quota_edit' WHERE perm_name='bit_p_quota_edit';
UPDATE users_group_permissions SET perm_name='p_quota_admin' WHERE perm_name='bit_p_quota_admin';
UPDATE users_group_permissions SET perm_name='p_quota_read' WHERE perm_name='bit_p_read_quota';

UPDATE users_group_permissions SET perm_name='p_smileys_use' WHERE perm_name='bit_p_use_smileys';

UPDATE users_group_permissions SET perm_name='p_chatterbox_use' WHERE perm_name='bit_p_use_chatterbox';

UPDATE users_group_permissions SET perm_name='p_fisheye_view' WHERE perm_name='bit_p_view_fisheye';
UPDATE users_group_permissions SET perm_name='p_fisheye_create' WHERE perm_name='bit_p_create_fisheye';
UPDATE users_group_permissions SET perm_name='p_fisheye_edit' WHERE perm_name='bit_p_edit_fisheye';
UPDATE users_group_permissions SET perm_name='p_fisheye_upload' WHERE perm_name='bit_p_upload_fisheye';
UPDATE users_group_permissions SET perm_name='p_fisheye_admin' WHERE perm_name='bit_p_admin_fisheye';
UPDATE users_group_permissions SET perm_name='p_fisheye_upload_nonimages' WHERE perm_name='bit_p_fisheye_upload_nonimages';

UPDATE users_group_permissions SET perm_name='p_languages_create' WHERE perm_name='bit_p_create_languages';
UPDATE users_group_permissions SET perm_name='p_languages_edit' WHERE perm_name='bit_p_edit_languages';
UPDATE users_group_permissions SET perm_name='p_languages_delete' WHERE perm_name='bit_p_delete_languages';
UPDATE users_group_permissions SET perm_name='p_languages_edit_master' WHERE perm_name='bit_p_edit_master_strings';
UPDATE users_group_permissions SET perm_name='p_languages_import' WHERE perm_name='bit_p_import_languages';

UPDATE users_group_permissions SET perm_name='p_users_assign_group_perms' WHERE perm_name='bit_p_user_group_perms';
UPDATE users_group_permissions SET perm_name='p_users_assign_group_members' WHERE perm_name='bit_p_user_group_members';
UPDATE users_group_permissions SET perm_name='p_users_group_subgroups' WHERE perm_name='bit_p_user_group_subgroups';
UPDATE users_group_permissions SET perm_name='p_users_admin' WHERE perm_name='bit_p_admin_users';
UPDATE users_group_permissions SET perm_name='p_users_view_icons_and_tools' WHERE perm_name='bit_p_view_tabs_and_tools';
UPDATE users_group_permissions SET perm_name='p_users_create_personal_groups' WHERE perm_name='bit_p_create_personal_groups';
UPDATE users_group_permissions SET perm_name='p_users_view_user_list' WHERE perm_name='bit_p_view_user_list';
UPDATE users_group_permissions SET perm_name='p_users_view_user_homepage' WHERE perm_name='bit_p_view_user_homepage';
UPDATE users_group_permissions SET perm_name='p_users_edit_user_homepage' WHERE perm_name='bit_p_edit_user_homepage';

UPDATE users_group_permissions SET perm_name='p_galaxia_admin' WHERE perm_name='bit_p_admin_workflow';
UPDATE users_group_permissions SET perm_name='p_galaxia_abort_instance' WHERE perm_name='bit_p_abort_instance';
UPDATE users_group_permissions SET perm_name='p_galaxia_use' WHERE perm_name='bit_p_use_workflow';
UPDATE users_group_permissions SET perm_name='p_galaxia_exception_instance' WHERE perm_name='bit_p_exception_instance';
UPDATE users_group_permissions SET perm_name='p_galaxia_send_instance' WHERE perm_name='bit_p_send_instance';

UPDATE users_group_permissions SET perm_name='p_newsletters_admin' WHERE perm_name='bit_p_admin_newsletters';
UPDATE users_group_permissions SET perm_name='p_newsletters_create' WHERE perm_name='bit_p_create_newsletters';
UPDATE users_group_permissions SET perm_name='p_newsletters_create_editions' WHERE perm_name='bit_p_create_editions';
UPDATE users_group_permissions SET perm_name='p_newsletters_subscribe' WHERE perm_name='bit_p_subscribe_newsletters';
UPDATE users_group_permissions SET perm_name='p_newsletters_subscribe_email' WHERE perm_name='bit_p_subscribe_email';

UPDATE users_group_permissions SET perm_name='p_blogs_create' WHERE perm_name='bit_p_create_blogs';
UPDATE users_group_permissions SET perm_name='p_blogs_create_public_blog' WHERE perm_name='bit_p_create_public_blog';
UPDATE users_group_permissions SET perm_name='p_blogs_post' WHERE perm_name='bit_p_blog_post';
UPDATE users_group_permissions SET perm_name='p_blogs_admin' WHERE perm_name='bit_p_blog_admin';
UPDATE users_group_permissions SET perm_name='p_blogs_view' WHERE perm_name='bit_p_read_blog';

UPDATE users_group_permissions SET perm_name='p_pdf_generation' WHERE perm_name='bit_p_pdf_generation';

UPDATE users_group_permissions SET perm_name='p_messages_send' WHERE perm_name='bit_p_messages';

UPDATE users_group_permissions SET perm_name='p_wiki_edit_dynvar' WHERE perm_name='bit_p_edit_dynvar';
UPDATE users_group_permissions SET perm_name='p_wiki_edit_page' WHERE perm_name='bit_p_edit';
UPDATE users_group_permissions SET perm_name='p_wiki_view_page' WHERE perm_name='bit_p_view';
UPDATE users_group_permissions SET perm_name='p_wiki_remove_page' WHERE perm_name='bit_p_remove';
UPDATE users_group_permissions SET perm_name='p_wiki_rollback' WHERE perm_name='bit_p_rollback';
UPDATE users_group_permissions SET perm_name='p_wiki_admin' WHERE perm_name='bit_p_admin_wiki';
UPDATE users_group_permissions SET perm_name='p_wiki_admin_attachments' WHERE perm_name='bit_p_wiki_admin_attachments';
UPDATE users_group_permissions SET perm_name='p_wiki_view_attachments' WHERE perm_name='bit_p_wiki_view_attachments';
UPDATE users_group_permissions SET perm_name='p_wiki_upload_picture' WHERE perm_name='bit_p_upload_picture';
UPDATE users_group_permissions SET perm_name='p_wiki_save_minor' WHERE perm_name='bit_p_minor';
UPDATE users_group_permissions SET perm_name='p_wiki_rename_page' WHERE perm_name='bit_p_rename';
UPDATE users_group_permissions SET perm_name='p_wiki_lock_page' WHERE perm_name='bit_p_lock';
UPDATE users_group_permissions SET perm_name='p_wiki_edit_book' WHERE perm_name='bit_p_edit_books';
UPDATE users_group_permissions SET perm_name='p_wiki_admin_book' WHERE perm_name='bit_p_admin_books';
UPDATE users_group_permissions SET perm_name='p_wiki_edit_copyright' WHERE perm_name='bit_p_edit_copyrights';

UPDATE users_group_permissions SET perm_name='p_pigeonholes_view' WHERE perm_name='bit_p_view_pigeonholes';
UPDATE users_group_permissions SET perm_name='p_pigeonholes_insert_member' WHERE perm_name='bit_p_insert_pigeonhole_member';
UPDATE users_group_permissions SET perm_name='p_pigeonholes_edit' WHERE perm_name='bit_p_edit_pigeonholes';

UPDATE users_group_permissions SET perm_name='p_stickies_edit' WHERE perm_name='bit_p_stickies_edit';
UPDATE users_group_permissions SET perm_name='p_stickies_admin' WHERE perm_name='bit_p_stickies_admin';

UPDATE users_group_permissions SET perm_name='p_stats_view_referer' WHERE perm_name='bit_p_view_referer_stats';
UPDATE users_group_permissions SET perm_name='p_stats_view' WHERE perm_name='bit_p_view_stats';

UPDATE users_group_permissions SET perm_name='p_liberty_edit_html_style' WHERE perm_name='bit_p_edit_html_style';
UPDATE users_group_permissions SET perm_name='p_liberty_post_comments' WHERE perm_name='bit_p_post_comments';
UPDATE users_group_permissions SET perm_name='p_liberty_read_comments' WHERE perm_name='bit_p_read_comments';
UPDATE users_group_permissions SET perm_name='p_liberty_remove_comments' WHERE perm_name='bit_p_remove_comments';
UPDATE users_group_permissions SET perm_name='p_liberty_vote_comments' WHERE perm_name='bit_p_vote_comments';
UPDATE users_group_permissions SET perm_name='p_liberty_edit_comments' WHERE perm_name='bit_p_edit_comments';
UPDATE users_group_permissions SET perm_name='p_liberty_attach_attachments' WHERE perm_name='bit_p_content_attachments';
UPDATE users_group_permissions SET perm_name='p_liberty_detach_attachment' WHERE perm_name='bit_p_detach_attachment';
UPDATE users_group_permissions SET perm_name='p_liberty_print' WHERE perm_name='bit_p_print';

UPDATE users_group_permissions SET perm_name='p_articles_edit' WHERE perm_name='bit_p_edit_article';
UPDATE users_group_permissions SET perm_name='p_articles_remove' WHERE perm_name='bit_p_remove_article';
UPDATE users_group_permissions SET perm_name='p_articles_read' WHERE perm_name='bit_p_read_article';
UPDATE users_group_permissions SET perm_name='p_articles_submit' WHERE perm_name='bit_p_submit_article';
UPDATE users_group_permissions SET perm_name='p_articles_edit_submission' WHERE perm_name='bit_p_edit_submission';
UPDATE users_group_permissions SET perm_name='p_articles_remove_submission' WHERE perm_name='bit_p_remove_submission';
UPDATE users_group_permissions SET perm_name='p_articles_approve_submission' WHERE perm_name='bit_p_approve_submission';
UPDATE users_group_permissions SET perm_name='p_articles_send' WHERE perm_name='bit_p_send_articles';
UPDATE users_group_permissions SET perm_name='p_articles_sendme' WHERE perm_name='bit_p_sendme_articles';
UPDATE users_group_permissions SET perm_name='p_articles_auto_approve' WHERE perm_name='bit_p_autoapprove_submission';
UPDATE users_group_permissions SET perm_name='p_articles_admin' WHERE perm_name='bit_p_admin_articles';

UPDATE users_group_permissions SET perm_name='p_nexus_insert_item' WHERE perm_name='bit_p_insert_nexus_item';
UPDATE users_group_permissions SET perm_name='p_nexus_create_menus' WHERE perm_name='bit_p_create_nexus_menus';

-- Add the FOREIGN KEY back
-- ALTER TABLE users_group_permissions ADD CONSTRAINT users_group_perm_perm_ref FOREIGN KEY (perm_name) REFERENCES users_permissions (perm_name);
5-APRIL-2006users_groupsA user can choose a group at registration/sylvie
SQL 92

ALTER TABLE users_groups ADD is_public VARCHAR(1);
29-MARCH-2006searchrename search tables in accordance to our standards/xing
SQL 92

ALTER TABLE tiki_searchsyllable RENAME TO search_syllable;
ALTER TABLE tiki_searchwords RENAME TO search_words;
ALTER TABLE tiki_searchindex RENAME TO search_index;
ALTER TABLE tiki_search_stats RENAME TO search_stats;
24-FEB-2006 liberty_content_links Remove "to_content_id" from compound primary key add seperate index for "to_content_id" to allow null values /seannerd
SQL 92

-- Drop primary key
ALTER TABLE liberty_content_links
    DROP CONSTRAINT PK__liberty_cont__336AA144 -- depends on your install
-- Add new primary key
ALTER TABLE liberty_content_links ADD CONSTRAINT
    PK__liberty_cont__0E391C95 PRIMARY KEY CLUSTERED
    ( from_content_id, to_title )
-- Create new (seperate) index
CREATE NONCLUSTERED INDEX to_content_id_idx ON liberty_content_links
    ( to_content_id    )
21-FEB-2006 liberty_content_links add to_title to fix several issues and improve performance /jht001
SQL 92

alter table liberty_content_links add column to_title varchar(160);
alter table liberty_content_links DROP PRIMARY KEY; -- mysql only
UPDATE liberty_content_links SET to_title = (SELECT title FROM liberty_content WHERE liberty_content_links.to_content_id=content_id);
DELETE FROM liberty_content_links WHERE to_title IS NULL;
ALTER TABLE liberty_content_links ALTER to_content_id DROP NOT NULL;
CREATE INDEX liberty_content_links_title_idx ON liberty_content_links (to_title);
to update liberty_content_links , please download this file, place it in your liberty directory and run it from the commandline. use the followwing command: php rebuild_liberty_content_links.php
20-FEB-2006 languages SQL reserved words renamed to allow unquoted field names /lsces
SQL 92

ALTER TABLE i18n_strings RENAME tran TO trans;
19-FEB-2006 galaxia SQL reserved words renamed to allow unquoted field names /lsces
SQL 92

ALTER TABLE galaxia_activities RENAME type TO act_type;
ALTER TABLE galaxia_instance_comments RENAME timestamp TO com_timestamp;
19-FEB-2006 nexus, multisite, messages, fisheye SQL reserved words renamed to allow unquoted field names /lsces
SQL 92

ALTER TABLE nexus_menus RENAME type TO menu_type;
ALTER TABLE multisite_preferences RENAME value TO pref_value;
ALTER TABLE messages RENAME date TO msg_date;
ALTER TABLE fisheye_gallery_image_map RENAME position TO item_position;
19-FEB-2006 tidbits, stats SQL reserved words renamed to allow unquoted field names /lsces
SQL 92

ALTER TABLE tidbits_banning RENAME "user" TO ban_user;
ALTER TABLE tidbits_banning RENAME message TO ban_message;
ALTER TABLE tidbits_tasks RENAME date TO task_date;
ALTER TABLE tidbits_menus RENAME position TO menu_position;
ALTER TABLE stats_pageviews RENAME day TO stats_day;
18-FEB-2006 wiki, articles, blogs SQL reserved words renamed to allow unquoted field names /lsces
SQL 92

ALTER TABLE wiki_pages RENAME page_size TO wiki_page_size;
ALTER TABLE wiki_pages RENAME cache TO page_cache;
ALTER TABLE article_topics RENAME active TO active_topic;
ALTER TABLE blogs RENAME public TO public_blog;
ALTER TABLE rss_feeds RENAME cache TO rss_cache;
18-FEB-2006 users, kernel, liberty,themes SQL reserved words renamed to allow unquoted field names /lsces
SQL 92

ALTER TABLE users_users RENAME password TO user_password;
ALTER TABLE users_favorites_map RENAME position TO map_postion;
ALTER TABLE users_group_permissions RENAME value TO perm_value;
ALTER TABLE users_watches RENAME type TO watch_type;
ALTER TABLE kernel_prefs RENAME value TO pref_value;
ALTER TABLE liberty_action_log RENAME action TO log_action;
ALTER TABLE liberty_copyrights RENAME year TO copyright_year;
ALTER TABLE liberty_content_prefs RENAME value TO pref_value;
ALTER TABLE themes_layouts RENAME position TO layout_position;
17-FEB-2006 users, liberty, wiki rename and move wiki_action_log to generalized content_action_log in liberty, rename columns with the universally poorly named title of 'comment' /spider
SQL 92

ALTER TABLE wiki_action_log RENAME TO liberty_action_log;
ALTER TABLE liberty_action_log ADD COLUMN content_id INT;
UPDATE liberty_action_log SET content_id=(SELECT content_id FROM wiki_pages WHERE page_id=liberty_action_log.page_id);
ALTER TABLE liberty_action_log DROP COLUMN page_id;
ALTER TABLE liberty_files RENAME size TO file_size;
ALTER TABLE liberty_structures RENAME level TO structure_level;
ALTER TABLE liberty_content_history RENAME comment TO history_comment;
ALTER TABLE liberty_action_log RENAME comment TO action_comment;
ALTER TABLE wiki_pages RENAME comment TO edit_comment;
ALTER TABLE users_permissions RENAME level TO perm_level;
ALTER TABLE themes_layouts RENAME rows TO module_rows;
ALTER TABLE themes_layouts_modules RENAME rows TO module_rows;
15-FEB-2006 i18n_content_trans_map Translation map to allow tracking of content translations - name shortened for compatibility /xing
SQL 92

CREATE TABLE i18n_content_trans_map ( content_id INT4 NOT NULL, translation_id INT4 NOT NULL );
UPDATE liberty_content SET lang_code=(SELECT value FROM kernel_prefs WHERE name='bitlanguage');
if you added group_id and source_id to liberty_content on the 8-FEB-2006, you can remove these again
13-FEB-2006 kernel_prefs rename preferences to under_score bitweaver standard /xing
SQL 92

UPDATE kernel_prefs SET name='pretty_urls_extended' WHERE name='feature_pretty_urls_extended';
UPDATE kernel_prefs SET name='messages_allow_messages' WHERE name='allowMsgs';
UPDATE kernel_prefs SET name='users_themes' WHERE name='feature_user_theme';
UPDATE kernel_prefs SET name='categories_objects' WHERE name='feature_categoryobjects';
UPDATE kernel_prefs SET name='categories_path' WHERE name='feature_categorypath';
UPDATE kernel_prefs SET name='liberty_offline_thumbnailer' WHERE name='feature_offline_thumbnailer';
UPDATE kernel_prefs SET name='kernel_server_name' WHERE name='feature_server_name';
UPDATE kernel_prefs SET name='output_obzip' WHERE name='feature_obzip';
UPDATE kernel_prefs SET name='themes_edit_css' WHERE name='feature_editcss';
UPDATE kernel_prefs SET name='html_pages' WHERE name='feature_html_pages';
UPDATE kernel_prefs SET name='themes_module_controls' WHERE name='feature_modulecontrols';
UPDATE kernel_prefs SET name='themes_collapsible_modules' WHERE name='feature_collapsible_modules';
UPDATE kernel_prefs SET name='kernel_live_support' WHERE name='feature_live_support';
UPDATE kernel_prefs SET name='themes_dropdown_navbar' WHERE name='feature_dropdown_navbar';
UPDATE kernel_prefs SET name='users_layouts' WHERE name='feature_user_layout';
UPDATE kernel_prefs SET name='users_preferences' WHERE name='feature_user_preferences';
UPDATE kernel_prefs SET name='sample_list_samples' WHERE name='feature_listSamples';
UPDATE kernel_prefs SET name='stats_search' WHERE name='feature_search_stats';
UPDATE kernel_prefs SET name='wiki_last_changes' WHERE name='feature_last_changes';
UPDATE kernel_prefs SET name='wiki_like_pages' WHERE name='feature_like_pages';
UPDATE kernel_prefs SET name='wiki_list_pages' WHERE name='feature_list_pages';
UPDATE kernel_prefs SET name='wiki_user_versions' WHERE name='feature_userVersions';
UPDATE kernel_prefs SET name='wiki_url_import' WHERE name='feature_wiki_url_import';
UPDATE kernel_prefs SET name='bit_index' WHERE name='bitIndex';
12-FEB-2006 liberty_comments Implement Materialized Path for comments /jht001
SQL 92

ALTER TABLE liberty_comments ADD COLUMN root_id INT4;
ALTER TABLE liberty_comments ADD COLUMN thread_forward_sequence varchar(250);
ALTER TABLE liberty_comments ADD COLUMN thread_reverse_sequence varchar(250);
CREATE UNIQUE INDEX liberty_comments_rt_fwd_idx ON liberty_comments (root_id, thread_forward_sequence);
CREATE UNIQUE INDEX liberty_comments_rt_rev_idx ON liberty_comments (root_id, thread_reverse_sequence);
to update comments, please download this file, place it in your liberty directory and run it from the commandline. use the followwing command: php comments_updater.php
12-FEB-2006 i18n_languages add a column to flag right to left languages /xing
SQL 92

ALTER TABLE i18n_languages ADD COLUMN right_to_left VARCHAR(1);
7-FEB-2006 liberty_content_history complete transition to generic content history in liberty /spider
SQL 92

ALTER TABLE liberty_content_history ADD COLUMN content_id INT;
UPDATE liberty_content_history SET content_id=(SELECT content_id FROM wiki_pages WHERE page_id=liberty_content_history.page_id);
ALTER TABLE liberty_content_history DROP COLUMN page_id;
ALTER TABLE liberty_content ADD COLUMN version INTEGER;
UPDATE liberty_content SET version=(SELECT version from wiki_pages WHERE content_id=liberty_content.content_id);
ALTER TABLE wiki_pages DROP COLUMN version;
7-FEB-2006 kernel_prefs rename preferences to under_score bitweaver standard /xing
SQL 92

UPDATE kernel_prefs SET name='bit_index' WHERE name='bitIndex';
UPDATE kernel_prefs SET name='allow_register' WHERE name='allowRegister';
UPDATE kernel_prefs SET name='forgot_pass' WHERE name='forgotPass';
UPDATE kernel_prefs SET name='eponymous_groups' WHERE name='eponymousGroups';
UPDATE kernel_prefs SET name='register_passcode' WHERE name='registerPasscode';

UPDATE kernel_prefs SET name='use_register_passcode' WHERE name='useRegisterPasscode';
UPDATE kernel_prefs SET name='validate_user' WHERE name='validateUsers';
UPDATE kernel_prefs SET name='validate_email' WHERE name='validateEmail';
UPDATE kernel_prefs SET name='temp_dir' WHERE name='tmpDir';
UPDATE kernel_prefs SET name='max_records' WHERE name='maxRecords';
UPDATE kernel_prefs SET name='url_index' WHERE name='urlIndex';

UPDATE kernel_prefs SET name='anon_can_edit' WHERE name='anonCanEdit';
UPDATE kernel_prefs SET name='max_versions' WHERE name='maxVersions';
UPDATE kernel_prefs SET name='wiki_home_page' WHERE name='wikiHomePage';
UPDATE kernel_prefs SET name='wiki_license_page' WHERE name='wikiLicensePage';
UPDATE kernel_prefs SET name='wiki_submit_notice' WHERE name='wikiSubmitNotice';
UPDATE kernel_prefs SET name='site_title' WHERE name='siteTitle';
UPDATE kernel_prefs SET name='feature_last_changes' WHERE name='feature_lastChanges';
UPDATE kernel_prefs SET name='feature_like_pages' WHERE name='feature_likePages';
UPDATE kernel_prefs SET name='feature_list_pages' WHERE name='feature_listPages';
UPDATE kernel_prefs SET name='feature_user_preferences' WHERE name='feature_userPreferences';

UPDATE kernel_prefs SET name='allow_dup_wiki_page_names' WHERE name='feature_allow_dup_wiki_page_names';
UPDATE kernel_prefs SET name='article_submissions' WHERE name='feature_article_submissions';
UPDATE kernel_prefs SET name='autolinks' WHERE name='feature_autolinks';
UPDATE kernel_prefs SET name='babelfish' WHERE name='feature_babelfish';
UPDATE kernel_prefs SET name='babelfish_logo' WHERE name='feature_babelfish_logo';
UPDATE kernel_prefs SET name='backlinks' WHERE name='feature_backlinks';
UPDATE kernel_prefs SET name='banning' WHERE name='feature_banning';
UPDATE kernel_prefs SET name='bidirectional_text' WHERE name='feature_bidi';
UPDATE kernel_prefs SET name='blogposts_comments' WHERE name='feature_blogposts_comments';
UPDATE kernel_prefs SET name='blog_rankings' WHERE name='feature_blog_rankings';
UPDATE kernel_prefs SET name='bot_bar' WHERE name='feature_bot_bar';
UPDATE kernel_prefs SET name='clear_passwords' WHERE name='feature_clear_passwords';
UPDATE kernel_prefs SET name='cms_rankings' WHERE name='feature_cms_rankings';
UPDATE kernel_prefs SET name='site_contact' WHERE name='feature_contact';
UPDATE kernel_prefs SET name='custom_home' WHERE name='feature_custom_home';

UPDATE kernel_prefs SET name='wiki_dump' WHERE name='feature_dump';
UPDATE kernel_prefs SET name='help' WHERE name='feature_help';
UPDATE kernel_prefs SET name='help_notes' WHERE name='feature_helpnotes';
UPDATE kernel_prefs SET name='help_popup' WHERE name='feature_helppopup';
UPDATE kernel_prefs SET name='hotwords' WHERE name='feature_hotwords';
UPDATE kernel_prefs SET name='hotwords_nw' WHERE name='feature_hotwords_nw';
UPDATE kernel_prefs SET name='jstabs' WHERE name='feature_jstabs';
UPDATE kernel_prefs SET name='last_changes' WHERE name='feature_lastChanges';
UPDATE kernel_prefs SET name='left_column' WHERE name='feature_left_column';
UPDATE kernel_prefs SET name='like_pages' WHERE name='feature_likePages';
UPDATE kernel_prefs SET name='list_pages' WHERE name='feature_listPages';
UPDATE kernel_prefs SET name='page_title' WHERE name='feature_page_title';
UPDATE kernel_prefs SET name='wiki_ranking' WHERE name='feature_ranking';
UPDATE kernel_prefs SET name='referer_stats' WHERE name='feature_referer_stats';
UPDATE kernel_prefs SET name='right_column' WHERE name='feature_right_column';
UPDATE kernel_prefs SET name='sandbox' WHERE name='feature_sandbox';
UPDATE kernel_prefs SET name='search_fulltext' WHERE name='feature_search_fulltext';
UPDATE kernel_prefs SET name='search_stats' WHERE name='feature_search_stats';
UPDATE kernel_prefs SET name='theme_control' WHERE name='feature_theme_control';
UPDATE kernel_prefs SET name='top_bar' WHERE name='feature_top_bar';
UPDATE kernel_prefs SET name='top_bar_dropdown' WHERE name='feature_top_bar_dropdown';
UPDATE kernel_prefs SET name='user_bookmarks' WHERE name='feature_user_bookmarks';
UPDATE kernel_prefs SET name='user_files' WHERE name='feature_userfiles';

UPDATE kernel_prefs SET name='usermenu' WHERE name='feature_usermenu';
UPDATE kernel_prefs SET name='user_preferences' WHERE name='feature_userPreferences';
UPDATE kernel_prefs SET name='user_watches' WHERE name='feature_user_watches';
UPDATE kernel_prefs SET name='warn_on_edit' WHERE name='feature_warn_on_edit';
UPDATE kernel_prefs SET name='wiki_attachments' WHERE name='feature_wiki_attachments';
UPDATE kernel_prefs SET name='wiki_books' WHERE name='feature_wiki_books';
UPDATE kernel_prefs SET name='wiki_comments' WHERE name='feature_wiki_comments';
UPDATE kernel_prefs SET name='wiki_description' WHERE name='feature_wiki_description';
UPDATE kernel_prefs SET name='wiki_discuss' WHERE name='feature_wiki_discuss';
UPDATE kernel_prefs SET name='wiki_footnotes' WHERE name='feature_wiki_footnotes';
UPDATE kernel_prefs SET name='wiki_generate_pdf' WHERE name='feature_wiki_generate_pdf';
UPDATE kernel_prefs SET name='wiki_help' WHERE name='feature_wikihelp';
UPDATE kernel_prefs SET name='wiki_icache' WHERE name='feature_wiki_icache';
UPDATE kernel_prefs SET name='wiki_monosp' WHERE name='feature_wiki_monosp';
UPDATE kernel_prefs SET name='wiki_multiprint' WHERE name='feature_wiki_multiprint';
UPDATE kernel_prefs SET name='wiki_notepad' WHERE name='feature_wiki_notepad';
UPDATE kernel_prefs SET name='wiki_pictures' WHERE name='feature_wiki_pictures';
UPDATE kernel_prefs SET name='wiki_plurals' WHERE name='feature_wiki_plurals';
UPDATE kernel_prefs SET name='wiki_rankings' WHERE name='feature_wiki_rankings';
UPDATE kernel_prefs SET name='wiki_tables' WHERE name='feature_wiki_tables';
UPDATE kernel_prefs SET name='wiki_templates' WHERE name='feature_wiki_templates';
UPDATE kernel_prefs SET name='wiki_undo' WHERE name='feature_wiki_undo';
UPDATE kernel_prefs SET name='wiki_usrlock' WHERE name='feature_wiki_usrlock';
UPDATE kernel_prefs SET name='wiki_words' WHERE name='feature_wikiwords';
UPDATE kernel_prefs SET name='wiki_copyrights' WHERE name='wiki_feature_copyrights';
UPDATE kernel_prefs SET name='wiki_history' WHERE name='feature_history';
1-FEB-2006 liberty_content increase lang_code size /xing
SQL 92

ALTER TABLE liberty_content RENAME COLUMN language TO lang_code;
ALTER TABLE liberty_content ALTER language TYPE varchar(32);
2-FEB-2006 everything unify table names /spider, /xing
SQL 92

-- de-tikify articles
ALTER TABLE tiki_articles RENAME TO articles;
ALTER TABLE tiki_article_status RENAME TO article_status;
ALTER TABLE tiki_article_topics RENAME TO article_topics;
ALTER TABLE tiki_article_types RENAME TO article_types;

-- de-tikify blogs
ALTER TABLE tiki_blogs RENAME TO blogs;

ALTER TABLE tiki_blog_posts RENAME TO blog_posts;
ALTER TABLE tiki_blog_activity RENAME TO blog_activity;
ALTER TABLE tiki_blog_posts_images RENAME TO blog_posts_images;

-- de-tikify categories
ALTER TABLE tiki_categories RENAME TO categories;
ALTER TABLE tiki_categorized_objects RENAME TO categories_objects;
ALTER TABLE tiki_category_objects RENAME TO categories_objects_map;
ALTER TABLE tiki_category_sites RENAME TO categories_sites;

-- de-tikify chatterbox
ALTER TABLE bit_chatterbox RENAME TO chatterbox;

-- de-tikify events
ALTER TABLE bit_events RENAME TO events;

-- de-tikify fisheye
ALTER TABLE tiki_fisheye_gallery RENAME TO fisheye_gallery;
ALTER TABLE tiki_fisheye_image RENAME TO fisheye_image;
ALTER TABLE tiki_fisheye_gallery_image_map RENAME TO fisheye_gallery_image_map;
ALTER TABLE tiki_thumbnail_queue RENAME TO liberty_thumbnail_queue;


-- galaxia does not need de-tikifying

-- de-tikify gatekeeper
ALTER TABLE tiki_security RENAME TO gatekeeper_security;
ALTER TABLE tiki_content_security_map RENAME TO gatekeeper_security_map;

-- de-tikify hotwords
ALTER TABLE tiki_hotwords RENAME TO hotwords;

-- de-tikify kernel
DROP TABLE tiki_dsn;
DROP TABLE tiki_menus;
DROP TABLE tiki_menu_options;
DROP TABLE tiki_programmed_content;
DROP TABLE tiki_content_templates;
DROP TABLE tiki_content_templates_sections;

ALTER TABLE tiki_banning RENAME TO tidbits_banning;
ALTER TABLE tiki_banning_sections RENAME TO tidbits_banning_sections;
ALTER TABLE tiki_cookies RENAME TO tidbits_fortune_cookies;
ALTER TABLE tiki_dynamic_variables RENAME TO liberty_dynamic_variables;
ALTER TABLE tiki_layouts RENAME TO themes_layouts;
ALTER TABLE tiki_layouts_modules RENAME TO themes_layouts_modules;
ALTER TABLE tiki_mail_events RENAME TO mail_notifications;
ALTER TABLE tiki_module_map RENAME TO themes_module_map;
ALTER TABLE tiki_pageviews RENAME TO stats_pageviews;
ALTER TABLE tiki_preferences RENAME TO kernel_prefs;
ALTER TABLE tiki_user_menus RENAME TO tidbits_user_menus;


-- de-tikify languages
ALTER TABLE tiki_i18n_languages RENAME TO i18n_languages;
ALTER TABLE tiki_i18n_masters RENAME TO i18n_masters;
ALTER TABLE tiki_i18n_strings RENAME TO i18n_strings;
ALTER TABLE tiki_i18n_version_map RENAME TO i18n_version_map;


-- de-tikify liberty
ALTER TABLE tiki_content RENAME TO liberty_content;
ALTER TABLE tiki_attachments RENAME TO liberty_attachments;
ALTER TABLE tiki_files RENAME TO liberty_files;
ALTER TABLE tiki_structures RENAME TO liberty_structures;
ALTER TABLE tiki_comments RENAME TO liberty_comments;
ALTER TABLE tiki_plugins RENAME TO liberty_plugins;
ALTER TABLE tiki_content_types RENAME TO liberty_content_types;
ALTER TABLE tiki_link_cache RENAME TO liberty_link_cache;


-- de-tikify messages
ALTER TABLE messu_messages RENAME TO messages;

ALTER TABLE messu_system_message_map RENAME TO messages_system_map;

-- de-tikify multisites
ALTER TABLE tiki_multisites RENAME TO multisites;
ALTER TABLE tiki_multisite_preferences RENAME TO multisite_preferences;

-- de-tikify newsletters
ALTER TABLE tiki_newsletters RENAME TO newsletters;
ALTER TABLE tiki_newsletters_editions RENAME TO newsletters_editions;
ALTER TABLE tiki_mail_subscriptions RENAME TO mail_subscriptions;
ALTER TABLE tiki_mail_errors RENAME TO mail_errors;
ALTER TABLE tiki_mail_mailings RENAME TO mail_mailings;
ALTER TABLE tiki_mail_queue RENAME TO mail_queue;

-- de-tikify nexus
ALTER TABLE tiki_nexus_plugins RENAME TO nexus_plugins;
ALTER TABLE tiki_nexus_menus RENAME TO nexus_menus;
ALTER TABLE tiki_nexus_menu_items RENAME TO nexus_menu_items;

-- de-tikify pigeonholes
ALTER TABLE bit_pigeonholes RENAME TO pigeonholes;
ALTER TABLE bit_pigeonhole_members RENAME TO pigeonhole_members;
ALTER TABLE bit_pigeonhole_settings RENAME TO pigeonhole_settings;

-- de-tikify quicktags
ALTER TABLE tiki_quicktags RENAME TO quicktags;

-- de-tikify quota
ALTER TABLE tiki_quotas RENAME TO quotas;
ALTER TABLE tiki_quotas_group_map RENAME TO quotas_group_map;

-- de-tikify rss
ALTER TABLE tiki_rss_feeds RENAME TO rss_feeds;
ALTER TABLE tiki_rss_modules RENAME TO rss_modules;

-- de-tikify shoutbox
ALTER TABLE tiki_shoutbox RENAME TO shoutbox;

-- de-tikify stats

ALTER TABLE tiki_referer_stats RENAME TO stats_referers;

-- de-tikify stickies
ALTER TABLE tiki_stickies RENAME TO stickies;

-- de-tikify themes
ALTER TABLE tiki_theme_control_categs RENAME TO theme_control_categs;
ALTER TABLE tiki_theme_control_sections RENAME TO theme_control_sections;
ALTER TABLE tiki_theme_control_objects RENAME TO theme_control_objects;
ALTER TABLE tiki_user_modules RENAME TO themes_custom_modules;

-- de-tikify users
DROP TABLE tiki_sessions;
ALTER TABLE users_objectpermissions RENAME TO users_object_permissions;
ALTER TABLE users_grouppermissions RENAME TO users_group_permissions;
ALTER TABLE tiki_semaphores RENAME TO users_semaphores;
ALTER TABLE tiki_user_watches RENAME TO users_watches;
ALTER TABLE tiki_user_votings RENAME TO tidbits_votings;
ALTER TABLE tiki_user_tasks RENAME TO tidbits_tasks;
ALTER TABLE tiki_user_postings RENAME TO tidbits_postings;
ALTER TABLE tiki_user_bookmarks_urls RENAME TO tidbits_bookmarks_urls;
ALTER TABLE tiki_user_bookmarks_folders RENAME TO tidbits_bookmarks_folders;
ALTER TABLE tiki_userpoints RENAME TO tidbits_points;
DROP TABLE tiki_userfiles;

-- de-tikify wiki
ALTER TABLE tiki_pages RENAME TO wiki_pages;
ALTER TABLE tiki_extwiki RENAME TO wiki_ext;
ALTER TABLE tiki_received_pages RENAME TO wiki_received_pages;
ALTER TABLE tiki_tags RENAME TO wiki_tags;
ALTER TABLE tiki_copyrights RENAME TO liberty_copyrights;
ALTER TABLE tiki_actionlog RENAME TO wiki_action_log;
ALTER TABLE tiki_page_footnotes RENAME TO wiki_footnotes;
ALTER TABLE tiki_history RENAME TO liberty_content_history;
ALTER TABLE tiki_links RENAME TO liberty_content_links;
1-FEB-2006 everything rename non-table objects such as sequences and indices /spider
Postgesql detikify_objects.sql
SQL92

-- Different database use different technique to rename these things. If you can send use some SQL to alter your db, please email to spider @ bitweaver . org . postgres users - please look at entry above first.
-- sequences:
tiki_security_id_seq         => gatekeeper_id_seq
tiki_content_id_seq          => liberty_content_id_seq
tiki_comments_comment_id_seq => liberty_comments_id_seq
tiki_files_file_id_seq       => liberty_files_id_seq
tiki_attachments_id_seq      => liberty_attachments_id_seq
tiki_structures_id_seq       => liberty_structures_id_seq
tiki_stickies_sticky_id_seq  => stickies_sticky_id_seq
tiki_pages_page_id_seq       => wiki_pages_page_id_seq

-- indeces
tiki_security_user_idx       => gatekeeper_security_user_idx
tiki_consec_security_idx     => gatekeeper_consec_security_idx
tiki_consec_content_idx      => gatekeeper_consec_content_idx
29-JAN-2006 users / liberty generalize tiki_user_preferences to liberty_content_prefs /spiderr
SQL 92

ALTER TABLE tiki_user_preferences RENAME TO liberty_content_prefs;
ALTER TABLE liberty_content_prefs RENAME pref_name TO name;
ALTER TABLE liberty_content_prefs ADD content_id INT;
UPDATE liberty_content_prefs SET content_id = (SELECT tc.content_id FROM tiki_content tc INNER JOIN users_users uu ON(tc.content_id=uu.content_id) WHERE uu.user_id=liberty_content_prefs.user_id );
ALTER TABLE liberty_content_prefs DROP user_id;
25-JAN-2006 articles shorten names of sequence generators lsces
PHP UPDATE:

<?php
global $gBitSystem;
$current $gBitSystem->mDb->GenID"tiki_article_topics_topic_id_seq" );
$gBitSystem->mDb->DropSequence"tiki_article_topics_topic_id_seq");
$gBitSystem->mDb->CreateSequence"tiki_article_topics_t_id_seq"$current );
$current $gBitSystem->mDb->GenID"tiki_article_types_article_type_id_seq" );
$gBitSystem->mDb->DropSequence"tiki_article_types_article_type_id_seq");
$gBitSystem->mDb->CreateSequence"tiki_article_types_a_t_id_seq"$current );
?>
23-JAN-2006 tiki_content add timestamps for hits and events lsces
Sql92 UPDATE:

ALTER TABLE tiki_content ADD last_hit INT8;
ALTER TABLE tiki_content ADD event_time INT8;
UPDATE tiki_content SET last_hit = last_modified;
23-JAN-2006 bit_pigeonholes_members drop custom positioning of items xing
Sql92 UPDATE:

ALTER TABLE bit_pigeonhole_members DROP COLUMN pos;
23-JAN-2006 users_favorites_map New favorites map to flag favorite content spiderr
Sql92 UPDATE:

CREATE TABLE users_favorites_map ( favorite_content_id INT4 NOT NULL, user_id INT4 NOT NULL, PRIMARY KEY (favorite_content_id, user_id) )  ;
CREATE INDEX users_fav_con_idx ON users_favorites_map (favorite_content_id)  ;
CREATE INDEX users_fav_user_idx ON users_favorites_map (user_id)
23-JAN-2006 messu_system_message_map MessuPackage updates for system messages and group_id sending to enable mass scaling spiderr
Sql92 UPDATE:

CREATE TABLE messu_system_message_map ( msg_id INT NOT NULL, to_user_id INT NOT NULL, is_read VARCHAR(1), is_flagged VARCHAR(1), is_replied VARCHAR(1), priority INT, is_hidden VARCHAR(1), CONSTRAINT tiki_messu_sys_message_ref FOREIGN KEY (msg_id) REFERENCES messu_messages (msg_id), CONSTRAINT tiki_messu_sys_to_user_ref FOREIGN KEY (to_user_id) REFERENCES users_users (user_id) );
ALTER TABLE messu_messages ADD COLUMN group_id INT;


code upgrade script

if you have your own package running on R1, you can use this simple script to make the appropriate changes in the code. just download the script, backup the pacakge, place this script inside your package and run it. it will rename tables and preferences to be in accordance with R2. there is no guarantee that this script will keep your code in tact, so please make sure you have a copy of your code somewhere! you can get the file here

Related Items

Documentation » Technical Documentation » Change Logs

a list of change logs that contain important changes made to bitweavers database setup, php files or template files

  •    •    •    •    •    •    •    •    •