added primary key to local database