Skip to content

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

3.3 KB
Raw Blame
## Follow-on migrations for exploration Summary documents.

databaseChangeLog:
  - changeSet:
      id: v64.2026-08-04T10:00:00
      author: kevinkelleher12
      comment: Add stored_result_use.card_id for Card references to stored results
      changes:
        - addColumn:
            tableName: stored_result_use
            columns:
              - column:
                  name: card_id
                  type: int
                  remarks: The referencing Card
                  constraints:
                    nullable: true

  - changeSet:
      id: v64.2026-08-04T10:00:01
      author: kevinkelleher12
      comment: Index on stored_result_use.card_id
      changes:
        - createIndex:
            tableName: stored_result_use
            indexName: idx_stored_result_use_card_id
            columns:
              - column:
                  name: card_id

  - changeSet:
      id: v64.2026-08-04T10:00:02
      author: kevinkelleher12
      comment: FK stored_result_use.card_id -> report_card.id
      changes:
        - addForeignKeyConstraint:
            baseTableName: stored_result_use
            baseColumnNames: card_id
            referencedTableName: report_card
            referencedColumnNames: id
            constraintName: fk_stored_result_use_card_id
            onDelete: CASCADE

  - changeSet:
      id: v64.2026-08-04T10:00:03
      author: kevinkelleher12
      comment: Add document.exploration_id for the per-exploration Summary document
      changes:
        - addColumn:
            tableName: document
            columns:
              - column:
                  name: exploration_id
                  type: int
                  remarks: Optional owning exploration. When set, this document is the exploration's Summary and is not first-class content (hidden from search, collections, recents).
                  constraints:
                    nullable: true

  - changeSet:
      id: v64.2026-08-04T10:00:04
      author: kevinkelleher12
      comment: Index on document.exploration_id
      changes:
        - createIndex:
            tableName: document
            indexName: idx_document_exploration_id
            columns:
              - column:
                  name: exploration_id

  - changeSet:
      id: v64.2026-08-04T10:00:05
      author: kevinkelleher12
      comment: FK document.exploration_id -> exploration.id
      changes:
        - addForeignKeyConstraint:
            baseTableName: document
            baseColumnNames: exploration_id
            referencedTableName: exploration
            referencedColumnNames: id
            constraintName: fk_document_exploration_id
            onDelete: CASCADE

  - changeSet:
      id: v64.2026-08-04T10:00:06
      author: kevinkelleher12
      comment: Add document.is_placeholder — true until the first body save or chart append on an exploration Summary
      changes:
        - addColumn:
            tableName: document
            columns:
              - column:
                  name: is_placeholder
                  type: ${boolean.type}
                  defaultValueBoolean: false
                  remarks: True while the document is still an untouched auto-created placeholder (exploration Summary). Cleared on the first body save or chart append.
                  constraints:
                    nullable: false