数据分析

Polsia Neon PostgreSQL

试用

Use Neon PostgreSQL conventions for Polsia apps, including migration patterns and DATABASE_URL usage.

它能做什么

Use Neon PostgreSQL conventions for Polsia apps, including migration patterns and DATABASE_URL usage.

技能文档

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

相关技能

接入并运维 Neon 上的 Lakebase Postgres —— 涵盖连接配置、分支、自动伸缩、连接池与恢复。

44 次安装

无需注册,几秒钟即可拿到一个临时 Postgres 数据库连接串。

33 次安装

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".

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".

2 次安装