Dan
Explore posts from serversCDCloudflare Developers
•Created by Dan on 12/12/2023 in #workers-help
Global vars
Hello, I'm trying to find the most convenient approach to pass keys into internal clients and other env values previously provided via
process.env.NAME
. I stumbled across this mention in docs: https://developers.cloudflare.com/workers/wrangler/environments/#:~:text=Any%20defined%20environment%20variables%20(the%20vars%20key)%20are%20exposed%20as%20global%20variables%20to%20your%20Worker.
Does it work? Variables specified in wrangler.toml are accessible via env.NAME param but they don't seem globally accessible as the snippet in the docs.6 replies
DTDrizzle Team
•Created by Dan on 7/26/2023 in #help
Postgres + WITH sql
I'm trying to do the following sql:
It returns a list of missing ids in the database. I have it done like this:
Is there a way to do it more object friendly by using
db.$with
and db.with(name)....
? The presence of VALUES seems there might not be any helpers for this.1 replies
DTDrizzle Team
•Created by Dan on 6/17/2023 in #help
How to do migrations that require data changes?
Hi, how can I migrate a live database that requires to do a more complicated data shuffling, e.g. I have this schema:
If I do this change:
It will need more than drizzle-kit is providing, e.g. update query to map existing data to new data. Is drizzle-kit able to handle this case by providing additional code/sql and if not does it mean that I need to do it manually and then reset drizzle snapshots to be able to continue with drizzle-kit from there?
5 replies