Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom migrations #28175

Merged
merged 5 commits into from
Feb 21, 2023
Merged

Custom migrations #28175

merged 5 commits into from
Feb 21, 2023

Commits on Feb 20, 2023

  1. 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}}))
    ```
    dpsutton authored and noahmoss committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    f8c9c62 View commit details
    Browse the repository at this point in the history
  2. Use db provided by liquibase

    noahmoss committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    592191c View commit details
    Browse the repository at this point in the history
  3. edit docstring

    noahmoss committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    9d9ea6f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8f31756 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    233da22 View commit details
    Browse the repository at this point in the history