I have a MySql column with type `double(10,2)` . H...
# orm-help
a
I have a MySql column with type
double(10,2)
. How Prisma can handle it? if i run
prisma migrate
it will override my database to
DOUBLE
j
If you run
npx prisma db pull
to introspect your database, it should create a schema with a native type annotation for exactly the type you are using.
a
Cool thanks! So we should not use Prisma introspect anymore?
j
It's the same, just a different name 😄
db push
<=>
db pull
But it still runs "Introspection" under the hood 😄
a
My actual database has
productCost DOUBLE(10,2) NOT NULL
I just run
npx prisma db pull
the schema is now
Float
. if I run
prisma migrate
a new SQL file will be create with
productCost DOUBLE NOT NULL
=> I lose the information
DOUBLE(10,2)
j
Is that maybe the default?