Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use createMany in Seed database example #1776

Merged
merged 5 commits into from
Feb 23, 2021
Merged

Use createMany in Seed database example #1776

merged 5 commits into from
Feb 23, 2021

Conversation

simoncrypta
Copy link
Collaborator

This replaces the example on api/db/seed.js with createMany, a preview feature in Prisma.

Like @dthyresson said on issue #1771

By using createMany one no longer has to iterate over a set of records to load data -- and no longer has to worry about Promises resolving per record creation.

I think is already a good idea to show this example in the comment section.

@github-actions
Copy link

github-actions bot commented Feb 10, 2021

📦 PR Packages

Click to Show Package Download Links

https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/create-redwood-app-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-api-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-api-server-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-auth-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-cli-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-core-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-dev-server-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-eslint-config-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-eslint-plugin-redwood-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-forms-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-internal-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-prerender-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-router-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-structure-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-testing-0.25.1-b44014c.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1776/redwoodjs-web-0.25.1-b44014c.tgz

Install this PR by running yarn rw upgrade --pr 1776:0.25.1-b44014c

@thedavidprice
Copy link
Contributor

@dthyresson I think this one's awaiting your guidance.

@simoncrypta simoncrypta marked this pull request as draft February 23, 2021 14:58
@simoncrypta simoncrypta marked this pull request as ready for review February 23, 2021 15:57
Copy link
Contributor

@dthyresson dthyresson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@thedavidprice thedavidprice merged commit f9524ac into redwoodjs:main Feb 23, 2021
@thedavidprice thedavidprice added this to the next release milestone Feb 23, 2021
dac09 added a commit to dac09/redwood that referenced this pull request Feb 24, 2021
… fix/dm-babel-register

* 'fix/dm-babel-register' of github.com:dac09/redwood:
  Remove bundlesize dependency (redwoodjs#1844)
  upgrade execa; fix test.js cwd (redwoodjs#1846)
  Make ESLint configuration aware of "env." (redwoodjs#1827)
  Use createMany in Seed database example (redwoodjs#1776)
  Docs: Update contributor workflow to yarn rwt link (redwoodjs#1803)
  fix(page-loader): Adds types for pageLoadingContext | Fix for pageLoader during prerender (redwoodjs#1832)
  Minify CSS in production builds (redwoodjs#1697)
  New contributor workflow (redwoodjs#1792)
  Improve/template and auth setup tests (redwoodjs#1834)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use createMany in Seed database example once out of Preview
3 participants