fix(panettone): Fix export of issue status to SQL
Postmodern changed[0] how users customize the way lisp values get exported to SQL - now, in addition to defining methods of `cl-postgres:to-sql-string`, we have to pass `:col-export` and `:col-import` args to the field itself in the dao class. I'm not *entirely* sure why both are necessary, but without both this doesn't work. [0]: https://github.com/marijnh/Postmodern/blob/v1.33.1/CHANGELOG.md#changelog-v-1331 Change-Id: Iae8fb63c34fb6c79b9dfa350129032aab5cd2233 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4383 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: grfn <grfn@gws.fyi>
This commit is contained in:
parent
faca687dda
commit
a8ec166c72
1 changed files with 6 additions and 1 deletions
|
@ -109,6 +109,9 @@ database connection."
|
|||
(declare (ignore initargs))
|
||||
(created-at->timestamp obj))
|
||||
|
||||
(defun keyword->str (kw) (string-downcase (symbol-name kw)))
|
||||
(defun str->keyword (st) (alexandria:make-keyword (string-upcase st)))
|
||||
|
||||
(defclass issue (has-created-at)
|
||||
((id :col-type serial :initarg :id :accessor id)
|
||||
(subject :col-type string :initarg :subject :accessor subject)
|
||||
|
@ -121,7 +124,9 @@ database connection."
|
|||
:initarg :status
|
||||
:accessor status
|
||||
:initform :open
|
||||
:col-default "open"))
|
||||
:col-default "open"
|
||||
:col-export keyword->str
|
||||
:col-import str->keyword))
|
||||
(:metaclass dao-class)
|
||||
(:keys id)
|
||||
(:table-name issues)
|
||||
|
|
Loading…
Reference in a new issue