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

ALTER TABLE tele_station_live
    ADD COLUMN messages_day integer NOT NULL DEFAULT -1;
ALTER TABLE tele_station_live
    ADD COLUMN md_changed timestamp with time zone;

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