Problem
On the MySQL connector, Prisma's canonical native type for Boolean fields is @db.TinyInt(1) — and Prisma rejects @db.Boolean on MySQL (P1012: Native type Boolean is not supported for mysql connector, verified with Prisma 6.19).
ZModel has the restriction inverted: the stdlib declares @db.TinyInt with @@@targetField([IntField]), so it cannot be applied to Boolean fields, while @db.Boolean is accepted.
model M {
id Int @id
b Boolean @db.TinyInt(1) // ZModel error: attribute "@db.TinyInt" cannot be used on this type of field
b2 Boolean @db.Boolean // ZModel accepts — but Prisma rejects this on MySQL
}
As a result the MySQL Boolean native type is not expressible in the ZModel/Prisma common subset, which breaks porting Prisma schemas that use Boolean @db.TinyInt(1) (a common shape, since it's what prisma db pull emits).
Expected
@db.TinyInt should also target BooleanField (stdlib: add BooleanField to its @@@targetField list), matching Prisma's MySQL connector.
Context
Found while building the Prisma physical-schema parity test suite for the native migration engine — the exhaustive MySQL native-type case documents this gap in a comment. The default Boolean → tinyint(1) mapping (no native type attribute) is unaffected and already matches Prisma.
Problem
On the MySQL connector, Prisma's canonical native type for
Booleanfields is@db.TinyInt(1)— and Prisma rejects@db.Booleanon MySQL (P1012: Native type Boolean is not supported for mysql connector, verified with Prisma 6.19).ZModel has the restriction inverted: the stdlib declares
@db.TinyIntwith@@@targetField([IntField]), so it cannot be applied toBooleanfields, while@db.Booleanis accepted.As a result the MySQL Boolean native type is not expressible in the ZModel/Prisma common subset, which breaks porting Prisma schemas that use
Boolean @db.TinyInt(1)(a common shape, since it's whatprisma db pullemits).Expected
@db.TinyIntshould also targetBooleanField(stdlib: addBooleanFieldto its@@@targetFieldlist), matching Prisma's MySQL connector.Context
Found while building the Prisma physical-schema parity test suite for the native migration engine — the exhaustive MySQL native-type case documents this gap in a comment. The default
Boolean→tinyint(1)mapping (no native type attribute) is unaffected and already matches Prisma.