Skip to content

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

1.8 KB
Raw Blame
# This migration intentionally fails but is set with `failOnError: false` to avoid stopping startup. However,
# this means it won't be logged in the `databasechangelog` table,  causing issues with the `MB_DB_AUTOMIGRATE`
# env variable as it will still consider this migration as pending. Migrations that have an expected chance of
# failure should generally use preConditions to detect these cases and mark the migration as ran.
databaseChangeLog:
  # The startup encryption check reads the encryption-check setting and treats an unreadable one as invalid, so give
  # it a setting table to read (no row: the database is simply not encrypted).
  - changeSet:
      id: '0'
      author: noahmoss
      changes:
        - createTable:
            tableName: setting
            columns:
              - column:
                  name: key
                  type: varchar(254)
                  constraints:
                    primaryKey: true
              - column:
                  name: value
                  type: text
              - column:
                  name: value_with_aad
                  type: text

  - changeSet:
      id: '1'
      author: noahmoss
      changes:
        - createTable:
            tableName: migration_error_test
            columns:
              - column:
                  name: id
                  type: int
                  autoIncrement: true
                  constraints:
                    primaryKey: true

  - changeSet:
      id: '2'
      author: noahmoss
      failOnError: false
      changes:
        - createTable:
            tableName: migration_error_test
            columns:
              - column:
                  name: id
                  type: int
                  autoIncrement: true
                  constraints:
                    primaryKey: true