Potential fix for sqlite migration issues

This commit is contained in:
Heliosares
2023-08-24 11:06:28 -04:00
parent 268bde76e6
commit 0a38415c76
2 changed files with 3 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>AuxProtect</groupId>
<artifactId>AuxProtect</artifactId>
<version>1.2.9</version>
<version>1.2.10-pre1</version>
<name>AuxProtect</name>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>

View File

@@ -424,12 +424,12 @@ public class MigrationManager {
total = uidValues.size() + longTermValues.size();
complete = 0;
for (String value : uidValues) {
sql.execute("UPDATE " + Table.AUXPROTECT_UIDS + " SET hash=" + value.hashCode() + " WHERE uuid='" + value + "'", connection);
sql.execute("UPDATE " + Table.AUXPROTECT_UIDS + " SET hash=? WHERE uuid=?", connection, value.hashCode(), value);
complete++;
}
for (String value : longTermValues) {
sql.execute("UPDATE " + Table.AUXPROTECT_LONGTERM + " SET target_hash=" + value.toLowerCase().hashCode() + " WHERE target='" + value + "'", connection);
sql.execute("UPDATE " + Table.AUXPROTECT_LONGTERM + " SET target_hash=? WHERE target=?", connection, value.toLowerCase().hashCode(), value);
complete++;
}
}));