Skip to content

Commit

Permalink
Merge pull request #167 from vimc/vimc-2929
Browse files Browse the repository at this point in the history
VIMC-2929: Remove custom fields from main orderly table
  • Loading branch information
hillalex authored Sep 8, 2022
2 parents 7b1f48c + 5b12ff9 commit ef814a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: orderly
Title: Lightweight Reproducible Reporting
Version: 1.4.9
Version: 1.4.10
Description: Order, create and store reports from R. By defining a
lightweight interface around the inputs and outputs of an
analysis, a lot of the repetitive work for reproducible research
Expand Down
15 changes: 2 additions & 13 deletions R/db2.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## namespace/module feature so that implementation details can be
## hidden away a bit further.

orderly_schema_version <- "1.2.39"
orderly_schema_version <- "1.3.0"
orderly_schema_table <- "orderly_schema"
orderly_table_list <- "orderly_schema_tables"

Expand All @@ -24,14 +24,6 @@ report_db_schema_read <- function(fields = NULL, dialect = "sqlite") {

d <- set_names(lapply(names(d), preprepare), names(d))

## Delete with VIMC-2929
if (!is.null(fields)) {
f <- set_names(Map(function(t, n) list(type = t, nullable = n),
rep("character", nrow(fields)), !fields$required),
fields$name)
d[["report_version"]]$columns <- c(d[["report_version"]]$columns, f)
}

prepare_table <- function(x) {
prepare_col <- function(nm) {
el <- x$columns[[nm]]
Expand Down Expand Up @@ -303,10 +295,7 @@ report_data_import <- function(con, dat_rds, config) {
git_sha = dat_rds$git$sha %||% NA_character_,
git_branch = dat_rds$git$branch %||% NA_character_,
git_clean = git_clean)
## TODO: Delete with VIMC-2929
if (!is.null(dat_rds$meta$extra_fields)) {
report_version <- cbind(report_version, dat_rds$meta$extra_fields)
}

DBI::dbWriteTable(con, "report_version", report_version, append = TRUE)

if (!is.null(dat_rds$meta$extra_fields)) {
Expand Down
2 changes: 0 additions & 2 deletions inst/database/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ report_version:
- git_sha: {type: TEXT, nullable: true}
- git_branch: {type: TEXT, nullable: true}
- git_clean: {type: BOOLEAN, nullable: true}
# NOTE: fields listed in orderly_config.yml will also be
# included here.

# Custom fields - all coerced into text.
report_version_custom_fields:
Expand Down

0 comments on commit ef814a1

Please sign in to comment.