Create citext type column
enrique-fernandez-polo opened this issue · comments
Enrique Fernández-Polo Puertas commented
Hello there!
I am trying to create a table with a citext
column
schema "public" {}
extension "citext" {
schema = schema.public
}
table "accounts" {
schema = schema.public
column "email" {
type = citext
}
}
I am getting the following error
Unknown column.type; There is no type named "citext". Did you mean "text"?
I've tried this without success
table "accounts" {
schema = schema.public
column "email" {
type = extension.citext
}
}
Any advice? Thanks in advance!
Ariel Mashraki commented
Hey! Non-standard and user-defined types can be defined using the sql
expression as follows: sql("citext")
.
Enrique Fernández-Polo Puertas commented
Cool!! I had to update the CLI too. I guess this is one of the latest features.
Thanks!