Unknown column 'metabase_field.special_type' in 'field list'

Hi after I upgrade 0.38.1 to 0.38.3, table valued functions and stored procedures can work normally, but simple queries have such problems

Unknown column 'metabase_field.special_type' in 'field list'

{
  "browser-info": {
    "language": "zh-CN",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "1.8.0_282-b08",
    "java.vendor": "Red Hat, Inc.",
    "java.vendor.url": "https://www.redhat.com/",
    "java.version": "1.8.0_282",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "25.282-b08",
    "os.name": "Linux",
    "os.version": "3.10.0-1062.el7.x86_64",
    "user.language": "zh",
    "user.timezone": "Asia/Shanghai"
  },
  "metabase-info": {
    "databases": [
      "h2",
      "sqlserver"
    ],
    "hosting-env": "unknown",
    "application-database": "mysql",
    "application-database-details": {
      "database": {
        "name": "MySQL",
        "version": "5.7.32-log"
      },
      "jdbc-driver": {
        "name": "MariaDB Connector/J",
        "version": "2.6.2"
      }
    },
    "run-mode": "prod",
    "version": {
      "tag": "v0.38.3",
      "date": "2021-04-01",
      "branch": "release-x.38.x",
      "hash": "8332830"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

Hi @zqycn
It looks like you upgraded to 0.39.0-rc1 and then downgraded. You should revert to your backup.

1 Like

Thank you. I downloaded the latest source code version, and then compiled and uploaded it. After uploading it, I found that some problems couldn't be used. Then I downloaded a compiled version, and then there was such a problem. I now restore the backup, free to test the next source version

Whoops! I didn't take a backup (lesson learned). Is there a dont-have-to-redo-everything way to get the dashboards up? BTW, I can't even get the UI to show up so I can't log in and go to Admin either.

@batman Sounds like you're seeing a different problem. Everything should work except making queries (and likely anything in Data Model).

I have no idea which application database you're using, but you would have to rename metabase_field.semantic_type to metabase_field.special_type, then it would work on pre-39 again.

But if you then upgrade to 39+ again, then you would manually need to change that back again.

Manually messing around in the application database is a great way to corrupt it, so you are warned and should of course make backups before making such a manual change - just like backing up before upgrading is strongly recommended.

@flamber Confirmed resolved and now the metabase instance is back up and running. I just copied the DB (we are using MySQL) to try 39 again. Will let you know if I see something worth reporting. The only thing I see now is that Unknown or incorrect time zone: 'US/Eastern' which seems to be related to the instance's timezone setting. I will check and update here.

Thanks.

@batman You need to load timezone into MySQL - it doesn't come with tzdata:
https://dev.mysql.com/doc/refman/8.0/en/mysql-tzinfo-to-sql.html
But that should not be a new thing on any recent versions - it's always been like that.

We have the timezone loaded into our MySQL servers. And this is the first time I am seeing this message. Interestingly, out other instances (two) of Metabase that use the same MySQL server don't report this. But given it's a warning, I am not losing sleep on it today. I will check this over the weekend.

Hey @flamber how can I make the changes you mentioned above. We shifted to the version 39.1 and post that the error Unknown column 'metabase_field.special_type' in 'field list' kept popping up. Reverting to the old version didn't help. And no I also don't have a backup just like @batman. :sweat_smile:

@ankit_o4s You shouldn't have any problems if you are running 39.x+, so I don't understand why you're getting that error. You cannot downgrade to anything pre-39.
Post "Diagnostic Info" from Admin > Troubleshooting.

Hey @flamber I managed to rollback to v37.7 for now by manually updating the schema.
Will definitely give it another try while taking a backup, and post the results here. Thanks a lot.