From c62e39c0cae13f70ab025c56110981bd0d6f2d41 Mon Sep 17 00:00:00 2001 From: William Schaefer <wschaefer@basistech.net> Date: Wed, 30 Jan 2019 16:14:31 -0500 Subject: [PATCH] 4637 fix the type of object id columns for new data_source_info and account_relationships tables --- tsk/auto/db_postgresql.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsk/auto/db_postgresql.cpp b/tsk/auto/db_postgresql.cpp index 666836810..8631ae883 100755 --- a/tsk/auto/db_postgresql.cpp +++ b/tsk/auto/db_postgresql.cpp @@ -540,7 +540,7 @@ int TskDbPostgreSQL::initialize() { "Error creating tsk_vs_info table: %s\n") || attempt_exec - ("CREATE TABLE data_source_info (obj_id INTEGER PRIMARY KEY, device_id TEXT NOT NULL, time_zone TEXT NOT NULL, acquisition_details TEXT, FOREIGN KEY(obj_id) REFERENCES tsk_objects(obj_id));", + ("CREATE TABLE data_source_info (obj_id BIGINT PRIMARY KEY, device_id TEXT NOT NULL, time_zone TEXT NOT NULL, acquisition_details TEXT, FOREIGN KEY(obj_id) REFERENCES tsk_objects(obj_id));", "Error creating data_source_info table: %s\n") || attempt_exec @@ -636,7 +636,7 @@ int TskDbPostgreSQL::initialize() { "Error creating accounts table: %s\n") || attempt_exec - ("CREATE TABLE account_relationships (relationship_id BIGSERIAL PRIMARY KEY, account1_id INTEGER NOT NULL, account2_id INTEGER NOT NULL, relationship_source_obj_id INTEGER NOT NULL, date_time BIGINT, relationship_type INTEGER NOT NULL, data_source_obj_id INTEGER NOT NULL, UNIQUE(account1_id, account2_id, relationship_source_obj_id), FOREIGN KEY(account1_id) REFERENCES accounts(account_id), FOREIGN KEY(account2_id) REFERENCES accounts(account_id), FOREIGN KEY(relationship_source_obj_id) REFERENCES tsk_objects(obj_id), FOREIGN KEY(data_source_obj_id) REFERENCES tsk_objects(obj_id))", + ("CREATE TABLE account_relationships (relationship_id BIGSERIAL PRIMARY KEY, account1_id INTEGER NOT NULL, account2_id INTEGER NOT NULL, relationship_source_obj_id BIGINT NOT NULL, date_time BIGINT, relationship_type INTEGER NOT NULL, data_source_obj_id BIGINT NOT NULL, UNIQUE(account1_id, account2_id, relationship_source_obj_id), FOREIGN KEY(account1_id) REFERENCES accounts(account_id), FOREIGN KEY(account2_id) REFERENCES accounts(account_id), FOREIGN KEY(relationship_source_obj_id) REFERENCES tsk_objects(obj_id), FOREIGN KEY(data_source_obj_id) REFERENCES tsk_objects(obj_id))", "Error creating relationships table: %s\n") || attempt_exec -- GitLab