Skip to content
Snippets Groups Projects
Unverified Commit 8efab7f6 authored by Noah Moss's avatar Noah Moss Committed by GitHub
Browse files

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
......@@ -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 su/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 su/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`."
......
......@@ -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
")")))))))
......
......@@ -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)
......
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