# AZ602: A key of another type

Keys are `bigint` unless written: `type doc = app.docs (id uuid)`. The table's column has another type, which the message names with what to write: `(id integer)` for a key Prisma made an `Int`.

Reported when the policy is applied (`rowstile push`, `apply`, a migration), against the database.

## The mistake

```authz
app role app_user
type user = app.users
type doc = app.docs
  owner : user = owner_id
  can view = owner
```

## Fixed

```authz
app role app_user
type user = app.users
type doc = app.docs (id uuid)
  owner : user = owner_id
  can view = owner
```
