Prisma - The Easiest Way to Work with a Database in Next.js (UPDATED)

  Рет қаралды 106,567

Prisma

Prisma

Күн бұрын

Пікірлер: 90
@tonyjaradev
@tonyjaradev 2 жыл бұрын
This guy should do all Prisma tutorials. Awesome.
@b1chler
@b1chler 3 жыл бұрын
Would be cool to see whats the best way to use authentication and authorization with next and prisma… :)
@hamburger-fries
@hamburger-fries 3 жыл бұрын
Yes
@neoesm
@neoesm 2 жыл бұрын
YES
@PoipoIgnix
@PoipoIgnix 2 жыл бұрын
@@neoesm agree
@trashAndNoStar
@trashAndNoStar 2 жыл бұрын
Yes
@blankcheckguy69
@blankcheckguy69 2 жыл бұрын
Magic Link maybe
@nicolasguillenc
@nicolasguillenc 3 жыл бұрын
Big thumbs up, this guy explains very well and his attitude is great while explaining
@DeepTitanic
@DeepTitanic Жыл бұрын
He sounds like a private detective
@JamesQQuick
@JamesQQuick 3 жыл бұрын
Great overview. Love this!
@PrismaData
@PrismaData 3 жыл бұрын
Thanks James 🙌
@MaksymMinenko
@MaksymMinenko 3 жыл бұрын
Thanks! This channel needs more videos like this one.
@Blue-bb9ro
@Blue-bb9ro 2 жыл бұрын
Huge thumbs up for this video, very concise, helped me A LOT with getting started with Prisma.
@martiananomaly
@martiananomaly 2 жыл бұрын
1:00 didn't know that. That's really cool.
@seandurrant2877
@seandurrant2877 3 жыл бұрын
From a very new Nextjs developer, I would love to see a tutorial from the very beginning. This is a great video but there is too much code for me to really understand it. Don't get me wrong, I could copy and paste and get it working but to really learn, a tutorial from the very start would be great.
@RamoFX
@RamoFX 3 жыл бұрын
Very interesting technology! Thanks!
@joncrowell9289
@joncrowell9289 3 жыл бұрын
Excellent video, Ryan. Thanks! At the ~7:45 mark, you mention a video that shows how to use a singleton rather than instantiating the Prisma Client in various places in the app. Can you post a link?
@Gorlik1337
@Gorlik1337 3 жыл бұрын
Also me looking for this link
@Gorlik1337
@Gorlik1337 3 жыл бұрын
@prisma
@AnthonySchmittt
@AnthonySchmittt 3 жыл бұрын
I think this video from prisma can help : kzbin.info/www/bejne/l5rQaYChYqqHgZI
@BhriguSrivastava
@BhriguSrivastava Жыл бұрын
Great tutorial video. Very concise and to the point.
@Norfeldt
@Norfeldt 3 жыл бұрын
Very good and informative tutorial - I'm just sitting back and missing the last step of how to deploy it...
@dunyan1586
@dunyan1586 Жыл бұрын
I need help on that too
@daniellaerachannel
@daniellaerachannel 3 жыл бұрын
Awesome!
@mediacreatif
@mediacreatif 2 жыл бұрын
react-hook-form updated to 7.0.0 from 6.X.X and has breaking changes
@maskman4821
@maskman4821 3 жыл бұрын
pretty useful and practical tutorial !!!
@brandonleichty
@brandonleichty 3 жыл бұрын
Thanks for the video! I'm curious if there is a "Prisma way" to add triggers to Postgres? Or do you just have to do it manually through raw SQL?
@holodeck_run
@holodeck_run 3 жыл бұрын
nothing specific that I know of. I was just looking for any docs we have but I can't find much. I believe right now it's just a manual task. Feel free to open an issue about it though, perhaps this is something that can be looked at in the future :)
@brandonleichty
@brandonleichty 3 жыл бұрын
Awesome! Thanks for the reply. I couldn’t find anything either. So I’ll open an issue up. 🙏
@marlonfalconhdez
@marlonfalconhdez 3 жыл бұрын
Thank you for the video, you explains very well
@PrismaData
@PrismaData 3 жыл бұрын
You are welcome! We're glad it was helpful! 💚
@stvlley
@stvlley 2 жыл бұрын
I wish i could like a video multiple time lol
@HillelGarciaAustria
@HillelGarciaAustria 2 жыл бұрын
Amazing video, just what I needed. Thanks! You've +1 subscriber
@Balance-8
@Balance-8 3 жыл бұрын
Where is the link to the video you discussed at @7:45
@holodeck_run
@holodeck_run 3 жыл бұрын
Here it is: kzbin.info/www/bejne/qqSyeapoiZZ7rKs
@TheLexuguin
@TheLexuguin 3 жыл бұрын
I'm following that approach github.com/prisma/prisma/issues/1983#issuecomment-869036852
@PaulSebastianM
@PaulSebastianM 2 жыл бұрын
13:05 that is a DTO for creating the actual model of Contact, to speak in software development parlance. :) But it is a simple generated type that probably looks identical to Contact itself. People might want to create their own DTOs so they can implement business logic like validation and such.
@CaseStudyQB
@CaseStudyQB 3 жыл бұрын
Whats the best way to learn how to model or design prisma 2 databases? I would like to see examples and / or tutorials on more complex databases. Thanks in advance
@burakcivan1219
@burakcivan1219 Жыл бұрын
Thanks, good course for me :)
@buntikashyap7618
@buntikashyap7618 7 ай бұрын
Yes, I use Next js with Prisma and mysql database and it is good combination for full stack developer but I have an issue to deploy on hostinger as it pre installed the phpmyadmin or database but didn't know about how we deploy my next js project on this and how can I create the tables in database dynamicallly. (if you have any reference for me you can send me)
@palkollar7739
@palkollar7739 2 жыл бұрын
This is amazing!
@myrez_
@myrez_ Жыл бұрын
6:43 I'm getting an error here when trying to import the { initialContacts }, I get "Binding element 'X' implicitly has an 'any' type." any help?
@jamesnguyen868
@jamesnguyen868 3 жыл бұрын
Hi Ryan, is there a support for multi-tenants based app?
@ImaginativeWork
@ImaginativeWork 9 ай бұрын
Got anything for SQL Server with Windows Authentication?
@asiatip
@asiatip Жыл бұрын
Thanks for your video, it helps me a lot. After everything is done, I have a question: can we deploy it to vercel directly with local ./dev.db. It seems not working.
@dunyan1586
@dunyan1586 Жыл бұрын
same, how should we do it lol
@rahulbhardwaj4568
@rahulbhardwaj4568 2 жыл бұрын
This should be updated react-hook-form v7 has breaking changes!
@bryson2662
@bryson2662 2 жыл бұрын
forgive my ignorance. If the api routes are run on the server, how are they "serverless functions"?
@daniel2color
@daniel2color 2 жыл бұрын
The term Serverless functions is indeed confusing. In practice, it just means that you don't need a dedicated server. There's always going to be a server that actually runs the functions - they are just invisible to you.
@babyfrank593
@babyfrank593 3 жыл бұрын
Cuando ejecuto npx prisma studio obtengo este error "Error: spawn undefined\System32\WindowsPowerShell\v1.0\powershell ENOENT" me podría ayudar a solucionarlo gracias
@magimaartdeveloper7465
@magimaartdeveloper7465 3 жыл бұрын
Is this prisma thing an alternative to mongoose? and would it make sense to use mongoose and prisma on a single project using mongodb?
@jaicedecelis9949
@jaicedecelis9949 3 жыл бұрын
Hey Prisma! Just out of curiosity, what is your revenue generation model / how does prisma make its money? Looking to adopt something like prisma but want to make sure it will be around for a while!
@PrismaData
@PrismaData 3 жыл бұрын
Prisma is open source and using it is free of any charge! In the future, Prisma will offer additional cloud services to facilitate various database- and Prisma-related workflows. Note that these will be optional, Prisma can continue to be used without consuming any commercial services.
@Fleshlight_Reviewer
@Fleshlight_Reviewer 3 жыл бұрын
is there a difference between prisma migrate dev and prisma generate?
@PrismaData
@PrismaData 3 жыл бұрын
Yes. The prisma migrate dev command generates SQL migrations and executes them The prisma generate command generates the Prisma Client code that you import into your application.
@HugensLouis
@HugensLouis 3 жыл бұрын
What is that icon theme?
@rahulsriram6295
@rahulsriram6295 3 жыл бұрын
Hey what font is that?!
@C0D3O
@C0D3O Жыл бұрын
how to configure prettier to format thing like that?? 3:50
@thewetfly9207
@thewetfly9207 Жыл бұрын
Have you any beautiful .prettierrc file for your style (without semicolon and align your model names) ? 😇
@hyggedev2124
@hyggedev2124 3 жыл бұрын
How do I update the Schema so i can add a new model or change model fields?
@MahmoudAbdelwahab
@MahmoudAbdelwahab 3 жыл бұрын
Hey Chris! You can make changes to your schema and then use Prisma migrate so that the changes are reflected in your database 😄 Check out the docs here: www.prisma.io/docs/concepts/components/prisma-migrate
@izio4408
@izio4408 3 жыл бұрын
Does prisma support graphql? When will mongodb be ready?
@PrismaData
@PrismaData 3 жыл бұрын
Hello there! To answer your questions: (1) Prisma and GraphQL fit together very well - Prisma is an ORM that is used inside of GraphQL resolvers to query a database. More info here: www.prisma.io/graphql (2) Prisma currently supports MongoDB in Preview and we plan to launch the GA support by the end of the year. More info here: www.prisma.io/blog/prisma-mongodb-preview-release
@sharkman8560
@sharkman8560 3 жыл бұрын
Hi! How can I update database without erase data. For example I want to add new column.
@leonardosimmons9658
@leonardosimmons9658 3 жыл бұрын
Just change whichever model(s) within the schema.primsa file and run npx prisma migrate dev. It will auto sync the new updated schema with your database. Don't forget to run prisma generate when you're finished to resync the database with @prisma/client
@cervece41
@cervece41 3 жыл бұрын
Hi there Ryan, I have a quick question, I never used SQLite before so I'm not sure whether it's safe to push the dev.db file to a public repo or not, I love the idea of having a ligth db in the file system but I obviously don't want to expose my application's data. Thanks in advance!
@CurtisUpshall
@CurtisUpshall 2 жыл бұрын
The idea behind database migrations is to "rebuild" your database when you run them. So storing any kind of database file in version control is a bad idea, even if the data isn't confidential. Use migrations and seeders to rebuild the data, or opt for a hosted database. Of course, you can still use SQLite if you don't mind mainting the sqlite file locally.
@elshir
@elshir 3 жыл бұрын
Hi there, why is this happening? Error: Error serializing .postsreturned fromgetStaticPropsin "/posts". Reason:object ("[object Promise]") cannot be serialized as JSON. Please only return JSON serializable data types.
@holodeck_run
@holodeck_run 3 жыл бұрын
looks like you have a page called "posts"? from the error, it looks like it could be that you're not awaiting something. if you're making a call to prisma to get data, be sure to await it so you can get the actual data result and not the pending promise.
@elshir
@elshir 3 жыл бұрын
@@holodeck_run I'm pretty sure I am set it to await, but still get this error.
@holodeck_run
@holodeck_run 3 жыл бұрын
@@elshir hard to say from just the error message. if your code is in a repo where I can take a look, I might be able to find the issue.
@elshir
@elshir 3 жыл бұрын
@@holodeck_run I got it, because of time.
@harryweisner4193
@harryweisner4193 2 жыл бұрын
Why have you styled your hair like a RawR Xd girl from the early 2000s? Great video thanks.
@mahbubhasan8661
@mahbubhasan8661 3 жыл бұрын
I m using mongoose. I never use prisma before. Please upload tutorial how I can use authentication and authorization with next js and prisma in API route
@PrismaData
@PrismaData 3 жыл бұрын
Check out this course which includes authentication and authorization with Next.js and Prisma: www.prisma.io/blog/fullstack-nextjs-graphql-prisma-oklidw1rhw
@mahbubhasan8661
@mahbubhasan8661 3 жыл бұрын
@@PrismaData Thank you
@nonefvnfvnjnjnjevjenjvonej3384
@nonefvnfvnjnjnjevjenjvonej3384 2 жыл бұрын
Something which I hate is that often times there is a ease of use way of doing things which is different from the actual way of doing things like the singleton pattern of the client. I wish the library would just deal with it.
@OMARKM
@OMARKM 2 жыл бұрын
what is Prisma and why should i use it ?!😅
@mohamedel-moustafa3667
@mohamedel-moustafa3667 2 жыл бұрын
Prisma best
@naveensingh6459
@naveensingh6459 11 ай бұрын
bro, i thought Sam Altman was going to teach us.
@tirancm
@tirancm 2 жыл бұрын
If you are going to use shared hostings, cpanel to host the app, do not use prisma. Prisma cannot work on ubuntu 20.04 at all. Its been lot of time. They have not fixed the issue.
@City__Walker
@City__Walker Жыл бұрын
Prisma has a nasty surprise that Prisma developers don't give a damn about, when transferring a project from one development environment to another where there is no Internet, Prisma tries to download a new driver for its work, if you have tight security settings, consider that your project will not work. Because of this, I almost lost my job. Gentlemen, can you create an offline version for complex situations !!??
@taggerung_
@taggerung_ 2 ай бұрын
now show us your middleware
@taggerung_
@taggerung_ 2 ай бұрын
downvoted
@spectator5144
@spectator5144 3 жыл бұрын
please JS version
@SphinxHill
@SphinxHill Жыл бұрын
@triTube70
@triTube70 2 жыл бұрын
Hi Ryan, I'm following one of the examples from Prisma Github page and i just wanted to know what is the .author() does in these code, Thanks. author: (parent, _args, ctx) => { return ctx.prisma.post .findUnique({ where: { id: parent.id }, }) .author()
@BJ-ic5tj
@BJ-ic5tj 3 жыл бұрын
If I understand correctly, you have renamed @prisma/cli to just plain prisma. If that is correct, I am wondering why you changed the name. @prisma/cli is much more descriptive of what the package does then just plain prisma (particularly since there is still a @prisma/client package).
Is Drizzle Really Better Than Prisma?
20:15
Web Dev Simplified
Рет қаралды 86 М.
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 9 МЛН
Who's spending her birthday with Harley Quinn on halloween?#Harley Quinn #joker
01:00
Harley Quinn with the Joker
Рет қаралды 22 МЛН
Next.js App Router: Routing, Data Fetching, Caching
14:32
Vercel
Рет қаралды 329 М.
How To Write Raw SQL w/ Type Safety in Prisma ORM
9:16
Prisma
Рет қаралды 4,5 М.
I DONT USE NEXT JS
54:01
ThePrimeTime
Рет қаралды 374 М.
Learn Prisma In 60 Minutes
59:25
Web Dev Simplified
Рет қаралды 422 М.
Why prisma calls directly in Next is a MISTAKE
7:51
Web Dev Cody
Рет қаралды 17 М.
Drizzle vs Prisma: Which ORM is right for YOU?
5:59
Kodaps Academy
Рет қаралды 10 М.
How to set up Prisma with Next.js and Postgres!
17:40
Build SaaS with Ethan
Рет қаралды 38 М.
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 9 МЛН