add a column in database

revise some code to add a column in database.