Error migrating trailing 3.17 to 4.0

br2e6 years ago
INFO|5555/0|Service traccar|19-02-01 02:33:56|Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-3.17::changelog-3.17::author:
INFO|5555/0|Service traccar|19-02-01 02:33:56|     Reason: liquibase.exception.DatabaseException: Duplicate column name 'maintenanceid' [Failed SQL: ALTER TABLE rastreamento.events ADD maintenanceid INT NULL]
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at liquibase.changelog.ChangeSet.execute(ChangeSet.java:637)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:78)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at liquibase.Liquibase.update(Liquibase.java:202)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at liquibase.Liquibase.update(Liquibase.java:179)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at liquibase.Liquibase.update(Liquibase.java:175)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:307)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at org.traccar.database.DataManager.<init>(DataManager.java:88)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at org.traccar.Context.init(Context.java:361)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at org.traccar.Main.main(Main.java:35)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  ... 6 more
INFO|5555/0|Service traccar|19-02-01 02:33:56|Caused by: liquibase.exception.DatabaseException: Duplicate column name 'maintenanceid' [Failed SQL: ALTER TABLE rastreamento.events ADD maintenanceid INT NULL]
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1229)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1211)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at liquibase.changelog.ChangeSet.execute(ChangeSet.java:600)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  ... 15 more
INFO|5555/0|Service traccar|19-02-01 02:33:56|Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'maintenanceid'
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at com.mysql.jdbc.Util.getInstance(Util.java:408)
INFO|5555/0|Service traccar|19-02-01 02:33:56|  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
FINEST|5555/0|Service traccar|19-02-01 02:33:56|        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976)
FINEST|5555/0|Service traccar|19-02-01 02:33:56|        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912)
FINEST|5555/0|Service traccar|19-02-01 02:33:56|        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
FINEST|5555/0|Service traccar|19-02-01 02:33:56|        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
FINEST|5555/0|Service traccar|19-02-01 02:33:56|        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2482)
FINEST|5555/0|Service traccar|19-02-01 02:33:56|        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2440)
FINEST|5555/0|Service traccar|19-02-01 02:33:56|        at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:845)
FINEST|5555/0|Service traccar|19-02-01 02:33:56|        at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:745)
FINEST|5555/0|Service traccar|19-02-01 02:33:56|        at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352)
FINEST|5555/0|Service traccar|19-02-01 02:33:56|        ... 20 more
INFO|wrapper|Service traccar|19-02-01 02:33:57|waitpid 5555 59136
INFO|wrapper|Service traccar|19-02-01 02:33:57|exit code posix process: 59136 application(status/signal): 231/0
Anton Tananaev6 years ago

Something went wrong with database migration. You would probably have to do it manually or start over if you have a database backup.

br2e6 years ago

My God is a 2gb database

Anton Tananaev6 years ago

Have you made a backup?

br2e6 years ago

yes I have more see well once I did an upgrade with it to 3.17 I did not like the version that at the time had some bugs I did a downgrade the tables maintenance I left as I noticed that in the users table only the admin field was renamed to administrator made manual the change and is up to now working fine now I made the up direct to the version 4.2 generated these error beginning where what it recommends to me before doing it manually

br2e6 years ago

Forgive me for version 4.0

Anton Tananaev6 years ago

OK, so you manually tweaked the database? That's the problem. You would need to manually fix it now.

br2e6 years ago

after daily occurrence but before

br2e6 years ago

3.17 for the 3.16 download grid what tables should I change out users admin field?

Ernesto Vallejo6 years ago

Check schema folder for changes along versions.