Liquibase changes

renaud7 years ago

Hello,
Is there a way to force liquibase to update the database? I upgraded to 3.10, but the database did not upgrade properly, so I can't add any devices or such as the account is "at maximum".

Anton Tananaev7 years ago

Why didn't it update properly? What do you see in the logs?

renaud7 years ago

Probably because I went from a snapshot which had already updated to another 3.10 schema.
There is not much in the logs, but I get errors in the web interface like "unknown column 'disabled' in 'field' list"

INFO 2/13/17 10:04 AM: liquibase: Reading from traccar.DATABASECHANGELOG
INFO 2/13/17 10:04 AM: liquibase: /var/www/traccar/schema/changelog-master.xml: changelog-3.8::changelog-3.8-dropuniquetoken::author: Change set changelog-3.8::changelog-3.8-dropuniquetoken::author failed, but failOnError was false.  Error: Can't DROP 'uk_user_token'; check that column/key exists [Failed SQL: ALTER TABLE traccar.users DROP KEY uk_user_token]
INFO 2/13/17 10:04 AM: liquibase: Successfully released change log lock
Anton Tananaev7 years ago

You would have to add another changelog file to apply schema modifications that were added after you tool snapshot of the code.

renaud7 years ago

That's what I did, but it doesn't apply correctly. Anyway, I found another way to do it.

netluca17 years ago

Hi I have the same problem

Anton Tananaev7 years ago

@netluca1, I have already explained the solution.