DO $$
DECLARE
 version_new_ CONSTANT integer := 11;-- new version number --
 ver_ integer;
 psql_ver_ text;
BEGIN
  LOCK TABLE variables;
  SELECT version_is('Ls') INTO ver_;
  IF ver_ < version_new_ THEN
    -- begin update --

INSERT INTO station_type (name, descr, endpoint, cpu_arch, os_name, os_version) VALUES ('H', 'x86 v1.0', 'debug', 'x86_64', 'ubuntu', '18\.\d*');
SELECT version() INTO psql_ver_;
IF psql_ver_ LIKE '% on x86_64%' THEN
  UPDATE object_settings SET value = 'https://92.53.102.118/update/h'
    WHERE _object = 19 AND key = 'UpUri';
END IF;

    -- end update --
    PERFORM version_set('Ls', version_new_);
  END IF;
END$$;