Update from 0.33.7 to 0.36.4 failed

09-01 17:38:16 ERROR changelog.ChangeSet :: Change Set migrations/000_migrations.yaml::1::agilliland failed. Error: (conn=103) Table ‘core_user’ already exists [Failed SQL: CREATE TABLE metabase.core_user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(254) NOT NULL, first_name VARCHAR(254) NOT NULL, last_name VARCHAR(254) NOT NULL, password VARCHAR(254) NOT NULL, password_salt VARCHAR(254) DEFAULT ‘default’ NOT NULL, date_joined datetime NOT NULL, last_login datetime NULL, is_staff BIT(1) NOT NULL, is_superuser BIT(1) NOT NULL, is_active BIT(1) NOT NULL, reset_token VARCHAR(254) NULL, reset_triggered BIGINT NULL, CONSTRAINT PK_CORE_USER PRIMARY KEY (id), UNIQUE (email)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
09-01 17:38:16 WARN metabase.util :: auto-retry metabase.db.liquibase$migrate_up_if_needed_BANG_$fn__20937@53390f33: Migration failed for change set migrations/000_migrations.yaml::1::agilliland:
Reason: liquibase.exception.DatabaseException: (conn=103) Table ‘core_user’ already exists [Failed SQL: CREATE TABLE metabase.core_user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(254) NOT NULL, first_name VARCHAR(254) NOT NULL, last_name VARCHAR(254) NOT NULL, password VARCHAR(254) NOT NULL, password_salt VARCHAR(254) DEFAULT ‘default’ NOT NULL, date_joined datetime NOT NULL, last_login datetime NULL, is_staff BIT(1) NOT NULL, is_superuser BIT(1) NOT NULL, is_active BIT(1) NOT NULL, reset_token VARCHAR(254) NULL, reset_triggered BIGINT NULL, CONSTRAINT PK_CORE_USER PRIMARY KEY (id), UNIQUE (email)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]

09-01 17:38:16 ERROR changelog.ChangeSet :: Change Set migrations/000_migrations.yaml::1::agilliland failed. Error: (conn=103) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
09-01 17:38:16 WARN metabase.util :: auto-retry metabase.db.liquibase$migrate_up_if_needed_BANG_$fn__20937@53390f33: Migration failed for change set migrations/000_migrations.yaml::1::agilliland:
Reason: liquibase.exception.DatabaseException: (conn=103) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]

09-01 17:38:16 ERROR changelog.ChangeSet :: Change Set migrations/000_migrations.yaml::1::agilliland failed. Error: (conn=103) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
09-01 17:38:16 ERROR metabase.core :: Metabase Initialization FAILED
liquibase.exception.MigrationFailedException: Migration failed for change set migrations/000_migrations.yaml::1::agilliland:
Reason: liquibase.exception.DatabaseException: (conn=103) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:637)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:83)
at liquibase.Liquibase.update(Liquibase.java:202)
at liquibase.Liquibase.update(Liquibase.java:179)
at liquibase.Liquibase.update(Liquibase.java:175)
at metabase.db.liquibase$migrate_up_if_needed_BANG_$fn__20937.invoke(liquibase.clj:126)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:423)
at metabase.util$do_with_auto_retries.invoke(util.clj:415)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:430)
at metabase.util$do_with_auto_retries.invoke(util.clj:415)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:430)
at metabase.util$do_with_auto_retries.invoke(util.clj:415)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:430)
at metabase.util$do_with_auto_retries.invoke(util.clj:415)
at metabase.db.liquibase$migrate_up_if_needed_BANG_.invokeStatic(liquibase.clj:126)
at metabase.db.liquibase$migrate_up_if_needed_BANG_.invoke(liquibase.clj:114)
at metabase.db$migrate_BANG_$fn__21717$fn__21718.invoke(db.clj:208)
at metabase.db.liquibase$do_with_liquibase.invokeStatic(liquibase.clj:38)
at metabase.db.liquibase$do_with_liquibase.invoke(liquibase.clj:29)
at metabase.db$migrate_BANG_$fn__21717.invoke(db.clj:203)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:807)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:776)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:852)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:776)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:789)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:776)
at metabase.db$migrate_BANG_.invokeStatic(db.clj:194)
at metabase.db$migrate_BANG_.invoke(db.clj:173)
at metabase.db$run_schema_migrations_BANG_.invokeStatic(db.clj:329)
at metabase.db$run_schema_migrations_BANG_.invoke(db.clj:323)
at metabase.db$setup_db_BANG__STAR_$fn__21799.invoke(db.clj:346)
at metabase.util$do_with_us_locale.invokeStatic(util.clj:656)
at metabase.util$do_with_us_locale.invoke(util.clj:642)
at metabase.db$setup_db_BANG__STAR_.invokeStatic(db.clj:344)
at metabase.db$setup_db_BANG__STAR_.invoke(db.clj:339)
at metabase.db$setup_db_from_env_BANG_.invokeStatic(db.clj:358)
at metabase.db$setup_db_from_env_BANG_.invoke(db.clj:351)
at metabase.db$setup_db_BANG_$fn__21804.invoke(db.clj:368)
at metabase.db$setup_db_BANG_.invokeStatic(db.clj:366)
at metabase.db$setup_db_BANG_.invoke(db.clj:361)
at metabase.core$init_BANG_.invokeStatic(core.clj:75)
at metabase.core$init_BANG_.invoke(core.clj:54)
at metabase.core$start_normally.invokeStatic(core.clj:119)
at metabase.core$start_normally.invoke(core.clj:113)
at metabase.core$_main.invokeStatic(core.clj:152)
at metabase.core$_main.doInvoke(core.clj:146)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at metabase.core.main(Unknown Source)
Caused by: liquibase.exception.DatabaseException: (conn=103) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1229)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1211)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:600)
… 50 more
Caused by: java.sql.SQLSyntaxErrorException: (conn=103) Table ‘core_organization’ already exists
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:243)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:164)
at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:258)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:349)
at org.mariadb.jdbc.MariaDbStatement.execute(MariaDbStatement.java:484)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352)
… 55 more
Caused by: java.sql.SQLException: Table ‘core_organization’ already exists
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(AbstractQueryProtocol.java:1599)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1461)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1424)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:178)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:343)
… 57 more
09-01 17:38:16 INFO metabase.core :: Metabase Shutting Down …
09-01 17:38:16 INFO metabase.server :: Shutting Down Embedded Jetty Webserver
09-01 17:38:16 INFO metabase.core :: Metabase Shutdown COMPLETE

Hi @rayn
So you’re using MySQL as the application database? Which version?
How are you upgrading? It looks like you’re trying to run the migration again.

Make sure that the database metabase is utf8mb4 and collation utf8mb4_unicode_ci

Yes, using mysql

Server version: 5.7.28 MySQL Community Server (GPL)

I backed up the 0.33.7 version of the database metabase, and set it to 0.36.4 version of the metadata. After startup, he had the above error

@rayn And what is the charset and collation of the database?

@flamber
±---------------------±-------------------+
| Variable_name | Value |
±---------------------±-------------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8mb4_unicode_ci |
| collation_server | utf8mb4_general_ci |
±---------------------±-------------------+

±-------------------------±----------------------------+
| Variable_name | Value |
±-------------------------±----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| character_sets_dir | /data/mysql/share/charsets/ |
±-------------------------±----------------------------+

@rayn
That is settings for MySQL, not specifically for the database metabase

Post the command you’re using to start Metabase with, when it fails to start.

±---------±------------------------------------------------------------------------------------------------+
| Database | Create Database |
±---------±------------------------------------------------------------------------------------------------+
| metabase | CREATE DATABASE metabase /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */ |
±---------±------------------------------------------------------------------------------------------------+

command: java -jar metabase.jar

@rayn I don’t know what the problem is, but it’s not detecting the table setting on startup, which is why it starts creating the base schema (same procedure as migration).

Post the entire log from startup to shutdown.

