vercel / vercel/storage

Extend documentation on postgres sql with Kysely

Open
#690 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
595
Forks
101
Avg merge
2h 24m
Merged PRs (30d)
1

Description

Dear Vercel Team,

I would really appreciate better documentation on the Postgres library and its ORM vendors.

I am now using Kysely and it was nowhere described how the table is created inside the database. I was able to find it by looking at the Kysely demo. However, they used a method that is not a production-ready solution either. It just creates the table and populates it when the application starts.

I have now written a script that creates the table once and I can use it from my server actions.

This brings me to a second problem where I cannot find any documentation:

I need one database for different environments: dev, preview and prod.

I have now created a second database for prod only. But I still need to create the table on it. What's the recommended way to create the tables based on the environment? Also, I don't know how to tell my Kysely client to create the tables on the prod database locally. Or even how to connect to a different database at all.

Any suggestion would be highly appreciated :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Kysely demo and the server actions described in the issue, then compare them with the reporter’s table-creation script. Document the recommended table setup for dev, preview, and prod, including how a Kysely client connects to another database locally; the guidance is complete when each environment and connection question is answered.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres, typescript
Domain
databases, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.