Connect to and operate Lakebase Postgres on Neon — setup, branching, autoscaling, pooling, and restore.
Data & analysis
Polsia Neon PostgreSQL
Try itUse Neon PostgreSQL conventions for Polsia apps, including migration patterns and DATABASE_URL usage.
What it does
Use Neon PostgreSQL conventions for Polsia apps, including migration patterns and DATABASE_URL usage.
The skill document
Neon PostgreSQL
Polsia apps use Neon PostgreSQL. DATABASE_URL is automatically provided.
Connection
const { Pool } = require('pg');
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
Migrations
Create files in migrations/ with timestamp prefix: 1704067200000_add_products_table.js
Migration Format
module.exports = {
up: async (pool) => {
await pool.query(`CREATE TABLE products (...)`);
},
down: async (pool) => {
await pool.query(`DROP TABLE products`);
}
};
Key Rules
- DATABASE_URL is NOT available at build time on Render
- Run migrations in startCommand, not buildCommand
- Always use parameterized queries ($1, $2) for user input
Related skills
Get a Postgres connection string in seconds, no signup required.
Choose and create the right Neon branch type for testing and development. Use when users ask about Neon branching, migration testing with real data, isolated test environments, schema-only branch workflows for sensitive data, resetting a branch from its parent, branch expiration and CI/CD branch lifecycles, or branch creation via Neon CLI or Neon MCP. Triggers include "Neon branch", "test migrations safely", "branch production data", "schema-only branch", "reset branch", "branch per PR" and "sensitive data testing".
Reduce Postgres data-transfer costs by fixing query patterns that send too much data to your application.
Apply Render-specific deployment requirements for Polsia apps, including /health checks and migration strategy.
Overview of Neon, a complete set of cloud backend primitives for apps and agents, spanning Lakebase Postgres, Auth, the Data API, Object Storage, Compute Functions, and the AI Gateway. Start here to route to the right Neon skill, set up the CLI or MCP server, and follow the branch-first workflow. Use when "Neon" or "Lakebase Postgres" is mentioned, or when any of its individual capabilities are the trigger: "object storage" or "S3", "buckets", "serverless functions", "AI gateway", "call an LLM", "postgres", "database", or "backend".