Skip to content

Commit

Permalink
Make column specs nilable
Browse files Browse the repository at this point in the history
  • Loading branch information
r0man committed Dec 5, 2017
1 parent ad5216f commit 983dc1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/datumbazo/table.clj
Expand Up @@ -80,7 +80,9 @@
"Define a function that truncates `table`."
[table column]
`(s/def ~(column-spec-name table column)
~(column-spec-gen table column)))
~(if (or (:not-null? column) (:primary-key? column))
(column-spec-gen table column)
(s/nilable (column-spec-gen table column)))))

(defn- define-column-specs
"Define a function that truncates `table`."
Expand Down

0 comments on commit 983dc1c

Please sign in to comment.