unique constraint does not seem to be applying as intended.
``ts
export const PlayerDiscordCacheTable = pgTable(
tal_player_discord_cache_table`,
{
id: uuid().defaultRandom().primaryKey(),...Using magic SQL operator with 2 SQL dbs
ExpoSQLite migration immediately fails... How to solve (without deleting migration files)?
Is This SQL Query Efficient? Seeking Advice!

Pkey violates unique constraint after Seed
await db.execute(sql.raw(
`ALTER SEQUENCE users_id_seq RESTART WITH ${Math.max(...users.map(u => u.id)) + 1}`
));
await db.execute(sql.raw(
`ALTER SEQUENCE users_id_seq RESTART WITH ${Math.max(...users.map(u => u.id)) + 1}`
));
Error: There are multiple relations between "__public__.*" and "*". Please specify relation name
The equivalent of connectOrCreate from Prisma
Version required mkcert.

Checking whether devs forgot to generate migrations
drizzle-kit generate
from the CI, and see whether some files were generated in the migration folder. It works in most cases, but if the migration generation asks some questions (e.g column renamed), my CI job just skips generating migrations. As a result it considers that no migration was forgotten, which is wrong.
I'm wondering whether there are better approaches I can take? Maybe some Drizzle API allows checking for migrations, without requiring interaction?
Thanks for the great lib, and for any help you can provide!...Strategy to handle wrong migrations locally
drizzle-kit regenerate
-> Generates the last migration file again containing my fixed schema and then drizzle-kit push
but in a manner that it also correctly updates the migration table so I can proceed with additional migrations later on..
...Get all authors with latest book
book.releaseDate
column)
The goal is to not load all books from the DB and perform the "latest" filter in the Node.js backend code.
With regular SQL, one possible solution is a subquery.
I've searched for existing solutions that use Drizzle but couldn't find any, so i asked ChatGPT and it went straight to "you gotta use raw SQL for the subquery" π...Timestamp mode as date while drizzle-kit pull
Is there a way to get typed results from executing a function on Postgres?
get_widgets
that returns rows. The default signature for rows
returned is Record<string, unknown>[]
Is there a way to specify the row type without having to cast to unknown
first?
```
interface Widget {
id: number...Are there any array size limitations for "inArray" filter method?
Uuid always the same with Bun randomUUIDv7() (?)
{mode: "json"} sqlite/libs sql does nothing
COALESCE to json array not working in sql function
``typescript
const productItemsImagesSQLAgg = sql<ProductItemImages[]>
COALESCE(...migrate using Bun SQL api
[Solved] Drizzle Studio blocked by CORS, mkcert "no security databases found"
apt
Firefox (pre-installed on Mint).
# mkcert --install
The local CA is already installed in the system trust store! π
ERROR: no Firefox and/or Chrome/Chromium security databases found
# mkcert --install
The local CA is already installed in the system trust store! π
ERROR: no Firefox and/or Chrome/Chromium security databases found