added upgrade scripts for 7.10.33 including upgrade to mysql 8.x

This commit is contained in:
Joeri de Bruin 2026-02-25 17:28:31 +01:00
parent 45a78c182f
commit e07af2eb65
4 changed files with 12 additions and 23 deletions

View file

@ -20,20 +20,12 @@ for configfile in `perl -Ilib sbin/wgd for-each`;do
echo "code version $code_version"
echo "database version $db_version for $configfile"
#this table shoud have a defult value. Shoud be in upgrade.pl to new version
`mysql -e 'alter table userSession MODIFY COLUMN userId char(22) NOT NULL DEFAULT "0";' $connection_info ` && break
`mysql -e 'alter table assetVersionTag MODIFY COLUMN name char(255) NOT NULL DEFAULT "default";' $connection_info ` && break
`mysql -e 'alter table assetVersionTag MODIFY COLUMN createdBy char(22) NOT NULL DEFAULT "3";' $connection_info ` && break
`mysql -e 'alter table assetVersionTag MODIFY COLUMN committedBy char(22) NOT NULL DEFAULT "3";' $connection_info ` && break
`mysql -e 'alter table assetVersionTag MODIFY COLUMN lockedBy char(22) NOT NULL DEFAULT "3";' $connection_info ` && break
`mysql -e 'alter table assetVersionTag MODIFY COLUMN groupToUse char(22) NOT NULL DEFAULT "3";' $connection_info ` && break
`mysql -e 'alter table assetVersionTag MODIFY COLUMN workflowId char(22) NOT NULL DEFAULT "";' $connection_info ` && break
`mysql -e 'alter table WorkflowInstance MODIFY COLUMN workflowId char(22) NOT NULL DEFAULT "";' $connection_info ` && break
`mysql -e 'alter table WorkflowInstance MODIFY COLUMN currentActivityId char(22) NOT NULL DEFAULT "";' $connection_info ` && break
if [ "$db_version" != "$code_version" ];then
echo "Upgrading Webgui from $db_version to $code_version..."
#first we alter the userSession table to make sure that the userId has a default value This is required for the upgrade process to work correctly.
`mysql -e 'alter table userSession MODIFY COLUMN userId char(22) NOT NULL DEFAULT "0";' $connection_info ` && break
perl -Ilib sbin/wgd reset --upgrade --verbose --config-file=$configfile --webgui-root=/data/WebGUI/
### alter table userSession MODIFY COLUMN userId char(22) NOT NULL DEFAULT '0';
## perl -Ilib sbin/wgd db --config-file=www.example.com --webgui-root=/data/WebGUI
@ -41,13 +33,6 @@ for configfile in `perl -Ilib sbin/wgd for-each`;do
done
#perl -I/data/WebGUI/lib sbin/spectre.pl --daemon
service apache2 start
while true; do
echo "Starting Apache web server..."
sleep 60
done
perl -I/data/WebGUI/lib sbin/spectre.pl --daemon
apachectl -DFOREGROUND