19 package org.sleuthkit.autopsy.centralrepository.datamodel;
21 import java.sql.Connection;
22 import java.sql.SQLException;
23 import java.sql.Statement;
24 import org.
sleuthkit.datamodel.CaseDbSchemaVersionNumber;
35 if (dbSchemaVersion.compareTo(
new CaseDbSchemaVersionNumber(1, 6)) < 0) {
37 try (Statement statement = connection.createStatement();) {
48 statement.execute(String.format(
RdbmsCentralRepoFactory.getCreateAccountInstancesTableTemplate(selectedPlatform), instance_type_dbname, instance_type_dbname));
49 statement.execute(String.format(
RdbmsCentralRepoFactory.getAddCaseIdIndexTemplate(), instance_type_dbname, instance_type_dbname));
50 statement.execute(String.format(
RdbmsCentralRepoFactory.getAddDataSourceIdIndexTemplate(), instance_type_dbname, instance_type_dbname));
51 statement.execute(String.format(
RdbmsCentralRepoFactory.getAddValueIndexTemplate(), instance_type_dbname, instance_type_dbname));
52 statement.execute(String.format(
RdbmsCentralRepoFactory.getAddKnownStatusIndexTemplate(), instance_type_dbname, instance_type_dbname));
53 statement.execute(String.format(
RdbmsCentralRepoFactory.getAddObjectIdIndexTemplate(), instance_type_dbname, instance_type_dbname));
CentralRepoPlatforms getDbPlatform()
static void insertCorrelationType(Connection conn, CorrelationAttributeInstance.Type correlationType)
static List< CorrelationAttributeInstance.Type > getDefaultCorrelationTypes()
static CentralRepoDbChoice getSavedDbChoice()
void upgradeSchema(CaseDbSchemaVersionNumber dbSchemaVersion, Connection connection)
static String correlationTypeToInstanceTableName(CorrelationAttributeInstance.Type type)
static final int INSTALLED_PROGS_TYPE_ID
static final int OSACCOUNT_TYPE_ID