09-01 21:18:57 INFO metabase.core :: Starting Metabase version v0.36.4 (196c1f6 release-0.36.x) …
09-01 21:18:57 INFO metabase.core :: System info:
{“file.encoding” “UTF-8”,
“java.runtime.name” “OpenJDK Runtime Environment”,
“java.runtime.version” “11.0.7+10”,
“java.vendor” “AdoptOpenJDK”,
“java.vendor.url” “https://adoptopenjdk.net/”,
“java.version” “11.0.7”,
“java.vm.name” “OpenJDK 64-Bit Server VM”,
“java.vm.version” “11.0.7+10”,
“os.name” “Linux”,
“os.version” “3.10.0-957.el7.x86_64”,
“user.language” “en”,
“user.timezone” “Asia/Shanghai”}

09-01 21:18:57 INFO metabase.plugins :: Loading plugins in /home/serv/software/metabase/plugins…
Extract file /modules/snowflake.metabase-driver.jar -> /home/serv/software/metabase/plugins/snowflake.metabase-driver.jar took 155.0 ms
Extract file /modules/googleanalytics.metabase-driver.jar -> /home/serv/software/metabase/plugins/googleanalytics.metabase-driver.jar took 4.2 ms
Extract file /modules/druid.metabase-driver.jar -> /home/serv/software/metabase/plugins/druid.metabase-driver.jar took 2.8 ms
Extract file /modules/redshift.metabase-driver.jar -> /home/serv/software/metabase/plugins/redshift.metabase-driver.jar took 13.2 ms
Extract file /modules/sparksql.metabase-driver.jar -> /home/serv/software/metabase/plugins/sparksql.metabase-driver.jar took 300.4 ms
Extract file /modules/sqlite.metabase-driver.jar -> /home/serv/software/metabase/plugins/sqlite.metabase-driver.jar took 12.9 ms
Extract file /modules/sqlserver.metabase-driver.jar -> /home/serv/software/metabase/plugins/sqlserver.metabase-driver.jar took 5.6 ms
Extract file /modules/oracle.metabase-driver.jar -> /home/serv/software/metabase/plugins/oracle.metabase-driver.jar took 566.7 µs
Extract file /modules/vertica.metabase-driver.jar -> /home/serv/software/metabase/plugins/vertica.metabase-driver.jar took 459.4 µs
Extract file /modules/bigquery.metabase-driver.jar -> /home/serv/software/metabase/plugins/bigquery.metabase-driver.jar took 3.1 ms
Extract file /modules/presto.metabase-driver.jar -> /home/serv/software/metabase/plugins/presto.metabase-driver.jar took 924.9 µs
Extract file /modules/mongo.metabase-driver.jar -> /home/serv/software/metabase/plugins/mongo.metabase-driver.jar took 21.3 ms
Extract file /modules/google.metabase-driver.jar -> /home/serv/software/metabase/plugins/google.metabase-driver.jar took 5.1 ms
09-01 21:18:58 INFO plugins.dependencies :: Metabase cannot initialize plugin Metabase Oracle Driver due to required dependencies. Metabase requires the Oracle JDBC driver in order to connect to Oracle databases, but we can’t ship it as part of Metabase due to licensing restrictions. See https://metabase.com/docs/latest/administration-guide/databases/oracle.html for more details.

