add sql upgrade,add pagination in thread and post, adjust style