add ddl execution

This commit is contained in:
Adam Black 2021-08-19 23:58:18 -04:00
parent ec02071b64
commit c98e171ebc
1 changed files with 22 additions and 22 deletions

View File

@ -26,26 +26,26 @@ for(dbms in testDatabases) {
}) })
# for(cdmVersion in listSupportedVersions()) { for(cdmVersion in listSupportedVersions()) {
# test_that(paste("DDL", cdmVersion, "runs on", dbms), { test_that(paste("DDL", cdmVersion, "runs on", dbms), {
# dropAllTablesFromSchema(connectionDetails, cdmDatabaseSchema) dropAllTablesFromSchema(connectionDetails, cdmDatabaseSchema)
# tables <- listTablesInSchema(connectionDetails, cdmDatabaseSchema) tables <- listTablesInSchema(connectionDetails, cdmDatabaseSchema)
# expect_equal(tables, character(0)) expect_equal(tables, character(0))
#
# executeDdl(connectionDetails, executeDdl(connectionDetails,
# cdmVersion = cdmVersion, cdmVersion = cdmVersion,
# cdmDatabaseSchema = cdmDatabaseSchema, cdmDatabaseSchema = cdmDatabaseSchema,
# executeDdl = TRUE, executeDdl = TRUE,
# executePrimaryKey = TRUE, executePrimaryKey = TRUE,
# executeForeignKey = FALSE) executeForeignKey = FALSE)
#
# tables <- listTablesInSchema(connectionDetails, cdmDatabaseSchema) tables <- listTablesInSchema(connectionDetails, cdmDatabaseSchema)
# cdmTableCsvLoc <- system.file(file.path("csv", paste0("OMOP_CDMv", cdmVersion, "_Table_Level.csv")), package = "CommonDataModel", mustWork = TRUE) cdmTableCsvLoc <- system.file(file.path("csv", paste0("OMOP_CDMv", cdmVersion, "_Table_Level.csv")), package = "CommonDataModel", mustWork = TRUE)
# tableSpecs <- read.csv(cdmTableCsvLoc, stringsAsFactors = FALSE)$cdmTableName tableSpecs <- read.csv(cdmTableCsvLoc, stringsAsFactors = FALSE)$cdmTableName
#
# # check that the tables in the database match the tables in the specification # check that the tables in the database match the tables in the specification
# expect_equal(sort(tolower(tables)), sort(tolower(tableSpecs))) expect_equal(sort(tolower(tables)), sort(tolower(tableSpecs)))
# dropAllTablesFromSchema(connectionDetails, cdmDatabaseSchema) dropAllTablesFromSchema(connectionDetails, cdmDatabaseSchema)
# }) })
# } }
} }