Providing Field (column) level Metadata via Geopackages & QGIS
The GeoPackage specification includes the Schema extension as "a means to describe the columns of tables in a GeoPackage with more detail than can be captured by the SQL table definition directly" - see schema extension guidance.
The specification defines a table, gpkg_data_columns
to hold information about table (and view) columns. They provide the SQL code to create the table.
QGIS support for field-level metadata
QGIS supports the GeoPackage schema functionality. It allows users to read and write an Alias and Comment for each field in a spatial table. For spatial views, it allows read but not write.
This simple SQL table makes it easy to add metadata to our GeoPackages. For example, we can transform the RME metrics table to column descriptions and we can copy metadata from one layer to another during our processing.