---
name: postgres-database-migration
slug: postgres-migrations
score: 55
rubric: 1.0
provenance: verified-org
publisher: TigerData (Timescale)
license: Apache-2.0
capability: read-only
canonical: https://top-agent-skills.com/skill/postgres-migrations
---

# postgres-database-migration

Zero-downtime Postgres migrations, with the locking behaviour spelled out — which ALTER TABLE takes an AccessExclusiveLock and what to do instead.

## Install

### Claude Code

```bash
npx skills add timescale/pg-aiguide --skill postgres-database-migration
```

## Best for

A schema change on a live table where the failure mode is a lock that takes production down, not a syntax error.

## Not ideal for

Greenfield schemas with no data and no traffic — the whole value here is in the constraints that only exist once a table is live.

## About

Use when testing a schema migration before applying it to production; adding, removing or renaming columns safely on a live table; changing a column's data type without downtime; understanding which ALTER TABLE operations lock the table; rolling back a failed migration; or planning a zero-downtime migration strategy. Covers AccessExclusiveLock behaviour, concurrent index creation, and backfill strategies.

## Compatibility

claude-code

## Metadata

- Categories: databases-schemas, devops-infra
- Surfaces: claude-code
- Tags: Migrations, PostgreSQL, Zero downtime
- Setup time: 1 min
- Complexity: Low
- Last update: 2026-06-26
- Verified: —
- Source: https://github.com/timescale/pg-aiguide/tree/main/skills/postgres-database-migration
- Docs: https://github.com/timescale/pg-aiguide/blob/main/skills/postgres-database-migration/SKILL.md

---

_Indexed by Top Agent Skills. Score breakdown: https://top-agent-skills.com/about/methodology_
