scope :root_res, where(:dir_id => 0) 有bug, 当是 0 时, migrate 会崩掉