public static function upgrade() {
		$sql = self::$sql;

		$sql::$logger->deactivate();
		try {
			$version = $sql->query(
				"SELECT version FROM meta LIMIT 1")['version'];
		} catch(SQLError $e) {
			$sql::$logger->activate();
			return self::upgrade_tables();
		}
		$sql::$logger->activate();

		if (0 <= version_compare($version, self::TABLE_VERSION))
			return self::$logger->debug(
				"Zapmin: Tables are up-to-date.");

		return self::upgrade_tables($version);
	}
public static function upgrade() {
		$sql = self::$sql;

		$sql::$logger->deactivate();
		try {
			$version = $sql->query(
				"SELECT version FROM meta LIMIT 1")['version'];
		} catch(SQLError $e) {
			$sql::$logger->activate();
			return self::upgrade_tables();
		}
		$sql::$logger->activate();

		if (0 <= version_compare($version, self::TABLE_VERSION))
			return self::$logger->debug(
				"Zapmin: Tables are up-to-date.");

		return self::upgrade_tables($version);
	}
public static function upgrade ( ) { $ sql = self :: $ sql ; $ sql :: $ logger -> deactivate ( ) ; try { $ version = $ sql -> query ( "SELECT version FROM meta LIMIT 1" ) [ 'version' ] ; } catch ( SQLError $ e ) { $ sql :: $ logger -> activate ( ) ; return self :: upgrade_tables ( ) ; } $ sql :: $ logger -> activate ( ) ; if ( 0 <= version_compare ( $ version , self :: TABLE_VERSION ) ) return self :: $ logger -> debug ( "Zapmin: Tables are up-to-date." ) ; return self :: upgrade_tables ( $ version ) ; }
Check if tables need upgrade.
Check if tables need upgrade .