Fixed SQL query

This commit is contained in:
Daniel Winzen
2021-11-01 21:45:55 +01:00
parent e8f5816d13
commit 2681b312aa
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ const DBUSER='hosting'; // Database user
const DBPASS='MY_PASSWORD'; // Database password
const DBNAME='hosting'; // Database
const PERSISTENT=true; // Use persistent database conection true/false
const DBVERSION=19; //database layout version
const DBVERSION=20; //database layout version
const CAPTCHA=1; // Captcha difficulty (0=off, 1=simple, 2=moderate, 3=extreme)
const ADDRESS='dhosting4xxoydyaivckq7tsmtgi4wfs3flpeyitekkmqwu4v4r46syd.onion'; // our own address
const CANONICAL_URL='https://hosting.danwin1210.me'; // our preferred domain for search engines

View File

@ -164,8 +164,8 @@ if(!@$version=$db->query("SELECT value FROM settings WHERE setting='version';"))
$db->exec('UPDATE disk_quota set updated=1;');
$db->exec("ALTER TABLE users ADD pgp_key text COLLATE 'latin1_bin' NULL, ADD pgp_verified tinyint(1) NOT NULL DEFAULT '0', ADD tfa tinyint(1) NOT NULL DEFAULT '0';");
}
if($version<19){
$db->exec("ALTER TABLE onions max_streams tinyint(3) unsigned NOT NULL DEFAULT '6';");
if($version<20){
$db->exec("ALTER TABLE onions CHANGE max_streams max_streams tinyint(3) unsigned NOT NULL DEFAULT '6';");
}
$stmt=$db->prepare("UPDATE settings SET value=? WHERE setting='version';");
$stmt->execute([DBVERSION]);