New fixtures not applied with bench update nor bench migrate

Hello all,

I’m used to add fixtures for Custom Field and Property Setter table, run bench update on my production site and all is applied correctly, this has worked fine for months.

Now it doesn’t work anymore, it seems to be related to the upgrade to 13.16.
Here are the steps I’m doing:

  • Add a new custom field to Item doctype
  • Run bench export-fixtures
  • commit and push to git repo ( I can see my new custom field in fixtures/custom_field.json )
  • on production server, run bench update
  • No errors, but the new custom field is not applied to the database

If I check fixtures/custom_field.json on server, I can see the new custom field in there.

I tried bench migrate, again no error but no field added.

Same issue with Property Setter.

I tried manually editing modified timestamp in the fixtures .json field, then issue again bench update / migrate, but still no change.

Note that fields added to my own custom doctype.json are added correctly on bench update, so it seems issue is only related to fixtures.

I tried creating a new site locally, and my new fixtures are applied correctly. So this issue happens only on my existing production site.

Anyone having the same issue ?
Any idea where to look at to investigate ?

Thanks in advance.

1 Like

Try to change modified date and time stamp ( increase ) manually in json files and see whether it works , you can try for few files before applying all to check whether this works.

I have solved such issues in the past but not know exactly the case.

Tried this with no success.

I restored a backup of the database and can replicate the problem on my pc. So at least I can try to debug locally.

Any insights on where to look at would be appreciated.

Thankfully we are not in live production yet, and not being able to rely on fixtures really freaks me out for the future.

I created a github issue, it seems recent changes in frappe migrate logic broke this.

At least I can fix it in my frappe fork, glad to have my own repo and not being stuck with this version in frappecloud…

There is a fix fix: import doc / fixtures by barredterra · Pull Request #15288 · frappe/frappe · GitHub

1 Like