Changing column type not working on foreign key column

Hi team,

I'm trying to change the column type of a foreign key column from "Foreign Key" to "Category". It works for a while, but automatically changes back to "Foreign Key". Could somebody explain why?


Hi @jiashanyao
Post "Diagnostic Info" from Admin > Troubleshooting, and which database type you're using.

Hi @flamber, the diagnostic info is as follow and the database I'm using is mysql.

"browser-info": {
"language": "en-US",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36",
"vendor": "Google Inc."
"system-info": {
"file.encoding": "UTF-8",
"": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.11+9",
"java.vendor": "AdoptOpenJDK",
"java.vendor.url": "",
"java.version": "11.0.11",
"": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.11+9",
"": "Linux",
"os.version": "3.10.0-1062.9.1.el7.x86_64",
"user.language": "en",
"user.timezone": "GMT"
"metabase-info": {
"databases": [
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "13.3 (Debian 13.3-1.pgdg100+1)"
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.2.18"
"run-mode": "prod",
"version": {
"date": "2021-08-03",
"tag": "v0.40.2",
"branch": "release-x.40.x",
"hash": "b884d29"
"settings": {
"report-timezone": null

@jiashanyao You should upgrade to at least 0.40.5. Latest release is 0.41.1.
You're seeing this issue: - upvote by clicking :+1: on the first post