Open samanshahroudi opened 4 months ago
err = conn.Exec("set allow_experimental_object_type = 1").AutoMigrate(objects...)
having the same question, anyone can help?
err = conn.Exec("set allow_experimental_object_type = 1").AutoMigrate(objects...)
it does not work.
Your Question
How can I set the
allow_experimental_object_type
value before creating a table in Clickhouse DB using go-gorm library?The document you expected this should be explained
I need to have a field of type Json in the Golang structure. According to this document https://clickhouse.com/docs/en/integrations/data-formats/json, I need to set the
allow_experimental_object_type
value to 1 before creating a table, but I couldn't find a way to set it using the go-gorm library.Expected answer
I need a code snippet or a small workaround to set
allow_experimental_object_type
to 1 using go-gorm library, so I can automatically migrate the Golang struct to the Clickhouse table with the JSON field.