[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) › ValidateSchema

```ts
type ValidateSchema<S> =
  ValidateSchemaHasId<S> extends never
    ? ValidateIdColumnType<S> extends never
      ? ValidateNoSystemColumns<S> extends never
        ? ValidateColumnTypes<S> extends never
          ? S
          : ValidateColumnTypes<S>
        : ValidateNoSystemColumns<S>
      : ValidateIdColumnType<S>
    : ValidateSchemaHasId<S>;
```

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

Validates an [EvoluSchema](https://evolu.dev/docs/api-reference/common/local-first/Schema/type-aliases/EvoluSchema) at compile time, returning the first error
found as a readable string literal type. This approach provides much clearer
and more actionable TypeScript errors than the default, which are often hard
to read.

Validates the following schema requirements:

1. All tables must have an 'id' column
2. The 'id' column output type must extend [Id](https://evolu.dev/docs/api-reference/common/Type/variables/Id)
3. Tables cannot use system column names (createdAt, updatedAt, isDeleted)
4. All column output types must be compatible with SQLite (extend SqliteValue)