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

Make `parameter_card.parameter_id` long enough for a uuid (#27770)

* Make `parameter_card.parameter_id` long enough for a uuid

was char(32). This is a common type for identifiers in our migrations
file, but unfortunately not great for ids.

```clojure
user=> (count (str (random-uuid)))
36
```

It seems like dashboards use shorter ids but cards use uuids.

* make it varying

from a test failure:

```
expected: [{:card_id 813,
            :parameter_id "_CATEGORY_NAME_",
            :parameterized_object_id 815,
            :parameterized_object_type :card}]
  actual: [#metabase.models.parameter_card.ParameterCardInstance
           {:card_id 813,
            :created_at #<java.time.OffsetDateTime@702e9037 2023-01-19T15:09:39.355894Z>,
            :id 36,
            :parameter_id "_CATEGORY_NAME_                     ",
            :parameterized_object_id 815,
            :parameterized_object_type :card,
            :updated_at #<java.time.OffsetDateTime@5db7ac60 2023-01-19T15:09:39.355894Z>}]
```

"_CATEGORY_NAME_" vs "_CATEGORY_NAME_                     "
parent e9a744b7
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