Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
8efab7f6
Unverified
Commit
8efab7f6
authored
2 years ago
by
Noah Moss
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
change schema to allow empty strings as table descriptions (#26302)
parent
0c66a36b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/metabase/sync/interface.clj
+5
-5
5 additions, 5 deletions
src/metabase/sync/interface.clj
src/metabase/util/schema.clj
+1
-2
1 addition, 2 deletions
src/metabase/util/schema.clj
test/metabase/sync_test.clj
+4
-2
4 additions, 2 deletions
test/metabase/sync_test.clj
with
10 additions
and
9 deletions
src/metabase/sync/interface.clj
+
5
−
5
View file @
8efab7f6
...
...
@@ -14,7 +14,7 @@
{
:name
su/NonBlankString
:schema
(
s/maybe
su/NonBlankString
)
;; `:description` in this case should be a column/remark on the Table, if there is one.
(
s/optional-key
:description
)
(
s/maybe
s
u/NonBlankString
)})
(
s/optional-key
:description
)
(
s/maybe
s
/Str
)})
(
def
DatabaseMetadata
"Schema for the expected output of `describe-database`."
...
...
@@ -41,10 +41,10 @@
(
def
TableMetadata
"Schema for the expected output of `describe-table`."
{
:name
su/NonBlankString
:schema
(
s/maybe
su/NonBlankString
)
:fields
#
{
TableMetadataField
}
(
s/optional-key
:description
)
(
s/maybe
s
u/NonBlankString
)})
{
:name
su/NonBlankString
:schema
(
s/maybe
su/NonBlankString
)
:fields
#
{
TableMetadataField
}
(
s/optional-key
:description
)
(
s/maybe
s
/Str
)})
(
def
NestedFCMetadata
"Schema for the expected output of `describe-nested-field-columns`."
...
...
This diff is collapsed.
Click to expand it.
src/metabase/util/schema.clj
+
1
−
2
View file @
8efab7f6
...
...
@@ -144,8 +144,7 @@
(
str
(
api-error-message
k
(
inc
indent-depth
))
" : "
(
api-error-message
(
get
schema
k
)
(
inc
indent-depth
)))
))
(
api-error-message
(
get
schema
k
)
(
inc
indent-depth
)))))
"\n"
spaces
")"
)))))))
...
...
This diff is collapsed.
Click to expand it.
test/metabase/sync_test.clj
+
4
−
2
View file @
8efab7f6
...
...
@@ -39,7 +39,8 @@
{
:name
"studio"
:database-type
"VARCHAR"
:base-type
:type/Text
:database-position
2
}}}
:database-position
2
}}
:description
nil
}
"studio"
{
:name
"studio"
:schema
nil
:fields
#
{{
:name
"studio"
...
...
@@ -50,7 +51,8 @@
{
:name
"name"
:database-type
"VARCHAR"
:base-type
:type/Text
:database-position
1
}}}})
:database-position
1
}}
:description
""
}})
(
driver/register!
::sync-test,
:abstract?
true
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment