====== Migration ====== Before starting to migrate, make sure that table %%#__spupgrade_log%% is empty. After you have migrated some data, do not remove any entries, as they tell SP Upgrade when to transfer new entries. ===== Users ===== - Make sure the first user id (Super User) of the new site is identical to the one of the old site. See [[joomla:btcl39inst#prepare for migration|Prepare for migration]]. - Select "Users -> Users" in SPupgrade and select "Transfer". - User Groups will not be assigned during or after the transfer automatically, you must take care of this after the transfer. - Within the core, go to //Users -> Manage//, then click on every user's name, select tab "Assigned User Groups", and check the group. - Within Bethico League, go to //Members//, and assign the user's group under column "Permissions". This is much faster, as you can assign permissions for several users in one form. ===== Articles ===== - Create categories in new site first - Select "Content -> Articles" in SPupgrade and select "Transfer". Do not migrate sections and categories. - Open mysql on the command line, select the old site dbmysql --user=user --password use db - Run the following query and copy the result into the brackets of the IN-statement of the query to be run on the new site db (through phpMyAdmin)SELECT GROUP_CONCAT(id) FROM btc_content where catid=1 group by catid UPDATE btc_content SET catid=11 WHERE id IN () - catid's must correspond as per the table below - Repeat for all categories - Run the UPDATE query for all remaining catid's which are equivalent to "uncategorised" - Go to the Category manager, Select all categories and click the rebuild button. - Open all categories and save them, this will insert the appropriate assets tables associations for all categories. ==== Categories ==== ^ Category ^ Joomla 1.5 ^ Joomla 3.9 ^ | News | 1 | 10 | | Announcements | 2 | 11 | | Info | 3 | 12 | | Meeting | 4 | 13 | | Hall of fame | 6 | 14 | | About | 7 | 15 | | Home | - | 16 | | Uncategorized | - | 2 | ===== Featured Articles ===== - Choose the Menu Item which contains the Featured Articles. Go to the "Layout" Tab. - In item "Article Order", select entry "Featured Articles Order". - In item "Category Order", select entry "No Order". [[http://www.armbruster-it.org/index.php/20-it/sonstiges/5-joomla-3-change-the-order-of-featured-articles|Change the Order of Featured Articles]] ===== Forum ===== We migrate CCB Forum to Kunena Forum. CCB was not very popular, there exist no migration tools, however I found that the people who developed Kunena must have taken CCB as a basis for the development. Too many field names and structure are identical, so the task is doable without developing a complicated migration tool. ==== Prepare categories ==== - Table %%#__ccb_forums%% is equivalent to %%#__kunena_categories%%. - Set up Kunena forum in the new site with all desired sections and categories. Take a note on the category ids. ==== Migrate topics ==== - Copy table %%#__ccb_topics%% to %%#__ccb_topics_migrate%% - Update all //old// forum ids with the //new// category ids for KunenaUPDATE #__ccb_topics_migrate SET forum_id=new WHERE forum_id=old - Dump the table - Modify the INSERT INTO statement from the first line to the second line belowINSERT INTO `#__ccb_topics` (`id`, `forum_id`, `post_subject`, `reply_count`, `hits`, `post_time`, `post_user`, `last_post_time`, `last_post_id`, `last_post_user`, `start_post_id`, `topic_type`, `locked`, `topic_email`, `hold`, `topic_emoticon`, `post_username`, `last_post_username`, `topic_favourite`) VALUES INSERT INTO `#__kunena_topics` (`id`, `category_id`, `subject`, `posts`, `hits`, `first_post_time`, `first_post_userid`, `last_post_time`, `last_post_id`, `last_post_userid`, `first_post_id`, `first_post_message`, `locked`, `last_post_message`, `hold`, `icon_id`, `first_post_guest_name`, `last_post_guest_name`, `params`) VALUES - Import the resulting file into %%#__kunena_topics%% - Delete the dummy field contents. They were needed to copy fields from CCB which are not used in Kunena.UPDATE `#__kunena_topics` SET first_post_message=`` UPDATE `#__kunena_topics` SET last_post_message=`` UPDATE `#__kunena_topics` SET params=`` ==== Migrate posts ==== - Copy table %%#__ccb_posts%% to %%#__ccb_posts_messages%% and %%#__ccb_posts_messages_text%% - Update all //old// forum ids with the //new// category ids for KunenaUPDATE #__ccb_posts_messages SET forum_id=new WHERE forum_id=old - Remove column post_text from %%#__ccb_posts_messages%%, then export the table - Remove all columns but id and post_text from %%#__ccb_posts_messages_text%%, then export the table - Modify the INSERT INTO statement from the first line to the second line belowINSERT INTO `ipl_ccb_posts_messages` (`id`, `topic_id`, `forum_id`, `post_subject`, `post_user`, `post_time`, `ip`, `hold`, `modified_by`, `modified_time`, `modified_reason`, `post_username`) VALUES INSERT INTO `ipl_kunena_messages` (`id`, `thread`, `catid`, `subject`, `userid`, `time`, `ip`, `hold`, `modified_by`, `modified_time`, `modified_reason`, `name`) VALUES - Import the resulting file into %%#__kunena_messages%% - Modify the INSERT INTO statement from the first line to the second line belowINSERT INTO `ipl_ccb_posts_migrate_text` (`id`, `post_text`) VALUES INSERT INTO `ipl_kunena_messages_text` (`mesid`, `message`) VALUES - Replace all \r\n: Replace **\\r\\n** with **\r\n**. Finally, select search mode Extended (\r, \n, \t, \x..., \0) and click "Replace All". - Sanitize all with Regex: Replace **%%(?<=)%%** with "" - Sanitize all with Regex: Replace **%%(?<=)%%** with "" - Sanitize all with Regex: Replace **%%(?<=)%%** with "" - Sanitize all

