pluginsGLPI / formcreator

GLPI Plugin Formcreator (DOWNLOAD : https://github.com/pluginsGLPI/formcreator/releases)
http://www.teclib-edition.com
GNU General Public License v3.0
172 stars 125 forks source link

Table 'glpi.glpi_plugin_formcreator_answers' doesn't exist #1345

Closed aveleztolsa closed 5 years ago

aveleztolsa commented 5 years ago

Hi all, I tried to upgrade from 2.7.0 to 2.8.0 and when I click on update, I have this error: `Upgrade glpi_plugin_formcreator_answers (0 segundos)

Table 'glpi.glpi_plugin_formcreator_answers' doesn't exist

Please, check migration log`

When I try to roll back to 2.7.0, I have the same error now. Any ideas?

Thanks in advance.

btry commented 5 years ago

Hi

1st : to roll back you must restore the backup of your database you created before the upgrade. The upgrade code does not supports downgrade.

2nd : On the migration log you will find a backtrace. This is a file named glpi/files/_log/migration_to2.8.0.log . Please review it and show it here.

aveleztolsa commented 5 years ago

It is not possible to restore the database backup.

Here's the log for 2.8.0 upgrade: 0 segundos for "Upgrade to schema version 2.5" @ 2019-03-11 14:38:01 [711@voyager2] Table 'glpi.glpi_plugin_formcreator_answers' doesn't exist Backtrace : plugins/formcreator/install/upgrade_to_2.5.php:75 plugin_formcreator_upgrade_error() plugins/formcreator/install/upgrade_to_2.5.php:47 PluginFormcreatorUpgradeTo2_5->updateAnswer_2_5() plugins/formcreator/install/install.php:136 PluginFormcreatorUpgradeTo2_5->upgrade() plugins/formcreator/install/install.php:104 PluginFormcreatorInstall->upgradeOneStep() plugins/formcreator/hook.php:50 PluginFormcreatorInstall->upgrade() inc/plugin.class.php:482 plugin_formcreator_install() : Plugin->install() front/plugin.form.php:47 call_user_func()

The traceback is the same when trying to roll back.

btry commented 5 years ago

Hi

From the backtrace I see that the upgrade system tried to upgrade from a version earlier than 2.5.0. This is very likely the cause of your problem.

To investigate further, we need to restore your backup on a test instance and do some checks.

aveleztolsa commented 5 years ago

We found a workaround to solve the issue. If you do not have so much info in the mysql tables I recommend that. We removed the plugin and we dropped off the tables in mysql, then we reinstalled from zero the plugin and it worked.

btry commented 5 years ago

Hi @aveleztolsa

Yes this will work for sure, but I would appreciate to have all required data to fix the upgrade system if needed :). All users of the plugin would appreciate a bug free upgrade.

btry commented 5 years ago

Hi,

No fedback, then I close.

diogosiqueira commented 2 years ago

Na pasta do formcreator tem o .sql para criação das tabelas, você pode inserir esse dump no banco manualmente e ativar o plugin novamente. Acesse /var/www/html/glpi/plugins/formcreator/install/mysql/plugin_formcreator_empty.sql

Entre no banco do glpi e remova todas as tabelas de plugins do formcreator

drop table glpi_plugin_formcreator_forms_languages; drop table glpi_plugin_formcreator_targets_actors;

mysql -uroot -p'PASSWORD' glpi < plugin_formcreator_empty.sql (Sugiro realizar um dump/backup do banco antes)

Se quiser salvar e tenha os formulários antes faça um dump também e volte depois:

mysqldump -uglpi -p glpi glpi_plugin_formcreator_answers glpi_plugin_formcreator_categories glpi_plugin_formcreator_conditions glpi_plugin_formcreator_entityconfigs glpi_plugin_formcreator_formanswers glpi_plugin_formcreator_forms glpi_plugin_formcreator_forms_languages glpi_plugin_formcreator_forms_profiles glpi_plugin_formcreator_forms_validators glpi_plugin_formcreator_issues glpi_plugin_formcreator_items_targettickets glpi_plugin_formcreator_questiondependencies glpi_plugin_formcreator_questionranges glpi_plugin_formcreator_questionregexes glpi_plugin_formcreator_questions glpi_plugin_formcreator_sections glpi_plugin_formcreator_targetchanges glpi_plugin_formcreator_targets_actors glpi_plugin_formcreator_targettickets > /var/tmp/formcreator.sql

EunirCarolino commented 2 years ago

Ola. Amigo, fiz exatamente isso mas ainda continua reclamando do tablespaces...

[root@glpi mysql]# mysql -u root glpi < plugin_formcreator_empty.sql ERROR 1813 (HY000) at line 4: Tablespace for table 'glpi.glpi_plugin_formcreator_answers' exists. Please DISCARD the tablespace before IMPORT