Skip to content

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

1.5 KB
Raw Blame
# Test changelog for metabase.app-db.liquibase.rollback-test/rollback-reverses-reran-changesets-newer-than-the-target-test.
# Simulates 65.0: a table, a column and a runOnChange view over that column, all with v65 ids. `versioned-roc-run2.yaml`
# is 65.1's changelog, where only the view's SQL was edited in place (same changeset identity, changed checksum).
databaseChangeLog:
  - logicalFilePath: migrations/065/versioned_roc.yaml
  - changeSet:
      id: v65.roc-table
      author: test
      comment: table of 65.0 (scenario test)
      changes:
        - createTable:
            tableName: vroc_table
            columns:
              - column:
                  name: id
                  type: int
      rollback:
        - dropTable:
            tableName: vroc_table
  - changeSet:
      id: v65.roc-column
      author: test
      comment: column of 65.0 that the view reads (scenario test)
      changes:
        - addColumn:
            tableName: vroc_table
            columns:
              - column:
                  name: extra
                  type: int
      rollback:
        - dropColumn:
            tableName: vroc_table
            columnName: extra
  - changeSet:
      id: v65.roc-view
      author: test
      runOnChange: true
      comment: runOnChange view over the 65.0 column (scenario test)
      changes:
        - sql:
            sql: CREATE OR REPLACE VIEW v_vroc AS SELECT extra, 1 AS x FROM vroc_table
      rollback:
        - sql:
            sql: DROP VIEW IF EXISTS v_vroc