Add migration commands for SQLite; not PGSql

This commit is contained in:
2026-04-29 23:19:50 -04:00
parent e12ad0ecac
commit 68724dff8f
34 changed files with 1289 additions and 13 deletions
+20
View File
@@ -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()