[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [local‑first/Schema](https://evolu.dev/docs/api-reference/common/local-first/Schema) › QuarantineReason

```ts
type QuarantineReason =
  (typeof QuarantineReason)[keyof typeof QuarantineReason];
```

Defined in: [packages/common/src/local-first/Schema.ts:349](https://github.com/evoluhq/evolu/blob/ecbac001e0c18bbc45b44715f49ecc3a768c5ec9/packages/common/src/local-first/Schema.ts#L349)

Why a message is stored in `evolu_message_quarantine` instead of being
applied to its table. Persisted codes: names may change, but numbers must not
be reassigned.

Quarantine is queryable state, not an error. An application subscribes to a
query over `evolu_message_quarantine` to tell the user what is waiting. Each
row is one column of a message, so distinct `ownerId` and `timestamp` pairs
count messages. `origin` records whether this database stamped the message
for a local mutation or received it from sync, see [QuarantineOrigin](https://evolu.dev/docs/api-reference/common/local-first/Schema/variables/QuarantineOrigin).
`quarantinedAt` is the system time captured for the request that quarantined
the row, in milliseconds; it is null for rows written before Evolu recorded
it. The clock-drift rules are described in the Timestamp module.

### Example

```ts
import {
  assertType,
  createQueryBuilder,
  type Millis,
  type OwnerIdBytes,
  type QuarantineOrigin,
  QuarantineReason,
  testEvoluSchema,
  type TimestampBytes,
} from "@evolu/common";

const createQuery = createQueryBuilder(testEvoluSchema);

// Messages waiting in drift quarantine, one row per message.
const driftQuarantineQuery = createQuery((db) =>
  db
    .selectFrom("evolu_message_quarantine")
    .select(["ownerId", "timestamp", "origin", "quarantinedAt"])
    .where("reason", "=", QuarantineReason.TimestampDrift)
    .distinct(),
);

assertType<
  typeof driftQuarantineQuery.Row,
  {
    ownerId: OwnerIdBytes;
    timestamp: TimestampBytes;
    origin: QuarantineOrigin;
    quarantinedAt: Millis | null;
  }
>();
```