added upgrade scripts for 7.10.33 including upgrade to mysql 8.x
This commit is contained in:
parent
45a78c182f
commit
e07af2eb65
4 changed files with 12 additions and 23 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
7.10.33
|
||||
- fixed: Columns defined with 'NOT NULL' must have a default value in MySQL 8.x
|
||||
|
||||
7.10.32
|
||||
- fixed: Bad asset redirect from AssetTrash www_delete if encryptPage is set
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package WebGUI;
|
||||
|
||||
|
||||
our $VERSION = '7.10.32';
|
||||
our $VERSION = '7.10.33';
|
||||
our $STATUS = 'stable';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
use strict;
|
||||
use File::Basename ();
|
||||
use File::Spec;
|
||||
use lib '.';
|
||||
|
||||
my $webguiRoot;
|
||||
BEGIN {
|
||||
|
|
@ -132,8 +133,8 @@ foreach my $filename (keys %{$configs}) {
|
|||
$config{$filename}{mysqlCLI} = $configs->{$filename}->get("mysqlCLI");
|
||||
$config{$filename}{mysqlDump} = $configs->{$filename}->get("mysqlDump");
|
||||
$config{$filename}{backupPath} = $configs->{$filename}->get("backupPath");
|
||||
my $session = WebGUI::Session->open($webguiRoot,$filename);
|
||||
($config{$filename}{version}) = $session->db->quickArray("select webguiVersion from webguiVersion order by
|
||||
my $session = WebGUI::Session->open($webguiRoot, $filename, undef, undef, undef, 1);
|
||||
($config{$filename}{version}) = $session->db->quickArray("select webguiVersion from webguiVersion order by
|
||||
dateApplied desc, length(webguiVersion) desc, webguiVersion desc limit 1");
|
||||
unless ($history) {
|
||||
print "\tPreparing site for upgrade.\n" unless ($quiet);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue