Skip to content
DevMeme
6600 of 7590
Databases Post #7233 · source on Telegram

Junior Dev Brags About 1000 Lines of Prisma Schema in 3 Hours

Description

A quote tweet from Shayan (@ImSh4yy) saying 'POV: you're about to find out why senior devs spend weeks/months on database design.' The quoted tweet from John doe (@sachindev69, Oct 4) reads: 'Today I wrote 1000+ lines of code using @prisma. And literally it takes only 3hr to design the database. Now I am exhausted and I think I deserve some goodies.' Below is a photo of a screen showing Prisma schema code around line 1047-1072, featuring models like 'Applications' with fields (id, status, User, userId), an enum 'applicationStatu' (truncated name, missing the 's'), and a 'Hackathons' model with fields (id, title, tagLine, logo, banner). The code shows classic junior mistakes: the enum name is misspelled as 'applicationStatu' instead of 'applicationStatus', the schema structure suggests poor normalization, and the pride in LOC count reveals the misconception that more code = more productivity

Comments

24
Anonymous ★ Top Pick 1000+ lines of Prisma schema in 3 hours is impressive -- that's roughly the same speed at which you'll be rewriting it once you discover what database normalization is
  1. Anonymous ★ Top Pick

    1000+ lines of Prisma schema in 3 hours is impressive -- that's roughly the same speed at which you'll be rewriting it once you discover what database normalization is

  2. Anonymous

    Scaffolding a schema in three hours is easy - just reserve the rest of the quarter for the migration that fixes “applicationStatu” after prod dashboards are already hard-coded to it

  3. Anonymous

    Nothing says 'production-ready schema' quite like optional User relations and string fields for everything - can't wait for the sequel where they discover why we have foreign key constraints, indexes, and why 'logo' probably shouldn't be a String field in the database

  4. Anonymous

    Ah yes, the classic '3 hours of database design' followed by 3 months of migration hell when you realize your optional User relationship and String-based IDs don't scale, your enum can't be extended without a migration, and you've accidentally created a many-to-many relationship that should have been many-to-one. Senior devs don't spend weeks on database design because they're slow - they're preemptively debugging the production incidents that junior devs schedule for 2 AM on a Saturday

  5. Anonymous

    John's schema proves every user-team relation spawns three junction tables - like a fractal of indirection no query planner can love

  6. Anonymous

    Anyone can ship a 3‑hour Prisma schema; seniors spend three weeks deciding cardinality and constraints because backfilling a misspelled enum on 200M rows teaches you CAP: Can’t Alter in Production

  7. Anonymous

    Designing the schema in 3 hours just means your next 3 quarters are spent writing zero‑downtime migrations to fix pluralized models, optional FKs, and an enum that will inevitably need a fourth state during Black Friday

  8. @ner0xt 10mo

    application statue

    1. @chupasaurus 10mo

      It's statu, plural form of stat (according to slop)

  9. @SaintScraTchY 10mo

    YES we Absolutely NEED UUID AS Primary KEY

    1. @ner0xt 10mo

      jokes aside its has its own advantages

      1. @SaintScraTchY 10mo

        aside from GIGA CORP like system its best used in loggings,traces it can act as timestamp and UUID what you use it for?

        1. @kostikdodik 10mo

          any customizable parameter system would run over bigint quite fast while being run in relatively active prod. or any other case of m-m relation table between 2 big tables that could be autogenerated

        2. @theu_u 10mo

          UUIDs are inevetible in distributed systems, as you don't have single issuing service for incremental bigint

  10. @azizhakberdiev 10mo

    good enough for a first prototype

  11. @philipp_2nd 10mo

    Fuck prisma

    1. @roninreilly 10mo

      all my homies use drizzle

  12. @Vlasoov 10mo

    That one is REJECTED one I guess

  13. @Vlasoov 10mo

    Oops, ment for the comment above

  14. @realazat 10mo

    humor brigade pls

    1. @beton_kruglosu_totchno 10mo

      the implication is that AI-generated code will suck massive cock "POV" means it will be John who finds it out

  15. @kddpq 10mo

    literally just learn SQL and it looks exactly the same

    1. @deadgnom32 10mo

      looks even better

  16. @tema3210 10mo

    Why prisma and not atlas?

Use J and K for navigation