private static function upgrade_tables($from_version=null) {

		$sql = self::$sql;

		if (!$from_version) {
			$from_version = '0.0';
			$sql->query_raw("
				CREATE TABLE meta (
					version VARCHAR(24) NOT NULL DEFAULT '0.0'
				);
			");
			$sql->insert('meta', [
				'version' => self::TABLE_VERSION,
			]);
		} else {
			$sql->update('meta', [
				'version' => self::TABLE_VERSION,
			]);
		}

		self::$logger->info(sprintf(
			"Zapmin: Upgrading tables: '%s' -> '%s'.",
			$from_version, self::TABLE_VERSION));

		# other upgrade actions here ...
	}