update doc and sql