Upgrade metabase enterprise to v1.48.0

Hello guys,

I have update my metabase enterprise to latest version and gets the follow error, i see on github and other persons have the same error, any help about this?

I running metabase on EKS deployed with helm-chart.

2023-12-15 12:47:20,939 INFO db.liquibase :: Checking if Database has unrun migrations...
2023-12-15 12:47:22,278 INFO db.liquibase :: Database has unrun migrations. Waiting for migration lock to be cleared...
2023-12-15 12:47:22,463 INFO db.liquibase :: Migration lock is cleared. Running 23 migrations ...
2023-12-15 12:47:23,685 ERROR liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v48.00-033::noahmoss encountered an exception.
2023-12-15 12:47:23,730 ERROR metabase.core :: Metabase Initialization FAILED
liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for changeset migrations/001_update_migrations.yaml::v48.00-033::noahmoss:
     Reason: liquibase.exception.DatabaseException: (conn=67850) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'agg_recipients as ( [Failed SQL: (1064) create or replace view v_subscriptions as
with agg_recipients as (
    select
        pulse_channel_id,
        group_concat(core_user.email) as recipients
    from pulse_channel_recipient
        left join core_user on pulse_channel_recipient.user_id = core_user.id
    group by pulse_channel_id
)
select
    pulse.id as entity_id,
    concat('pulse_', pulse.id) as entity_qualified_id,
    pulse.created_at,
    pulse.updated_at,
    creator_id,
    archived,
    concat('dashboard_', dashboard_id) as dashboard_qualified_id,
    pulse_channel.schedule_type,
    pulse_channel.schedule_day,
    pulse_channel.schedule_hour,
    channel_type as recipient_type,
    agg_recipients.recipients,
    details as recipient_external,
    parameters
    from pulse
        left join pulse_channel on pulse.id = pulse_channel.pulse_id
        left join agg_recipients on pulse_channel.id = agg_recipients.pulse_channel_id
    where alert_condition is null

We just updated the release notes, Metabase 48+ is not compatible with MySQL < 8. Also MySQL 5.x is EoL. Please upgrade your application database to MySQL 8 to upgrade

Thanks for the answer Luiggi, im not able now to upgrade the MySQL to version 8, when i trying to downgrade the metabase, he gives me "cant find table database.migration", any other type to solve this?

Im using the image metabase/metabase-enterprise:v1.47.9

Thanks a lot man this is very critical for my company.

to downgrade you need to restore a database backup, have you taken a backup before trying to upgrade?

im using latest version on image tag since upgrade to enterprise version one/two years ago, i think im in a huge problem D:

Ok I just tested the "migrate down" command and it works.

Workaround: you need to be able to connect to the application database and with the v48 JAR run
"java -jar metabase.jar migrate down"

that command will fix the schema of the application database and set it up again for v47. Then start v47 again

1 Like