Skip to content
Snippets Groups Projects
Unverified Commit 30e731e3 authored by dpsutton's avatar dpsutton Committed by GitHub
Browse files

Custom migrations (#28175)


* Custom migrations

Current syntax:

specify the migration with
```
  - changeSet:
      id: v46.00-080
      author: dpsutton
      comment: Uppercases all Card names
      changes:
        - customChange:
            class: "metabase.db.custom_migrations.ReversibleUppercaseCards"
```

and in the new namespace metabase.db.custom-migrations:

```clojure
(defmigration UppercaseCards
  (db/execute! {:update :report_card
                :set    {:name :%upper.name}}))

(def-reversible-migration ReversibleUppercaseCards
  (db/execute! {:update :report_card
                :set    {:name :%upper.name}})
  (db/execute! {:update :report_card
                :set    {:name :%lower.name}}))
```

* Use db provided by liquibase

* edit docstring

* set *warn-on-reflection* to fix lint error & rebase

---------

Co-authored-by: default avatarNoah Moss <noahbmoss@gmail.com>
Co-authored-by: default avatarNoah Moss <32746338+noahmoss@users.noreply.github.com>
parent 5e18759f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment