model B {
id String @id @default(cuid())
float Float @db.Real
dFloat Float @db.DoublePrecision
decFloat Decimal @db.Decimal(20, 10)
numFloat Decimal @db.Numeric(10, 6)
}
and I want to change it to this:
model B {
id String @id @default(cuid())
float Float @db.Real
dFloat Float @db.DoublePrecision
decFloat Decimal[] @db.Decimal(20, 10)
numFloat Decimal[] @db.Numeric(10, 6)
}
It errors like so:
Error: Error querying the database: Null constraint failed: (float)
0: sql_migration_connector::sql_database_step_applier::apply_step
with index=0
at migration-engine/connectors/sql-migration-connector/src/sql_database_step_applier.rs:15
1: migration_core::api::SchemaPush
at migration-engine/core/src/api.rs:188
I have this schema in Postgres:
and I want to change it to this:
It errors like so: