Selecting random records from table
Order by `rowid`?
rowid
?
I need to order by rowid
as my table has no other natural sorting column.
```...Drift detected but no changes in schema
Adding arguments to rawQueryTyped with MySql
SELECT id, name, age
FROM users
WHERE age > ? AND age < ?
SELECT id, name, age
FROM users
WHERE age > ? AND age < ?
Bad error messages with array of transactions
if (!isNil(changes.systems)) transactions = transactions.concat(this.handleSystemChanges(changes.systems, lastPulledAt));...
Search text with Prisma
search
prop or making it with contains
prop. Now I am using search and it looks like this
```js
function formatSearchQuery(query: string | null): string | undefined {...Migrating database from sqlserver to postgresql
Upgrade prisma 2 to 5 and got renamed index error
prisma migrate dev
and got this message.
Here is message and prisma shema.
- schema.prisma
`model Tag {...Row Level Security Example
const user = await prisma.$extends(bypassRLS()).user.findFirstOrThrow();
const user = await prisma.$extends(bypassRLS()).user.findFirstOrThrow();
Prisma Transactions stops working once you extend the client with Pulse, Optimize or Accelerate
TypeError: parentTracer.getSpanLimits is not a function
...Can't set api key/token when using Optimize
Optimize is not showing queries
Safe Rolling Deployments When Dropping Columns
Advisory lock errors in CI suddenly ocurring very frequently
Error: P1002
on about 75% of my builds, even when there are minutes between builds.
Context: Timed out trying to acquire a postgres advisory lock (SELECT pg_advisory_lock(72707369)). Elapsed: 10000ms. See https://pris.ly/d/migrate-advisory-locking for details.
Context: Timed out trying to acquire a postgres advisory lock (SELECT pg_advisory_lock(72707369)). Elapsed: 10000ms. See https://pris.ly/d/migrate-advisory-locking for details.
Drift detected after migration reset
migration reset --force
``` ...Supabase with Pulse and Accelerate
Whenever you extend your PrismaClient with Pulse, you don't have access to $on anymore. Why?
deep nested create takes so much time to complete
Return Type With Relations