Skip to content

Auto formats small default floats values into scientific notation breaking prisma syntax #646

@sitch

Description

@sitch

Description and expected behavior

Very small floats < 0.000001 and smaller translate into scientific notation in the @default field, reguardless of Decimal or Float

Zenstack

model Example {
  epsilon Decimal @default(0.00000001)
}

Becomes:

Prisma

model Example {
  epsilon Decimal @default(1e-8)
}

Which is invalid because prisma doesn't support scientific notation

Environment (please complete the following information):

  • ZenStack version: [latest beta 20]
  • Prisma version: [e.g., 4.8
  • Database type: [e.g. Postgresql]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions