diff --git a/create_server_dist.sh b/create_server_dist.sh index 16107668..60a7a4b4 100755 --- a/create_server_dist.sh +++ b/create_server_dist.sh @@ -186,6 +186,9 @@ awk 'NR==FNR { a[n++]=$0; next } /__CUSTOM_METHODS_JAVA__/ { for (i=0;i ${CWS}/sql/cws/core.sql cp ${INSTALL_DIR}/sql/core.afterstartup.sql.template ${CWS}/sql/cws/core.afterstartup.sql +cp ${INSTALL_DIR}/sql/adaptation.sql.template ${CWS}/sql/cws/adaptation.sql +cp ${INSTALL_DIR}/sql/adaptation_core.sql.template ${CWS}/sql/cws/adaptation_core.sql +cp ${INSTALL_DIR}/sql/adaptation_external.sql.template ${CWS}/sql/cws/adaptation_external.sql rm ${DIST}/snippets.java rm ${DIST}/snippets.java.bak diff --git a/install/configure.sh b/install/configure.sh index ef0e7897..fd853d23 100755 --- a/install/configure.sh +++ b/install/configure.sh @@ -336,7 +336,6 @@ if [[ "${CWS_INSTALL_TYPE}" = "1" ]] || [[ "${CWS_INSTALL_TYPE}" = "2" ]]; then echo "password=\"${ADAPT_DB_PASS}\"" >> ${ROOT}/config/myadapt.cnf chmod 644 ${ROOT}/config/myadapt.cnf - cat ${ROOT}/config/myadapt.cnf # ---------------------------------------- print "Your adaptation database configuration is:" diff --git a/install/sql/adaptation.sql.template b/install/sql/adaptation.sql.template new file mode 100644 index 00000000..84f2b8bb --- /dev/null +++ b/install/sql/adaptation.sql.template @@ -0,0 +1,8 @@ +INSERT INTO cws_code (code) +VALUES ( +' +__CUSTOM_METHODS_JAVA__ +' +); + +ALTER TABLE cws_worker ADD asg_class VARCHAR(10); diff --git a/install/sql/adaptation_core.sql.template b/install/sql/adaptation_core.sql.template new file mode 100644 index 00000000..84f2b8bb --- /dev/null +++ b/install/sql/adaptation_core.sql.template @@ -0,0 +1,8 @@ +INSERT INTO cws_code (code) +VALUES ( +' +__CUSTOM_METHODS_JAVA__ +' +); + +ALTER TABLE cws_worker ADD asg_class VARCHAR(10); diff --git a/install/sql/adaptation_external.sql.template b/install/sql/adaptation_external.sql.template new file mode 100644 index 00000000..c5df011c --- /dev/null +++ b/install/sql/adaptation_external.sql.template @@ -0,0 +1,6 @@ +CREATE TABLE IF NOT EXISTS `cws_workers` ( + `id` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`id`, `name`), + UNIQUE KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;