Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

1.9 KB
Raw Blame
## Serialization import used to insert custom visualization plugins with status "pending" and nothing ever
## resolved it, so every imported plugin was hidden from the visualization picker and its questions fell back
## to a default visualization. The import now validates the bundle and sets active/error itself. Rows left in
## "pending" by the old import carry the bundle, hash and manifest exported from an active plugin, so activate
## them; a bundle that turns out unusable fails at serve time and can be replaced by an admin.
##
## The exception is a row with no bundle at all: a dev-only plugin, served from a dev server URL that the export
## drops. There is nothing to serve, so mark it as an error the same way the import now does.

databaseChangeLog:
  - changeSet:
      id: v63.m2tnuz
      author: chodorowicz
      comment: Mark custom_viz_plugin rows left "pending" without a bundle by older serialization imports as errors
      changes:
        - update:
            tableName: custom_viz_plugin
            columns:
              - column:
                  name: status
                  value: error
              - column:
                  name: error_message
                  value: Bundle is empty
            where: status = 'pending' AND bundle IS NULL
      rollback: # nothing to restore; "pending" was never a valid status to go back to
        - empty: {}

  - changeSet:
      id: v63.18voz9
      author: chodorowicz
      comment: Activate custom_viz_plugin rows left "pending" by older serialization imports
      changes:
        - update:
            tableName: custom_viz_plugin
            columns:
              - column:
                  name: status
                  value: active
            where: status = 'pending' AND bundle IS NOT NULL
      rollback: # nothing to restore; "pending" was never a valid status to go back to
        - empty: {}