bench migrate
Migrating bonyan14.org
Updating DocTypes for frappe        : [========================================] 100%
Updating DocTypes for payments      : [========================================] 100%
Updating DocTypes for erpnext       : [========================================] 100%
Updating DocTypes for hrms          : [========================================] 100%
Updating DocTypes for education     : [========================================] 100%
Updating DocTypes for healthcare    : [========================================] 100%
Updating DocTypes for non_profit    : [========================================] 100%
Updating DocTypes for hr_report     : [========================================] 100%
Updating DocTypes for chat          : [========================================] 100%
Updating DocTypes for archeive_system: [========================================] 100%
Updating DocTypes for itaam_information: [========================================] 100%
Updating DocTypes for metabase_integration: [========================================] 100%
Updating DocTypes for monitoring_and_evaluation: [========================================] 100%
Updating DocTypes for free_disburse : [========================================] 100%
Updating DocTypes for initiative_app: [========================================] 100%
Updating DocTypes for scrum         : [========================================] 100%
Updating DocTypes for bonyan_app    : [========================================] 100%
Updating DocTypes for wiki          : [========================================] 100%
Updating Dashboard for frappe
Updating Dashboard for payments
Updating Dashboard for erpnext
Updating Dashboard for hrms
Updating Dashboard for education
Updating Dashboard for healthcare
Updating Dashboard for non_profit
Updating Dashboard for hr_report
Updating Dashboard for openalt_theme
Updating Dashboard for frappe_hijri_datepicker
Updating Dashboard for chat
Updating Dashboard for archeive_system
Updating Dashboard for itaam_information
Updating Dashboard for metabase_integration
Updating Dashboard for monitoring_and_evaluation
Updating Dashboard for free_disburse
Updating Dashboard for initiative_app
Updating Dashboard for scrum
Updating Dashboard for bonyan_app
Updating Dashboard for wiki
Updating customizations for Address
Updating customizations for Contact
Updating customizations for Shift Type
Updating customizations for Work Order
Updating customizations for Warehouse
Updating customizations for Stock Entry
Updating customizations for Stock Entry Detail
Updating customizations for Task Depends On
Updating customizations for Holiday
Updating customizations for Task
Updating customizations for Department
Updating customizations for Holiday List
Updating customizations for Employee
Updating customizations for Customer
Updating customizations for Project
Updating customizations for Indicator
Updating customizations for Indicator Value
Updating customizations for Location
Updating customizations for Scrum
Updating customizations for Work Order
Updating customizations for Training Event
Updating customizations for Employee Education
Updating customizations for Identification Document Type
Updating customizations for Payment Entry
Updating customizations for Payroll Employee Detail
Updating customizations for Party Type
Updating customizations for Employee Advance
Updating customizations for Expense Claim Detail
Updating customizations for Employee Expense Tool
Updating customizations for Warehouse Type
Updating customizations for Warehouse
Updating customizations for Expense Taxes and Charges
Updating customizations for Stock Entry
Updating customizations for Asset
Updating customizations for Expense Claim Request Type
Updating customizations for Purchase Invoice
Updating customizations for Appraisal KRA
Updating customizations for Salary Slip
Updating customizations for Appraisal Cycle
Updating customizations for Journal Entry
Updating customizations for Expense Claim
Updating customizations for Appraisal Template Goal
Updating customizations for Purchase Order
Updating customizations for Salary Detail
Updating customizations for Payment Entry Reference
Updating customizations for Location
Updating customizations for Loan
Failed to alter schema using query: ALTER TABLE `tabLoan` ADD INDEX `creation`(`creation`)
Queued rebuilding of search index for bonyan14.org

