This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Aug 01, 2024
-
-
Chris Truter authored
* Squash * Clean up query modifier for validating card references (#46283) * Fixup bad git merge on test expectation * Tweak docstrings and de-densify logic
-
- Jul 08, 2024
-
-
John Swanson authored
* Nicer error messages for linting migrations In general, just throw exceptions instead of using clojure spec here. You'll only get one error per run, but that seems fine. I did keep some specs around, but run them slightly differently. Rather than validating the whole collection of changeSets at once with `s/+`, just `doseq` through the changeSets and validate each one separately. That way, the value that's presented as erroneous is much smaller (a single changeSet) and it's easier to see what went wrong. * Update bin/lint-migrations-file/test/lint_migrations_file_test.clj Co-authored-by:
Noah Moss <32746338+noahmoss@users.noreply.github.com> * Update bin/lint-migrations-file/src/lint_migrations_file.clj Co-authored-by:
Noah Moss <32746338+noahmoss@users.noreply.github.com> * Require preConditions for certain liquibase change types to encourage idempotence (#44578) Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com> * remove `!`s from non-side-effecty fns * add preConditions to a few v51 migrations --------- Co-authored-by:
Noah Moss <32746338+noahmoss@users.noreply.github.com> Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com>
-
- Jan 09, 2024
-
-
Ngoc Khuat authored
-
- Jan 03, 2024
-
-
Ngoc Khuat authored
-
- Dec 20, 2023
-
-
Noah Moss authored
Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com>
-
- Nov 15, 2023
-
-
Ngoc Khuat authored
-
- Nov 08, 2023
-
-
Noah Moss authored
Co-authored-by:
Ryan Laurie <iethree@gmail.com> Co-authored-by:
Luiz Arakaki <luiz.arakaki@metabase.com> Co-authored-by:
bryan <bryan.maass@gmail.com> Co-authored-by:
Noah Moss <32746338+noahmoss@users.noreply.github.com> Co-authored-by:
Ryan Laurie <30528226+iethree@users.noreply.github.com> Co-authored-by:
Nick Fitzpatrick <nick@metabase.com> Co-authored-by:
Nick Fitzpatrick <nickfitz.582@gmail.com> Co-authored-by:
Noah Moss <noahbmoss@gmail.com> Co-authored-by:
Case Nelson <case@metabase.com> Co-authored-by:
Jerry Huang <jhuang37050@gmail.com> Co-authored-by:
Bryan Maass <bryan.maass@gmail.com> Co-authored-by:
Jerry Huang <34140255+qwef@users.noreply.github.com> Co-authored-by:
adam-james <21064735+adam-james-v@users.noreply.github.com> Co-authored-by:
Adam James <adam.vermeer2@gmail.com> Co-authored-by:
John Swanson <john.swanson@metabase.com>
-
- Nov 07, 2023
-
-
Ryan Kienstra authored
Co-authored-by:
Cam Saul <github@camsaul.com>
-
- Mar 13, 2023
-
-
john-metabase authored
* Moves to actively-maintained clj-yaml and removes obsolete pinned deps * Adds discouraged namespace rule for clj-yaml (use metabase.util.yaml) Co-authored-by:
Braden Shepherdson <braden@metabase.com>
-
- Feb 23, 2023
-
-
Noah Moss authored
* new clojure migration for v1->v2 permissions * updates * fix rebase issue * fix reflection warning * fix final test and address comment about macro name * fix indentation * revert changes to defmigration macro to try to fix final test
-
- Feb 21, 2023
-
-
dpsutton authored
* 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:
Noah Moss <noahbmoss@gmail.com> Co-authored-by:
Noah Moss <32746338+noahmoss@users.noreply.github.com>
-
- Dec 29, 2022
-
-
Noah Moss authored
* standardize ns formatting in all src/ namespaces * small fixes * test formatting * enterprise files * fix whitespace linter error * fix kondo error * bin files * reformat shared files * fix errors * fix another error * mostly fix import to use parenthesis and have it at a new line * fix wrong spacing Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com>
-
- Dec 15, 2022
-
-
john-metabase authored
-
- Dec 09, 2022
-
-
Cam Saul authored
* Make Dimension unique on `field_id` and deduplicate * Fix rollback for new migrations * Don't require migration comments to contain 'added' anymore since it's part of the version ID now * Don't require 'Added <version>' in migration comments anymore * Fix SerDes test that created duplicate dimensions for one Field * Silly fix to fix MySQL 5.7
-
- Nov 28, 2022
-
-
john-metabase authored
* Adds rollback where necessary to v45 migrations * Adds linter for migrations requiring rollback key * Removes unused writeback table migrations * Removes migrate down-one subcommand
-
- Mar 14, 2022
-
-
Cam Saul authored
Upgrade Liquibase to latest version; remove final Java source file and need for `clojure -X:deps prep` (#20611) * Upgrade Liquibase to latest version * Try adjusting log * Fix checksums for the TWO migrations with ID = 32 * FINALLY get Liquibase to use Log4j2 * Set Liquibase ConsoleUIService OutputStream to null OutputStream * Manually define a package for our H2 proxy class so Java 8 works * Fix package-name determination code * Update migrations file spec * `databasechangelog` shouldn't be upper-case * Lower-case quartz table names * More MySQL fixes
* Properties for all the Quartz tables * Formatting tweaks [ci skip] * Revert a few more busted changes * Fix more busted changes * Bump Liquibase version to 4.8.0 to fix MySQL defaultValueBoolean bug * OMG I think I finally fixed MySQL * Remove Java source file and prep-deps code * Remove two more references to bin/prep.sh * Minor cleanup * Revert unneeded changes * Fix busted indentation * Don't search inside java/ anymore since it's G-O-N-E * Appease the namespace linter * Update src/metabase/db/liquibase/h2.clj
-
- Nov 23, 2021
-
-
Cam Saul authored
* Add index on QueryExecution card_id + started_at * Migrations linter shouldn't disallow legacymigrations > 382 * Remove old test
-
- Nov 04, 2021
-
-
Jeff Evans authored
* Change all active TEXT columns in MySQL app DB to LONGTEXT Add new text.type Liquibase property to dynamically select the correct text type to use, per DB (which is LONGTEXT for MySQL), very similar to the existing blob.type one Adding new migrations that update all existing app DB TEXT columns to LONGTEXT columns, only for mariadb/mysql Update migrations linter to ensure no new text types get added, via a new predicate that searches for text types being added Do the same logic for "blob" now (should be "${blob.type}"), update rule and test Add test for migrations, that checks the new types, for all types in scope for this PR, to ensure that they have all been changed to their expected DB-specific type (either LONGTEXT for MySQL or TEXT/CLOB for others) Updating a couple migrations to remove special casing that was originally done only for MySQL to simply make them universally "${text.type}", in order to unify behavior and reduce surprises going forward Co-authored-by:
Cam Saul <github@camsaul.com>
-
- Nov 03, 2021
-
-
Cam Saul authored
* Revert changes from Jeff's PR * Add index to ModerationReview moderated_item_type + moderated_item_id * Add to 0.41.2 instead * Require explicit index name for createIndex * Move 41.2 migrations to after the 41.0 migrations * Adopt new migration numbering scheme * Fix comments * Fix MySQL + MariaDB insanity * Fix ID range validation * Actually 382 is the last legacy ID * Improved validation and tests * Adopt the new-new migration ID format. * Test fixes
-
Cam Saul authored
* Adopt new migration numbering scheme * Fix comments * Fix MySQL + MariaDB insanity * Fix ID range validation * Actually 382 is the last legacy ID * Improved validation and tests * Adopt the new-new migration ID format. * Test fixes
-
- Oct 19, 2021
-
-
Dennis Schridde authored
* Fix precondition of change set 97 Without the `type` and with the space Liquibase is unable to parse this precondition. During `lein test` it outputs: ``` [clojure-agent-send-off-pool-0] DEBUG liquibase.changelog - Running Changeset:migrations/000_migrations.yaml::97::senior [clojure-agent-send-off-pool-0] DEBUG liquibase.executor - Changeset migrations/000_migrations.yaml::97::senior [clojure-agent-send-off-pool-0] DEBUG liquibase.executor - Added 0.32.0 [clojure-agent-send-off-pool-0] INFO liquibase.changelog - Marking ChangeSet: migrations/000_migrations.yaml::97::senior ran despite precondition failure due to onFail='MARK_RAN': liquibase.yaml : DBMS Precondition failed: expected null, got h2 [clojure-agent-send-off-pool-0] DEBUG liquibase.changelog - Skipping ChangeSet: migrations/000_migrations.yaml::97::senior [clojure-agent-send-off-pool-0] DEBUG liquibase.executor - Executing with the 'jdbc' executor [clojure-agent-send-off-pool-0] DEBUG liquibase.executor - 1 row(s) affected ``` After this change the output changes to: ``` [clojure-agent-send-off-pool-0] DEBUG liquibase.changelog - Running Changeset:migrations/000_migrations.yaml::97::senior [clojure-agent-send-off-pool-0] DEBUG liquibase.executor - Changeset migrations/000_migrations.yaml::97::senior [clojure-agent-send-off-pool-0] DEBUG liquibase.executor - Added 0.32.0 [clojure-agent-send-off-pool-0] INFO liquibase.changelog - Marking ChangeSet: migrations/000_migrations.yaml::97::senior ran despite precondition failure due to onFail='MARK_RAN': liquibase.yaml : DBMS Precondition failed: expected mysql,mariadb, got h2 [clojure-agent-send-off-pool-0] DEBUG liquibase.changelog - Skipping ChangeSet: migrations/000_migrations.yaml::97::senior [clojure-agent-send-off-pool-0] DEBUG liquibase.executor - Executing with the 'jdbc' executor [clojure-agent-send-off-pool-0] DEBUG liquibase.executor - 1 row(s) affected ``` For documentation of the syntax cf. https://docs.liquibase.com/concepts/advanced/preconditions.html * Extend migration linter to check dbms preconditions * Also validate the `type` field of the `dbms` precondition Co-authored-by:
dpsutton <dan@dpsutton.com>
-
- Aug 05, 2021
-
-
Cam Saul authored
* Bump some more backend dependencies * Add license info for com.sun.activation/jakarta.activation * Fix reflection warnings * Revert bump of MariaDB for now
-
- Feb 25, 2021
-
-
Cam Saul authored
1. Rename optimize-datetime-filters middleware -> optimize-temporal-filters (it's more accurate, because this also optimizes date or time filter clauses) 2. optimize-temporal-filters middleware now optimizes relative-datetime clauses (which represent a moment in time relative to when the query is ran, e.g. "last month") in addition to absolute-datetime clauses (which represent an absolute moment in time, e.g. 2021-02-15T14:40:00-08:00) . This middleware rewrites queries so we filter against specific temporal ranges without casting the column itself, meaning we can leverage indexes on that column. See #11837 for more details 3. Added new validate-temporal-bucketing middleware that throws an Exception if you try to do something that makes no sense, e.g. bucket a DATE field by :time or a TIME field by :month. This is a better situation then running the query and waiting for the DB to complain. (In practice, I don't think the FE client would let you generate a query like this in the first place) 4. Fix random test failures for MySQL in task-history-cleanup-test
-
- Jan 08, 2021
-
-
Cam Saul authored
-
- Dec 16, 2020
-
-
Cam Saul authored
* add step to validate Liquibase migrations to CI * addColumn should only allow one column. * Only allow one column added per addColumn change * Add strict-mode for change sets * Check that migrations are in order/IDs are unique * Fix CI * Tests for the linter!! * Require remarks when adding new Tables * Fix CI
-