09-01 21:18:58 INFO plugins.dependencies :: Metabase Oracle Driver dependency {:class oracle.jdbc.OracleDriver} satisfied? false
09-01 21:18:58 INFO plugins.dependencies :: Plugins with unsatisfied deps: [“Metabase Oracle Driver”]
09-01 21:18:58 INFO plugins.dependencies :: Plugin ‘Metabase BigQuery Driver’ depends on plugin ‘Metabase Google Drivers Shared Dependencies’
09-01 21:18:58 INFO plugins.dependencies :: Metabase BigQuery Driver dependency {:plugin Metabase Google Drivers Shared Dependencies} satisfied? false
09-01 21:18:58 INFO plugins.dependencies :: Plugins with unsatisfied deps: [“Metabase Oracle Driver” “Metabase BigQuery Driver”]
09-01 21:18:58 DEBUG plugins.lazy-loaded-driver :: Registering lazy loading driver :presto…
09-01 21:18:58 INFO driver.impl :: Registered abstract driver :sql :truck:
Load driver :sql took 81.3 ms
09-01 21:18:58 INFO driver.impl :: Registered driver :presto (parents: [:sql]) :truck:
09-01 21:18:58 INFO plugins.dependencies :: Plugin ‘Metabase Google Analytics Driver’ depends on plugin ‘Metabase Google Drivers Shared Dependencies’
09-01 21:18:58 INFO plugins.dependencies :: Metabase Google Analytics Driver dependency {:plugin Metabase Google Drivers Shared Dependencies} satisfied? false
09-01 21:18:58 INFO plugins.dependencies :: Plugins with unsatisfied deps: [“Metabase Oracle Driver” “Metabase Google Analytics Driver” “Metabase BigQuery Driver”]
09-01 21:18:58 DEBUG plugins.lazy-loaded-driver :: Registering lazy loading driver :sqlserver…
09-01 21:18:58 INFO driver.impl :: Registered abstract driver :sql-jdbc (parents: [:sql]) :truck:
Load driver :sql-jdbc took 34.6 ms
09-01 21:18:58 INFO driver.impl :: Registered driver :sqlserver (parents: [:sql-jdbc]) :truck:
09-01 21:18:58 DEBUG plugins.lazy-loaded-driver :: Registering lazy loading driver :druid…
09-01 21:18:58 INFO driver.impl :: Registered driver :druid :truck:
09-01 21:18:58 DEBUG plugins.lazy-loaded-driver :: Registering lazy loading driver :google…
09-01 21:18:58 INFO driver.impl :: Registered abstract driver :google :truck:
09-01 21:18:58 INFO plugins.dependencies :: Metabase Google Analytics Driver dependency {:plugin Metabase Google Drivers Shared Dependencies} satisfied? true
09-01 21:18:58 INFO plugins.dependencies :: Metabase BigQuery Driver dependency {:plugin Metabase Google Drivers Shared Dependencies} satisfied? true
09-01 21:18:58 DEBUG plugins.initialize :: Dependencies satisfied; these plugins will now be loaded: [“Metabase BigQuery Driver” “Metabase Google Analytics Driver”]
09-01 21:18:58 WARN plugins.lazy-loaded-driver :: Warning: plugin manifest for :bigquery does not include connection properties
09-01 21:18:58 DEBUG plugins.lazy-loaded-driver :: Registering lazy loading driver :bigquery…
09-01 21:18:58 INFO driver.impl :: Registered driver :bigquery (parents: [:sql :google]) :truck:
09-01 21:18:58 DEBUG plugins.lazy-loaded-driver :: Registering lazy loading driver :googleanalytics…
09-01 21:18:58 INFO driver.impl :: Registered driver :googleanalytics (parents: [:google]) :truck:
09-01 21:18:58 DEBUG plugins.lazy-loaded-driver :: Registering lazy loading driver :hive-like…
09-01 21:18:58 INFO driver.impl :: Registered abstract driver :hive-like (parents: [:sql-jdbc]) :truck:
09-01 21:18:58 DEBUG plugins.lazy-loaded-driver :: Registering lazy loading driver :sparksql…
09-01 21:18:58 INFO driver.impl :: Registered driver :sparksql (parents: [:hive-like]) :truck:
09-01 21:18:58 INFO plugins.dependencies :: Metabase cannot initialize plugin Metabase Vertica Driver due to required dependencies. Metabase requires the Vertica JDBC driver in order to connect to Vertica databases, but we can’t ship it as part of Metabase due to licensing restrictions. See https://metabase.com/docs/latest/administration-guide/databases/vertica.html for more details.

