prisma-migration
/prisma-migration
Bezpiecznie zmienia schemat bazy Order Hub w prisma/schema.prisma i tworzy migrację Prisma dla nowych modeli, pól, indeksów i relacji.
- Autor
- fsemilia ↗
- Repozytorium
- order-hub ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 12.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Bezpiecznie zmienia schemat bazy Order Hub w prisma/schema.prisma i tworzy migrację Prisma dla nowych modeli, pól, indeksów i relacji.
Oryginalny opis (EN)
Safely change the Order Hub database schema (prisma/schema.prisma) and create a Prisma migration. Use for any new model, field, index or relation, renames, and data backfills.
Jak działa
- Rules
- Steps
Podgląd SKILL.md
--- name: prisma-migration description: Safely change the Order Hub database schema (prisma/schema.prisma) and create a Prisma migration. Use for any new model, field, index or relation, renames, and data backfills. --- # Schema change workflow (Prisma 7) Prisma 7 specifics in this repo: generator `prisma-client` outputs to `generated/prisma` (import from `@/generated/prisma/client`), the datasource URL lives in `prisma.config.ts` (`DIRECT_URL` for migrations, falls back to `DATABASE_URL`), and the client uses the `@prisma/adapter-pg` driver adapter (`lib/db.ts`). For API details see the `prisma-client-api` and `prisma-cli` skills. ## Rules - **Money** is `Decimal @db.Decimal(12, 2)`. Never `Float`. - **Shopify IDs** are `String @unique`. - **Time-dependent values** (e.g. the customer segment) are derived at query time, not stored. - **Migrations are append-only**: never edit a migration that is already on `main`. - **Expand / contract** for anything destructive: add the new column → backfill → switch code → drop the old column in a *later* PR. A rename is never a single migration in production. - New `NOT NULL` columns on existing tables need a `@default` or a backfill step. - Add an `@@index` for every new filter/sort column used by `lib/crm/queries.ts`. ## Steps 1. Edit `prisma/schema.prisma` (keep the header conventions comment accurate). 2. `npm run db:migrate -- --name <snake_case_description>` (runs `migrate dev` + `generate`). 3. Read the generated SQL in `prisma/migrations/*/migration.sql`. Look for `DROP`, table rewrites, and missing defaults. If it is destructive, stop and split it (expand/contract). 4. Update `prisma/seed.ts` if the new data should appear in the demo. 5. `npm run typecheck && npm run test:integration` (the test DB is migrated by Vitest global setup). 6. Production: `vercel-build` runs `prisma migrate deploy` before `next build`.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · fsemilia/order-hub | 90 | MIT |
| nexadevapp/nexa-claude-skills-marketplace | 100 | Apache-2.0 |
Migawka bazy z 13.11.2026 · wersja paczki 3b83e800ac8d (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100prisma-expert
Dostarcza wzorce Prisma ORM dla projektu schematu, migracji, optymalizacji zapytań i modelowania relacji, przy pracy z plikami schema.prisma. - 100prisma-schema
Tworzy lub zmienia schemat Prisma dla nowych encji, domyślnie wieloschematowy: modele bazy, tabele, migracje, typy pól, relacje, indeksy i konwencje, w tym soft delete. - 100prisma-schema-helper
Prawdopodobnie pomaga przy pracy ze schematem Prisma w rozwoju backendu, na podstawie nazwy skilla. - 100prisma-postgres-upgrade
Przenosi aplikację PostgreSQL z Prisma ORM 6 lub 7 na Prisma 8 bez zmiany schematu, bazy i danych. - 100prisma
Pomaga w pracy z Prisma ORM: schemat Prisma, migracje, typowane zapytania, filtry relacji i Accelerate, przy modelowaniu baz i zapytaniach SQL w TypeScript i JavaScript. - 100prisma-client-api
Pomaga pisać i przeglądać zapytania Prisma Client, zapisy relacji, granice transakcji, filtry, paginację i surowy SQL.