Skip to content

Add associatedTemplates column to Book model

paulwababu requested to merge feature/add-new-column-to-book into dev

What this MR does:

This Merge Request introduces a new field associatedTemplates to the Book model. The associatedTemplates field is a JSONB data type, and by default, contains an object with keys pagedjs, epub, and icml, all set to null.

Why this MR is needed:

The addition of the associatedTemplates field allows us to link different templates to a book, which is important as books may have different associated templates for different formats. This change will provide us with the ability to store these associations directly within the Book model.

What has changed:

  • Created a new migration file to add the associatedTemplates field to the Book model
  • Updated down migration file to remove the associatedTemplates field when rolled back

Potential impacts:

This change is backward compatible. The new field will be added to the Book model and will not impact any existing features. However, it's necessary to run the migration to update the schema in all environments.

Please review and let me know if there are any concerns.

Merge request reports