I don’t know the specific purpose of the password here, and I don’t know whether the questioner has strict requirements for the password plaintext encryption algorithm. If there is no requirement and the password is only used for matching, there is a convenient password function in mysql to encrypt the plaintext password into ciphertext. It may be a simple way to use the update statement to execute this function on all password fields.
I suggest adding a new field to the old table to store the encrypted password. After the test is successful, delete the plain text password field. Anyway, the Kendi code needs to be rewritten where the plain text password field is used. For the new table, if it is an auto-incremented primary key, It might be different.
I don’t know much about sql programming. If your encryption algorithm can be written as a sql function, just execute update directly.
I don’t know the specific purpose of the password here, and I don’t know whether the questioner has strict requirements for the password plaintext encryption algorithm.
If there is no requirement and the password is only used for matching, there is a convenient password function in mysql to encrypt the plaintext password into ciphertext. It may be a simple way to use the update statement to execute this function on all password fields.
Create a new table and write insertAll, then replace the old table with the new table.
I suggest adding a new field to the old table to store the encrypted password. After the test is successful, delete the plain text password field. Anyway, the Kendi code needs to be rewritten where the plain text password field is used. For the new table, if it is an auto-incremented primary key, It might be different.
Disposable things, how to make them as simple as possible