mirror of
https://github.com/latentPrion/cppbessot.git
synced 2026-06-23 23:28:36 +00:00
Add migration commands for SQLite; not PGSql
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
function(_cppbessot_db_action_validate_basename value kind relative_root)
|
||||
if("${value}" STREQUAL "")
|
||||
message(FATAL_ERROR "${kind} must not be empty.")
|
||||
endif()
|
||||
|
||||
if("${value}" MATCHES "[/\\\\]")
|
||||
message(FATAL_ERROR
|
||||
"${kind} `${value}` must be a basename under ${relative_root}, not a path.")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(_cppbessot_db_action_validate_db_target_impl db_target)
|
||||
if(NOT "${db_target}" STREQUAL "prod"
|
||||
AND NOT "${db_target}" STREQUAL "proddev"
|
||||
AND NOT "${db_target}" STREQUAL "dev")
|
||||
message(FATAL_ERROR "DB_TARGET must be one of: prod, proddev, dev.")
|
||||
endif()
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user