production-awid-db

Connects to the awid.ai production Postgres database for migrations, audits, and data operations.

82|9|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/awebai/aweb --skill production-awid-db-awebai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: production-awid-db
Source: https://github.com/awebai/aweb/tree/main/.claude/skills/production-awid-db
Command: npx skills add https://github.com/awebai/aweb --skill production-awid-db-awebai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Operating on the awid.ai production database requires locating credentials, using the correct Neon Postgres connection string and schema name, and following safe procedures for migrations, audits, and schema consolidation without corrupting production data. ## Core Features & Use Cases - Credential and Connection Guidance: Locates production credentials in .env.awid-production and connects via psql using the AWID_DATABASE_URL Neon Postgres string with the awid schema. - Audit and Integrity Queries: Provides ready-made SQL for table counts across did_aw_mappings, dns_namespaces, public_addresses, teams, and team_certificates, plus orphan address detection before adding FK constraints. - Migrations and Schema Consolidation: Runs migrations through the AwidDatabaseInfra Python module and documents the full dump-transform-drop-migrate-load-verify workflow used for the awid 0.3.1 consolidation. - Use Case: Before deploying a migration that adds a foreign key constraint, run the orphan address query to find public_addresses rows with no matching did_aw_mappings entry, then verify table counts after the migration completes. ## Quick Start Connect to the awid.ai production database and run the table count audit query to verify the current state of the registry.

Frequently Asked Questions about production-awid-db

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect to the awid.ai production database?

Read the AWID_DATABASE_URL from the .env.awid-production file at the repo root using grep, then pass it to psql. Strip the channel_binding parameter if psql complains, and use the awid schema name rather than aweb.

How do I run migrations on a Neon Postgres database?

Set AWID_DATABASE_URL and AWID_DB_SCHEMA=awid, then run the AwidDatabaseInfra Python module with run_migrations=True via uv. This initializes the database infrastructure and applies pending migrations to the awid schema.

How do I check for orphan records before adding a foreign key constraint?

Run a LEFT JOIN query from public_addresses to did_aw_mappings filtering where the mapping did_aw IS NULL. This lists addresses that would violate a new FK constraint, so you can resolve them before deploying the migration.

Why does sourcing .env.awid-production fail in the shell?

The connection URL contains an ampersand character that breaks shell parsing when sourced directly. Use grep to extract the value or inline the URL in the command instead of sourcing the file.

How do I consolidate Postgres migrations into a single schema file?

Dump current data with pg_dump using --column-inserts, transform the dump to match the new schema, drop the schema with CASCADE, run the new migration, load the transformed data, then verify counts and orphans.