with Regex: Replace **%%(?<=)%%** with "" - Sanitize all

,
with Regex: Replace **%%(?<=)%%** with "" - Sanitize all with Regex: Replace **%%(?<=)%%** with "" - Sanitize all with Regex: Replace **%%(?<=)%%** with "" - Sanitize all
with Regex: Replace **%%(?<=)%%** with "" - Replace all tags, including
, , , , , , ,
, (with [b]), and their respective closing tag, with their equivalent in square brackets, eg. [tr] and [/tr] - Remove unused tags, including

, ,

,

,

,

,

,
- Replace all html entities, including >   & - Search for all remaining < and manually replace those - Import the resulting file into %%#__kunena_messages_text%% * [[https://stackoverflow.com/questions/6109882/regex-match-all-characters-between-two-strings|Regex Match all characters between two strings]] * [[https://regex101.com/r/eZ1gT7/5|Regex101]] ==== Update stats ==== - Query table %%#__kunena_topics%% and find the number of topics per category - Find the latest post in %%#__kunena_messages%% and take a note of id, thread, and time - Update %%#__kunena_categories%% and set numTopics="number of topics per category", last_topic_id="thread", last_post_id="id" (from %%#__kunena_messages%%), last_post_time="time" ==== Attachments ==== ===== Bethico Component ===== To migrate the betico league tables, export them according to the table below from the old db, then import into the new db. Not all tables need to be transferred, and some tables require column name modification. ^ table name 1.5 ^ table name 3.9 ^ modifications ^ multi-league\\ unified ratings ^ multi-league\\ separate ratings ^ | ipl_ipl_access | //deprecated// | | | ipl_ipl_arbitrary | btc_bethico_arbitrary | | | ipl_ipl_bar | btc_bethico_bar | | view | view | | ipl_ipl_brackets | btc_bethico_brackets | | | //new// | btc_bethico_calc_config | | | //new// | btc_bethico_calc_points | | | ipl_ipl_comment | btc_bethico_comment | | | ipl_ipl_config | btc_bethico_config | dart_league -> league\\ file_suffix -> league_code | | //new// | btc_bethico_config_time | | | ipl_ipl_contactus | btc_bethico_contactus | | | ipl_ipl_date | btc_bethico_date | | view | view | | ipl_ipl_division | btc_bethico_division | | | //new// | btc_bethico_fees | | | //new// | btc_bethico_function | | | ipl_ipl_forum | //deprecated// | | | ipl_ipl_game | btc_bethico_game | | view | | | ipl_ipl_league | btc_bethico_league | | | ipl_ipl_map | btc_bethico_map | | view | view | | ipl_ipl_marks | btc_bethico_marks | | | ipl_ipl_match | btc_bethico_match | | view | | | ipl_ipl_menu | //deprecated// | | | ipl_ipl_olddb_player | btc_bethico_olddb_player | | | ipl_ipl_olddb_team | btc_bethico_olddb_team | | | ipl_ipl_player | btc_bethico_player | new: function_id | view | view | | ipl_ipl_player_game | btc_bethico_player_game | | view | | | ipl_ipl_player_team_season | btc_bethico_player_team_season | | | ipl_ipl_playoff | btc_bethico_playoff | | | ipl_ipl_season | btc_bethico_season | | view | view | | ipl_ipl_site | btc_bethico_site | | view | | ipl_ipl_team | btc_bethico_team | | | ipl_ipl_team_season | btc_bethico_team_season | new: captain_id | | ipl_ipl_tournament | btc_bethico_tournament | | view | | | | | | | | | ipl_session | ipl_session | | view | view | | ipl_users | ipl_users | | view | view | | ipl_stats_agents | ipl_usergroups | | view | view | | ipl_core_acl_aro | ipl_user_notes | | view | view | | ipl_core_acl_aro_groups | ipl_user_profiles | | view | view | | ipl_core_acl_aro_map | ipl_user_usergroup_map | | view | view | | ipl_core_acl_aro_sections | ipl_viewlevels | | view | view | | ipl_core_acl_groups_aro_map | | | view | view | * [[https://joomla.stackexchange.com/questions/10145/how-to-share-table-between-2-or-more-databases|How to share table between 2 or more databases?]] ===== Trouble Shooting ===== * [[https://docs.joomla.org/Fixing_the_assets_table|Fixing the assets table]]