create-huenei-template 0.2.13 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/templates.js +7 -0
- package/dist/templates/cursor/.cursor/agents/config-drift-analyzer.md +152 -0
- package/dist/templates/cursor/.cursor/commands/actualizar-reglas.md +580 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +22 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +24 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +32 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +25 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-component.md +97 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-page.md +95 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +66 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +89 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +94 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +120 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +209 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +101 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +10 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks.json +41 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/auth-patterns.mdc +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/code-quality.mdc +39 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/naming-conventions.mdc +32 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/nextjs-architecture.mdc +51 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/prisma-standards.mdc +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/react-conventions.mdc +52 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/testing-conventions.mdc +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/ui-stack.mdc +47 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/authjs-skills/SKILL.md +1149 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/SKILL.md +189 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/daisyUI5.skill +0 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/creating-components.md +412 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/data-display.md +341 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/feedback.md +240 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/input.md +283 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/layout.md +275 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/navigation.md +338 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/daisy-meta.ts +220 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts +152 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/docker-expert/SKILL.md +413 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/nextjs-app-router-patterns/SKILL.md +537 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/SKILL.md +243 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-execute.md +75 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-pull.md +185 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-push.md +148 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-seed.md +191 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/debug.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/dev.md +157 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/format.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/generate.md +147 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/init.md +118 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-deploy.md +127 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-dev.md +143 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-diff.md +89 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-reset.md +72 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-resolve.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-status.md +65 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/studio.md +122 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/validate.md +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/SKILL.md +216 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/client-methods.md +221 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/constructor.md +185 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/filters.md +256 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/model-queries.md +281 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/query-options.md +276 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/raw-queries.md +194 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/relations.md +308 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/transactions.md +184 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/AGENTS.md +97 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/README.md +138 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/SKILL.md +116 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/assets/templates/_template.md +26 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/_sections.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/SKILL.md +713 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/api_reference.md +1121 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/best_practices.md +782 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/examples.md +940 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/SKILL.md +114 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-gc-time.md +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-invalidation.md +116 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-placeholder-vs-initial.md +156 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-stale-time.md +80 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/err-error-boundaries.md +150 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/inf-page-params.md +132 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-invalidate-queries.md +118 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-mutation-state.md +169 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-optimistic-updates.md +137 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/network-mode.md +179 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/parallel-use-queries.md +152 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/perf-select-transform.md +144 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/persist-queries.md +194 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/pf-intent-prefetch.md +143 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-array-structure.md +50 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-factory-pattern.md +102 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-hierarchical-organization.md +76 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-include-dependencies.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-serializable.md +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/query-cancellation.md +171 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/ssr-dehydration.md +158 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-table/SKILL.md +582 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/zod-4/SKILL.md +216 -0
- package/dist/templates/frontend/react-ssr/.dockerignore +14 -0
- package/dist/templates/frontend/react-ssr/.env.example +9 -0
- package/dist/templates/frontend/react-ssr/.husky/pre-commit +1 -0
- package/dist/templates/frontend/react-ssr/Dockerfile +41 -0
- package/dist/templates/frontend/react-ssr/README.md +121 -0
- package/dist/templates/frontend/react-ssr/components.json +22 -0
- package/dist/templates/frontend/react-ssr/docker-compose.yml +21 -0
- package/dist/templates/frontend/react-ssr/eslint.config.mjs +26 -0
- package/dist/templates/frontend/react-ssr/next.config.ts +7 -0
- package/dist/templates/frontend/react-ssr/package.json +86 -0
- package/dist/templates/frontend/react-ssr/postcss.config.mjs +5 -0
- package/dist/templates/frontend/react-ssr/prisma/schema.prisma +75 -0
- package/dist/templates/frontend/react-ssr/prisma/seed.ts +109 -0
- package/dist/templates/frontend/react-ssr/prisma.config.ts +17 -0
- package/dist/templates/frontend/react-ssr/skills-lock.json +65 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/badge.test.tsx +26 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/button.test.tsx +38 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/card.test.tsx +39 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/input.test.tsx +32 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/hooks/useLocalStorage.test.ts +53 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/lib/queryClient.test.ts +19 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/lib/utils.test.ts +24 -0
- package/dist/templates/frontend/react-ssr/src/actions/auth.ts +91 -0
- package/dist/templates/frontend/react-ssr/src/actions/contacto.ts +46 -0
- package/dist/templates/frontend/react-ssr/src/actions/proyectos.ts +159 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/dashboard-client.tsx +321 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/page.tsx +48 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/layout.tsx +34 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/perfil/page.tsx +85 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/page.tsx +23 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/proyectos-crud-client.tsx +472 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/ui-components/page.tsx +358 -0
- package/dist/templates/frontend/react-ssr/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/iniciar-sesion/page.tsx +148 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/recuperar-password/page.tsx +100 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/registro/page.tsx +154 -0
- package/dist/templates/frontend/react-ssr/src/app/contacto/contacto-form.tsx +189 -0
- package/dist/templates/frontend/react-ssr/src/app/contacto/page.tsx +11 -0
- package/dist/templates/frontend/react-ssr/src/app/globals.css +99 -0
- package/dist/templates/frontend/react-ssr/src/app/layout.tsx +22 -0
- package/dist/templates/frontend/react-ssr/src/app/loading.tsx +7 -0
- package/dist/templates/frontend/react-ssr/src/app/not-found.tsx +14 -0
- package/dist/templates/frontend/react-ssr/src/app/page.tsx +331 -0
- package/dist/templates/frontend/react-ssr/src/app/proyectos/page.tsx +178 -0
- package/dist/templates/frontend/react-ssr/src/auth.ts +64 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/navbar.tsx +68 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/sidebar.tsx +109 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/sign-out-button.tsx +16 -0
- package/dist/templates/frontend/react-ssr/src/components/providers.tsx +33 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/avatar.tsx +53 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/badge.tsx +42 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/breadcrumb.tsx +114 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/button.tsx +58 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/card.tsx +95 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/dialog.tsx +136 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/form.tsx +168 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/input.tsx +22 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/label.tsx +26 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/password-input.tsx +43 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/separator.tsx +30 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/table.tsx +240 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/tabs.tsx +76 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/textarea.tsx +21 -0
- package/dist/templates/frontend/react-ssr/src/data/dashboard.ts +179 -0
- package/dist/templates/frontend/react-ssr/src/hooks/useLocalStorage.ts +38 -0
- package/dist/templates/frontend/react-ssr/src/lib/prisma.ts +24 -0
- package/dist/templates/frontend/react-ssr/src/lib/queryClient.ts +25 -0
- package/dist/templates/frontend/react-ssr/src/lib/utils.ts +6 -0
- package/dist/templates/frontend/react-ssr/src/proxy.ts +31 -0
- package/dist/templates/frontend/react-ssr/src/test/mocks/next-navigation.ts +16 -0
- package/dist/templates/frontend/react-ssr/src/test/setup.ts +1 -0
- package/dist/templates/frontend/react-ssr/src/test/utils.tsx +30 -0
- package/dist/templates/frontend/react-ssr/src/types/index.ts +36 -0
- package/dist/templates/frontend/react-ssr/tsconfig.json +41 -0
- package/dist/templates/frontend/react-ssr/vitest.config.ts +41 -0
- package/package.json +1 -1
- package/templates/cursor/.cursor/agents/config-drift-analyzer.md +152 -0
- package/templates/cursor/.cursor/commands/actualizar-reglas.md +580 -0
- package/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +22 -0
- package/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +24 -0
- package/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +32 -0
- package/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +25 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-component.md +97 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-page.md +95 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +66 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +89 -0
- package/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +64 -0
- package/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +94 -0
- package/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +120 -0
- package/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +209 -0
- package/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +101 -0
- package/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +93 -0
- package/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +10 -0
- package/templates/frontend/react-ssr/.cursor/hooks.json +41 -0
- package/templates/frontend/react-ssr/.cursor/rules/auth-patterns.mdc +48 -0
- package/templates/frontend/react-ssr/.cursor/rules/code-quality.mdc +39 -0
- package/templates/frontend/react-ssr/.cursor/rules/naming-conventions.mdc +32 -0
- package/templates/frontend/react-ssr/.cursor/rules/nextjs-architecture.mdc +51 -0
- package/templates/frontend/react-ssr/.cursor/rules/prisma-standards.mdc +53 -0
- package/templates/frontend/react-ssr/.cursor/rules/react-conventions.mdc +52 -0
- package/templates/frontend/react-ssr/.cursor/rules/testing-conventions.mdc +53 -0
- package/templates/frontend/react-ssr/.cursor/rules/ui-stack.mdc +47 -0
- package/templates/frontend/react-ssr/.cursor/skills/authjs-skills/SKILL.md +1149 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/SKILL.md +189 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/daisyUI5.skill +0 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/creating-components.md +412 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/data-display.md +341 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/feedback.md +240 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/input.md +283 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/layout.md +275 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/navigation.md +338 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/daisy-meta.ts +220 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts +152 -0
- package/templates/frontend/react-ssr/.cursor/skills/docker-expert/SKILL.md +413 -0
- package/templates/frontend/react-ssr/.cursor/skills/nextjs-app-router-patterns/SKILL.md +537 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/SKILL.md +243 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-execute.md +75 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-pull.md +185 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-push.md +148 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-seed.md +191 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/debug.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/dev.md +157 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/format.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/generate.md +147 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/init.md +118 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-deploy.md +127 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-dev.md +143 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-diff.md +89 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-reset.md +72 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-resolve.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-status.md +65 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/studio.md +122 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/validate.md +53 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/SKILL.md +216 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/client-methods.md +221 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/constructor.md +185 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/filters.md +256 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/model-queries.md +281 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/query-options.md +276 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/raw-queries.md +194 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/relations.md +308 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/transactions.md +184 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/AGENTS.md +97 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/README.md +138 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/SKILL.md +116 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/assets/templates/_template.md +26 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/_sections.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/SKILL.md +713 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/api_reference.md +1121 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/best_practices.md +782 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/examples.md +940 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/SKILL.md +114 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-gc-time.md +93 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-invalidation.md +116 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-placeholder-vs-initial.md +156 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-stale-time.md +80 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/err-error-boundaries.md +150 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/inf-page-params.md +132 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-invalidate-queries.md +118 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-mutation-state.md +169 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-optimistic-updates.md +137 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/network-mode.md +179 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/parallel-use-queries.md +152 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/perf-select-transform.md +144 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/persist-queries.md +194 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/pf-intent-prefetch.md +143 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-array-structure.md +50 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-factory-pattern.md +102 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-hierarchical-organization.md +76 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-include-dependencies.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-serializable.md +93 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/query-cancellation.md +171 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/ssr-dehydration.md +158 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-table/SKILL.md +582 -0
- package/templates/frontend/react-ssr/.cursor/skills/zod-4/SKILL.md +216 -0
- package/templates/frontend/react-ssr/.dockerignore +14 -0
- package/templates/frontend/react-ssr/.env.example +9 -0
- package/templates/frontend/react-ssr/.husky/pre-commit +1 -0
- package/templates/frontend/react-ssr/Dockerfile +41 -0
- package/templates/frontend/react-ssr/README.md +121 -0
- package/templates/frontend/react-ssr/components.json +22 -0
- package/templates/frontend/react-ssr/docker-compose.yml +21 -0
- package/templates/frontend/react-ssr/eslint.config.mjs +26 -0
- package/templates/frontend/react-ssr/next.config.ts +7 -0
- package/templates/frontend/react-ssr/package.json +86 -0
- package/templates/frontend/react-ssr/postcss.config.mjs +5 -0
- package/templates/frontend/react-ssr/prisma/schema.prisma +75 -0
- package/templates/frontend/react-ssr/prisma/seed.ts +109 -0
- package/templates/frontend/react-ssr/prisma.config.ts +17 -0
- package/templates/frontend/react-ssr/skills-lock.json +65 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/badge.test.tsx +26 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/button.test.tsx +38 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/card.test.tsx +39 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/input.test.tsx +32 -0
- package/templates/frontend/react-ssr/src/__tests__/hooks/useLocalStorage.test.ts +53 -0
- package/templates/frontend/react-ssr/src/__tests__/lib/queryClient.test.ts +19 -0
- package/templates/frontend/react-ssr/src/__tests__/lib/utils.test.ts +24 -0
- package/templates/frontend/react-ssr/src/actions/auth.ts +91 -0
- package/templates/frontend/react-ssr/src/actions/contacto.ts +46 -0
- package/templates/frontend/react-ssr/src/actions/proyectos.ts +159 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/dashboard-client.tsx +321 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/page.tsx +48 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/layout.tsx +34 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/perfil/page.tsx +85 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/page.tsx +23 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/proyectos-crud-client.tsx +472 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/ui-components/page.tsx +358 -0
- package/templates/frontend/react-ssr/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/templates/frontend/react-ssr/src/app/auth/iniciar-sesion/page.tsx +148 -0
- package/templates/frontend/react-ssr/src/app/auth/recuperar-password/page.tsx +100 -0
- package/templates/frontend/react-ssr/src/app/auth/registro/page.tsx +154 -0
- package/templates/frontend/react-ssr/src/app/contacto/contacto-form.tsx +189 -0
- package/templates/frontend/react-ssr/src/app/contacto/page.tsx +11 -0
- package/templates/frontend/react-ssr/src/app/globals.css +99 -0
- package/templates/frontend/react-ssr/src/app/layout.tsx +22 -0
- package/templates/frontend/react-ssr/src/app/loading.tsx +7 -0
- package/templates/frontend/react-ssr/src/app/not-found.tsx +14 -0
- package/templates/frontend/react-ssr/src/app/page.tsx +331 -0
- package/templates/frontend/react-ssr/src/app/proyectos/page.tsx +178 -0
- package/templates/frontend/react-ssr/src/auth.ts +64 -0
- package/templates/frontend/react-ssr/src/components/layout/navbar.tsx +68 -0
- package/templates/frontend/react-ssr/src/components/layout/sidebar.tsx +109 -0
- package/templates/frontend/react-ssr/src/components/layout/sign-out-button.tsx +16 -0
- package/templates/frontend/react-ssr/src/components/providers.tsx +33 -0
- package/templates/frontend/react-ssr/src/components/ui/avatar.tsx +53 -0
- package/templates/frontend/react-ssr/src/components/ui/badge.tsx +42 -0
- package/templates/frontend/react-ssr/src/components/ui/breadcrumb.tsx +114 -0
- package/templates/frontend/react-ssr/src/components/ui/button.tsx +58 -0
- package/templates/frontend/react-ssr/src/components/ui/card.tsx +95 -0
- package/templates/frontend/react-ssr/src/components/ui/dialog.tsx +136 -0
- package/templates/frontend/react-ssr/src/components/ui/form.tsx +168 -0
- package/templates/frontend/react-ssr/src/components/ui/input.tsx +22 -0
- package/templates/frontend/react-ssr/src/components/ui/label.tsx +26 -0
- package/templates/frontend/react-ssr/src/components/ui/password-input.tsx +43 -0
- package/templates/frontend/react-ssr/src/components/ui/separator.tsx +30 -0
- package/templates/frontend/react-ssr/src/components/ui/table.tsx +240 -0
- package/templates/frontend/react-ssr/src/components/ui/tabs.tsx +76 -0
- package/templates/frontend/react-ssr/src/components/ui/textarea.tsx +21 -0
- package/templates/frontend/react-ssr/src/data/dashboard.ts +179 -0
- package/templates/frontend/react-ssr/src/hooks/useLocalStorage.ts +38 -0
- package/templates/frontend/react-ssr/src/lib/prisma.ts +24 -0
- package/templates/frontend/react-ssr/src/lib/queryClient.ts +25 -0
- package/templates/frontend/react-ssr/src/lib/utils.ts +6 -0
- package/templates/frontend/react-ssr/src/proxy.ts +31 -0
- package/templates/frontend/react-ssr/src/test/mocks/next-navigation.ts +16 -0
- package/templates/frontend/react-ssr/src/test/setup.ts +1 -0
- package/templates/frontend/react-ssr/src/test/utils.tsx +30 -0
- package/templates/frontend/react-ssr/src/types/index.ts +36 -0
- package/templates/frontend/react-ssr/tsconfig.json +41 -0
- package/templates/frontend/react-ssr/vitest.config.ts +41 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prisma-cli
|
|
3
|
+
description: Prisma CLI commands reference covering all available commands, options, and usage patterns. Use when running Prisma CLI commands, setting up projects, generating client, running migrations, or managing databases. Triggers on "prisma init", "prisma generate", "prisma migrate", "prisma db", "prisma studio".
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: prisma
|
|
7
|
+
version: "7.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Prisma CLI Reference
|
|
11
|
+
|
|
12
|
+
Complete reference for all Prisma CLI commands. This skill provides guidance on command usage, options, and best practices for Prisma ORM 7.x.
|
|
13
|
+
|
|
14
|
+
## When to Apply
|
|
15
|
+
|
|
16
|
+
Reference this skill when:
|
|
17
|
+
- Setting up a new Prisma project (`prisma init`)
|
|
18
|
+
- Generating Prisma Client (`prisma generate`)
|
|
19
|
+
- Running database migrations (`prisma migrate`)
|
|
20
|
+
- Managing database state (`prisma db push/pull`)
|
|
21
|
+
- Using local development database (`prisma dev`)
|
|
22
|
+
- Debugging Prisma issues (`prisma debug`)
|
|
23
|
+
|
|
24
|
+
## Rule Categories by Priority
|
|
25
|
+
|
|
26
|
+
| Priority | Category | Impact | Prefix |
|
|
27
|
+
|----------|----------|--------|--------|
|
|
28
|
+
| 1 | Setup | HIGH | `init` |
|
|
29
|
+
| 2 | Generation | HIGH | `generate` |
|
|
30
|
+
| 3 | Development | HIGH | `dev` |
|
|
31
|
+
| 4 | Database | HIGH | `db-` |
|
|
32
|
+
| 5 | Migrations | CRITICAL | `migrate-` |
|
|
33
|
+
| 6 | Utility | MEDIUM | `studio`, `validate`, `format`, `debug` |
|
|
34
|
+
|
|
35
|
+
## Command Categories
|
|
36
|
+
|
|
37
|
+
| Category | Commands | Purpose |
|
|
38
|
+
|----------|----------|---------|
|
|
39
|
+
| Setup | `init` | Bootstrap new Prisma project |
|
|
40
|
+
| Generation | `generate` | Generate Prisma Client |
|
|
41
|
+
| Validation | `validate`, `format` | Schema validation and formatting |
|
|
42
|
+
| Development | `dev` | Local Prisma Postgres for development |
|
|
43
|
+
| Database | `db pull`, `db push`, `db seed`, `db execute` | Direct database operations |
|
|
44
|
+
| Migrations | `migrate dev`, `migrate deploy`, `migrate reset`, `migrate status`, `migrate diff`, `migrate resolve` | Schema migrations |
|
|
45
|
+
| Utility | `studio`, `version`, `debug` | Development tools |
|
|
46
|
+
|
|
47
|
+
## Quick Reference
|
|
48
|
+
|
|
49
|
+
### Project Setup
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Initialize new project (creates prisma/ folder and prisma.config.ts)
|
|
53
|
+
prisma init
|
|
54
|
+
|
|
55
|
+
# Initialize with specific database
|
|
56
|
+
prisma init --datasource-provider postgresql
|
|
57
|
+
prisma init --datasource-provider mysql
|
|
58
|
+
prisma init --datasource-provider sqlite
|
|
59
|
+
|
|
60
|
+
# Initialize with Prisma Postgres (cloud)
|
|
61
|
+
prisma init --db
|
|
62
|
+
|
|
63
|
+
# Initialize with AI-generated schema
|
|
64
|
+
prisma init --prompt "E-commerce app with users, products, orders"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Client Generation
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Generate Prisma Client
|
|
71
|
+
prisma generate
|
|
72
|
+
|
|
73
|
+
# Watch mode for development
|
|
74
|
+
prisma generate --watch
|
|
75
|
+
|
|
76
|
+
# Generate without engine (for Accelerate/edge)
|
|
77
|
+
prisma generate --no-engine
|
|
78
|
+
|
|
79
|
+
# Generate specific generator only
|
|
80
|
+
prisma generate --generator client
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Bun Runtime
|
|
84
|
+
|
|
85
|
+
When using Bun, always add the `--bun` flag so Prisma runs with the Bun runtime (otherwise it falls back to Node.js because of the CLI shebang):
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
bunx --bun prisma init
|
|
89
|
+
bunx --bun prisma generate
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Local Development Database
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Start local Prisma Postgres
|
|
96
|
+
prisma dev
|
|
97
|
+
|
|
98
|
+
# Start with specific name
|
|
99
|
+
prisma dev --name myproject
|
|
100
|
+
|
|
101
|
+
# Start in background (detached)
|
|
102
|
+
prisma dev --detach
|
|
103
|
+
|
|
104
|
+
# List all local instances
|
|
105
|
+
prisma dev ls
|
|
106
|
+
|
|
107
|
+
# Stop instance
|
|
108
|
+
prisma dev stop myproject
|
|
109
|
+
|
|
110
|
+
# Remove instance data
|
|
111
|
+
prisma dev rm myproject
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Database Operations
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Pull schema from existing database
|
|
118
|
+
prisma db pull
|
|
119
|
+
|
|
120
|
+
# Push schema to database (no migrations)
|
|
121
|
+
prisma db push
|
|
122
|
+
|
|
123
|
+
# Seed database
|
|
124
|
+
prisma db seed
|
|
125
|
+
|
|
126
|
+
# Execute raw SQL
|
|
127
|
+
prisma db execute --file ./script.sql
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Migrations (Development)
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Create and apply migration
|
|
134
|
+
prisma migrate dev
|
|
135
|
+
|
|
136
|
+
# Create migration with name
|
|
137
|
+
prisma migrate dev --name add_users_table
|
|
138
|
+
|
|
139
|
+
# Create migration without applying
|
|
140
|
+
prisma migrate dev --create-only
|
|
141
|
+
|
|
142
|
+
# Reset database and apply all migrations
|
|
143
|
+
prisma migrate reset
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Migrations (Production)
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Apply pending migrations (CI/CD)
|
|
150
|
+
prisma migrate deploy
|
|
151
|
+
|
|
152
|
+
# Check migration status
|
|
153
|
+
prisma migrate status
|
|
154
|
+
|
|
155
|
+
# Compare schemas and generate diff
|
|
156
|
+
prisma migrate diff --from-config-datasource --to-schema schema.prisma --script
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Utility Commands
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Open Prisma Studio (database GUI)
|
|
163
|
+
prisma studio
|
|
164
|
+
|
|
165
|
+
# Show version info
|
|
166
|
+
prisma version
|
|
167
|
+
prisma -v
|
|
168
|
+
|
|
169
|
+
# Debug information
|
|
170
|
+
prisma debug
|
|
171
|
+
|
|
172
|
+
# Validate schema
|
|
173
|
+
prisma validate
|
|
174
|
+
|
|
175
|
+
# Format schema
|
|
176
|
+
prisma format
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Prisma 7 Changes
|
|
180
|
+
|
|
181
|
+
### New Configuration File
|
|
182
|
+
|
|
183
|
+
Prisma 7 uses `prisma.config.ts` for CLI configuration:
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
import 'dotenv/config'
|
|
187
|
+
import { defineConfig, env } from 'prisma/config'
|
|
188
|
+
|
|
189
|
+
export default defineConfig({
|
|
190
|
+
schema: 'prisma/schema.prisma',
|
|
191
|
+
migrations: {
|
|
192
|
+
path: 'prisma/migrations',
|
|
193
|
+
seed: 'tsx prisma/seed.ts',
|
|
194
|
+
},
|
|
195
|
+
datasource: {
|
|
196
|
+
url: env('DATABASE_URL'),
|
|
197
|
+
},
|
|
198
|
+
})
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Removed Flags
|
|
202
|
+
|
|
203
|
+
- `--skip-generate` removed from `migrate dev` and `db push`
|
|
204
|
+
- `--skip-seed` removed from `migrate dev`
|
|
205
|
+
- `--schema` and `--url` removed from `db execute`
|
|
206
|
+
- Run `prisma generate` explicitly after migrations
|
|
207
|
+
|
|
208
|
+
### Environment Variables
|
|
209
|
+
|
|
210
|
+
Environment variables are no longer auto-loaded. Use `dotenv`:
|
|
211
|
+
|
|
212
|
+
```typescript
|
|
213
|
+
// prisma.config.ts
|
|
214
|
+
import 'dotenv/config'
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Rule Files
|
|
218
|
+
|
|
219
|
+
See individual rule files for detailed command documentation:
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
references/init.md - Project initialization
|
|
223
|
+
references/generate.md - Client generation
|
|
224
|
+
references/dev.md - Local development database
|
|
225
|
+
references/db-pull.md - Database introspection
|
|
226
|
+
references/db-push.md - Schema push
|
|
227
|
+
references/db-seed.md - Database seeding
|
|
228
|
+
references/db-execute.md - Raw SQL execution
|
|
229
|
+
references/migrate-dev.md - Development migrations
|
|
230
|
+
references/migrate-deploy.md - Production migrations
|
|
231
|
+
references/migrate-reset.md - Database reset
|
|
232
|
+
references/migrate-status.md - Migration status
|
|
233
|
+
references/migrate-resolve.md - Migration resolution
|
|
234
|
+
references/migrate-diff.md - Schema diffing
|
|
235
|
+
references/studio.md - Database GUI
|
|
236
|
+
references/validate.md - Schema validation
|
|
237
|
+
references/format.md - Schema formatting
|
|
238
|
+
references/debug.md - Debug info
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## How to Use
|
|
242
|
+
|
|
243
|
+
Use the command categories above for navigation, then open the specific command reference file you need.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# prisma db execute
|
|
2
|
+
|
|
3
|
+
Execute native commands (SQL) to your database.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
prisma db execute [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What It Does
|
|
12
|
+
|
|
13
|
+
- Connects to your database using the configured datasource
|
|
14
|
+
- Executes a script provided via file (`--file`) or stdin (`--stdin`)
|
|
15
|
+
- Useful for running raw SQL, maintenance tasks, or applying diffs from `migrate diff`
|
|
16
|
+
- Not supported on MongoDB
|
|
17
|
+
|
|
18
|
+
## Options
|
|
19
|
+
|
|
20
|
+
| Option | Description |
|
|
21
|
+
|--------|-------------|
|
|
22
|
+
| `--file` | Path to a file containing the script to execute |
|
|
23
|
+
| `--stdin` | Use terminal standard input as the script |
|
|
24
|
+
| `--url` | Override the datasource URL from the Prisma config file |
|
|
25
|
+
| `--config` | Custom path to your Prisma config file |
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
### Execute from file
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
prisma db execute --file ./script.sql
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Execute from stdin
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
echo "TRUNCATE TABLE User;" | prisma db execute --stdin
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Execute `migrate diff` output
|
|
42
|
+
|
|
43
|
+
Pipe the output of `migrate diff` directly to the database:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
prisma migrate diff \
|
|
47
|
+
--from-empty \
|
|
48
|
+
--to-schema-datamodel prisma/schema.prisma \
|
|
49
|
+
--script \
|
|
50
|
+
| prisma db execute --stdin
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Configuration
|
|
54
|
+
|
|
55
|
+
Uses `datasource` from `prisma.config.ts`:
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
export default defineConfig({
|
|
59
|
+
datasource: {
|
|
60
|
+
url: env('DATABASE_URL'),
|
|
61
|
+
},
|
|
62
|
+
})
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Use Cases
|
|
66
|
+
|
|
67
|
+
- **Manual Migrations**: Applying raw SQL changes
|
|
68
|
+
- **Data Maintenance**: Truncating tables, cleaning up data
|
|
69
|
+
- **Schema Synchronization**: Applying `migrate diff` scripts
|
|
70
|
+
- **Debugging**: Running test queries (though typically not for fetching data)
|
|
71
|
+
|
|
72
|
+
## Limitations
|
|
73
|
+
|
|
74
|
+
- **No Data Return**: The command reports success/failure, not query results (rows). Use Prisma Client or `prisma studio` to view data.
|
|
75
|
+
- **SQL Only**: Primarily for SQL databases.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# prisma db pull
|
|
2
|
+
|
|
3
|
+
Introspects an existing database and updates your Prisma schema to reflect its structure.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
prisma db pull [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What It Does
|
|
12
|
+
|
|
13
|
+
- Connects to your database
|
|
14
|
+
- Reads the database schema (tables, columns, relations, indexes)
|
|
15
|
+
- Updates `schema.prisma` with corresponding Prisma models
|
|
16
|
+
- For MongoDB, samples data to infer schema
|
|
17
|
+
|
|
18
|
+
## Options
|
|
19
|
+
|
|
20
|
+
| Option | Description |
|
|
21
|
+
|--------|-------------|
|
|
22
|
+
| `--force` | Ignore current Prisma schema file |
|
|
23
|
+
| `--print` | Print the introspected Prisma schema to stdout |
|
|
24
|
+
| `--schema` | Custom path to your Prisma schema |
|
|
25
|
+
| `--config` | Custom path to your Prisma config file |
|
|
26
|
+
| `--url` | Override the datasource URL from the Prisma config file |
|
|
27
|
+
| `--composite-type-depth` | Specify the depth for introspecting composite types (default: -1 for infinite, 0 = off) |
|
|
28
|
+
| `--schemas` | Specify the database schemas to introspect |
|
|
29
|
+
| `--local-d1` | Generate a Prisma schema from a local Cloudflare D1 database |
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
### Basic introspection
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
prisma db pull
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Preview without writing
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
prisma db pull --print
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Outputs schema to terminal for review.
|
|
46
|
+
|
|
47
|
+
### Force overwrite
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
prisma db pull --force
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Replaces schema file, losing any manual customizations.
|
|
54
|
+
|
|
55
|
+
## Prerequisites
|
|
56
|
+
|
|
57
|
+
Configure database connection in `prisma.config.ts`:
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import 'dotenv/config'
|
|
61
|
+
import { defineConfig, env } from 'prisma/config'
|
|
62
|
+
|
|
63
|
+
export default defineConfig({
|
|
64
|
+
schema: 'prisma/schema.prisma',
|
|
65
|
+
datasource: {
|
|
66
|
+
url: env('DATABASE_URL'),
|
|
67
|
+
},
|
|
68
|
+
})
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Workflow
|
|
72
|
+
|
|
73
|
+
### Starting from existing database
|
|
74
|
+
|
|
75
|
+
1. Initialize Prisma:
|
|
76
|
+
```bash
|
|
77
|
+
prisma init
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
2. Configure database URL
|
|
81
|
+
|
|
82
|
+
3. Pull schema:
|
|
83
|
+
```bash
|
|
84
|
+
prisma db pull
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
4. Review and customize generated schema
|
|
88
|
+
|
|
89
|
+
5. Generate client:
|
|
90
|
+
```bash
|
|
91
|
+
prisma generate
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Syncing changes from database
|
|
95
|
+
|
|
96
|
+
When database changes are made outside Prisma:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
prisma db pull
|
|
100
|
+
prisma generate
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Generated Schema Example
|
|
104
|
+
|
|
105
|
+
Database tables become Prisma models:
|
|
106
|
+
|
|
107
|
+
```sql
|
|
108
|
+
-- Database tables
|
|
109
|
+
CREATE TABLE users (
|
|
110
|
+
id SERIAL PRIMARY KEY,
|
|
111
|
+
email VARCHAR(255) UNIQUE NOT NULL,
|
|
112
|
+
name VARCHAR(100)
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
CREATE TABLE posts (
|
|
116
|
+
id SERIAL PRIMARY KEY,
|
|
117
|
+
title VARCHAR(255) NOT NULL,
|
|
118
|
+
author_id INTEGER REFERENCES users(id)
|
|
119
|
+
);
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Becomes:
|
|
123
|
+
|
|
124
|
+
```prisma
|
|
125
|
+
model users {
|
|
126
|
+
id Int @id @default(autoincrement())
|
|
127
|
+
email String @unique @db.VarChar(255)
|
|
128
|
+
name String? @db.VarChar(100)
|
|
129
|
+
posts posts[]
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
model posts {
|
|
133
|
+
id Int @id @default(autoincrement())
|
|
134
|
+
title String @db.VarChar(255)
|
|
135
|
+
author_id Int?
|
|
136
|
+
users users? @relation(fields: [author_id], references: [id])
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Post-Introspection Cleanup
|
|
141
|
+
|
|
142
|
+
After `db pull`, consider:
|
|
143
|
+
|
|
144
|
+
1. **Rename models** to PascalCase:
|
|
145
|
+
```prisma
|
|
146
|
+
model User { // Was: users
|
|
147
|
+
@@map("users")
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
2. **Rename fields** to camelCase:
|
|
152
|
+
```prisma
|
|
153
|
+
authorId Int? @map("author_id")
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
3. **Add relation names** for clarity:
|
|
157
|
+
```prisma
|
|
158
|
+
author User? @relation("PostAuthor", fields: [authorId], references: [id])
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
4. **Add documentation**:
|
|
162
|
+
```prisma
|
|
163
|
+
/// User account information
|
|
164
|
+
model User {
|
|
165
|
+
/// Primary email for authentication
|
|
166
|
+
email String @unique
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## MongoDB Introspection
|
|
171
|
+
|
|
172
|
+
For MongoDB, `db pull` samples documents to infer schema:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
prisma db pull
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
May require manual refinement since MongoDB is schemaless.
|
|
179
|
+
|
|
180
|
+
## Warning
|
|
181
|
+
|
|
182
|
+
`db pull` overwrites your schema file. Always:
|
|
183
|
+
- Commit current schema before pulling
|
|
184
|
+
- Use `--print` to preview first
|
|
185
|
+
- Backup customizations you want to keep
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# prisma db push
|
|
2
|
+
|
|
3
|
+
Pushes schema changes directly to database without creating migrations. Ideal for prototyping.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
prisma db push [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What It Does
|
|
12
|
+
|
|
13
|
+
- Syncs your Prisma schema to the database
|
|
14
|
+
- Creates database if it doesn't exist
|
|
15
|
+
- Does NOT create migration files
|
|
16
|
+
- Does NOT track migration history
|
|
17
|
+
|
|
18
|
+
## Options
|
|
19
|
+
|
|
20
|
+
| Option | Description |
|
|
21
|
+
|--------|-------------|
|
|
22
|
+
| `--force-reset` | Force a reset of the database before push |
|
|
23
|
+
| `--accept-data-loss` | Ignore data loss warnings |
|
|
24
|
+
| `--schema` | Custom path to your Prisma schema |
|
|
25
|
+
| `--config` | Custom path to your Prisma config file |
|
|
26
|
+
| `--url` | Override the datasource URL from the Prisma config file |
|
|
27
|
+
|
|
28
|
+
### Removed in v7
|
|
29
|
+
|
|
30
|
+
- `--skip-generate` - Run `prisma generate` explicitly
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
### Basic push
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
prisma db push
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Accept data loss
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
prisma db push --accept-data-loss
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Required when changes would delete data (dropping columns, etc.)
|
|
47
|
+
|
|
48
|
+
### Force reset
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
prisma db push --force-reset
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Completely resets database and applies schema.
|
|
55
|
+
|
|
56
|
+
### Full workflow (v7)
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
prisma db push
|
|
60
|
+
prisma generate # Must run explicitly in v7
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## When to Use
|
|
64
|
+
|
|
65
|
+
- **Prototyping** - Rapid schema iteration
|
|
66
|
+
- **Local development** - Quick schema changes
|
|
67
|
+
- **MongoDB** - Primary workflow (migrations not supported)
|
|
68
|
+
- **Testing** - Setting up test databases
|
|
69
|
+
|
|
70
|
+
## When NOT to Use
|
|
71
|
+
|
|
72
|
+
- **Production** - Use `migrate deploy`
|
|
73
|
+
- **Team collaboration** - Use migrations for trackable changes
|
|
74
|
+
- **When you need rollback** - Migrations provide history
|
|
75
|
+
|
|
76
|
+
## Comparison with migrate dev
|
|
77
|
+
|
|
78
|
+
| Feature | db push | migrate dev |
|
|
79
|
+
|---------|---------|-------------|
|
|
80
|
+
| Creates migration files | No | Yes |
|
|
81
|
+
| Tracks history | No | Yes |
|
|
82
|
+
| Requires shadow database | No | Yes |
|
|
83
|
+
| Speed | Faster | Slower |
|
|
84
|
+
| Rollback capability | No | Yes |
|
|
85
|
+
| Best for | Prototyping | Development |
|
|
86
|
+
|
|
87
|
+
## MongoDB Workflow
|
|
88
|
+
|
|
89
|
+
MongoDB doesn't support migrations. Use `db push` exclusively:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Schema changes for MongoDB
|
|
93
|
+
prisma db push
|
|
94
|
+
prisma generate
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Common Patterns
|
|
98
|
+
|
|
99
|
+
### Prototyping workflow
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Make schema changes
|
|
103
|
+
# ...
|
|
104
|
+
|
|
105
|
+
# Push to database
|
|
106
|
+
prisma db push
|
|
107
|
+
|
|
108
|
+
# Generate client
|
|
109
|
+
prisma generate
|
|
110
|
+
|
|
111
|
+
# Test your changes
|
|
112
|
+
# Repeat as needed
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Reset and start fresh
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
prisma db push --force-reset
|
|
119
|
+
prisma db seed
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Handling conflicts
|
|
123
|
+
|
|
124
|
+
If `db push` can't apply changes safely:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
Error: The following changes cannot be applied:
|
|
128
|
+
- Removing field `email` would cause data loss
|
|
129
|
+
|
|
130
|
+
Use --accept-data-loss to proceed
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Decide whether data loss is acceptable, then:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
prisma db push --accept-data-loss
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Transition to Migrations
|
|
140
|
+
|
|
141
|
+
When ready for production, switch to migrations:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Create baseline migration from current schema
|
|
145
|
+
prisma migrate dev --name init
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Then use `migrate dev` for future changes.
|