ALTER TABLE tasks
ADD log_offset integer NOT NULL DEFAULT COALESCE(CARDINALITY(log),0);
