From 15f9b48dd09159bf50ab840653a34ae7e523ec89 Mon Sep 17 00:00:00 2001 From: betateilchen <> Date: Tue, 25 Feb 2020 19:44:21 +0000 Subject: [PATCH] configDB: support for automatic migration of weekprofile config git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21277 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/98_configdb.pm | 3 ++- configDB.pm | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/FHEM/98_configdb.pm b/FHEM/98_configdb.pm index c35afe106..d1c4c6b3a 100644 --- a/FHEM/98_configdb.pm +++ b/FHEM/98_configdb.pm @@ -302,13 +302,14 @@ sub _cfgDB_readConfig() {
  • 93_DbLog.pm
  • 95_holiday.pm
  • 98_SVG.pm
  • +
  • 98_weekprofile.pm

  • will use configDB to read their configuration data from database
    instead of formerly used configuration files inside the filesystem.

    This requires you to import your configuration files from filesystem into database.

    - Example:
    + Examples:
    configdb fileimport FHEM/nrw.holiday
    configdb fileimport FHEM/myrss.layout
    configdb fileimport www/gplot/xyz.gplot
    diff --git a/configDB.pm b/configDB.pm index ad9185379..b05ed235d 100644 --- a/configDB.pm +++ b/configDB.pm @@ -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 = '';