I was checking the file sql.py, seeing the way you get the IDs of the different engine databases. I think the problem might occur with the use of "SELECT IDENT_CURRENT('tablename'); "in SQLServer, so have the other databases.
That is, if that was inserted between the registry and retrieves the ID, someone inserts another record, the ID obtained will be incorrect. I know that the probability is very small, but it can happen. For example: Postgres use: "select currval ('tablename_id_Seq')" similarly the other engines. Jose