Error "The table is inactive" after upgrading to Metabase 0.51

After upgrading from v0.50.14 to v0.51.5, several questions return:

Table "databasename.null.tablename" is inactive.
imagen

It seems that a control was introduced to prevent questions from being executed on tables marked as inactive [1], but the issue might have existed before the upgrade.

When running the query:
SELECT * FROM metabase_table mt WHERE mt.name = 'COSTOS'

It appears that there are two records for each table. The one marked as inactive has a null schema. This is probably due to the fact that, at some point, we switched from Firebird to SQL Server as the database engine.

The main issue is that we have several questions referencing both table IDs, and after the update, they stop working.

I can't set the schema because there is a unique constraint in the table that prevents it.

I considered changing the IDs referencing metabase_database in, for example, report_card and query_table. However, I noticed that references to metabase_field are also stored, and these would also need to be updated. Additionally, I see text fields containing JSON where these IDs appear. I'm not sure if this is the right approach.

Could this be a bug in database synchronization? If the schema is null, shouldn't it default to the default schema?

Any advice would be greatly appreciated.

[1] Exclude inactive tables from the perms cache, and block queries over … · metabase/metabase@37162aa · GitHub

1 Like

Diagnostic Info:

{
  "browser-info": {
    "language": "es-AR",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0",
    "vendor": ""
  },
  "metabase-info": {
    "databases": [
      "sqlserver",
      "postgres"
    ],
    "run-mode": "prod",
    "plan-alias": "",
    "version": {
      "date": "2024-11-26",
      "tag": "v0.51.5",
      "hash": "d79d949"
    },
    "settings": {
      "report-timezone": "America/Argentina/Buenos_Aires"
    },
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "16.4 (Ubuntu 16.4-0ubuntu0.24.04.1)"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.7.3"
      }
    }
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "21.0.4+7-LTS",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "21.0.4",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "21.0.4+7-LTS",
    "os.name": "Windows Server 2019",
    "os.version": "10.0",
    "user.language": "es",
    "user.timezone": "America/Argentina/Buenos_Aires"
  }
}

Same here