add new database
fix a errord [sort tables by position]