Data truncated for column while adding a new field

App Versions

	"chat": "0.0.1",
	"erpnext": "14.67.2",
	"frappe": "14.72.0",
	"hrms": "14.26.0",
	"india_compliance": "14.26.3",
	"payments": "0.0.1"


Form/DocType/Bank Guarantee BG


Traceback (most recent call last):
  File "apps/frappe/frappe/", line 95, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/", line 48, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/", line 86, in execute_cmd
    return, **frappe.form_dict)
  File "apps/frappe/frappe/", line 1611, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/", line 31, in savedocs
  File "apps/frappe/frappe/model/", line 307, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/", line 359, in _save
  File "apps/frappe/frappe/model/", line 1095, in run_post_save_methods
  File "apps/frappe/frappe/model/", line 928, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/", line 1280, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/", line 1262, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/", line 925, in fn
    return method_object(*args, **kwargs)
  File "apps/frappe/frappe/core/doctype/doctype/", line 390, in on_update
    raise e
  File "apps/frappe/frappe/core/doctype/doctype/", line 387, in on_update
    frappe.db.updatedb(, Meta(self))
  File "apps/frappe/frappe/database/mariadb/", line 423, in updatedb
  File "apps/frappe/frappe/database/", line 44, in sync
  File "apps/frappe/frappe/database/mariadb/", line 118, in alter
  File "apps/frappe/frappe/database/", line 431, in sql_ddl
    self.sql(query, debug=debug)
  File "apps/frappe/frappe/database/", line 244, in sql
    self._cursor.execute(query, values)
  File "env/lib/python3.10/site-packages/pymysql/", line 158, in execute
    result = self._query(query)
  File "env/lib/python3.10/site-packages/pymysql/", line 325, in _query
  File "env/lib/python3.10/site-packages/pymysql/", line 549, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "env/lib/python3.10/site-packages/pymysql/", line 779, in _read_query_result
  File "env/lib/python3.10/site-packages/pymysql/", line 1157, in read
    first_packet = self.connection._read_packet()
  File "env/lib/python3.10/site-packages/pymysql/", line 729, in _read_packet
  File "env/lib/python3.10/site-packages/pymysql/", line 221, in raise_for_error
  File "env/lib/python3.10/site-packages/pymysql/", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.DataError: (1265, "Data truncated for column 'bg_commission_amount' at row 3")

Request Data

	"type": "POST",
	"args": {
		"doc": "{\"name\":\"Bank Guarantee BG\",\"creation\":\"2023-02-16 19:31:21.372052\",\"modified\":\"2024-04-25 11:32:54.926975\",\"modified_by\":\"Administrator\",\"owner\":\"\",\"docstatus\":0,\"idx\":0,\"issingle\":0,\"is_tree\":0,\"istable\":0,\"editable_grid\":1,\"track_changes\":0,\"module\":\"Grotech\",\"autoname\":\"format:{bg_number}-{issuing_bank}-{project_name}\",\"name_case\":\"\",\"sort_field\":\"modified\",\"sort_order\":\"DESC\",\"read_only\":0,\"in_create\":0,\"allow_copy\":0,\"allow_rename\":1,\"allow_import\":0,\"hide_toolbar\":0,\"track_seen\":0,\"max_attachments\":0,\"document_type\":\"\",\"engine\":\"InnoDB\",\"is_submittable\":0,\"show_name_in_global_search\":0,\"custom\":1,\"beta\":0,\"has_web_view\":0,\"allow_guest_to_view\":0,\"email_append_to\":0,\"translated_doctype\":0,\"quick_entry\":0,\"track_views\":0,\"is_virtual\":0,\"allow_events_in_timeline\":0,\"allow_auto_repeat\":0,\"__last_sync_on\":\"2024-04-25T06:04:54.021Z\",\"__unsaved\":1}",
		"action": "Save"
	"btn": {
		"jQuery3600190581931943826221": {
			"events": {
				"click": [
						"type": "click",
						"origType": "click",
						"guid": 2056,
						"namespace": ""
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/"

Response Data

	"exception": "pymysql.err.DataError: (1265, \"Data truncated for column 'bg_commission_amount' at row 3\")"

I’m trying to add a new column, but always getting this error in this doc type, the mentioned field. as per the error (bg_commission_amount) i didn’t changed anything in this field.

Help please

Hi @rs115199789,

Please follow the step in reference post.


I’m using erp installed via frappe cloud, so i don’t have access to ssh for any commands, please share any alternatives.

Thank You

If you have a support of frappe cloud then raise the support ticket.

I’m on the 25gb plan in which support is not available :frowning:

@NCP any help ?

I think, it’s not solved from the UI side. but try it.

remove the field and again create with a different name, not the same name.

If i remove i will lose some important data, will try thank you

But you said that you are creating a field, that I suggest creating a new field with a different name.

If the field is already there, i think, its not possible from the UI side.

yes my bad, i’m trying to creating a new field, will try again and post here