Menu

Migration from 1.2.1 to 2.0.3 stalls on error ALTER VIEW

Patrick
2014-11-25
2015-11-26
  • Patrick

    Patrick - 2014-11-25

    When doing a migration, the installer stops at about 40% saying:

    An exception occurred: Failed to issue SQL query: query = ALTER VIEW view_TriggerOnStateEnter AS SELECT DISTINCT _priv_trigger_onstateenter.id AS id, _priv_trigger.description AS descr iption, _priv_trigger_onobject.target_class AS target_class, _priv_trigger_onobject.filter AS filter, _priv_trigger_onstatechange.state AS state, _priv_trigger.realclass AS finalclass, CAST(CONCAT(COALE
    SCE(_priv_trigger.description, '')) AS CHAR) AS friendlyname FROM priv_trigger_onstateenter AS _priv_trigger_onstateenterINNER JOIN (priv_trigger AS _priv_trigger ) ON _priv_trigger_onstateenter.id = _priv_tr igger.idINNER JOIN (priv_trigger_onobject AS _priv_trigger_onobject ) ON _priv_trigger_onstateenter.id = _priv_trigger_onobject.idINNER JOIN (priv_trigger_onstatechange AS _priv_trigger_onstatechange ) ON _p riv_trigger_onstateenter.id = _priv_trigger_onstatechange.id WHERE 1 , mysql_error = 'db033491_itop.view_TriggerOnStateEnter' is not VIEW, mysql_errno = 1347 at line 290 in file /newitop/core/cmdbsource.class.inc.php

    Any way to get around this?

     
  • KillianMills

    KillianMills - 2015-09-11

    I have a very similar problem, stops at 40% and has this message:

    Failed to issue SQL query: query = ALTER VIEW cp_itopview_TriggerOnPortalUpdate AS SELECT DISTINCT _cp_itoppriv_trigger_onportalupdate.id AS id, _cp_itoppriv_trigger.description AS description, _cp_itoppriv_trigger_onobject.target_class AS target_class, _cp_itoppriv_trigger.realclass AS finalclass, CAST(CONCAT(COALESCE(_cp_itoppriv_trigger.description, '')) AS CHAR) AS friendlyname FROM cp_itoppriv_trigger_onportalupdate AS _cp_itoppriv_trigger_onportalupdateINNER JOIN (cp_itoppriv_trigger AS _cp_itoppriv_trigger ) ON _cp_itoppriv_trigger_onportalupdate.id = _cp_itoppriv_trigger.idINNER JOIN (cp_itoppriv_trigger_onobject AS _cp_itoppriv_trigger_onobject ) ON _cp_itoppriv_trigger_onportalupdate.id = _cp_itoppriv_trigger_onobject.id WHERE 1 , mysql_error = 'itop.cp_itopview_TriggerOnPortalUpdate' is not VIEW, mysql_errno = 1347

    I know this is an old post but if anybody could help it would be greatly appreciated.

     
  • Xtophe38

    Xtophe38 - 2015-11-26

    Hello,

    We met the same problem during a 2.1.0 to 2.2.0 migration: 'xx' is not VIEW, mysql_errno = 1347. When looking at the content of the database, it appears that the view in question doesn't exist as a view... but as a table. This may happen when dumping the database and restoring it: views are transformed into tables.

    In order to correct the problem, just drop the tables called view_xxx. iTop setup will recreate them.

    Note that views in iTop are not used by the application. They are here for 'end users' who may want to see the attributes of an iTop object, whitout going through the different tables that actually make that object.

     

Log in to post a comment.