Dropping tables using Drizzle studio extension on planet scale
How to use findMany() with distinct column values?
findMany() query in my project to retrieve the latest records from an SQLite (libsql) database:
```ts
export const getLatestRecords = db.query.Record.findMany({...Drizzle Studio "unknown is not defined"
Parsing Postgres array
{ditchrider,ditchrider,ditchrider}. This is my query:
```ts
db
.select({
userRole: user.role,...How to convert filters (e.g. eq(), ne(), lte(), like()) into SQL string, for use in sql.raw()
LEFT JOIN LATERAL, but I have a lot of filters already created with drizzle. I would like to use them in my SQL:
``typescript
const query = sql.raw(SELECT user.id, message.received_at FROM user LEFT JOIN LATERAL (SELECT message.user_id, message.received_at FROM message WHERE message.user_id = user.id ORDER BY message.received_at LIMIT 1) message on user.id=message.user_id);
// TODO use other filters too: AND ${filtersExceptTime?.getSQL()}` doesn't work
...How to test the connection & cleanup on shutdown
SIGTERM and SIGINT that will close the server, how can I tell drizzle to close all the connections to the database? And while I'm at it I would like to test the connection as soon as the server starts, because we are using AWS managed database. I would like to know if I can connect from this server to the database, if not then there is no point in running the server.allow passing undefined to limit
.limit(limitNum) where limit is only applied if limit is defined?...Drizzle Query Returns Different Result Than Select
How can we get all tables names
Is it possible to create table during runtime?
filter basesd query not working

Database won't update
error: relation "session" does not exist

Getting 'error: write CONNECTION_CLOSED' when trying to seed with stream-json from a 100MB file
Getting SQLITE Constraint error with `foreign_keys off`
Confused about onConflictDoUpdate when having a constraint
drizzle-kit should use `peerDependencies` instead of bundling dependencies
.env loading issue for local development, I see that drizzle-kit has bundled a bunch of drivers into its own executable instead of using peerDependencies. This makes it impossible to override neonConfig settings so I can use a local wsproxy for local development since drizzle-kit is using an entirely separate and unexported copy of @vercel/postgres and @neondatabase/serverless.
There should either be a way to configure settings on the bundled copy @neondatabase/serverless or a way to use peerDependencies to dedupe drivers so that we can override settings on the same instance that drizzle-kit uses....drizzle-kit overriding `process.env` before `@next/env` can load values
drizzle-kit push using the setup recommended by the Drizzle and Vercel docs, but I am finding that the drizzle-kit command is performing its own dotenv loading before my config file can import and use loadEnvConfig from @next/env. This is causing issues if I have an empty value for POSTGRES_URL in .env (for documentation purposes) and the actual value in .env.local (for local development) because drizzle-kit is unaware of how @next/env loads environment variables.
I've worked around this issue by setting by setting DOTENV_CONFIG_PATH=/dev/null, but there should a way to turn this automatic behavior off (or more ideally, make it opt-in instead of opt-out) so it is easier to load environment variables correctly using @next/env or another .env loader of choice....sqlite create new db file push programatically
better-sqlite3 with drizzle in my electron project and for my use case, I have some binary format data that my app can read, and I'd like to make an export to a new sqlite .db file. I have the schemas and everything set up but I want to take the db file path from user input and just create new one on the spot and fill it with data. Is there a way to push my schema to this db file programatically just like drizzle-kit push does normally?withPagination type inference
PaginatedResult does not get full inferred at the top level.
pagination.ts
```typescript
import type { PgSelect } from 'drizzle-orm/pg-core'...