fixing alternc-awstats upgrade SQL error + fixing error in upgrade check for mysql
This commit is contained in:
parent
48cee467fc
commit
db9d270de7
|
@ -3,6 +3,8 @@ CREATE TABLE IF NOT EXISTS `aws` (
|
|||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`uid` int(10) unsigned NOT NULL default '0',
|
||||
`hostname` varchar(255) NOT NULL default '',
|
||||
`public` INT(1) unsigned NOT NULL DEFAULT '1',
|
||||
`hostaliases` TEXT,
|
||||
PRIMARY KEY (`id`)
|
||||
) Engine=MyISAM COMMENT='Statistiques web par Awstats';
|
||||
|
||||
|
@ -24,5 +26,3 @@ CREATE TABLE IF NOT EXISTS `aws_access` (
|
|||
INDEX (`id`)
|
||||
) COMMENT = 'Qui peut accéder aux stats awstats ';
|
||||
|
||||
ALTER TABLE `aws` ADD `public` INT(1) unsigned NOT NULL DEFAULT '1';
|
||||
ALTER TABLE `aws` ADD `hostaliases` TEXT ;
|
||||
|
|
|
@ -21,7 +21,7 @@ get_ext() {
|
|||
# Reading the current version in the DB.
|
||||
# If the DB exist but the alternc_status table doesn't, we will initialize it below
|
||||
# In that case we search where we upgrade from in /var/lib/alternc/backups/lastversion from debian.postinstall script
|
||||
oldvers="`mysql --defaults-file=/etc/alternc/my.cnf --skip-column-names -e "SELECT value FROM alternc_status WHERE name='alternc_version'"||true`"
|
||||
oldvers="`mysql --defaults-file=/etc/alternc/my.cnf --skip-column-names -e "SELECT value FROM alternc_status WHERE name='alternc_version'" 2>/dev/null||true`"
|
||||
if [ -z "$oldvers" ]
|
||||
then
|
||||
# no version number, we check from /var/lib/alternc
|
||||
|
|
Loading…
Reference in New Issue