diesel-guard 0.10.0

Linter for dangerous Postgres migration patterns in Diesel and SQLx. Prevents downtime caused by unsafe schema changes.
Documentation
# Create Table with SERIAL

**Check name:** `CreateTableSerialCheck`

**Lock type:** —

## Bad

`SERIAL` / `BIGSERIAL` / `SMALLSERIAL` are PostgreSQL pseudo-types (not standard SQL).
They create separately-owned sequence objects, which can complicate permissions,
dump/restore, and replication workflows.

```sql
CREATE TABLE events (id BIGSERIAL PRIMARY KEY);
CREATE TABLE users (id SERIAL PRIMARY KEY);
CREATE TABLE users (external_id SERIAL NOT NULL UNIQUE, id BIGINT PRIMARY KEY);
```

## Good

Prefer SQL-standard identity columns:

```sql
CREATE TABLE events (
  id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
);

CREATE TABLE users (
  id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
);
```

**Key insight:** For new schemas on PostgreSQL 10+, identity columns avoid
SERIAL pseudo-type drawbacks while keeping auto-increment semantics.