Running a FreePBX Distro.
When upgrading from 2.10 to 2.11, the IVR module failed with error (appended at end) that ivr_dests table does not exist. Figuring that would be easy, I went to several other running systems that have successfully upgraded IVR to 220.127.116.11 and went to grab that table schema only to find those other systems do not have an ivr_dests table (but they work just fine).
So next I tried uninstall/reinstall of the IVR module, but it generates the same error.
In the meantime the IVR module sits disabled.
Please wait while module actions are performed
ALTER TABLE ivr_dests ADD ivr_ret TINYINT(1) NOT NULL DEFAULT 0; [nativecode=1146 ** Table ‘asterisk.ivr_dests’ doesn’t exist]
: ALTER TABLE ivr_dests ADD ivr_ret TINYINT(1) NOT NULL DEFAULT 0; [nativecode=1146 ** Table ‘asterisk.ivr_dests’ doesn’t exist]
Please update your Framework to the current version 18.104.22.168
I upgraded framework (and core) but the IVR still give same error.
A brief look at the code shows that the only time you should hit that code is if you are going through migrating. Can you give me a print out of the following:
amportal a m
show tables like 'ivr%';
Also was the a restore from an older version of anything by any chance?
(1) This system is only a few months old (installed as 2.10) and the upgrade was pretty standard.
mysql> show tables like ‘ivr%’;
| Tables_in_asterisk (ivr%) |
| ivr |
| ivr_details |
2 rows in set (0.00 sec)
I have a fairly large number of servers running FPBX of varying vintages from 2.9 though 2.11, and the ones running 2.11 include ones that started as 2.9 or earlier and have been upgraded all the way up.
I took a look at several of these servers and everyone is using IVR tables ivr_entries and ivr_details.
This troublesome machine is the only one that is using ivr and ivr_details.
Not one of them has a table ivr_dests that is causing this failure. I can speculate that ivr_details.
Did FPBX change the table design to new names and somehow failed to migrate in one of the upgrades? Unfortunately this is a production machine so I am not going to run experiments but I do have a strong suspicion that ivr is the new table name for ivr_entries and ivr_dests is the new name for ivr_details. If that is true, I should be able to make new tables up, copy over the data accordingly and move forward. However, I am not at all sure that even if this worked that there would not be unintended consequences down the road.
In appears that something prevented the table from being updated during migration, as FreePBX should be renaming the older tables to it’s new names and add/changing any fields necessary. In fact during the migrating ivr_dests becomes ivr_entries and ivr becomes ivr_details. You can see the schema for the tables in install.php of the ivr module, or at http://git.freepbx.org/projects/FREEPBX/repos/ivr/browse/install.php, to see all the field they should have during a new install.
After a little messing around, I manually created the ivr_details and ivr_entries and we are back in business.