I have a doubt regarding app Doctype customization between tenants

site A (Tenant A) and Site B (Tenant B) installed same app, Site A Admin customize app’s docktype and also Site B admin customize same app’s doctype. if this happens, is there app schema conflict?.

tenant A admin delete the doctype then new tenant user would not have that doctypes for that app.

How to manage site(tenant) specific app schema?

If the site administrators use Customize (the Customize button and page), then the DocType changes are saved inside the Site’s database.

Example:

  • Site Admin A customizes, and creates a new field on Customer named “foo”.
    • The foo field’s definition and metadata is saved in the Site A database.
    • The foo field is created as a SQL column in Site A’s database table Customer.
  • Site Admin B customizes, and creates a new field on Customer named “bar”.
    • The bar field’s definition and metadata is saved in the Site B database.
    • The bar field is created as a SQL column in Site B’s database table Customer.

This is no problem. None of the official ERPNext App code has been touched. Each Site can have its own field.

However. If you allow Site A and B administrators to edit the actual DocTypes? And make changes without Customize? Then yes. The situation you described will happen. There will be schema conflicts. Things will go very wrong.

Option 1: Do not allow Site administrators the ability to edit the App’s DocTypes. Only allow Customize.
Option 2: Create and maintain a separate App, per Site.