1. Create hsi_history table to store the security attributes.
2. Convert all security entities to a json string and write to database.
Signed-off-by: Kate Hsuan <hpa@redhat.com>
Changes in v1:
1. Fixed typo: "his_history" to "hsi_history"
2. g_autofree all gchar pointer.
3. Removed unnecessary g_warning messages.
4. Moved the json format comment to Document comment.
5. Add an error handling for json converter.
Changes in v2:
1. Declare all pointers using g_auto_ptr.
2. The warning messages of JSON conversion and DB writing errors were added.
3. "Since: 1.7.0" was added to the document comment.
Changes in v3:
1. Fix variable declaration.
2. Remove unecessary data type casting.
Changes in v4:
1. Fix migration schema.
Changes in v5:
1. Fix hsi_history column name declaration.
Changes in v6:
Column name was modified from last to timestamp.
To do this, rely on the AppStream ID to map to a translated string (providing a
fallback for clients that do not care) and switch the free-form result string
into a set of enumerated values that can be translated.
This fixes some of the problems where some things have to be enabled to "pass"
and other attributes have to be some other state. For cases where we want the
user to "do" something, provide a URL to a wiki page that we update out-of-band
of fwupd releases.