salix/db/versions/11172-blueFern/10-firstScript.sql

6 lines
172 B
SQL

UPDATE vn.invoiceOut
SET id = (SELECT MAX(id) + 1 FROM vn.invoiceOut)
WHERE id = 0;
ALTER TABLE vn.invoiceOut MODIFY COLUMN id int(10) unsigned auto_increment NOT NULL;