Traceback with variables (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
      mod_name = 'frappe.utils.bench_helper'
      alter_argv = True
      mod_spec = ModuleSpec(name='frappe.utils.bench_helper', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f226cd3e920>, origin='/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/bench_helper.py')
      code = <code object <module> at 0x7f226b490a80, file "/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/bench_helper.py", line 1>
      main_globals = {'__name__': '__main__', '__doc__': None, '__package__': 'frappe.utils', '__loader__': <_frozen_importlib_external.SourceFileLoader object at 0x7f226cd3e920>, '__spec__': ModuleSpec(name='frappe.utils.bench_helper', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f226cd3e920>, origin='/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/bench_helper.py'), '__annotations__': {}, '__builtins__': <module 'builtins' (built-in)>, '__file__': '/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/bench_helper.py', '__cached__': '/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/__pycache__/bench_helper.cpython-310.pyc', 'importlib': <module 'importlib' from '/usr/local/lib/python3.10/importlib/__init__.py'>, 'json': <module 'json' from '/usr/local/lib/python3.10/json/__init__.py'>, 'os': <module 'os' from '/usr/local/lib/python3.10/os.py'>, 'traceback': <module 'traceback' from '/usr/local/lib/python3.10/traceback.py'>, 'warnings': <module 'warnings' from '/usr/local/lib/p...
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
      code = <code object <module> at 0x7f226b490a80, file "/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/bench_helper.py", line 1>
      run_globals = {'__name__': '__main__', '__doc__': None, '__package__': 'frappe.utils', '__loader__': <_frozen_importlib_external.SourceFileLoader object at 0x7f226cd3e920>, '__spec__': ModuleSpec(name='frappe.utils.bench_helper', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f226cd3e920>, origin='/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/bench_helper.py'), '__annotations__': {}, '__builtins__': <module 'builtins' (built-in)>, '__file__': '/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/bench_helper.py', '__cached__': '/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/__pycache__/bench_helper.cpython-310.pyc', 'importlib': <module 'importlib' from '/usr/local/lib/python3.10/importlib/__init__.py'>, 'json': <module 'json' from '/usr/local/lib/python3.10/json/__init__.py'>, 'os': <module 'os' from '/usr/local/lib/python3.10/os.py'>, 'traceback': <module 'traceback' from '/usr/local/lib/python3.10/traceback.py'>, 'warnings': <module 'warnings' from '/usr/local/lib/p...
      init_globals = None
      mod_name = '__main__'
      mod_spec = ModuleSpec(name='frappe.utils.bench_helper', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f226cd3e920>, origin='/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/bench_helper.py')
      pkg_name = 'frappe.utils'
      script_name = None
      loader = <_frozen_importlib_external.SourceFileLoader object at 0x7f226cd3e920>
      fname = '/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/bench_helper.py'
      cached = '/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/__pycache__/bench_helper.cpython-310.pyc'
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/bench_helper.py", line 109, in <module>
    main()
      ...skipped... 25 vars
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name="bench")
      commands = {'frappe': <Group frappe>, 'get-frappe-commands': <Command get-frappe-commands>, 'get-frappe-help': <Command get-frappe-help>}
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
      self = <Group None>
      args = ()
      kwargs = {'prog_name': 'bench'}
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
      self = <Group None>
      args = ['frappe', 'migrate']
      prog_name = 'bench'
      complete_var = None
      standalone_mode = True
      extra = {}
      ctx = <click.core.Context object at 0x7f226b48ee90>
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
      _process_result = <function MultiCommand.invoke.<locals>._process_result at 0x7f226b4a5a20>
      args = ['migrate']
      cmd_name = 'frappe'
      cmd = <Group frappe>
      sub_ctx = <click.core.Context object at 0x7f226b48f010>
      ctx = <click.core.Context object at 0x7f226b48ee90>
      self = <Group None>
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
      _process_result = <function MultiCommand.invoke.<locals>._process_result at 0x7f226b53d360>
      args = []
      cmd_name = 'migrate'
      cmd = <Command migrate>
      sub_ctx = <click.core.Context object at 0x7f226b52ba90>
      ctx = <click.core.Context object at 0x7f226b48f010>
      self = <Group frappe>
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
      self = <Command migrate>
      ctx = <click.core.Context object at 0x7f226b52ba90>
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
      args = ()
      kwargs = {'skip_failing': False, 'skip_search_index': False}
      self = <click.core.Context object at 0x7f226b52ba90>
      callback = <function migrate at 0x7f226b4ed630>
      ctx = <click.core.Context object at 0x7f226b52ba90>
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
      args = ()
      kwargs = {'skip_failing': False, 'skip_search_index': False}
      f = <function migrate at 0x7f226b4ed3f0>
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/commands/__init__.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
      ctx = <click.core.Context object at 0x7f226b52ba90>
      args = ()
      kwargs = {'skip_failing': False, 'skip_search_index': False}
      profile = False
      f = <function migrate at 0x7f226b4ed360>
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/commands/site.py", line 671, in migrate
    SiteMigration(
      context = {'sites': ['bonyan14.org'], 'force': False, 'verbose': False, 'profile': False}
      skip_failing = False
      skip_search_index = False
      activate_by_import = <module 'traceback_with_variables.activate_by_import' from '/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/traceback_with_variables/activate_by_import.py'>
      SiteMigration = <class 'frappe.migrate.SiteMigration'>
      site = 'bonyan14.org'
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/migrate.py", line 183, in run
    self.post_schema_updates()
      self = <frappe.migrate.SiteMigration object at 0x7f226b52bd90>
      site = 'bonyan14.org'
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/migrate.py", line 52, in wrapper
    raise e
      args = (<frappe.migrate.SiteMigration object at 0x7f226b52bd90>,)
      kwargs = {}
      method = <function SiteMigration.post_schema_updates at 0x7f22542b2680>
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/migrate.py", line 44, in wrapper
    ret = method(*args, **kwargs)
      args = (<frappe.migrate.SiteMigration object at 0x7f226b52bd90>,)
      kwargs = {}
      method = <function SiteMigration.post_schema_updates at 0x7f22542b2680>
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/migrate.py", line 142, in post_schema_updates
    sync_customizations()
      self = <frappe.migrate.SiteMigration object at 0x7f226b52bd90>
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/modules/utils.py", line 108, in sync_customizations
    sync_customizations_for_doctype(data, folder, fname)
      app = None
      apps = ['frappe', 'payments', 'erpnext', 'hrms', 'education', 'healthcare', 'non_profit', 'hr_report', 'openalt_theme', 'frappe_hijri_datepicker', 'chat', 'archeive_system', 'itaam_information', 'metabase_integration', 'monitoring_and_evaluation', 'free_disburse', 'initiative_app', 'scrum', 'bonyan_app', 'wiki']
      app_name = 'bonyan_app'
      module_name = 'bonyan_app'
      folder = '/home/asofi/bench_bonyan_14/apps/bonyan_app/bonyan_app/bonyan_app/custom'
      fname = 'loan.json'
      f = <_io.TextIOWrapper name='/home/asofi/bench_bonyan_14/apps/bonyan_app/bonyan_app/bonyan_app/custom/loan.json' mode='r' encoding='UTF-8'>
      data = {'custom_fields': [{'_assign': None, '_comments': None, '_liked_by': None, '_user_tags': None, 'allow_in_quick_entry': 0, 'allow_on_submit': 1, 'bold': 0, 'collapsible': 0, 'collapsible_depends_on': None, 'columns': 0, 'creation': '2022-10-04 20:11:45.089979', 'default': None, 'depends_on': None, 'description': None, 'docstatus': 0, 'dt': 'Loan', 'fetch_from': None, 'fetch_if_empty': 0, 'fieldname': 'has_loan_disbursement', 'fieldtype': 'Check', 'hidden': 0, 'hide_border': 0, 'hide_days': 0, 'hide_seconds': 0, 'idx': 6, 'ignore_user_permissions': 0, 'ignore_xss_filter': 0, 'in_global_search': 0, 'in_list_view': 1, 'in_preview': 1, 'in_standard_filter': 1, 'insert_after': 'loan_application', 'is_system_generated': 1, 'is_virtual': 0, 'label': 'Has Loan Disbursement', 'length': 0, 'mandatory_depends_on': None, 'modified': '2022-10-04 20:11:45.089979', 'modified_by': 'Administrator', 'module': None, 'name': 'Loan-has_loan_disbursement', 'no_copy': 0, 'non_negative': 0, 'options': None, 'o...
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/modules/utils.py", line 186, in sync_customizations_for_doctype
    frappe.db.updatedb(doctype)
      filename = 'loan.json'
      validate_fields_for_doctype = <function validate_fields_for_doctype at 0x7f2253619120>
      update_schema = True
      sync = <function sync_customizations_for_doctype.<locals>.sync at 0x7f22546b7d00>
      data = {'custom_fields': [{'_assign': None, '_comments': None, '_liked_by': None, '_user_tags': None, 'allow_in_quick_entry': 0, 'allow_on_submit': 1, 'bold': 0, 'collapsible': 0, 'collapsible_depends_on': None, 'columns': 0, 'creation': '2022-10-04 20:11:45.089979', 'default': None, 'depends_on': None, 'description': None, 'docstatus': 0, 'dt': 'Loan', 'fetch_from': None, 'fetch_if_empty': 0, 'fieldname': 'has_loan_disbursement', 'fieldtype': 'Check', 'hidden': 0, 'hide_border': 0, 'hide_days': 0, 'hide_seconds': 0, 'idx': 6, 'ignore_user_permissions': 0, 'ignore_xss_filter': 0, 'in_global_search': 0, 'in_list_view': 1, 'in_preview': 1, 'in_standard_filter': 1, 'insert_after': 'loan_application', 'is_system_generated': 1, 'is_virtual': 0, 'label': 'Has Loan Disbursement', 'length': 0, 'mandatory_depends_on': None, 'modified': '2022-10-04 20:11:45.089979', 'modified_by': 'Administrator', 'module': None, 'name': 'Loan-has_loan_disbursement', 'no_copy': 0, 'non_negative': 0, 'options': None, 'o...
      doctype = 'Loan'
      folder = '/home/asofi/bench_bonyan_14/apps/bonyan_app/bonyan_app/bonyan_app/custom'
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/database/mariadb/database.py", line 423, in updatedb
    db_table.sync()
      self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7f225444fe20>
      doctype = 'Loan'
      meta = None
      res = ((0,),)
      db_table = <frappe.database.mariadb.schema.MariaDBTable object at 0x7f2250eb1360>
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/database/schema.py", line 44, in sync
    self.alter()
      self = <frappe.database.mariadb.schema.MariaDBTable object at 0x7f2250eb1360>
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/database/mariadb/schema.py", line 118, in alter
    frappe.db.sql_ddl(query)
      self = <frappe.database.mariadb.schema.MariaDBTable object at 0x7f2250eb1360>
      col = <frappe.database.schema.DbColumn object at 0x7f2250e153f0>
      add_column_query = []
      modify_column_query = ['MODIFY `total_amount_paid` decimal(21,9) not null default 0', 'MODIFY `disbursed_amount` decimal(21,9) not null default 0', 'MODIFY `employeee_remaining_salary` decimal(21,9) not null default 0', 'MODIFY `loan_amount` decimal(21,9) not null default 0', 'MODIFY `gross_salary_details` decimal(21,9) not null default 0', 'MODIFY `monthly_repayment_amount` decimal(21,9) not null default 0', 'MODIFY `total_principal_paid` decimal(21,9) not null default 0', 'MODIFY `maximum_loan_amount` decimal(21,9) not null default 0', 'MODIFY `credit_adjustment_amount` decimal(21,9) not null default 0', 'MODIFY `rate_of_interest` decimal(21,9) not null default 0', 'MODIFY `written_off_amount` decimal(21,9) not null default 0', 'MODIFY `total_loans` decimal(21,9) not null default 0', 'MODIFY `debit_adjustment_amount` decimal(21,9) not null default 0', 'MODIFY `refund_amount` decimal(21,9) not null default 0', 'MODIFY `group_loan` varchar(140)']
      add_index_query = ['ADD INDEX `creation`(`creation`)']
      drop_index_query = []
      columns_to_modify = {<frappe.database.schema.DbColumn object at 0x7f2250e9a200>, <frappe.database.schema.DbColumn object at 0x7f2250e99810>, <frappe.database.schema.DbColumn object at 0x7f2250e17a30>, <frappe.database.schema.DbColumn object at 0x7f2250e15240>, <frappe.database.schema.DbColumn object at 0x7f2250e15660>, <frappe.database.schema.DbColumn object at 0x7f2250e9bcd0>, <frappe.database.schema.DbColumn object at 0x7f2250e9aad0>, <frappe.database.schema.DbColumn object at 0x7f2250e9a2f0>, <frappe.database.schema.DbColumn object at 0x7f2250e99f30>, <frappe.database.schema.DbColumn object at 0x7f2250e17580>, <frappe.database.schema.DbColumn object at 0x7f2250e98790>, <frappe.database.schema.DbColumn object at 0x7f2250e15ba0>, <frappe.database.schema.DbColumn object at 0x7f2250e981f0>, <frappe.database.schema.DbColumn object at 0x7f2250e9a7d0>, <frappe.database.schema.DbColumn object at 0x7f2250e153f0>}
      query_parts = ['ADD INDEX `creation`(`creation`)']
      query_body = 'ADD INDEX `creation`(`creation`)'
      query = 'ALTER TABLE `tabLoan` ADD INDEX `creation`(`creation`)'
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/database/database.py", line 431, in sql_ddl
    self.sql(query, debug=debug)
      self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7f225444fe20>
      query = 'ALTER TABLE `tabLoan` ADD INDEX `creation`(`creation`)'
      debug = False
  File "/home/asofi/bench_bonyan_14/apps/frappe/frappe/database/database.py", line 244, in sql
    self._cursor.execute(query, values)
      self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7f225444fe20>
      query = 'ALTER TABLE `tabLoan` ADD INDEX `creation`(`creation`)'
      values = None
      as_dict = 0
      as_list = 0
      formatted = 0
      debug = False
      ignore_ddl = 0
      as_utf8 = 0
      auto_commit = 0
      update = None
      explain = False
      run = True
      pluck = False
      as_iterator = False
      trace_id = None
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/pymysql/cursors.py", line 158, in execute
    result = self._query(query)
      self = <pymysql.cursors.Cursor object at 0x7f22539198d0>
      query = 'ALTER TABLE `tabLoan` ADD INDEX `creation`(`creation`)'
      args = None
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/pymysql/cursors.py", line 325, in _query
    conn.query(q)
      self = <pymysql.cursors.Cursor object at 0x7f22539198d0>
      q = 'ALTER TABLE `tabLoan` ADD INDEX `creation`(`creation`)'
      conn = <pymysql.connections.Connection object at 0x7f2253919810>
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/pymysql/connections.py", line 549, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
      self = <pymysql.connections.Connection object at 0x7f2253919810>
      sql = b'ALTER TABLE `tabLoan` ADD INDEX `creation`(`creation`)'
      unbuffered = False
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/pymysql/connections.py", line 779, in _read_query_result
    result.read()
      self = <pymysql.connections.Connection object at 0x7f2253919810>
      unbuffered = False
      result = <pymysql.connections.MySQLResult object at 0x7f2250c4d1b0>
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/pymysql/connections.py", line 1157, in read
    first_packet = self.connection._read_packet()
      self = <pymysql.connections.MySQLResult object at 0x7f2250c4d1b0>
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/pymysql/connections.py", line 729, in _read_packet
    packet.raise_for_error()
      self = <pymysql.connections.Connection object at 0x7f2253919810>
      packet_type = <class 'pymysql.protocol.MysqlPacket'>
      buff = bytearray(b"\xff%\x04#42000Duplicate key name \'creation\'")
      packet_header = b'&\x00\x00\x01'
      btrl = 38
      btrh = 0
      packet_number = 1
      bytes_to_read = 38
      recv_data = b"\xff%\x04#42000Duplicate key name 'creation'"
      packet = <pymysql.protocol.MysqlPacket object at 0x7f2250e98100>
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
      self = <pymysql.protocol.MysqlPacket object at 0x7f2250e98100>
      errno = 1061
  File "/home/asofi/bench_bonyan_14/env/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
      data = b"\xff%\x04#42000Duplicate key name 'creation'"
      errno = 1061
      errval = "Duplicate key name 'creation'"
      errorclass = <class 'pymysql.err.OperationalError'>
pymysql.err.OperationalError: (1061, "Duplicate key name 'creation'")