Problem/Motivation

On installing the module for the first time (via drush) I get errors about missing revision keys, for example:
"The entity type bookable_calendar does not have an "revision_created" entity revision metadata key.
"The entity type bookable_calendar does not have an "revision_user" entity revision metadata key.

Also, similar errors for the bookable_calendar_opening entity.

Apparently it stops the module from creating all the tables it's meant to, but not from being installed. Which means that when you try to uninstall the module, you get these errors:

In Connection.php line 805:

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd9_bookable.book
  ing' doesn't exist: SELECT "base_table"."id" AS "id", "base_table"."id" AS
  "base_table_id"
  FROM
  {booking} "base_table"
  LIMIT 1 OFFSET 0; Array
  (
  )


In Statement.php line 59:

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd9_bookable.book
  ing' doesn't exist

Steps to reproduce

Install the module via composer on a fresh install of Drupal 9, and then enable it via drush.

Proposed resolution

Add the cited key to the annotation for the BookableCalendar entity class.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mandclu created an issue. See original summary.

mandclu’s picture

Update: adding the cited annotation key results in a second error:

The entity type bookable_calendar does not have an "revision_user" entity revision metadata key.

mandclu’s picture

Title: Error on install: "The entity type bookable_calendar does not have an "revision_created" entity revision metadata key. » Error on install
Issue summary: View changes
Status: Active » Needs review
FileSize
1008 bytes

Here's a patch that resolves the errors for me. Should have mentioned that I'm testing with Drupal 9.0.6.

josh.fabean’s picture

Thanks, got that patched. I'm on Drupal 8.9 and those were generated by a mix of Drush generate and Drupal Code Generator, so I wonder which one messed that up.

josh.fabean’s picture

Status: Needs review » Fixed
josh.fabean’s picture

Tested again on a fresh d9 site, seems fixed. Thanks!

josh.fabean’s picture

Status: Fixed » Closed (fixed)