-- --------------------------------------------------------------------------------
-- MIGRATION SCRIPT FOR JCOMMENTS IN JOOMLA v1.5.x TO JOOMLA v2.5.x
-- --------------------------------------------------------------------------------
-- NOTE: Replace string "mydb_livecopy_j15" to your Joomla 1.5.x database name
-- -- -- (example: "anolddatabase") -- 9 occurrences
-- NOTE: Replace string "mydb_livecopy_j15.myprefix_" to your Joomla 1.5.x database name & table prefix
-- -- -- (example: "anolddatabase.jos_") -- 8 occurrences
-- NOTE: Replace string "mydb_upgrade_j25" to your Joomla 2.5.x database name
-- -- -- (example: "anewdatabase") -- 9 occurrences
-- NOTE: Replace string "mydb_upgrade_j25.myprefix_" to your Joomla 2.5.x database name & table prefix
-- -- -- (example: "anewdatabase.rndpfx1_") -- 8 occurrences
-- --------------------------------------------------------------------------------
-- _jcomments
-- --------------------------------------------------------------------------------
INSERT INTO
mydb_upgrade_j25.myprefix_jcomments
(
id, parent, thread_id, path, level, object_id, object_group, object_params, lang,
userid, name, username, email, homepage, title, comment, ip, DATE, isgood, ispoor,
published, subscribe, SOURCE, source_id, checked_out, checked_out_time, editor
)
SELECT
id, parent,
CASE WHEN SUBSTRING(path, LOCATE(',', path)+1, LOCATE(',', path, 2))='' THEN 0
ELSE SUBSTRING(path, LOCATE(',', path)+1, LOCATE(',', path, 2)) END AS thread_id,
path, level, object_id, object_group, object_params, lang,
userid, name, username, email, homepage, title, comment, ip, DATE, isgood, ispoor,
published, subscribe, SOURCE, source_id, checked_out, checked_out_time, editor
FROM
mydb_livecopy_j15.myprefix_jcomments;
-- --------------------------------------------------------------------------------
-- _jcomments_custom_bbcodes
-- --------------------------------------------------------------------------------
-- NOTE: This is disabled as the new version includes the old bbcodes setup (no change)
-- INSERT INTO
-- mydb_upgrade_j25.myprefix_jcomments_custom_bbcodes
-- (
-- id, `name`, simple_pattern, simple_replacement_html, simple_replacement_text, pattern,
-- replacement_html, replacement_text, button_acl, button_open_tag, button_close_tag,
-- button_title, button_prompt, button_image, button_css, button_enabled, ordering,
-- published
-- )
-- SELECT
-- id, `name`, simple_pattern, simple_replacement_html, simple_replacement_text, pattern,
-- replacement_html, replacement_text, button_acl, button_open_tag, button_close_tag,
-- button_title, button_prompt, button_image, button_css, button_enabled, ordering,
-- published
-- FROM
-- mydb_livecopy_j15.myprefix_jcomments_custom_bbcodes;
-- --------------------------------------------------------------------------------
-- _jcomments_reports
-- --------------------------------------------------------------------------------
INSERT INTO
mydb_upgrade_j25.myprefix_jcomments_reports
(
id, commentid, userid, name, ip, DATE, reason, STATUS
)
SELECT
id, commentid, userid, name, ip, DATE, reason, STATUS
FROM
mydb_livecopy_j15.myprefix_jcomments_reports;
-- --------------------------------------------------------------------------------
-- _jcomments_settings -- ignored as this will load factory settings
-- --------------------------------------------------------------------------------
/*
INSERT INTO
mydb_upgrade_j25.myprefix_jcomments_settings
(
component, lang, name, value
)
SELECT
component, lang, name, value
FROM
mydb_livecopy_j15.myprefix_jcomments_settings;
*/
-- --------------------------------------------------------------------------------
-- _jcomments_subscriptions
-- --------------------------------------------------------------------------------
INSERT INTO
mydb_upgrade_j25.myprefix_jcomments_subscriptions
(
id, object_id, object_group, lang, userid, name, email, hash, published
)
SELECT
id, object_id, object_group, lang, userid, name, email, hash, published
FROM
mydb_livecopy_j15.myprefix_jcomments_subscriptions;
-- source=???
-- --------------------------------------------------------------------------------
-- _jcomments_version
-- --------------------------------------------------------------------------------
INSERT INTO
mydb_upgrade_j25.myprefix_jcomments_version
(
version, previous, installed, updated
)
SELECT
version, previous, installed, updated
FROM
mydb_livecopy_j15.myprefix_jcomments_version;
-- --------------------------------------------------------------------------------
-- _jcomments_votes
-- --------------------------------------------------------------------------------
INSERT INTO
mydb_upgrade_j25.myprefix_jcomments_votes
(
id, commentid, userid, ip, DATE, VALUE
)
SELECT
id, commentid, userid, ip, DATE, VALUE
FROM
mydb_livecopy_j15.myprefix_jcomments_votes;
-- --------------------------------------------------------------------------------
-- _jcomments_objects *** NEW FOR JOOMLA 2.5.X
-- --------------------------------------------------------------------------------
Comments
The site loading pace is amazing. It seems that
you're doing any unique trick. Furthermore, The contents are masterwork.
you've done a excellent task on this matter!
one is sharing information, that's really excellent,
keep up writing.