Umami is no longer compatible with MariaDB now
Describe the Bug
Hello,
I was trying to upgrade from v2.10.2 to v2.12.1. It fails, unfortunately. When I get into the error I saw MariaDB doesn't support BIN_TO_UUID and UUID_TO_BIN functions which made the migration failed.
I've reverted to the v2.10.2 version. However, I had to delete the prisma migration entry which was related to the error and deleted visit_id field in the website_events table.
Will you support mariadb again in the next versions?
Database
MySQL
Relevant log output
A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
Migration name: 05_add_visit_id
Database error code: 1060
Database error:
Duplicate column name 'visit_id'
Please check the query number 1 from the migration file.
0: sql_schema_connector::apply_migration::apply_script
with migration_name="05_add_visit_id"
at schema-engine/connectors/sql-schema-connector/src/apply_migration.rs:106
1: schema_core::commands::apply_migrations::Applying migration
with migration_name="05_add_visit_id"
at schema-engine/core/src/commands/apply_migrations.rs:91
2: schema_core::state::ApplyMigrations
at schema-engine/core/src/state.rs:226
### Which Umami version are you using? (if relevant)
v2.12.1
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
Docker
Duplicate of #2645. I fixed it using This gist to essentially build the MySQL functions in my MariaDB instance.
Oh, I missed the other issue when I was checking it. Well, I had tried that hacky solution that didn't work for me.
I am still getting the below error:
Truncated incorrect DECIMAL value: '3\xB4\xB5\xAA\x9D\xFD\xBF\x02V!\x93\xB4e6\x10\x85'
A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
Migration name: 05_add_visit_id
Database error code: 1292
Database error:
Truncated incorrect DECIMAL value: '3\xB4\xB5\xAA\x9D\xFD\xBF\x02V!\x93\xB4e6\x10\x85'
Please check the query number 2 from the migration file.
0: sql_schema_connector::apply_migration::apply_script
with migration_name="05_add_visit_id"
at schema-engine/connectors/sql-schema-connector/src/apply_migration.rs:106
1: schema_core::commands::apply_migrations::Applying migration
with migration_name="05_add_visit_id"
at schema-engine/core/src/commands/apply_migrations.rs:91
2: schema_core::state::ApplyMigrations
at schema-engine/core/src/state.rs:226
This issue is stale because it has been open for 60 days with no activity.
This issue was closed because it has been inactive for 7 days since being marked as stale.
Up
Hello @mikecao, I still cannot upgrade to the new version from umami:mysql-v2.10.2 image for months. Using npx prisma migrate resolve --applied "05_add_visit_id" command will fix the issue?
If so, when and where I should run this on my docker deployment? Could you lead me?
I cant install Umami since we use MariaDB and the Migration crashes. Is there a plan to support MariaDB again?
I've fixed the issue with these instructions:
https://github.com/umami-software/umami/issues/2645#issuecomment-2039226061
But yeah sadly it's not available on the official documentation or on the troubleshooting section.