Customization disappears after bench update

whenever I update using bench update it is showing git rebasing error when I give git rebase --skip it installs fine but after updation all my custom fields and custom codes disappears but my custom apps are still there…I never used git before I just followed methods given in the erpnext installation…if any one know about this pls guide me

hi @hereabdulla,
Try "bench migrate "
and check it.

Sagar Shiragawakar

Thanks for ur reply…
the data in the database still there but the code,custom field added are disappeared everytime I update I need to modify all the previous changes…I am not using a fork of GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript I am directly cloned the repo and changing the local code and running bench update…whether it may leads to problem?

are you modifying DocType instead of customizing that?

that means…I am adding custom fields

there are 2 ways to customize DocType:

  1. From Set up → Customize Form and then adding/modify fields.
  2. If you are in developer_mode (developer_mode = 1 in site_config), you can edit DocType directly and save your customization

If you’re using point 2. …all your customization will be lost when u run bench update

I am using point 2 but I used this before but I didnt find any problem but from last 2 updates only I find this problem…
what about my codes…why they are resetting

probably it didn’t happen because the DoctType was not changed …but if you keep modifying using point 2 …you’ll loose all customizations on bench update if DocType will be modified from core team.

Use point 1 to be safe.

@hereabdulla please mark as solved, thx

is code changes also reset when using bench update


bench update fetches the latest code from git repo.


is there any chance to retain my code with new update

Hi @hereabdulla,

keep the customization in your custom app instead on frappe or erpnext app

also you can take the fixtures of Custom Field and Customize Form in your app commit the changes and push to github.


I have 3 more buttons in addition to present,absent,half day in Employee Attendance Tool for that I am generating HTML from js, for this functionality do I need to design a custom app

I dont know what is fixtures


check the user manual for fixtures



I’m new on ERPNext
I added field (Arabic name ) on Employee. after restore database this field disappears.
Please tell me, how resolve it ?