Hello,
When I try to update the version of metabase from 0.50.10 to 0.50.11, I got this error :
Caused by: liquibase.exception.DatabaseException: ERREUR: erreur de syntaxe sur ou près de « ( » Position: 87 [Failed SQL: (0) ALTER TABLE metabase_field ADD COLUMN unique_field_helper INTEGER GENERATED ALWAYS AS (
CASE WHEN is_defective_duplicate = TRUE THEN NULL ELSE (
CASE WHEN parent_id IS NULL THEN 0 ELSE parent_id END
) END
) STORED]
To Reproduce
helm repo add pmint93 https://pmint93.github.io/helm-charts
helm repo update
helm install metabase pmint93/metabase -f values.yaml
Using a values.yaml similar to this
image:
tag: v0.50.10
database:
type: postgres
host: postgre.********
port: "5432"
dbname: metabase
username: *********
password: *********
Upgrade the version to v0.50.11 by updating your values.yaml
image:
tag: v0.50.11
Execute the following command
helm upgrade metabase pmint93/metabase -f values.yaml
The update will fail on migration
Logs
Caused by: liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for changeset migrations/001_update_migrations.yaml::v49.2024-06-27T00:00:07::calherries: │
│ Reason: liquibase.exception.DatabaseException: ERREUR: erreur de syntaxe sur ou près de « ( » │
│ Position: 87 [Failed SQL: (0) ALTER TABLE metabase_field ADD COLUMN unique_field_helper INTEGER GENERATED ALWAYS AS ( │
│ CASE WHEN is_defective_duplicate = TRUE THEN NULL ELSE (CASE WHEN parent_id IS NULL THEN 0 ELSE parent_id END) END │
│ ) STORED]
Information about your Metabase installation
{
"browser-info": {
"language": "fr",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0",
"vendor": ""
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.23+9",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.23",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.23+9",
"os.name": "Linux",
"os.version": "5.15.0-113-generic",
"user.language": "en",
"user.timezone": "UTC"
},
"metabase-info": {
"databases": [
"postgres"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "11.12 (Debian 11.12-0+deb10u1)"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.7.3"
}
},
"run-mode": "prod",
"version": {
"date": "2024-07-04",
"tag": "v0.50.10",
"hash": "49d9e46"
},
"settings": {
"report-timezone": null
}
}
}
I also create an issue on github : (Migrate from 0.50.10 to 0.50.11 · Issue #46063 · metabase/metabase · GitHub)