Learn Drizzle In 60 Minutes

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ส.ค. 2024

ความคิดเห็น • 136

  • @DavidBowmanJr
    @DavidBowmanJr 3 หลายเดือนก่อน +29

    elite video. 60-minutes, no fluff, no ads, well organized, from the documentation. greatest hair in the business.

  • @xl0xl0xl0
    @xl0xl0xl0 หลายเดือนก่อน

    60 minutes, and every minute is right on point, no water. Thank you for the video!

  • @AkashPandya9
    @AkashPandya9 2 หลายเดือนก่อน

    For some breaking changes, refer to official migration docs from drizzle. Apart from that, just a perfect and precise tutorial for drizzle. Kudos Kyle.

  • @Metavibez-p3f
    @Metavibez-p3f หลายเดือนก่อน +1

    OMG bro i was knee deep in a real time data migration in a project for work and drizzle is the perfect solution.

  • @sanketss84
    @sanketss84 หลายเดือนก่อน

    incredible. ❤
    one video packs a ton of information. worth the one hour spent listening and grasping the concepts of not just drizzle but also postgres and sql database essentials.

  • @poh9044
    @poh9044 4 หลายเดือนก่อน +9

    I swear you read my mind, just in time! Thanks Kyle

  • @ruskasielu6261
    @ruskasielu6261 4 หลายเดือนก่อน +16

    Thanks for the video. Drizzle is indeed pretty nice, but their documentation could be improved. Tried to set it up with SQLite and it took me a long time to figure out, and the help of a blog that someone who encountered the same issues as I did fortunately wrote. They should be clearer on the different steps, where to put what code (which files and dicrectory) and such. The whole system of migrations is also still pretty confusing so far.

    • @skyhappy
      @skyhappy 4 หลายเดือนก่อน

      You should add a pull request to improve it

  • @larrymcfarlane6202
    @larrymcfarlane6202 4 หลายเดือนก่อน +3

    Let me save someone some time if you're getting an error like [PostgresError: unrecognized configuration parameter 'schema'] when trying to migrate. I copied and pasted my DATABASE_URL with the '?schema=public' param at the end. Check yours before diving too deep. :) Thanks for the video Kyle!

  • @AnthonyCandaele
    @AnthonyCandaele 29 วันที่ผ่านมา

    very insightful video on Drizzle ORM. I would love to see a course on a full blown project with Next.js and Drizzle ...

  • @404-not-found-service
    @404-not-found-service 4 หลายเดือนก่อน +1

    Thank you, I was just looking for a Drizzle course, it seems like an orm that is currently very efficient

  • @itzDoraemon
    @itzDoraemon 12 วันที่ผ่านมา +1

    🙏✨Maybe, you should make a database tutorial series on backend.

  • @mythmaker6155
    @mythmaker6155 4 หลายเดือนก่อน +1

    the timing of this video and my learning thirst for DRIZZLE is right on time.... thanks

  • @DivinPrince
    @DivinPrince 4 หลายเดือนก่อน +4

    Drizzle such a good ORM

  • @artem_zakharchuk
    @artem_zakharchuk หลายเดือนก่อน

    I listened only 15 seconds of the video, but exactly know that till the end of the day, my bd successfully deployed to the Vercel using Drizzle)

  • @ronny-andrebendiksen4137
    @ronny-andrebendiksen4137 2 หลายเดือนก่อน

    Great tutorial and very well explained! :) Could I request a follow-up video on how to handle migration sync between local dev environment and the production environment?

  • @theisoj
    @theisoj 4 หลายเดือนก่อน +1

    I waited this for so long and now it is here! Thanks Kyle!

  • @ryujinwatatsumi
    @ryujinwatatsumi 4 หลายเดือนก่อน +4

    Can we get the link for the notion notes please ?

  • @sabuein
    @sabuein หลายเดือนก่อน

    Thank you, Kyle.

  • @user-qj4rr1rm8i
    @user-qj4rr1rm8i 4 หลายเดือนก่อน

    28:18
    Thank you again for sharing your knowledge and efforts, Kyle.
    I have a question to ask while I'm watching this video.
    at 28:18
    about the foreign key,
    // One way of handle a foreign key was like...
    export const UserPreferencesTable = pgTable("userPrefenrences", {
    id: uuid("id").primaryKey().defaultRandon(),
    userId: uuid("userId").references()
    });
    // Another way of handle a foreign key...
    export const PostCategoryTable = pgTable("postCategory", {
    id: uuid("postId").references(() => PostCategoryTable.id).notNull(),
    categoryId: uuid("categoryId").references(() => CategoryTable.id).notNull()
    }, table => {
    pk: primaryKey({ columns: [table.postId, table.categoryId]})
    });
    Assuming, first one just refers to a foreign column, while second one is creating actual foreign key for foreign key, am I right?

  • @mohammedshamil1626
    @mohammedshamil1626 4 หลายเดือนก่อน +1

    Crazy timing bro, just started a project using drizzle a couple of weeks back

  • @iwas23
    @iwas23 4 หลายเดือนก่อน

    Really nice video mate. Hope you cover the dynamic query in upcoming video 🎉🎉❤

  • @hiplipfy
    @hiplipfy 2 หลายเดือนก่อน +1

    Just sharing, if you or anyone of you are deleting a typographical error. You can hold ctrl (in Windows) or hold option (in Mac) then press backspace to delete the whole string instead of manually backspacing in deleting each character, just something that will help a lot (or not) in expediting the entire coding experience.
    Great video btw :salute:

  • @roodood
    @roodood 4 หลายเดือนก่อน

    So in in Rails, I get these commands from the get-go: db:create, db:migrate db:rollback, db:drop etc and they do exactly as you imagine. Why doesn't drizzle ship them directly but instead require to write them myself?

  • @dough-pizza
    @dough-pizza 4 หลายเดือนก่อน +108

    Developers will do everything but learn SQL

    • @nepolianpratik9890
      @nepolianpratik9890 4 หลายเดือนก่อน +20

      And CSS

    • @chudchadanstud
      @chudchadanstud 4 หลายเดือนก่อน +1

      nmp. Should have made it intuitive from the start

    • @dough-pizza
      @dough-pizza 4 หลายเดือนก่อน

      @@chudchadanstud even still ORMs are not a solution then it's a bandage

    • @asthedreamfadesaway
      @asthedreamfadesaway 4 หลายเดือนก่อน +10

      I mean sure you should learn SQL first, but then if you want to prevent SQL injections manually or ignore type checking and find out whether it works or not during runtime, or want to manually review all the code for DB migrations to other DB (e.g. mysql to postgresql) you can use raw SQL

    • @beyourahi
      @beyourahi 4 หลายเดือนก่อน

      go cry in a corner

  • @carltongordon
    @carltongordon 4 หลายเดือนก่อน

    Hey Kyle, can we get. video on how you plan your projects?

  • @ShayanAli-vq6iq
    @ShayanAli-vq6iq 9 วันที่ผ่านมา

    what about error handeling with custom error messages

  •  3 หลายเดือนก่อน

    I created a repo following this tutorial and using neon for postgres Github rogercastaneda/drizzle-neon-pg-example. I also have the same implementation using sqlite (with turso) Github rogercastaneda/drizzle-turso-example

    • @Shubham-yc6nz
      @Shubham-yc6nz 3 หลายเดือนก่อน

      Github link?

    •  3 หลายเดือนก่อน

      @@Shubham-yc6nz TH-cam does not allow me to post urls. Add the following to the Github url rogercastaneda/drizzle-neon-pg-example

  • @gregwalton331
    @gregwalton331 3 หลายเดือนก่อน

    Got everything working, thank you for this super tutorial, really clear!

  •  3 หลายเดือนก่อน

    Thanks!

  • @mrlectus
    @mrlectus 2 หลายเดือนก่อน

    Well i lot interest on in relationships, going back to use prisma

  • @farzadmf
    @farzadmf 4 หลายเดือนก่อน +2

    It would have been nice to also share the code

  • @pallavggupta
    @pallavggupta 3 หลายเดือนก่อน

    In 1 month, none of commands for drizzle work now, new version is out and so much has changed

  • @adanos2006
    @adanos2006 4 หลายเดือนก่อน

    awesome. as always

  • @jens-mikaelstjernberg1037
    @jens-mikaelstjernberg1037 4 หลายเดือนก่อน +3

    But how do i update a table (eg. addidng a new column) without deleting the existing data in that? So far everytime I've done that the data gets the deleted and the drizzle doc doesn't include any information about how this would be done? Any suggestions are appreciated

  • @PanicAtProduction
    @PanicAtProduction 4 หลายเดือนก่อน +3

    30:13 that’s why you should not use orms. Let’s think we have a production database, we want to add a new column which can not be a null. What are we going to do? Deleting whole table? This must be fixed. The same issue was in Strapi 2 years ago and my cluster died because of the db migration.

    • @user-xi9cw4wq6l
      @user-xi9cw4wq6l 2 หลายเดือนก่อน

      Newbie to relational db here, in this part what exactly should i do when i encounter this kind of issue?

  • @adriangajdulewicz4257
    @adriangajdulewicz4257 2 หลายเดือนก่อน

    Hands down the best drizzle video, they should pin it to their website lol. Amazing job!

  • @ariassingh462
    @ariassingh462 3 หลายเดือนก่อน

    Good tutorial. I won’t use it though as I will never utter the words ‘I am proficient in drizzle’.

  • @jacob5403
    @jacob5403 4 หลายเดือนก่อน +1

    it's an absolute nightmare, that returning function doesn't exist for mysql, I went through docs, cannot see a way to get at least "last insert id"

  • @abeercodes
    @abeercodes 3 หลายเดือนก่อน +2

    if you see pg is not found in driver, install drizzle-kit version 0.20.14
    I struggled a lot

    • @QuangPham-tj7kq
      @QuangPham-tj7kq 3 หลายเดือนก่อน

      thanks for saving my day

    • @abeercodes
      @abeercodes 3 หลายเดือนก่อน

      @@QuangPham-tj7kq actually you could struggle with this version too. defineCofig's configuration has been changed in the new version of drizzle-kit. Look at the documentation.

  • @nickwoodward819
    @nickwoodward819 2 หลายเดือนก่อน

    @23:30 - is it still a 'serial' here if that's how you did it in the original table? loving the video though :)

  • @charlesokorobo508
    @charlesokorobo508 หลายเดือนก่อน

    Dear Kyle,
    This Tutorial is fine.
    The challenge I always have with you, is that you talk too fast.
    Now, can you help me check out how to set up a project that will use Postgres, Drizzle and SvelteKit?
    You are to show how to connect these 3, and get them working together.
    Regards.

  • @fabienpineau1580
    @fabienpineau1580 4 หลายเดือนก่อน

    For a small end of the year project in IT study, is it useful to use migration? I'm still struggling to understand the whole scope of migration in database

  • @badzpowazny8172
    @badzpowazny8172 2 หลายเดือนก่อน

    It has a few bugs. It replaces keys, changes the names of primary keys, and what's worse, by generating too long names it causes errors and does not add indexes correctly. It is incompatible with what Workbench generates.

  • @DihCpsPsy
    @DihCpsPsy 4 หลายเดือนก่อน

    How can I push a new item to an array field? And how to remove one specific item?

  • @WatashiwaWatashi-zw7hy
    @WatashiwaWatashi-zw7hy หลายเดือนก่อน

    is Drizzle ready for production?

  • @depreza68
    @depreza68 4 หลายเดือนก่อน +2

    is there no repo? :(

    • @Shubham-yc6nz
      @Shubham-yc6nz 3 หลายเดือนก่อน

      Anyone? Github

  • @destocot1729
    @destocot1729 4 หลายเดือนก่อน

    anyone know the difference between Postgres.JS and the node-posgres (pg) packages seems that node-posgres is used a lot more

  • @eliuddyn
    @eliuddyn 4 หลายเดือนก่อน +1

    Amazing content 🔥🔥

  • @tushswe
    @tushswe 3 หลายเดือนก่อน

    Where are the compiled notes Kyle?

  • @ayushgogna9732
    @ayushgogna9732 3 หลายเดือนก่อน

    can i do nested inserts like prisma in drizzle if yes how ? like i want to create user with posts

  • @NathanielBabalola
    @NathanielBabalola 4 หลายเดือนก่อน +1

    I'm yet to adopt this as i heard they truncate tables a lot during migration. Until it gets better i don't think I'll.
    Laravel hardly truncates tables

  • @frontend_ko
    @frontend_ko 4 หลายเดือนก่อน

    Thanks for nice video

  • @harunjeylan9362
    @harunjeylan9362 4 หลายเดือนก่อน

    Thanks, bro, this is what I'm looking for.🙏

  • @anuvette
    @anuvette 4 หลายเดือนก่อน

    Please make an in-depth tutorial on tanstack router

  • @carterv.31
    @carterv.31 4 หลายเดือนก่อน

    Very nice video

  • @muhammadisa440
    @muhammadisa440 4 หลายเดือนก่อน

    Thanks Kyle, it helped me a lot!

  • @user-ru8hn9hb5c
    @user-ru8hn9hb5c 3 วันที่ผ่านมา

    If you are new to SQL, use Drizzle. If you know SQL already, use Prisma.

  • @nickwoodward819
    @nickwoodward819 2 หลายเดือนก่อน

    so wait, the 1:1 and 1:M references are the same?

  • @bm9code
    @bm9code หลายเดือนก่อน

    Please share your notes, that would be helpful

  • @gregwalton331
    @gregwalton331 4 หลายเดือนก่อน

    Great tutorial, thank you. but, I am getting this error TypeError: Cannot read properties of undefined (reading 'Symbol(drizzle:Columns)') when I am trying to insert to a table. The migrate works perfectly fine, so can connect to the db. Here is the code.
    import "dotenv/config"
    import { db } from "./drizzle/db"
    import { tBrand } from "./drizzle/schema"
    async function main() {
    await db.insert(tBrand).values({ name: 'Andrew'})
    }
    main()
    The db is a neon postgres db. thanks

  • @intune6
    @intune6 3 หลายเดือนก่อน

    I'm watching this tutorial and nothing works. in drizzle.config.ts db credentials connectionString not on type. driver is not assignable to type '"aws-data-api". aws-data-api is the only option I'm given for driver. What the hell is going on.

  • @zivtamary
    @zivtamary 4 หลายเดือนก่อน

    why do we need this prisma replacement though?

  • @imkir4n
    @imkir4n 4 หลายเดือนก่อน

    Wow i just completed watching prisma in 60mins

  • @eleah2665
    @eleah2665 3 หลายเดือนก่อน

    Is this code available somewhere?

  • @samwise8731
    @samwise8731 4 หลายเดือนก่อน +1

    Prisma's schema syntax is way superior to this. It also helps with relationships. Drizzle's schema files is a mess.

    • @M1a2n3o43
      @M1a2n3o43 4 หลายเดือนก่อน

      Prisma schemas are so easy to read and understand. The prisma extensions also formats them pretty neat 😂. A sql schema is easier to read than drizzle imo

    • @das_daily_
      @das_daily_ 4 หลายเดือนก่อน

      yeah but it so slow

  • @YasharthSinghParihar-kj3mu
    @YasharthSinghParihar-kj3mu 3 หลายเดือนก่อน

    Nice

  • @4fkd00m
    @4fkd00m หลายเดือนก่อน

    This is killing me Internal error: TypeError: Cannot read properties of undefined (reading 'referencedTable')

    • @4fkd00m
      @4fkd00m หลายเดือนก่อน

      I had divided everything into three files, and that's why it doesn't work. If I put everything in a single schema file, it works perfectly.

  • @darkmift
    @darkmift 4 หลายเดือนก่อน

    is there a repo of your work here?

  • @awwwkshay
    @awwwkshay 20 วันที่ผ่านมา

    ORM = Object Relational Mapper

  • @MiguelMartinez-ui8nl
    @MiguelMartinez-ui8nl หลายเดือนก่อน

    interesting, ts tells me "pg" is not a possible value for "driver"

    • @ognjenmarceta
      @ognjenmarceta หลายเดือนก่อน +1

      It seems that they changed the configuration object. This is from the official documentation:
      import { defineConfig } from 'drizzle-kit'
      export default defineConfig({
      schema: "./schema.ts",
      dialect: 'postgresql',
      dbCredentials: {
      url: process.env.DB_URL,
      },
      verbose: true,
      strict: true,
      })

    • @MiguelMartinez-ui8nl
      @MiguelMartinez-ui8nl หลายเดือนก่อน

      @@ognjenmarceta yess thats what I was using now, thanks for the answer tho :D

  • @BamboodjaOfficial
    @BamboodjaOfficial 4 หลายเดือนก่อน

    Eloquent -> Drizzle

  • @nicko9958
    @nicko9958 หลายเดือนก่อน +7

    3 months later and the video is already outdated...

    • @malcolmn.5222
      @malcolmn.5222 หลายเดือนก่อน

      The same general principles still apply. Grow the fck up and stop crying.

    • @superhumandose
      @superhumandose 21 วันที่ผ่านมา

      @@malcolmn.5222 Fk off, guy's just sharing accurate info. Yes, the video is outdated. That is helpful to know.

    • @harizrafie2945
      @harizrafie2945 9 วันที่ผ่านมา

      Im late, but why is it outdated?

  • @chaitanyasharma6270
    @chaitanyasharma6270 4 หลายเดือนก่อน

    I love you

  • @montebont
    @montebont 4 หลายเดือนก่อน

    OMG...how many wrappers do you need to simply access a SQL database ? These are solutions looking for a problem that does not exist :-(
    In my use cases I just load a million data records into my app. The browser and OS can handle that...

  • @boltyk1
    @boltyk1 4 หลายเดือนก่อน

    drizzle drizzle :)

  • @codie1372
    @codie1372 3 หลายเดือนก่อน

    well it get complicated when you have a big database with alot of tables

  • @parikshitgupta343
    @parikshitgupta343 10 วันที่ผ่านมา

    🚨 🚨🚨🚨🚨🚨🚨🚨 BREAKING CHANGES 🚨🚨🚨🚨🚨🚨🚨🚨BREAKING CHANGES 🚨🚨🚨🚨🚨🚨🚨🚨BREAKING CHANGES 🚨🚨🚨🚨🚨🚨🚨🚨

  • @webminsk7884
    @webminsk7884 3 หลายเดือนก่อน

    Пушка!

  • @imshivampancholi
    @imshivampancholi 4 หลายเดือนก่อน

    First View🤩

  • @smartdriver2990
    @smartdriver2990 25 วันที่ผ่านมา

    f

  • @Nodsaibot
    @Nodsaibot 4 หลายเดือนก่อน +3

    just use firebase lol

    • @frstylol
      @frstylol หลายเดือนก่อน

      skill issue ?

  • @editedbycomradezeusman1642
    @editedbycomradezeusman1642 4 หลายเดือนก่อน

    Kyle you were my inspiration for starting web dev, kyle please i need help debugging an error in my server code, i am using nodejs, please i need help

  • @jellyfish1772
    @jellyfish1772 4 หลายเดือนก่อน

    Give us YOUR note😒

  • @a1x5h04
    @a1x5h04 4 หลายเดือนก่อน

    Prisma is Good but Drizzle is Better

  • @SSPARTHIBAN-bq3hc
    @SSPARTHIBAN-bq3hc 4 หลายเดือนก่อน

    Devin AI can replace frontend developer anybody reply me pls

  • @ayushgogna9732
    @ayushgogna9732 3 หลายเดือนก่อน

    (mentioned the code missing below) I think you are missing a step when you set relation between many to many relation fir you have to set many(PostCategory) then you have to create another relation which is one(Post) one(Category) with reference and fieldId to connect each other with PostCategoryTable.
    I am talking about this step you are missing
    export const usersToGroupsRelations = relations(postToCategory, ({ one }) => ({
    group: one(PostTable, {
    fields: [postToCategory.postId],
    references: [PostTable.id],
    }),
    user: one(CategoryTable, {
    fields: [postToCategory.categoryId],
    references: [CategoryTable.id],
    }),
    }));

  • @Tanner-cz4bd
    @Tanner-cz4bd 4 หลายเดือนก่อน +3

    but you just made an ecommerce tutorial with next.js/ prisma?!!
    can we get something Auth + crud + nextjs?

    • @TheRicoco2011
      @TheRicoco2011 4 หลายเดือนก่อน +3

      Nextjs + Auth + CRUD with Drizzle and how to host it on the cloud 🎉

    • @AdolfRizzler41
      @AdolfRizzler41 4 หลายเดือนก่อน

      Drizzle , prisma what next

  • @parikshitgupta343
    @parikshitgupta343 10 วันที่ผ่านมา +1

    New drizzle.config.ts file -
    import { config } from 'dotenv';
    import { defineConfig } from 'drizzle-kit';
    config({ path: '.env.local' });
    export default defineConfig({
    schema: './src/drizzle/schema.ts',
    out: './src/drizzle/migrations',
    dialect: 'postgresql',
    dbCredentials: {
    url: process.env.POSTGRES_URL!,
    },
    verbose: true,
    strict: true,
    });

    • @sarthaksanjay4525
      @sarthaksanjay4525 8 วันที่ผ่านมา

      can you give me link of your github repo where you have implemented this code , I am facing issue generating migration files - thanks

  • @AdolfRizzler41
    @AdolfRizzler41 4 หลายเดือนก่อน +2

    I didn't know sql hate is this strong💀

  • @BigFattyNat
    @BigFattyNat 4 หลายเดือนก่อน +1

    u know what else allows me to avoid writing raw sql queries? fookin any LLM bro, u said the query and it gives u the sql. fk these orms. raw sql is what runs im the background either way