Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-11529

Sql migration returns error on "Users_Temp" table

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Critical Critical
    • 4.6.0
    • 4.6.0
    • Plugin : Web
    • None
    • 4.6 RC4

      When migrating to version 4.6RC3 I have this error :

      org.ametys.core.migration.MigrationException: Impossible to run the upgrade: Upgrade '202301013T0000' of type 'sql' for version: 'Version '0' for component 'org.ametys.web.core.SqlTablesInit' (Manual initialization.) dataSource id: 'SQL-default-datasource', databaseType: 'mysql'' (Automatic Upgrade.)
      ....
      Caused by: java.sql.SQLException: Unable to execute SQL: 'ALTER TABLE Users_Temp ADD COLUMN firstname VARCHAR(64)' at line 16
      ...
      Caused by: java.sql.SQLSyntaxErrorException: Duplicate column name 'firstname'
      at com.mysql.cj.jdbc.exceptions.SQLError#createSQLException:120
      at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping#translateException:122
      at com.mysql.cj.jdbc.StatementImpl#executeInternal:763
      at com.mysql.cj.jdbc.StatementImpl#execute:648
      

      because in "Users_Temp" table I have first name and lastname columns

      at org.apache.commons.dbcp2.DelegatingStatement#execute:193
      at org.apache.commons.dbcp2.DelegatingStatement#execute:193
      at org.ametys.core.script.SQLScriptHelper#_execute:480
      ... 55 more

            lperier Laurence Perier
            lperier Laurence Perier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: