Replies: 7 comments 5 replies
-
I get what you're saying. It can also allow room for other database layers, (ie; Fauna) But... I think removing the The little detail of not changing context from using the blitz cli to the prisma cli could mean a lot to some people. Would aliasing the prisma commands with blitz work? |
Beta Was this translation helpful? Give feedback.
-
I wasn't sure how to feel about it at first, because somewhat like the commenter above, I liked the idea of everything going through Blitz. But thinking about it some more, what I love about Blitz is that I have escape hatches everywhere, and how little "magic" there is. What's more, removing code always feels great. So I'm fully supportive of this move. My "attenuation" suggestion would be to have the relevant Prisma commands still featured in our documentation, if only to showcase a typical "Blitz DB development flow". |
Beta Was this translation helpful? Give feedback.
-
This makes a lot of sense and seems like a step in the right direction. Delegating specific tasks to tools that are purpose built for those tasks makes a lot of sense. It avoids any impedance mismatch/divergence between blitz and the underlying too while reducing the maintenance overhead on the blitz project/developers. |
Beta Was this translation helpful? Give feedback.
-
I agree completely:
|
Beta Was this translation helpful? Give feedback.
-
This seems like the right direction, because Prisma is only getting better with their CLI. What about if we added some shortcut commands for Prisma in |
Beta Was this translation helpful? Give feedback.
-
I think this move is in a good direction! For the blitz team to always write code to match how prisma would evolve I think would be a mammoth task of cat and mouse. Peeling off a layer over prisma commands would help developers - at least - while troubleshooting, as if they were anything like me, they would go "oh, i'm running a prisma command, perhaps I should look in there for help". There were times when I created an issue related to a Perhaps it would be OK to have additional handlers in future like what you mentioned about |
Beta Was this translation helpful? Give feedback.
-
As @jackbravo brought up, using prisma CLI directly doesn't work with the extra env files like I'm talking to Prisma about a solution for this, but in the meantime I think the best compromise is to add a |
Beta Was this translation helpful? Give feedback.
-
Prisma 2.13 introduces an overhauled migration system and new CLI commands.
That release is very welcome and is a great step towards Prisma meeting all production needs. With this release, their cli now has two db related commands,
prisma migrate
andprisma db
, both with various sub commands.However this causes a bit of an issue because we only have one command
blitz db
with various sub commands.After thinking about this for awhile, I'm convinced the best choice is to remove our
blitz db
command in favor of using the prisma cli directly. The prisma migrations are very powerful but also a bit complex, and they likely they will add new commands and features in the future.While I like the idea of having a blitz specific command for this, another big reason for adding it back at the start was a simple db migration required running three prisma commands. And Prisma didn't support db resets or db seeding.
But now the new cli only requires one command to migrate,
prisma migrate dev
, hasprisma migrate reset
, and they are adding a seed command soon. And for production, they have a specific command,prisma migrate deploy
.Another benefit from removing our command is reducing confusion about this integration and we can fully direct people to the prisma docs for this instead of having some of their docs in our docs.
The first step would be to remove all
blitz db
commands except forblitz db seed
. And then remove that once prisma adds their seed feature.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions