Semantic types pt 1 (special-type -> semantic-type rename) (#14780)
* Semantic types migration * Fixup for basic querying * Remove the relation type migration. it makes the diff far too hard at the moment. need to be able to just move everything from special_type -> semantic_type and then correct the few that look at it to care about the effective type. the PK/FK stuff gets really invasive and needs to be in its own much smaller changeset * Just rename special_type -> semantic_type for first change * Special type -> semantic type * special-type -> semantic-type * SpecialType -> SemanticType * special type -> semantic type mostly in documentation, docstrings, etc * Fix tests which relied on order of sets database position was annotated by map-index'ing over the set. changing `:special-type` to `:semantic-type` changed the order of the seq produced from it. * special -> semantic in schema_metadata * Tim is awesome: Undo overeager special->semantic in docstrings * Un-rename semantic_type in data_migrations These migrations are run unless a migrations table marks them as already having run. If they haven't run, then the db is older and the column is special_type most likely. So we let them run as `:special_type` and add some error handling to the migration runner that is _opt in_. ```clojure (defmigration ^{:author "camsaul", :added "0.20.0", :catch? true} migrate-field-types ... ) (try (@migration-var) (catch Exception e (if catch? ;; catch? from metadata (log/warn (format "Data migration %s failed: %s" migration-name (.getMessage e))) (throw e)))) ``` * Fix merged master changes just accepted their changes and fixed up rather than fix conflicts.
Showing
- backend/mbql/src/metabase/mbql/normalize.clj 1 addition, 1 deletionbackend/mbql/src/metabase/mbql/normalize.clj
- backend/mbql/src/metabase/mbql/schema.clj 7 additions, 7 deletionsbackend/mbql/src/metabase/mbql/schema.clj
- backend/mbql/src/metabase/mbql/util.clj 5 additions, 5 deletionsbackend/mbql/src/metabase/mbql/util.clj
- backend/mbql/test/metabase/mbql/normalize_test.clj 38 additions, 38 deletionsbackend/mbql/test/metabase/mbql/normalize_test.clj
- docs/administration-guide/03-metadata-editing.md 6 additions, 6 deletionsdocs/administration-guide/03-metadata-editing.md
- docs/api-documentation.md 260 additions, 260 deletionsdocs/api-documentation.md
- docs/users-guide/13-sql-parameters.md 1 addition, 1 deletiondocs/users-guide/13-sql-parameters.md
- enterprise/backend/test/metabase_enterprise/sandbox/query_processor/middleware/row_level_restrictions_test.clj 5 additions, 5 deletions...uery_processor/middleware/row_level_restrictions_test.clj
- frontend/src/metabase-lib/lib/Dimension.js 6 additions, 6 deletionsfrontend/src/metabase-lib/lib/Dimension.js
- frontend/src/metabase-lib/lib/queries/StructuredQuery.js 1 addition, 1 deletionfrontend/src/metabase-lib/lib/queries/StructuredQuery.js
- frontend/src/metabase-types/types/Dataset.js 1 addition, 1 deletionfrontend/src/metabase-types/types/Dataset.js
- frontend/src/metabase-types/types/Field.js 2 additions, 2 deletionsfrontend/src/metabase-types/types/Field.js
- frontend/src/metabase/admin/datamodel/components/FieldRemapping.jsx 2 additions, 2 deletions...rc/metabase/admin/datamodel/components/FieldRemapping.jsx
- frontend/src/metabase/admin/datamodel/components/database/ColumnItem.jsx 18 additions, 18 deletions...tabase/admin/datamodel/components/database/ColumnItem.jsx
- frontend/src/metabase/admin/datamodel/containers/FieldApp.jsx 2 additions, 2 deletions...tend/src/metabase/admin/datamodel/containers/FieldApp.jsx
- frontend/src/metabase/admin/settings/components/widgets/FormattingWidget.jsx 3 additions, 3 deletions...se/admin/settings/components/widgets/FormattingWidget.jsx
- frontend/src/metabase/components/Select.info.js 2 additions, 2 deletionsfrontend/src/metabase/components/Select.info.js
- frontend/src/metabase/css/admin.css 2 additions, 2 deletionsfrontend/src/metabase/css/admin.css
- frontend/src/metabase/entities/fields.js 5 additions, 5 deletionsfrontend/src/metabase/entities/fields.js
- frontend/src/metabase/lib/core.js 2 additions, 2 deletionsfrontend/src/metabase/lib/core.js
Loading
Please register or sign in to comment