Repository navigation
db seed GA - #2161
db seed GA#2161
db seed GA#2161Conversation
Co-authored-by: Joël Galeran <[email protected]>
|
It's hard for me to see through the markup diff, but have the content changes from #2055 been taken into account? I think this is the most important information we need to reflect the new |
|
|
||
| 1. A `seed.ts` or `seed.js` file in the [same location as your `schema.prisma` file](../../concepts/components/prisma-schema#prisma-schema-file-location). | ||
| 2. **One** of the following inside the `seed.js`/`seed.ts` file: | ||
| Prisma's integrated seeding functionality expects a command in the `"seed"` key in the `"prisma"` key of your `package.json` file. This points to a file which holds your seed script. The location of the file is optional, although we recommend placing it in the `/prisma` folder by convention. |
There was a problem hiding this comment.
The seed key is any command, there is not necessarily a file in the project involved. I think we could use the content from #2055 as a starting point.
There was a problem hiding this comment.
Hey @tomhoule , this is based off of that PR. Perhaps I wasn't clear in the above. I will re-write it.
Hey @tomhoule, this whole PR is based off of the work done in #2055. You can check the preview link to get a better overview of the changes and how it reads |
|
Ok thanks, I'll do a review based on the preview link :) |
tomhoule
left a comment
There was a problem hiding this comment.
It was a lot easier to read with the preview link, and I think it mostly looks good now. I will re-read later and see if we can expand a bit on the introduction, I think it's important to give the right high-level picture: prisma.seed key in package.json that can be any command, we are not tied to seed scripts.
|
Another thing I just noticed is that the document only mentions |
Co-authored-by: Jan Piotrowski <[email protected]>
Co-authored-by: Jan Piotrowski <[email protected]>
That would be wonderful. Alternatively, if you dont have time to do a draft, you could jot some notes down in a comment here on the issue and i could put it together and ask you some questions when you're free |
Co-authored-by: Tom Houlé <[email protected]>
* SQL Server GA (#2164) * working on tutorial * MSSQL tasks, 2095, 2083, 2094, 2091, 2086, 2082 * working on tutorial * MSSQL tasks, 2095, 2083, 2094, 2091, 2086, 2082 * Update content/100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases/100-connect-your-database.mdx Co-authored-by: Jan Piotrowski <[email protected]> * Feedback changes, including: mssql => sqlserver, clean up sections, fix sql tables Co-authored-by: Jan Piotrowski <[email protected]> * fix: broken links in mdx files * $queryRaw and $executeRaw GA (#2177) * Updated query raw page * Made sql injection warning scary * Changed sql injection warning, updated sql injection section, changed mock emails * Removed in preview from Interactive Transactions * fixed query * Removed section about template literals, fixed query * Minor change * Revert removal of in preview tags * Removed link to issue * add: initial full-text search docs * Sql Server GA part 2 (#2192) * Fixes #2084 * Fixes #2085 * Fixes #2088 * Fixes #2093 * Changed title of section, moved content and deleted tls section * Patch typeorm uses mssql (#2198) * Update content/200-concepts/100-components/02-prisma-client/060-full-text-search.mdx * Update content/200-concepts/100-components/02-prisma-client/060-full-text-search.mdx * Update content/200-concepts/100-components/02-prisma-client/060-full-text-search.mdx * Update content/200-concepts/100-components/02-prisma-client/060-full-text-search.mdx * Sql server fixes (#2200) * SQL Server boolean type is bit * Note about decimal parameters * No need for params, when describing allowed types * bit is not bytes! * Fix SQL Server feature matrix (#2199) * Fix SQL Server feature matrix - No support for `RESTRICT` action - JSON support is only partial * Fix phrasing * Moved previews to GA (#2196) * Update schema ref attributes (#2213) * Added note of until version 3 the signiture was... * Fixed codeblocks inside quote blocks * `db seed` GA (#2161) * Updated db seed docs * Trigger build * Chnaged to require syntax * Update content/300-guides/050-database/300-seed-database.mdx Co-authored-by: Joël Galeran <[email protected]> * Feedback changes * Simplified copy and seed field * Added note about compile options when using nextjs * Update content/300-guides/050-database/300-seed-database.mdx Co-authored-by: Jan Piotrowski <[email protected]> * Update content/300-guides/050-database/300-seed-database.mdx Co-authored-by: Jan Piotrowski <[email protected]> * Changed copy according to feedback * Update content/300-guides/050-database/300-seed-database.mdx Co-authored-by: Tom Houlé <[email protected]> * Moved migrate section and added more context * Fixed alignment bug causing failed builds Co-authored-by: Joël Galeran <[email protected]> Co-authored-by: Jan Piotrowski <[email protected]> Co-authored-by: Tom Houlé <[email protected]> * update node requirement from 12.2 to 12.6 (#2245) Closes prisma/orm#8839 * Sql server add to project guide (#2248) * Update 060-full-text-search.mdx (#2218) * Update 060-full-text-search.mdx Unfortunately pipes can't be escaped in our docs markdown parser right now. * Fixed code in md table with pipe Co-authored-by: Rich Haines <[email protected]> * Small fixes in self relation docs (#2221) - Fix a minor heading level inconsistency - Fix an issue with incorrect code highlighting * fix(codemods): Fix title (#2224) * fix(deps): update dependency @prisma/lens to v0.0.222 * fix(deps): update dependency @prisma/lens to v0.0.223 * fix(deps): update dependency @prisma/lens to v0.0.224 * fix(logging): Fix highlighted line in code (#2230) * fix(use-custom-model-and-field-names): Fix a typo (#2228) * feat(environment-variables): Expand env vars from system env, not only .env file (#2208) Co-authored-by: Rich Haines <[email protected]> * interactive transactions: update concept and tx guide with a better example (#2227) * interactive transactions: update concept and tx guide with a better example * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Hervé Labas <[email protected]> * fix(deps): update dependency @prisma/lens to v0.0.223 * fix(deps): update dependency @prisma/lens to v0.0.224 * fix(logging): Fix highlighted line in code (#2230) * fix(use-custom-model-and-field-names): Fix a typo (#2228) * feat(environment-variables): Expand env vars from system env, not only .env file (#2208) Co-authored-by: Rich Haines <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/100-performance-and-optimization/100-prisma-client-transactions-guide.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/100-performance-and-optimization/100-prisma-client-transactions-guide.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/100-performance-and-optimization/100-prisma-client-transactions-guide.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/100-performance-and-optimization/100-prisma-client-transactions-guide.mdx Co-authored-by: Rich Haines <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Rich Haines <[email protected]> * add spacing between header Co-authored-by: Hervé Labas <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Jan Piotrowski <[email protected]> Co-authored-by: Vespaiach <[email protected]> Co-authored-by: Rich Haines <[email protected]> * Add to existing project sql server guide * Feedback changes Co-authored-by: Matthew Mueller <[email protected]> Co-authored-by: Tasin Ishmam <[email protected]> Co-authored-by: Jan Piotrowski <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Vespaiach <[email protected]> Co-authored-by: Hervé Labas <[email protected]> * remove --preview-feature from db seed (#2250) * Upgrade guide to Prisma 3 + structural changes (#2247) * Update 060-full-text-search.mdx (#2218) * Update 060-full-text-search.mdx Unfortunately pipes can't be escaped in our docs markdown parser right now. * Fixed code in md table with pipe Co-authored-by: Rich Haines <[email protected]> * Small fixes in self relation docs (#2221) - Fix a minor heading level inconsistency - Fix an issue with incorrect code highlighting * fix(codemods): Fix title (#2224) * fix(deps): update dependency @prisma/lens to v0.0.222 * fix(deps): update dependency @prisma/lens to v0.0.223 * fix(deps): update dependency @prisma/lens to v0.0.224 * fix(logging): Fix highlighted line in code (#2230) * fix(use-custom-model-and-field-names): Fix a typo (#2228) * upgrade to prisma 3 guide plus structural changes * feat(environment-variables): Expand env vars from system env, not only .env file (#2208) Co-authored-by: Rich Haines <[email protected]> * interactive transactions: update concept and tx guide with a better example (#2227) * interactive transactions: update concept and tx guide with a better example * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Hervé Labas <[email protected]> * fix(deps): update dependency @prisma/lens to v0.0.223 * fix(deps): update dependency @prisma/lens to v0.0.224 * fix(logging): Fix highlighted line in code (#2230) * fix(use-custom-model-and-field-names): Fix a typo (#2228) * feat(environment-variables): Expand env vars from system env, not only .env file (#2208) Co-authored-by: Rich Haines <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/100-performance-and-optimization/100-prisma-client-transactions-guide.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/100-performance-and-optimization/100-prisma-client-transactions-guide.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/100-performance-and-optimization/100-prisma-client-transactions-guide.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/100-performance-and-optimization/100-prisma-client-transactions-guide.mdx Co-authored-by: Rich Haines <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Rich Haines <[email protected]> * add spacing between header Co-authored-by: Hervé Labas <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Jan Piotrowski <[email protected]> Co-authored-by: Vespaiach <[email protected]> Co-authored-by: Rich Haines <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/index.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/index.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/index.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/index.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/index.mdx Co-authored-by: Hervé Labas <[email protected]> * Refactor * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/100-named-constraints.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/100-named-constraints.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/100-named-constraints.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/100-named-constraints.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/index.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/index.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/index.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/300-upgrade-guides/250-upgrading-to-use-preview-features.mdx Co-authored-by: Hervé Labas <[email protected]> * small changes * Chnaged order of breaking changes to match release notes Co-authored-by: Matthew Mueller <[email protected]> Co-authored-by: Tasin Ishmam <[email protected]> Co-authored-by: Jan Piotrowski <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Vespaiach <[email protected]> Co-authored-by: Hervé Labas <[email protected]> * Update 07-names-in-underlying-database.mdx * Upgrade guide mk2 (#2263) * Update 060-full-text-search.mdx (#2218) * Update 060-full-text-search.mdx Unfortunately pipes can't be escaped in our docs markdown parser right now. * Fixed code in md table with pipe Co-authored-by: Rich Haines <[email protected]> * Small fixes in self relation docs (#2221) - Fix a minor heading level inconsistency - Fix an issue with incorrect code highlighting * fix(codemods): Fix title (#2224) * fix(deps): update dependency @prisma/lens to v0.0.222 * fix(deps): update dependency @prisma/lens to v0.0.223 * fix(deps): update dependency @prisma/lens to v0.0.224 * fix(logging): Fix highlighted line in code (#2230) * fix(use-custom-model-and-field-names): Fix a typo (#2228) * feat(environment-variables): Expand env vars from system env, not only .env file (#2208) Co-authored-by: Rich Haines <[email protected]> * interactive transactions: update concept and tx guide with a better example (#2227) * interactive transactions: update concept and tx guide with a better example * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Hervé Labas <[email protected]> * fix(deps): update dependency @prisma/lens to v0.0.223 * fix(deps): update dependency @prisma/lens to v0.0.224 * fix(logging): Fix highlighted line in code (#2230) * fix(use-custom-model-and-field-names): Fix a typo (#2228) * feat(environment-variables): Expand env vars from system env, not only .env file (#2208) Co-authored-by: Rich Haines <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/100-performance-and-optimization/100-prisma-client-transactions-guide.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/100-performance-and-optimization/100-prisma-client-transactions-guide.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/100-performance-and-optimization/100-prisma-client-transactions-guide.mdx Co-authored-by: Hervé Labas <[email protected]> * Update content/300-guides/100-performance-and-optimization/100-prisma-client-transactions-guide.mdx Co-authored-by: Rich Haines <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx Co-authored-by: Rich Haines <[email protected]> * add spacing between header Co-authored-by: Hervé Labas <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Jan Piotrowski <[email protected]> Co-authored-by: Vespaiach <[email protected]> Co-authored-by: Rich Haines <[email protected]> * Missed feedback from previous PR Co-authored-by: Matthew Mueller <[email protected]> Co-authored-by: Tasin Ishmam <[email protected]> Co-authored-by: Jan Piotrowski <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Vespaiach <[email protected]> Co-authored-by: Hervé Labas <[email protected]> * Chnaged image sin cloudinary (#2275) * Minor fixes to constraint names upgrade guide (#2274) * Minor fixes to constraint names upgrade guide * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/100-named-constraints.mdx * fix(prisma-client-transactions-guide): fix referential actions admon + Whats new week 30th sept (#2264) (#2267) * Whats new week 30th sept (#2264) * fix: broken links in mdx files * add: initial full-text search docs * Update content/200-concepts/100-components/02-prisma-client/060-full-text-search.mdx * Update content/200-concepts/100-components/02-prisma-client/060-full-text-search.mdx * Update content/200-concepts/100-components/02-prisma-client/060-full-text-search.mdx * Update content/200-concepts/100-components/02-prisma-client/060-full-text-search.mdx * whats new week 23rd and 30th Co-authored-by: Nilu <[email protected]> Co-authored-by: Matthew Mueller <[email protected]> * fix(prisma-client-transactions-guide): fix referential actions admon Co-authored-by: Rich Haines <[email protected]> Co-authored-by: Nilu <[email protected]> Co-authored-by: Matthew Mueller <[email protected]> * Added docs about the json nullability breaking change (#2265) * added docs about the json nullability breaking change * fix todos * Update content/200-concepts/100-components/02-prisma-client/051-working-with-fields/100-working-with-json-fields.mdx Co-authored-by: Rich Haines <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/051-working-with-fields/100-working-with-json-fields.mdx Co-authored-by: Rich Haines <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/051-working-with-fields/100-working-with-json-fields.mdx Co-authored-by: Rich Haines <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/index.mdx Co-authored-by: Rich Haines <[email protected]> Co-authored-by: Rich Haines <[email protected]> * Feedback changes (#2276) * db seed small fixes (#2281) * Document Node-API library (#2258) Co-authored-by: Hervé Labas <[email protected]> * Update content/400-reference/200-api-reference/300-environment-variables-reference.mdx Co-authored-by: Jan Piotrowski <[email protected]> * Update content/400-reference/200-api-reference/300-environment-variables-reference.mdx Co-authored-by: Jan Piotrowski <[email protected]> * Changes text * Update content/300-guides/050-database/300-seed-database.mdx Co-authored-by: Jan Piotrowski <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/150-referential-actions.mdx Co-authored-by: Julius de Bruijn <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/150-referential-actions.mdx Co-authored-by: Julius de Bruijn <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/150-referential-actions.mdx Co-authored-by: Julius de Bruijn <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/150-referential-actions.mdx Co-authored-by: Julius de Bruijn <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/150-referential-actions.mdx Co-authored-by: Julius de Bruijn <[email protected]> * Introspection/db pull: Moved sections around, added link (#2282) * Moved sections around, added link * Update content/400-reference/200-api-reference/200-command-reference.mdx Co-authored-by: Joël Galeran <[email protected]> * Update content/400-reference/200-api-reference/200-command-reference.mdx Co-authored-by: Joël Galeran <[email protected]> * Update content/400-reference/200-api-reference/200-command-reference.mdx Co-authored-by: Joël Galeran <[email protected]> * split warning into 2 sections * Removed text as wrong * Update content/400-reference/200-api-reference/200-command-reference.mdx Co-authored-by: Joël Galeran <[email protected]> * Update content/400-reference/200-api-reference/200-command-reference.mdx Co-authored-by: Joël Galeran <[email protected]> Co-authored-by: Joël Galeran <[email protected]> * Update content/300-guides/300-upgrade-guides/200-upgrading-versions/050-upgrading-to-prisma-3/150-referential-actions.mdx Co-authored-by: Julius de Bruijn <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx Co-authored-by: Pierre-Antoine Mills <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx Co-authored-by: Pierre-Antoine Mills <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx Co-authored-by: Pierre-Antoine Mills <[email protected]> * Use the new constraint name defaults in SQL Server (#2284) ... migrate example * New constraint names for SQL Server introspection (#2286) * DANGER_PLAINTEXT should not be mentioned (#2287) * Update content/200-concepts/200-database-connectors/08-sql-server/index.mdx Co-authored-by: Julius de Bruijn <[email protected]> * Raw query fixes (#2285) * raw query fixes * changes * Update content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx Co-authored-by: Pierre-Antoine Mills <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx Co-authored-by: Pierre-Antoine Mills <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx Co-authored-by: Pierre-Antoine Mills <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx Co-authored-by: Pierre-Antoine Mills <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx Co-authored-by: Pierre-Antoine Mills <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx Co-authored-by: Pierre-Antoine Mills <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx Co-authored-by: Pierre-Antoine Mills <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx Co-authored-by: Pierre-Antoine Mills <[email protected]> * Update content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx Co-authored-by: Pierre-Antoine Mills <[email protected]> * fixes Co-authored-by: Pierre-Antoine Mills <[email protected]> Co-authored-by: Jan Piotrowski <[email protected]> Co-authored-by: Nilu <[email protected]> Co-authored-by: Matthew Mueller <[email protected]> Co-authored-by: Hervé Labas <[email protected]> Co-authored-by: Julius de Bruijn <[email protected]> Co-authored-by: Joël Galeran <[email protected]> Co-authored-by: Tom Houlé <[email protected]> Co-authored-by: Tasin Ishmam <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Vespaiach <[email protected]> Co-authored-by: Pierre-Antoine Mills <[email protected]>
This PR updates the
db seeddocs to reflect that it is no longer in preview.Fixes: #2121
Closes: #2055