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.  ;(
This commit is contained in:
Franco Fichtner 2017-08-09 15:25:41 +02:00
parent b138f2e960
commit dcd571e0ac
2 changed files with 5 additions and 0 deletions

View file

@ -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 \

2
Templates/models Normal file
View file

@ -0,0 +1,2 @@
echo "Running migration"
/usr/local/opnsense/mvc/script/run_migrations.php