09-01 21:18:58 INFO plugins.dependencies :: Metabase Vertica Driver dependency {:class com.vertica.jdbc.Driver} satisfied? false
09-01 21:18:58 INFO plugins.dependencies :: Plugins with unsatisfied deps: [“Metabase Oracle Driver” “Metabase Vertica Driver”]
09-01 21:18:58 DEBUG plugins.lazy-loaded-driver :: Registering lazy loading driver :redshift…
09-01 21:18:58 INFO driver.impl :: Registered driver :postgres (parents: [:sql-jdbc]) :truck:
Load driver :postgres took 13.8 ms
09-01 21:18:58 INFO driver.impl :: Registered driver :redshift (parents: [:postgres]) :truck:
09-01 21:18:58 DEBUG plugins.lazy-loaded-driver :: Registering lazy loading driver :sqlite…
09-01 21:18:58 INFO driver.impl :: Registered driver :sqlite (parents: [:sql-jdbc]) :truck:
09-01 21:18:58 DEBUG plugins.lazy-loaded-driver :: Registering lazy loading driver :snowflake…
09-01 21:18:58 INFO driver.impl :: Registered driver :snowflake (parents: [:sql-jdbc]) :truck:
09-01 21:18:58 DEBUG plugins.lazy-loaded-driver :: Registering lazy loading driver :mongo…
09-01 21:18:58 INFO driver.impl :: Registered driver :mongo :truck:
09-01 21:18:58 INFO driver.impl :: Registered driver :h2 (parents: [:sql-jdbc]) :truck:
09-01 21:18:58 INFO driver.impl :: Registered driver :mysql (parents: [:sql-jdbc]) :truck:
09-01 21:18:58 INFO metabase.core :: Setting up and migrating Metabase DB. Please sit tight, this may take a minute…
09-01 21:18:58 INFO metabase.db :: Verifying mysql Database Connection …
09-01 21:18:58 INFO driver.impl :: Initializing driver :sql…
09-01 21:18:58 INFO driver.impl :: Initializing driver :sql-jdbc…
09-01 21:18:58 INFO driver.impl :: Initializing driver :mysql…
09-01 21:18:58 INFO metabase.db :: Successfully verified MySQL 5.7.28 application database connection. :white_check_mark:
09-01 21:18:58 INFO metabase.db :: Running Database Migrations…
09-01 21:18:58 INFO metabase.db :: Setting up Liquibase…
09-01 21:18:58 INFO metabase.db :: Liquibase is ready.
09-01 21:18:58 INFO db.liquibase :: Checking if Database has unrun migrations…
09-01 21:18:59 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:18:59 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:18:59 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:18:59 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:18:59 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:18:59 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:18:59 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:18:59 INFO db.liquibase :: Database has unrun migrations. Waiting for migration lock to be cleared…
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 INFO db.liquibase :: Migration lock is cleared. Running migrations…
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 ERROR changelog.ChangeSet :: Change Set migrations/000_migrations.yaml::1::agilliland failed. Error: (conn=133) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
09-01 21:19:00 WARN metabase.util :: auto-retry metabase.db.liquibase$migrate_up_if_needed_BANG_$fn__20937@1639a18d: Migration failed for change set migrations/000_migrations.yaml::1::agilliland:
Reason: liquibase.exception.DatabaseException: (conn=133) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 ERROR changelog.ChangeSet :: Change Set migrations/000_migrations.yaml::1::agilliland failed. Error: (conn=133) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
09-01 21:19:00 WARN metabase.util :: auto-retry metabase.db.liquibase$migrate_up_if_needed_BANG_$fn__20937@1639a18d: Migration failed for change set migrations/000_migrations.yaml::1::agilliland:
Reason: liquibase.exception.DatabaseException: (conn=133) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 ERROR changelog.ChangeSet :: Change Set migrations/000_migrations.yaml::1::agilliland failed. Error: (conn=133) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
09-01 21:19:00 WARN metabase.util :: auto-retry metabase.db.liquibase$migrate_up_if_needed_BANG_$fn__20937@1639a18d: Migration failed for change set migrations/000_migrations.yaml::1::agilliland:
Reason: liquibase.exception.DatabaseException: (conn=133) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 WARN changelog.DatabaseChangeLog :: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
09-01 21:19:00 ERROR changelog.ChangeSet :: Change Set migrations/000_migrations.yaml::1::agilliland failed. Error: (conn=133) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
09-01 21:19:00 ERROR metabase.core :: Metabase Initialization FAILED
liquibase.exception.MigrationFailedException: Migration failed for change set migrations/000_migrations.yaml::1::agilliland:
Reason: liquibase.exception.DatabaseException: (conn=133) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:637)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:83)
at liquibase.Liquibase.update(Liquibase.java:202)
at liquibase.Liquibase.update(Liquibase.java:179)
at liquibase.Liquibase.update(Liquibase.java:175)
at metabase.db.liquibase$migrate_up_if_needed_BANG_$fn__20937.invoke(liquibase.clj:126)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:423)
at metabase.util$do_with_auto_retries.invoke(util.clj:415)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:430)
at metabase.util$do_with_auto_retries.invoke(util.clj:415)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:430)
at metabase.util$do_with_auto_retries.invoke(util.clj:415)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:430)
at metabase.util$do_with_auto_retries.invoke(util.clj:415)
at metabase.db.liquibase$migrate_up_if_needed_BANG_.invokeStatic(liquibase.clj:126)
at metabase.db.liquibase$migrate_up_if_needed_BANG_.invoke(liquibase.clj:114)
at metabase.db$migrate_BANG_$fn__21717$fn__21718.invoke(db.clj:208)
at metabase.db.liquibase$do_with_liquibase.invokeStatic(liquibase.clj:38)
at metabase.db.liquibase$do_with_liquibase.invoke(liquibase.clj:29)
at metabase.db$migrate_BANG_$fn__21717.invoke(db.clj:203)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:807)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:776)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:852)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:776)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:789)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:776)
at metabase.db$migrate_BANG_.invokeStatic(db.clj:194)
at metabase.db$migrate_BANG_.invoke(db.clj:173)
at metabase.db$run_schema_migrations_BANG_.invokeStatic(db.clj:329)
at metabase.db$run_schema_migrations_BANG_.invoke(db.clj:323)
at metabase.db$setup_db_BANG__STAR_$fn__21799.invoke(db.clj:346)
at metabase.util$do_with_us_locale.invokeStatic(util.clj:656)
at metabase.util$do_with_us_locale.invoke(util.clj:642)
at metabase.db$setup_db_BANG__STAR_.invokeStatic(db.clj:344)
at metabase.db$setup_db_BANG__STAR_.invoke(db.clj:339)
at metabase.db$setup_db_from_env_BANG_.invokeStatic(db.clj:358)
at metabase.db$setup_db_from_env_BANG_.invoke(db.clj:351)
at metabase.db$setup_db_BANG_$fn__21804.invoke(db.clj:368)
at metabase.db$setup_db_BANG_.invokeStatic(db.clj:366)
at metabase.db$setup_db_BANG_.invoke(db.clj:361)
at metabase.core$init_BANG_.invokeStatic(core.clj:75)
at metabase.core$init_BANG_.invoke(core.clj:54)
at metabase.core$start_normally.invokeStatic(core.clj:119)
at metabase.core$start_normally.invoke(core.clj:113)
at metabase.core$_main.invokeStatic(core.clj:152)
at metabase.core$_main.doInvoke(core.clj:146)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at metabase.core.main(Unknown Source)
Caused by: liquibase.exception.DatabaseException: (conn=133) Table ‘core_organization’ already exists [Failed SQL: CREATE TABLE metabase.core_organization (id INT AUTO_INCREMENT NOT NULL, slug VARCHAR(254) NOT NULL, name VARCHAR(254) NOT NULL, description TEXT NULL, logo_url VARCHAR(254) NULL, inherits BIT(1) NOT NULL, CONSTRAINT PK_CORE_ORGANIZATION PRIMARY KEY (id), UNIQUE (slug)) ENGINE InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1229)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1211)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:600)
… 50 more
Caused by: java.sql.SQLSyntaxErrorException: (conn=133) Table ‘core_organization’ already exists
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:243)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:164)
at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:258)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:349)
at org.mariadb.jdbc.MariaDbStatement.execute(MariaDbStatement.java:484)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352)
… 55 more
Caused by: java.sql.SQLException: Table ‘core_organization’ already exists
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(AbstractQueryProtocol.java:1599)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1461)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1424)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:178)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:343)
… 57 more
09-01 21:19:00 INFO metabase.core :: Metabase Shutting Down …
09-01 21:19:00 INFO metabase.server :: Shutting Down Embedded Jetty Webserver
09-01 21:19:00 INFO metabase.core :: Metabase Shutdown COMPLETE

@rayn There’s thousands of Metabase installations using MySQL as their application database, so I’m sure there’s something specific to your setup, which is different, but I simply don’t know what the problem is.

So the only thing you do, when upgrading, is to replace the metabase.jar file?

Have you ever manually edited anything in the database?

What’s the content of the table metabase.databasechangelog ?