Field filters not working after Upgrade

After upgrading from 0.41.0 to 0.42.3 all the field filter mappings got deleted. All reports are throwing error
Failed to fetch Field 892,134: Field does not exist, or belongs to a different Database.
Ay reasons why this would happen also how to fix it? Mostly all the reports use filters and it is difficult to fix manually one by one.

Hi @vindev
You're seeing this issue:
https://github.com/metabase/metabase/issues/14145
You need to make sure that the database selected and the Field Filter are referencing the same database.

Hi @flamber,
There are no multiple databases in our case and still we are getting this issue, field filed variable is showing up like this
image
Without changing the DB of the question If I map the field filter again it starts working. But doing it manually is will be a lot of work, all our reports are using field filter.

@vindev The "Field to map to" shows like that because it was connected to a different database at some point.

I'm not sure how that is possible because this table is in the public schema and as mentioned earlier we don't have multiple databases.
Is there a way I can update the report_card's database_query json from the backend? Because it'll be a lot of effort doing it manually one by one. We have around 2k+ reports.

@vindev Try looking at the template-tag field reference in /api/card/123, where 123 is the question ID, and then lookup the field ID /api/field/321
You would have to figure out the correct field reference in report_card."database_query.native.template-tags.<variablename>.dimension[1]" and update that.