Retool DB - Changing FK Field Type Doesn't Save

whenever I try to change a column type from Foreign Key to anything, it doesn't save.
I have to delete the column and remake it if I want to make this change even if the value is valid for the new type. has anybody else had this problem or is it my table?

Hi @bobthebear, it's not just your table. I experienced the same issue when I was working on a project and I'm able to repro today. When updating a FK, the form allows us to change from FK to Text but this error appears when we try to submit it:

I asked this question internally and there is a workaround:

"the issue is just that we don't drop the foreign key constraint that exists for the column on data type change. You can just manually drop it and then are able to update it in the UI to text first (since it's a number most likely) and then to whatever data type you want without losing data."

We created a FR internally to add a way to do this without having to write the raw SQL. We'll update you with any news from our devs. :slightly_smiling_face:

1 Like