Removed policy from hsm_key, should use policy_id.
Removed locator from key_data, should use hsm_key_id to get the locator from the hsm_key object.
Removed the schema from test.sqlite and use the schema.sqlite to create the test database.