Skip to content

Prisma Studio: Unsupported "@default()" declaration #1498

@BluSimmon

Description

@BluSimmon

Background

@default() values are placing as default values when inserting rows in old version of studio.
However, @default() values are no longer being managed by Prisma Schema API on Prisma Studio when inserting rows.

Reproduction

Simply clicking on Add Record / Insert Row within selected table viewer on Prisma Studio.

Actual Behaviour

Default values are no longer exist.
It is now showing (empty string) instead of (default value).
Example image below, captured from the latest version of Prisma Studio.
Image

Expected Behaviour

The specified cell with @default() declaration should be managed by Prisma Schema API when no manual inputs.
Example Image below is captured from the older version of Prisma Studio.
Image

Environment

Browser: Microsoft Edge 134.0.3124.66 (Official) (64-bit)
Database: MySQL 8

Schema (same for both version)

model UserRole {
  id             String                 @id @default(ulid())
  weight         Int                    @default(0)
  name           User_Role              @unique
  displayName    String
  ...
}

enum User_Role {
  User
  Admin
}

Older version:

"@prisma/client": "^6.16.2",
"prisma": "^6.16.2",

Newer version:

"@prisma/adapter-mariadb": "^7.7.0",
"@prisma/client": "^7.7.0",
"prisma": "^7.7.0",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions