From 18610fd601daddc1ce74dac606685d086a9d8259 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 18 Nov 2021 09:55:19 -0500 Subject: [PATCH 1/2] Add an update script that includes manufacturers and models --- db/CMakeLists.txt | 3 +++ db/zm_update-1.37.4.sql.in | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 db/zm_update-1.37.4.sql.in diff --git a/db/CMakeLists.txt b/db/CMakeLists.txt index 18f440fc8..eb9e690bd 100644 --- a/db/CMakeLists.txt +++ b/db/CMakeLists.txt @@ -4,6 +4,7 @@ configure_file(zm_create.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_create.sql" @ONLY) configure_file(zm_update-1.31.30.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.31.30.sql" @ONLY) configure_file(zm_update-1.35.24.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.35.24.sql" @ONLY) +configure_file(zm_update-1.37.4.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.37.4.sql" @ONLY) # Glob all database upgrade scripts file(GLOB dbfileslist RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "zm_update-*.sql") @@ -15,6 +16,8 @@ install(FILES ${dbfileslist} DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.31.30.sql" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db") # install zm_update-1.35.24.sql install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.35.24.sql" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db") +# install zm_update-1.37.4.sql +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.37.4.sql" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db") # install zm_create.sql install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm_create.sql" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db") diff --git a/db/zm_update-1.37.4.sql.in b/db/zm_update-1.37.4.sql.in new file mode 100644 index 000000000..d0ab7b36c --- /dev/null +++ b/db/zm_update-1.37.4.sql.in @@ -0,0 +1,2 @@ +source @PKGDATADIR@/db/manufacturers.sql +source @PKGDATADIR@/db/models.sql From f63c124988ceb565ce00deb5651d23bba6883ff7 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 18 Nov 2021 09:55:39 -0500 Subject: [PATCH 2/2] include manufacturers and models --- db/zm_create.sql.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index d9d4f96c3..fe4d93dde 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -1118,6 +1118,9 @@ CREATE TABLE Snapshot_Events ( -- We generally don't alter triggers, we drop and re-create them, so let's keep them in a separate file that we can just source in update scripts. source @PKGDATADIR@/db/triggers.sql + +source @PKGDATADIR@/db/manufacturers.sql +source @PKGDATADIR@/db/models.sql -- -- Apply the initial configuration --