My metabase current version was 0.32.
And now i am trying to upgrade to latest.
after stopping the old metabase and running the new one, I am getting the below error.
i was running the postgres db in different container for data persistency . But new Metabase is complaining field already exist (which i believe it should.)
Reason: liquibase.exception.DatabaseException: ERROR: column "last_analyzed" of relation "metabase_field" already exists [Failed SQL: ALTER TABLE public.metabase_field ADD last_analyzed TIMESTAMP WITH TIME ZONE]
I can drop the field from metabase_field Table and retry the deployment. But I am not sure if that will work.
So you were running 0.32.0 and now you’re trying to upgrade to 0.32.4?
There isn’t any changes to the backend since 0.32.0, so it shouldn’t run any migrations.
Can just you post the log from start until the error?
EDIT: You can always make a backup of the database, drop the column, start Metabase to see if that fixes it. If not, then revert to the backup.
It looks like something is completely corrupted in your database. It’s trying to do migration for changeset 32, which is several years old.
Have you been downgrading versions - going back and forth between them, meaning using 0.30, then trying 0.32, then going to 0.31 and so on, with the same database?
You have to use the tags and then using the same tag, when running the container:
docker pull metabase/metabase:v0.32.3
Thanks for your help,
no i have not tried to downgrade version ever. I tried version v0.32.3 but same problem.
Is there a way to stop database migration as i need to run metabase by connecting to postgres.
this metabase were used by our BA and i will be in trouble if data are lost.
Use the env variable
I’m not sure what has happened to your database, but maybe the migration from H2 to Postgres went wrong. Without knowing exactly which versions you used with which databases, then it’s difficult to know. Your logs should have that information.
Great, great help for this flamber,
What i did is fired a simple H2 metabase copied the databasechangelog from h2 to my postgres DB.
For some reason i lost record in the table with id 32, which was throwing error.
Your hint of changeset 32 helped like a light bomb.
Thanks a lot