Skip to content

Commit

Permalink
Database update bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonra committed Dec 4, 2023
1 parent 5d4ffd6 commit cb9b2eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/initialize.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#' @return Something - use this to sniff for existing DB information?
#' @export
#'
#' @importFrom DBI dbAppendTable
#' @importFrom DBI dbConnect
#' @importFrom DBI dbDisconnect
#' @importFrom DBI dbListTables
Expand Down Expand Up @@ -94,7 +95,7 @@ dbinit <- function(db_path, data = NULL)
!is.null(data$trackRaw))
{
dbWriteTable(con, "trackRaw", data$trackRaw)
}else{
}else if(!is.null(data$trackRaw)){
dbAppendTable(con, "trackRaw", data$trackRaw)
}

Expand Down
3 changes: 3 additions & 0 deletions data-raw/process_raw_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ if(length(all_experiments) > 0)
source_dir = file.path(root, 'data-raw', 'results_csv'),
results_dir = file.path(root, '.data'),
seed = 923847)

processed_data$access <- data.frame(user = 'kuhnslab',
expID = processed_data$expSummary$expID)

dbinit(db_path, processed_data)
}
Expand Down

0 comments on commit cb9b2eb

Please sign in to comment.