Metabase DB Migration

Hi, currently i’m migrating metabase data from local H2 database to amazon rds postgres. I run the migration command and found this error

Command failed with exception: Table "COMPUTATION_JOB" not found; SQL statement:
SELECT * FROM computation_job [42102-194]

I’m sure the computation_job table already created on the database, any idea on this case ?

What Metabase version are you on?

Is the table present in your H2 source table?

Seem the current latest definition of that table is set in the database migration file around here https://github.com/metabase/metabase/blob/c1ab5aedb2cec270402537722296731f0bdb05fe/resources/migrations/000_migrations.yaml#L3937 around v0.27.0 … and there was a bit back and forth in some previous migrations.

The existing system running with docker and using v0.26.2. I’m doing the migration from backup db file using metabase.jar (v0.29.0). How’s the workaround to do migration for this case ?

To be honest, I’m not sure.

But here’s my thinking:
It looks like you’re trying to do two things simultaneously. Both migrate between H2 and Postgres AND upgrade across Metabase versions. I would separate these steps.

With the versions you mention it seems that you exactly are crossing the boundary where the computation_job got added to the schema. That would match with the error message about that SELECT * FROM computation_job would fail on your source database (H2).

To sum up: Probably no need to workaround, just don’t do something unsupported! But first do a upgrade then the migration across databases.

Hi jornh, thanks for the suggestion. It’s working now, looks like this is effect from failed migration before. I just drop all table from my RDS and did migration again and it’s updated to v0.29.0 now.

1 Like