mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-16 17:57:43 +00:00
Cleanup
This commit is contained in:
parent
f80e57dafb
commit
e25c97d031
@ -135,28 +135,10 @@ public class EamDbUtil {
|
|||||||
*
|
*
|
||||||
* @return true on success, else false
|
* @return true on success, else false
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
public static boolean insertSchemaVersion(Connection conn) {
|
|
||||||
PreparedStatement preparedStatement = null;
|
|
||||||
String sql = "INSERT INTO db_info (name, value) VALUES (?, ?)";
|
|
||||||
try {
|
|
||||||
preparedStatement = conn.prepareStatement(sql);
|
|
||||||
preparedStatement.setString(1, "SCHEMA_VERSION");
|
|
||||||
preparedStatement.setString(2, String.valueOf(SCHEMA_VERSION));
|
|
||||||
preparedStatement.executeUpdate();
|
|
||||||
} catch (SQLException ex) {
|
|
||||||
LOGGER.log(Level.SEVERE, "Error adding schema version to db_info.", ex);
|
|
||||||
return false;
|
|
||||||
} finally {
|
|
||||||
EamDbUtil.closePreparedStatement(preparedStatement);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}*/
|
|
||||||
static boolean updateSchemaVersion(Connection conn) {
|
static boolean updateSchemaVersion(Connection conn) {
|
||||||
|
|
||||||
Statement statement;
|
Statement statement;
|
||||||
ResultSet resultSet;
|
ResultSet resultSet;
|
||||||
//PreparedStatement preparedStatement = null;
|
|
||||||
String sql = "INSERT INTO db_info (name, value) VALUES (?, ?)";
|
String sql = "INSERT INTO db_info (name, value) VALUES (?, ?)";
|
||||||
try {
|
try {
|
||||||
statement = conn.createStatement();
|
statement = conn.createStatement();
|
||||||
@ -178,7 +160,6 @@ public class EamDbUtil {
|
|||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Error adding schema version to db_info.", ex);
|
LOGGER.log(Level.SEVERE, "Error adding schema version to db_info.", ex);
|
||||||
return false;
|
return false;
|
||||||
} finally {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user