bkstorm
06/06/2019, 7:41 AMprisma deploy
, it works well.
But then, I run prisma deploy --no-migrate
, an error shows up, I can't figure out the problem, I hope you can. Here is the error and my schema.
What should I do with the language
column ? Its type is text in PostgreSQL.
CategoryContent
✖ The underlying column for the field `language` has an incompatible type. The field has type `Enum` and the column has type `String`.
type CategoryContent @db(name: "category_content") {
id: Int!
@id(strategy: SEQUENCE)
@sequence(
name: "category_content_id_seq"
initialValue: 1
allocationSize: 100
)
language: LanguageCode!
name: String!
}
enum LanguageCode {
VI
KO
EN
}
Vlad Faust
06/06/2019, 7:46 AMENUM
column type as wellbkstorm
06/06/2019, 8:01 AMTEXT
column in database if you define a ENUM
field in schema.bkstorm
06/06/2019, 8:07 AMprisma deploy
then run prisma deploy --no-migrate
, if I have to create a ENUM
column, prisma deploy
will do it for me.Andre Coetzee
06/06/2019, 9:07 AMbkstorm
06/06/2019, 9:15 AMprisma introspect
generates datamodel exactly like my datamodel.Davina Adisusila
05/12/2020, 11:37 AMbkstorm
06/05/2020, 7:49 AM