[Sat Apr 25 15:50:46.015467 2020] [php7:notice] [pid 2711] [client 10.0.2.2:41652] Uncaught PHP Exception Drupal\\Core\\Entity\\Query\\QueryException: "'fits_droid_puid' not found" at /var/www/html/drupal/web/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php line 367, referer: http://localhost:8000/admin/reports/media_formats
The best way to check whether a field exists is using code like:
$schema = \Drupal\Core\Database\Database::getConnection()->schema();
$tables = rest_oai_pmh_schema();
foreach ($tables as $name => $table) {
if (!$schema->tableExists($name)) {
$schema->createTable($name, $table);
}
}
The Islandora FITS module doesn't provide a schema, since the fields are dynamically generated. So, in the absense of the fits_droid_puid field, the current PUID data source won't work.
As of https://github.com/roblib/islandora_fits/commit/004f269ebfe50462eff9a592a9e76c5fe9f115bf, fields from the FITS data are not being added to media, so our query on
fits_droid_puid
fails with:[Sat Apr 25 15:50:46.015467 2020] [php7:notice] [pid 2711] [client 10.0.2.2:41652] Uncaught PHP Exception Drupal\\Core\\Entity\\Query\\QueryException: "'fits_droid_puid' not found" at /var/www/html/drupal/web/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php line 367, referer: http://localhost:8000/admin/reports/media_formats
The best way to check whether a field exists is using code like:
The Islandora FITS module doesn't provide a schema, since the fields are dynamically generated. So, in the absense of the
fits_droid_puid
field, the current PUID data source won't work.