Reset (doesnt work):
npx prisma migrate reset --skip-seed
Migrate:
npx prisma migrate dev --skip-seed
Seed:
npx prisma db seed
Dashboard:
npx prisma studio
import { User } from '@prisma/client';
import { User } from '.prisma/client';
- offset - for small number, must select previous, can jump to page, can sort on any field
- cursor - for infinite scroll facebook timeline, can handle large number, needs one sorted field, can't jump to page
- offset and cursor-based pagination prisma docs and tutorial
- Prisma code example
-
text search,
search
prop docs -
filtering
AND, OR, where, contains
docs -
problem: prisma
where
andorderBy
type errors, solution: cast object e.g{...} as Prisma.UserOrderByWithRelationAndSearchRelevanceInput,
-
Prisma generates client on yarn install automatically
- docs
- validate schema
npx prisma validate
- nothing changed, all works
_
matches space literally, I need that and not&
to match phrase with spacecat dog
cat & dog
matches those two words anywhere in same content, in any order,cat some text dog
- Github issue