From e9d1e81c4953554b17b22551a8e7a0f249ca96dd Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 3 Apr 2016 08:14:53 +0000 Subject: [PATCH] api update script to deinstall on longer existing EMailAdmin and create it's 14.1 tables, if they are not already there (update from before 14.1) --- api/setup/tables_update.inc.php | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 api/setup/tables_update.inc.php diff --git a/api/setup/tables_update.inc.php b/api/setup/tables_update.inc.php new file mode 100644 index 0000000000..936a7b233b --- /dev/null +++ b/api/setup/tables_update.inc.php @@ -0,0 +1,43 @@ +db->table_names(true); + $phpgw_baseline = array(); + include (__DIR__.'/tables_current.inc.php'); + foreach($phpgw_baseline as $table => $definition) + { + if (!in_array($table, $tables)) + { + $GLOBALS['egw_setup']->oProc->CreateTable($table, $definition); + } + } + + // uninstall no longer existing EMailAdmin + if (in_array('egw_emailadmin', $tables)) + { + $GLOBALS['egw_setup']->oProc->DropTable('egw_emailadmin'); + } + $GLOBALS['egw_setup']->deregister_app('emailadmin'); + + return $GLOBALS['setup_info']['api']['currentver'] = '16.1'; +} \ No newline at end of file