Database v1.0.0

neon-postgres-agentlevier

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

agentlevier 更新于 2026-06-16 1 浏览
下载 SKILL

技能说明

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

使用场景

Polsia apps use Neon PostgreSQL. DATABASEURL is automatically provided.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/neon-postgres-agentlevier
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 14 kB
SKILL.md text/markdown
---
name: neon-postgres
description: '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
```javascript
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
```javascript
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

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。