Page 1 of 1

upgrade.sql: Duplicate column name

PostPosted: Thu Feb 19, 2015 1:42 am
by THUFIR
I'm upgrading ViciDial Redux and In the UPGRADE file, which for me is at:

/usr/src/astguiclient/trunk/UPGRADE

I see:
Code: Select all
2. upgrade the MySQL asterisk database(you have two options):
    A. Running the upgrade file directly from Linux:
        mysql -f --database=asterisk < /path/from/root/extras/upgrade_2.10.sql


which results in these errors:

Code: Select all
tleilax:~ #
tleilax:~ # mysql -f --database=asterisk < /usr/src/astguiclient/trunk/extras/upgrade_2.10.sql
ERROR 1060 (42S21) at line 5: Duplicate column name 'wrapup_seconds_override'
ERROR 1060 (42S21) at line 9: Duplicate column name 'no_agent_ingroup_redirect'
ERROR 1060 (42S21) at line 10: Duplicate column name 'no_agent_ingroup_id'
ERROR 1060 (42S21) at line 11: Duplicate column name 'no_agent_ingroup_extension'
ERROR 1060 (42S21) at line 12: Duplicate column name 'pre_filter_phone_group_id'
ERROR 1060 (42S21) at line 13: Duplicate column name 'pre_filter_extension'
ERROR 1060 (42S21) at line 17: Duplicate column name 'wrapup_bypass'
ERROR 1060 (42S21) at line 21: Duplicate column name 'wrapup_after_hotkey'
ERROR 1060 (42S21) at line 25: Duplicate column name 'callback_time_24hour'
ERROR 1060 (42S21) at line 29: Duplicate column name 'callback_active_limit'
ERROR 1060 (42S21) at line 30: Duplicate column name 'callback_active_limit_override'
ERROR 1060 (42S21) at line 34: Duplicate column name 'active_modules'
ERROR 1060 (42S21) at line 35: Duplicate column name 'allow_chats'
ERROR 1060 (42S21) at line 36: Duplicate column name 'allow_chats'
ERROR 1050 (42S01) at line 39: Table 'vicidial_avatars' already exists
ERROR 1050 (42S01) at line 51: Table 'vicidial_avatar_audio' already exists
ERROR 1060 (42S21) at line 65: Duplicate column name 'comments_all_tabs'
ERROR 1060 (42S21) at line 66: Duplicate column name 'comments_dispo_screen'
ERROR 1060 (42S21) at line 67: Duplicate column name 'comments_callback_screen'
ERROR 1060 (42S21) at line 68: Duplicate column name 'qc_comment_history'
ERROR 1060 (42S21) at line 72: Duplicate column name 'show_previous_callback'
ERROR 1060 (42S21) at line 76: Duplicate column name 'clear_script'
ERROR 1050 (42S01) at line 85: Table 'audio_store_details' already exists
ERROR 1050 (42S01) at line 96: Table 'www_phrases' already exists
ERROR 1060 (42S21) at line 112: Duplicate column name 'enable_languages'
ERROR 1060 (42S21) at line 114: Duplicate column name 'modify_languages'
ERROR 1050 (42S01) at line 116: Table 'vicidial_languages' already exists
ERROR 1050 (42S01) at line 125: Table 'vicidial_language_phrases' already exists
ERROR 1060 (42S21) at line 138: Duplicate column name 'cpd_unknown_action'
ERROR 1060 (42S21) at line 140: Duplicate column name 'na_call_url'
ERROR 1060 (42S21) at line 142: Duplicate column name 'insert_date'
ERROR 1060 (42S21) at line 146: Duplicate column name 'selected_language'
ERROR 1060 (42S21) at line 147: Duplicate column name 'user_choose_language'
ERROR 1060 (42S21) at line 149: Duplicate column name 'active'
ERROR 1060 (42S21) at line 151: Duplicate column name 'language_method'
ERROR 1060 (42S21) at line 155: Duplicate column name 'ignore_group_on_search'
ERROR 1061 (42000) at line 159: Duplicate key name 'vlali'
ERROR 1061 (42000) at line 160: Duplicate key name 'vlaus'
ERROR 1060 (42S21) at line 168: Duplicate column name 'local_call_time'
ERROR 1060 (42S21) at line 170: Duplicate column name 'manual_dial_search_filter'
ERROR 1060 (42S21) at line 178: Duplicate column name 'on_login_report'
ERROR 1060 (42S21) at line 180: Duplicate column name 'on_login_report'
ERROR 1050 (42S01) at line 184: Table 'vicidial_callbacks_archive' already exists
tleilax:~ #


I'm not entirely sure of the significance to these errors. I should edit the upgrade_2.10.sql file and remove those duplicates? Or, is it saying "upgrade went ok, just didn't create these duplicate entries"?


- ViciBox Redux v.6.0.3-141118

following upgrade guide at:

http://wiki.vicidial.org/index.php/SVN:howto

Re: upgrade.sql: Duplicate column name

PostPosted: Thu Feb 19, 2015 1:59 am
by THUFIR
I think I see. The last line is:

Code: Select all
UPDATE system_settings SET db_schema_version='1403',db_schema_update_date=NOW() where db_schema_version < 1403;


and, when I look in Admin->System Settings that's my version number for the DB schema. So, delete all lines above that line. (Effectively, do nothing to the db.) I see, it's kinda like rake, it's a sort of build tool. Well, hopefully, I'm at least learning something :)

Is that right?