From dcd571e0ace65f86fde3bec172bf0ef62c74f177 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 9 Aug 2017 15:25:41 +0200 Subject: [PATCH] Framework: migration auto-hook for model-provider Of course, models are polluted with ACL and Menu so this becomes a kind of a given step. ;( --- Mk/plugins.mk | 3 +++ Templates/models | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 Templates/models diff --git a/Mk/plugins.mk b/Mk/plugins.mk index 313428d21..4736b80ed 100644 --- a/Mk/plugins.mk +++ b/Mk/plugins.mk @@ -128,6 +128,9 @@ scripts-auto: ${DESTDIR}/$${SCRIPT}; \ done; \ fi + @if [ -d ${.CURDIR}/src/opnsense/mvc/app/models ]; then \ + cat ${TEMPLATESDIR}/models >> ${DESTDIR}/+POST_INSTALL; \ + fi @if [ -d ${.CURDIR}/src/opnsense/service/templates ]; then \ for FILE in $$(cd ${.CURDIR}/src/opnsense/service/templates && \ find -s . -mindepth 2 -type d); do \ diff --git a/Templates/models b/Templates/models new file mode 100644 index 000000000..0ea75f82d --- /dev/null +++ b/Templates/models @@ -0,0 +1,2 @@ +echo "Running migration" +/usr/local/opnsense/mvc/script/run_migrations.php