1 (edited by HMEternity 2005-06-02 19:50)

Topic: Upgrade Help

I'm running a version of PunBB++ called Alpha 2. Does anyone know which version that is based off of? Thank you for your help.

I tried upgrading as if it was 1.1.1, but I got this error:

File: /home2/hmetern/public_html/RPG/Forums/11_to_12_update.php
Line: 185

PunBB reported: Unable to alter DB structure.

Database reported: Duplicate column name 'language' (Errno: 1060)

2 (edited by Smartys 2005-06-02 20:21)

Re: Upgrade Help

Well, it looks like you'll have to manually go from that step in the upgrade script (because the mods in it seem to have messed up the script) smile
I'll be more then happy to help you if you like smile

Edit: Well, first you'll have to replace all the php files with clean ones from the download package. Then, run the following SQL commands

ALTER TABLE '.$db->prefix.'users DROP language;
ALTER TABLE '.$db->prefix.'users ADD language VARCHAR(25) NOT NULL DEFAULT 'English' AFTER timezone;
ALTER TABLE '.$db->prefix.'users ADD jabber VARCHAR(75) DEFAULT NULL AFTER url;
UPDATE '.$db->prefix.'users SET group_id=1 WHERE status=2;
UPDATE '.$db->prefix.'users SET group_id=2 WHERE status=1;
UPDATE '.$db->prefix.'users SET group_id=3 WHERE id=1;
ALTER TABLE '.$db->prefix.'users DROP status;
ALTER TABLE '.$db->prefix.'users DROP link_to_new_win;
ALTER TABLE '.$db->prefix.'users DROP last_action;
ALTER TABLE '.$db->prefix.'users CHANGE smilies show_smilies TINYINT(1) DEFAULT 1 NOT NULL;
ALTER TABLE '.$db->prefix.'users CHANGE timezone timezone FLOAT DEFAULT 0 NOT NULL;
UPDATE '.$db->prefix.'users SET show_img_sig = show_img;
INSERT INTO '.$db->prefix."groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Administrators', 'Administrator', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0);
INSERT INTO '.$db->prefix."groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Moderators', 'Moderator', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0);
INSERT INTO '.$db->prefix."groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Guest', NULL, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0);
INSERT INTO '.$db->prefix."groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Members', NULL, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 300, 60, 30);
INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES('p_mod_edit_users', '1');
INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES('p_mod_rename_users', '0');
INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES('p_mod_change_passwords', '0');
INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES('p_mod_ban_users', '0');
INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES('p_force_guest_email', '1');
INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES('o_show_version', '0');
INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES('o_show_user_info', '1');
INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES('o_default_lang', 'English');
INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES('o_default_user_group', '4');
INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES('o_regs_report', '0');
DELETE FROM '.$db->prefix."config WHERE conf_name IN('o_flood_interval', 'o_search', 'p_guests_read', 'p_guests_post', 'p_guests_post_topic', 'p_guests_search', 'p_users_post', 'p_users_post_topic', 'p_users_edit_post', 'p_users_del_post', 'p_users_del_topic', 'p_users_set_title');
UPDATE '.$db->prefix.'config SET conf_value="1.2.0" WHERE conf_name='o_cur_version';

Replace '.$db->prefix.' with whatever your db prefix is (or remove it if you have none) and you'll be all done.


Edit 2: That will get you up to 1.2.0. You'll still have to run the other update script after wink

Tell me if you get any more errors

Re: Upgrade Help

I can't thank you enough for what you've done. Thanks.

Re: Upgrade Help

No trouble at all, it was just grabbing the stuff from the update script smile
I would however double check that everything is OK: I'm pretty sure that you'll have some un-necessary columns and tables lying around