Skip to content
Commit 5bd5cf75 authored by Chris Thornton's avatar Chris Thornton
Browse files

Update primary key in VIS sound model database.

The public API for getting at KeyphraseSoundModels is based on the user,
locale, and keyphrase ID. However, the sound model database would allow
multiple models to be registered using the same values, as it has a
primary key on the model UUID. This can potentially lead to a scenario
where multiple models are enrolled for the same user, and the data that
is returned when querying models is arbitrary.

V6 of the sound model database now enforces a primary key over the user
ID, locale and keyphrase ID. When inserting a new model with the same
primary key, the old model will be removed and the new model will be
used instead.

When upgrading from V5 to V6, if there are any models that would violate
the primary key constraint, they are all dropped.

Bug: 32174118
Change-Id: I9597c6a994f01a426625c3be2c53e826f26f5156
parent e422b0b2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment