Skip to content
Snippets Groups Projects
Commit 3110b1e2 authored by apriestman's avatar apriestman
Browse files

Updating to 9.0 schema

parent 0239c593
No related branches found
No related tags found
No related merge requests found
...@@ -767,6 +767,7 @@ INPUT = main.dox \ ...@@ -767,6 +767,7 @@ INPUT = main.dox \
communications.dox \ communications.dox \
schema/schema_list.dox \ schema/schema_list.dox \
schema/db_schema_8_6.dox \ schema/db_schema_8_6.dox \
schema/db_schema_9_0.dox \
../src ../src
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
......
...@@ -45,7 +45,7 @@ You can also access the data in its tree form by starting with org.sleuthkit.dat ...@@ -45,7 +45,7 @@ You can also access the data in its tree form by starting with org.sleuthkit.dat
The Sleuth Kit has its own database schema that is shared with Autopsy and other tools. The primary way it gets populated is via the Java code. The Sleuth Kit has its own database schema that is shared with Autopsy and other tools. The primary way it gets populated is via the Java code.
- Database Schema Documentation: - Database Schema Documentation:
- \subpage db_schema_8_6_page - \subpage db_schema_9_0_page
- \subpage db_schema_page "Older schemas" - \subpage db_schema_page "Older schemas"
- Refer to \subpage query_database_page if you are going to use one of the SleuthkitCase methods that requires you to specify a query. - Refer to \subpage query_database_page if you are going to use one of the SleuthkitCase methods that requires you to specify a query.
- Refer to \subpage insert_and_update_database_page if you are a Sleuth Kit developer and want to avoid database issues. - Refer to \subpage insert_and_update_database_page if you are a Sleuth Kit developer and want to avoid database issues.
......
This diff is collapsed.
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
This page contians links to the documention for selected versions of the TSK & Autopsy database schema. This page contians links to the documention for selected versions of the TSK & Autopsy database schema.
- Current Schema - Current Schema
- \subpage db_schema_8_6_page - \subpage db_schema_9_0_page
- Older Schemas - Older Schemas
- \subpage db_schema_8_6_page
- <a href="https://wiki.sleuthkit.org/index.php?title=Database_v7.2_Schema">Schema version 7.2</a> - <a href="https://wiki.sleuthkit.org/index.php?title=Database_v7.2_Schema">Schema version 7.2</a>
- <a href="https://wiki.sleuthkit.org/index.php?title=SQLite_Database_v6_Schema">Schema version 6</a> - <a href="https://wiki.sleuthkit.org/index.php?title=SQLite_Database_v6_Schema">Schema version 6</a>
- <a href="https://wiki.sleuthkit.org/index.php?title=SQLite_Database_v3_Schema">Schema version 3</a> - <a href="https://wiki.sleuthkit.org/index.php?title=SQLite_Database_v3_Schema">Schema version 3</a>
......
...@@ -100,7 +100,7 @@ public class SleuthkitCase { ...@@ -100,7 +100,7 @@ public class SleuthkitCase {
* tsk/auto/tsk_db.h. * tsk/auto/tsk_db.h.
*/ */
static final CaseDbSchemaVersionNumber CURRENT_DB_SCHEMA_VERSION static final CaseDbSchemaVersionNumber CURRENT_DB_SCHEMA_VERSION
= new CaseDbSchemaVersionNumber(8, 7); = new CaseDbSchemaVersionNumber(9, 0);
   
private static final long BASE_ARTIFACT_ID = Long.MIN_VALUE; // Artifact ids will start at the lowest negative value private static final long BASE_ARTIFACT_ID = Long.MIN_VALUE; // Artifact ids will start at the lowest negative value
private static final Logger logger = Logger.getLogger(SleuthkitCase.class.getName()); private static final Logger logger = Logger.getLogger(SleuthkitCase.class.getName());
...@@ -994,7 +994,7 @@ private void updateDatabaseSchema(String dbPath) throws Exception { ...@@ -994,7 +994,7 @@ private void updateDatabaseSchema(String dbPath) throws Exception {
dbSchemaVersion = updateFromSchema8dot3toSchema8dot4(dbSchemaVersion, connection); dbSchemaVersion = updateFromSchema8dot3toSchema8dot4(dbSchemaVersion, connection);
dbSchemaVersion = updateFromSchema8dot4toSchema8dot5(dbSchemaVersion, connection); dbSchemaVersion = updateFromSchema8dot4toSchema8dot5(dbSchemaVersion, connection);
dbSchemaVersion = updateFromSchema8dot5toSchema8dot6(dbSchemaVersion, connection); dbSchemaVersion = updateFromSchema8dot5toSchema8dot6(dbSchemaVersion, connection);
dbSchemaVersion = updateFromSchema8dot6toSchema8dot7(dbSchemaVersion, connection); dbSchemaVersion = updateFromSchema8dot6toSchema9dot0(dbSchemaVersion, connection);
statement = connection.createStatement(); statement = connection.createStatement();
connection.executeUpdate(statement, "UPDATE tsk_db_info SET schema_ver = " + dbSchemaVersion.getMajor() + ", schema_minor_ver = " + dbSchemaVersion.getMinor()); //NON-NLS connection.executeUpdate(statement, "UPDATE tsk_db_info SET schema_ver = " + dbSchemaVersion.getMajor() + ", schema_minor_ver = " + dbSchemaVersion.getMinor()); //NON-NLS
connection.executeUpdate(statement, "UPDATE tsk_db_info_extended SET value = " + dbSchemaVersion.getMajor() + " WHERE name = '" + SCHEMA_MAJOR_VERSION_KEY + "'"); //NON-NLS connection.executeUpdate(statement, "UPDATE tsk_db_info_extended SET value = " + dbSchemaVersion.getMajor() + " WHERE name = '" + SCHEMA_MAJOR_VERSION_KEY + "'"); //NON-NLS
...@@ -2345,7 +2345,7 @@ private CaseDbSchemaVersionNumber updateFromSchema8dot5toSchema8dot6(CaseDbSchem ...@@ -2345,7 +2345,7 @@ private CaseDbSchemaVersionNumber updateFromSchema8dot5toSchema8dot6(CaseDbSchem
} }
   
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
private CaseDbSchemaVersionNumber updateFromSchema8dot6toSchema8dot7(CaseDbSchemaVersionNumber schemaVersion, CaseDbConnection connection) throws SQLException, TskCoreException { private CaseDbSchemaVersionNumber updateFromSchema8dot6toSchema9dot0(CaseDbSchemaVersionNumber schemaVersion, CaseDbConnection connection) throws SQLException, TskCoreException {
if (schemaVersion.getMajor() != 8) { if (schemaVersion.getMajor() != 8) {
return schemaVersion; return schemaVersion;
} }
...@@ -2564,7 +2564,7 @@ private CaseDbSchemaVersionNumber updateFromSchema8dot6toSchema8dot7(CaseDbSchem ...@@ -2564,7 +2564,7 @@ private CaseDbSchemaVersionNumber updateFromSchema8dot6toSchema8dot7(CaseDbSchem
+ "FOREIGN KEY(obj_id) REFERENCES tsk_objects(obj_id) ON DELETE CASCADE )"); + "FOREIGN KEY(obj_id) REFERENCES tsk_objects(obj_id) ON DELETE CASCADE )");
return new CaseDbSchemaVersionNumber(8, 7); return new CaseDbSchemaVersionNumber(9, 0);
   
} finally { } finally {
closeStatement(statement); closeStatement(statement);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment