> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# migration-volatile-default

> A column is added with a volatile default, which rewrites the table.

## What it flags

Adding a column to an existing PostgreSQL table as `SERIAL` (including `SMALLSERIAL` and `BIGSERIAL`), as an identity or stored generated column, or with a default expression containing a function the checker treats as volatile. These additions can rewrite the table under an exclusive lock. The rule skips tables created earlier in the same migration unit and tables truncated earlier under a transaction in that unit. For default expressions, it skips constants, calls to known non-volatile functions such as `now()` when no other call is considered volatile, and expressions with unresolved placeholders.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "migration-volatile-default": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.