You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Database of a SilverStripe Project that puts Fulle qualified Classnames in an enum.
First a changed pgsql-ddl.lisp and added in line 171: (setf default (cl-ppcre:regex-replace-all "\\" default "\\\\")).
The Result is that it can create the Table but I still got an Error with the Values.
Secound approach I put in transforms.lisp:
(defun fix-enum-backslashes (string)
"Transform \ to \"
(when string
(if (search "\\" string)
string
(setf string (cl-ppcre:regex-replace-all "\" string "\\\\"))))
string)
And then in my-cast-rules.lisp
(:source (:type "enum")
:target (:type ,#'enum-or-set-name)
:using pgloader.transforms::fix-enum-backslashes)
This was teoretically working. But all my tablenames and columnes are lowercase. So I have to use --with "quote identifiers". Now all my Enum Values have double backslashes like SilverStripe\ErrorPage\ErrorPage. So I redone all my changes because it seems with "quote identifiers" they are not neccesary anymore. Now I get the same Error form the biginning. Cant even create the Table.
ERROR Database error 22P02: invalid input value for enum "ChangeSet_ClassName": "SilverStripe\Versioned\ChangeSet"
Im not a lisp programmer. I have no idea what I'm doing.
PS: How the f*ck do I end that debuger? Only solution is kill -9 in another terminal.
The text was updated successfully, but these errors were encountered:
I have a Database of a SilverStripe Project that puts Fulle qualified Classnames in an enum.
First a changed pgsql-ddl.lisp and added in line 171: (setf default (cl-ppcre:regex-replace-all "\\" default "\\\\")).
The Result is that it can create the Table but I still got an Error with the Values.
Secound approach I put in transforms.lisp:
(defun fix-enum-backslashes (string)
"Transform \ to \"
(when string
(if (search "\\" string)
string
(setf string (cl-ppcre:regex-replace-all "\" string "\\\\"))))
string)
And then in my-cast-rules.lisp
(:source (:type "enum")
:target (:type ,#'enum-or-set-name)
:using pgloader.transforms::fix-enum-backslashes)
This was teoretically working. But all my tablenames and columnes are lowercase. So I have to use --with "quote identifiers". Now all my Enum Values have double backslashes like SilverStripe\ErrorPage\ErrorPage. So I redone all my changes because it seems with "quote identifiers" they are not neccesary anymore. Now I get the same Error form the biginning. Cant even create the Table.
ERROR Database error 22P02: invalid input value for enum "ChangeSet_ClassName": "SilverStripe\Versioned\ChangeSet"
Im not a lisp programmer. I have no idea what I'm doing.
PS: How the f*ck do I end that debuger? Only solution is kill -9 in another terminal.
The text was updated successfully, but these errors were encountered: