Migrate Postgres Tables To Hypertables

🌐Community
by timescale · vlatest · Repository

Helps with migration, PostgreSQL as part of working with databases and data persistence workflows.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add migrate-postgres-tables-to-hypertables npx -- -y @trustedskills/migrate-postgres-tables-to-hypertables
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "migrate-postgres-tables-to-hypertables": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/migrate-postgres-tables-to-hypertables"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill automates the conversion of standard PostgreSQL tables into TimescaleDB hypertables. It handles the necessary schema modifications to enable time-series optimizations without requiring manual SQL execution or downtime.

When to use it

  • You have existing PostgreSQL tables storing time-series data that are becoming slow as they grow.
  • Your application needs efficient range queries based on timestamps and automatic data retention policies.
  • You want to upgrade your database performance with minimal operational overhead and zero code changes to your application logic.
  • You need to leverage TimescaleDB's compression features to reduce storage costs for historical data.

Key capabilities

  • Automatically detects time columns in existing PostgreSQL tables.
  • Applies hypertable partitioning based on the specified time column.
  • Preserves all existing data and indexes during migration.
  • Enables native support for continuous aggregates and chunk management.

Example prompts

  • "Migrate my sensor_readings table to a hypertable using the created_at timestamp."
  • "Convert all tables in the iot_data schema to hypertables optimized for daily time ranges."
  • "Upgrade my legacy PostgreSQL database to TimescaleDB by converting the main event log table."

Tips & gotchas

  • Ensure your target column is of a compatible data type (e.g., timestamp, date, or integer representing time) before running the migration.
  • While the process is automated, verify that the resulting hypertable behaves as expected in your specific query workload after conversion.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
timescale
Installs
31

🌐 Community

Passed automated security scans.