Changing structure of database