Database question

hello,
if we created a sales invoice and it has been submitted, and we saw that we need to change something within it ,
i know there is the amend option, which will allow us to edit what we want but for example if the SINV number is 4257 after amending, the SINV becomes 4257-1 , i don’t want the -1 and if i access the database and go to tabsalesinvoice and delete the old row of 4257, it works but it causes an issue later , i can create a sales order, but can’t create a delivery note and so on…
what is the issue caused by the change of the deletion of the row 4257?

Anthony can you list down what you did in specific steps

there is a sales invoice called 4257, i want to change something in it , so if i use amend option it renames it as 4257-1, i don’t want that -1, so i amended this sales invoice so now it has 4257 which is canceled and 4257-1
so with a program to open mariadb, i can view the tables of the erpnext, i go to tabsalesinvoice, i search for row with id 4257 and i delete all the row and rename 4257-1 with 4257, but there is an issue later if i create a new sales order it works but delivery note won’t work

Anthony I strongly recommend don’t directly alter records in the database unless critical.

All that was needed you could have deleted the old invoice (i.e. 4257) and created a new invoice from the Delivery Note.

yeah i know it’s very dangerous to change records directly from the DB, i’ll just do it from delivery note then
thanks for your reply!