ward-wise / ward-wise-front-end

6 stars 4 forks source link

36 add and configure prisma orm #38

Closed NoahAppelbaum closed 8 months ago

NoahAppelbaum commented 8 months ago

Kind-of a mega-PR here, sorry!

This PR encompasses:

Instructions for setting up the db and the initial Prisma migration can be found in the ReadMe. (You will have to install new dependencies with this PR.) I will confer with John Ortega about containerizing this for streamlining the dev environment and setup, pending approval of this implementation of Prisma/Postgres. In the meantime, Slack me if you are running into any issues.

smacmullan commented 8 months ago

It's working on my end. When I have the time tomorrow, I'm going to add info to the readme. PATH variables didn't install by default for me (running Windows) and I couldn't get my Windows username to take, so there was few extra steps. To setup, I should have run both the migrate and db:seed scripts? Readme only mentioned migrate.

As far as Docker goes, it's occurred to me that once we using AWS we can just host a dev Postgres server there so people can skip the Postegres installation step. That's probably the easiest option for newcomers. We can have a Docker setup in addition to that for anybody wanting to do database work.

NoahAppelbaum commented 8 months ago

Glad to hear it’s working. The seed script should get called automatically by migrate, but it’s possible it needs the init flag on that script (I know it gets called automatically on migrate:reset). But yeah, otherwise totally with you— having dev/testing db’s on AWS makes sense, and otherwise docker should take care of local setup for anyone who needs it. So, however the ReadMe is set up now is probably a stop-gap until then.

On Sat, Mar 16, 2024 at 3:28 PM Sean MacMullan @.***> wrote:

It's working on my end. When I have the time tomorrow, I'm going to add info to the readme. PATH variables didn't install by default for me (running Windows) and I couldn't get my Windows username to take, so there was few extra steps. To setup, I should have run both the migrate and db:seed scripts? Readme only mentioned migrate.

As far as Docker goes, it's occurred to me that once we using AWS we can just host a dev Postgres server there so people can skip the Postegres installation step. That's probably the easiest option for newcomers. We can have a Docker setup in addition to that for anybody wanting to do database work.

— Reply to this email directly, view it on GitHub https://github.com/ward-wise/ward-wise-front-end/pull/38#issuecomment-2002120474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJGWHKXX7AKJRP37KLKWG73YYSTQXAVCNFSM6AAAAABEYWVEROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGEZDANBXGQ . You are receiving this because you authored the thread.Message ID: @.***>

smacmullan commented 8 months ago

The migration script automatically did the seeding the second time I ran it. I added a note in case others have the same issue the first time. I also add the prisma migration folder to gitignore. I'm not sure if that's best practice or not.