fix db_gen: (1) mv X.L to X.delta instead of X.new (2) after finish each logical level, advance corresponding active delta level by one