Skip to content

Commit

Permalink
update create_server_dist and add adaptation sql templates
Browse files Browse the repository at this point in the history
  • Loading branch information
voxparcxls committed Dec 5, 2023
1 parent 9a091a5 commit 928fbb9
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions create_server_dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ awk 'NR==FNR { a[n++]=$0; next }
/__CUSTOM_METHODS_JAVA__/ { for (i=0;i<n;++i) print a[i]; next }1' ${DIST}/snippets.java ${INSTALL_DIR}/sql/core.sql.template > ${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
Expand Down
1 change: 0 additions & 1 deletion install/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand Down
8 changes: 8 additions & 0 deletions install/sql/adaptation.sql.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
INSERT INTO cws_code (code)
VALUES (
'
__CUSTOM_METHODS_JAVA__
'
);

ALTER TABLE cws_worker ADD asg_class VARCHAR(10);
8 changes: 8 additions & 0 deletions install/sql/adaptation_core.sql.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
INSERT INTO cws_code (code)
VALUES (
'
__CUSTOM_METHODS_JAVA__
'
);

ALTER TABLE cws_worker ADD asg_class VARCHAR(10);
6 changes: 6 additions & 0 deletions install/sql/adaptation_external.sql.template
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 928fbb9

Please sign in to comment.