2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

configDB: support for automatic migration of weekprofile config

git-svn-id: https://svn.fhem.de/fhem/trunk@21277 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2020-02-25 19:44:21 +00:00
parent 75ba6d4f1c
commit 1dcaa5f5b7
2 changed files with 13 additions and 1 deletions

View File

@ -302,13 +302,14 @@ sub _cfgDB_readConfig() {
<li>93_DbLog.pm</li>
<li>95_holiday.pm</li>
<li>98_SVG.pm</li>
<li>98_weekprofile.pm</li>
<br/>
will use configDB to read their configuration data from database<br/>
instead of formerly used configuration files inside the filesystem.<br/>
<br/>
This requires you to import your configuration files from filesystem into database.<br/>
<br/>
Example:<br/>
Examples:<br/>
<code>configdb fileimport FHEM/nrw.holiday</code><br/>
<code>configdb fileimport FHEM/myrss.layout</code><br/>
<code>configdb fileimport www/gplot/xyz.gplot</code><br/>

View File

@ -147,6 +147,8 @@
#
# 2019-02-16 - changed default field length for table creation
#
# 2020-02-25 - added support weekprofile in automatic migration
#
##############################################################################
=cut
@ -614,6 +616,15 @@ sub cfgDB_MigrationImport() {
push @files, $filename;
}
# find weekprofile configurations
$filename ='';
@def = '';
@def = _cfgDB_findDef('TYPE=weekprofile','CONFIGFILE');
foreach $filename (@def) {
next unless $filename;
push @files, $filename;
}
# find holiday files
$filename ='';
@def = '';