GithubHelp home page GithubHelp logo

Comments (10)

kentcdodds avatar kentcdodds commented on April 19, 2024 1

The migrations run via the start.sh script:

npx prisma migrate deploy
which is configured to run in the fly.toml:
cmd = "start.sh"

So they should be all ready to go for you to run those automatically. If you have a repo I can look at I can help more.

from indie-stack.

samselikoff avatar samselikoff commented on April 19, 2024 1

It was my fault, I never generated a migration! New to Prisma :)

Quick question while I have you, do you normally do the prisma db push then prisma migrate dev workflow? It's but didn't realize it always blows away my local db. (As opposed to just changing the schema then running prisma migrate dev).

Thanks for the help!

from indie-stack.

samselikoff avatar samselikoff commented on April 19, 2024

Just invited you to the repo, please let me know if there's anything else I can do to make it easier for you to diagnose. This is my first time using Prisma so maybe I'm missing something - but locally everything works.

This is the error I'm seeing:

image

from indie-stack.

samselikoff avatar samselikoff commented on April 19, 2024

Happy to start a new app from scratch too if that'd be easier!

from indie-stack.

kentcdodds avatar kentcdodds commented on April 19, 2024

I looked into this a bit and didn't see anything out of order. I suggest you start a thread on the fly support community (give them your app name and they can look into it) or try to change the app name, run through the setup steps again with the new app name, and try to deploy there. It could be that something went wrong on Fly's end (that's the most likely case I think).

FWIW, the Fly community is normally pretty quick to respond to new threads.

Unfortunately, there's nothing actionable on our end here in the stack, so I'm going to close this issue. But if anything comes up that we can do to improve the stack (even a note in the README or something) then let me know. In fact, I'll probably add a note about the fly community right now. Thanks!

from indie-stack.

kentcdodds avatar kentcdodds commented on April 19, 2024

Glad you got it working! 👏👏

I'm still figuring out my preferred workflow with changing the schema 😅 I typically execute a bunch of commands until I'm happy with the result 🙃 I don't mind blowing away my local db. If there's anything I want sticking around I just update the seed script :)

from indie-stack.

ajenkins avatar ajenkins commented on April 19, 2024

I had the exact same issue as @samselikoff (thanks for posting). Maybe this is my fault, but I only read the Developer Blog tutorial and I skipped the Jokes App tutorial. The Developer Blog tutorial doesn't mention anything about needing to generate migrations. I'm also new to Prisma and I thought that npx prisma db push was migrating my database.

Looking at the docs again, I now see that the migration process is clearly explained here: https://remix.run/docs/en/v1/tutorials/jokes#deployment . But I never made it that far in the docs – I felt like I had a good enough understanding of the framework from the first tutorial.

My two cents is that it would be helpful to add a warning to the Developer Blog tutorial calling out that npx prisma db push doesn't actually generate migrations and you'll need to run npx prisma migrate dev and commit the generated migration file before deploying to Fly.io.

from indie-stack.

kentcdodds avatar kentcdodds commented on April 19, 2024

Agreed! I merged a PR yesterday that added a note about that to the blog tutorial 😁

from indie-stack.

ajenkins avatar ajenkins commented on April 19, 2024

Awesome, thanks Kent! Remix is awesome by the way. Thanks for the great work.

from indie-stack.

kentcdodds avatar kentcdodds commented on April 19, 2024

Thank you!

from indie-stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.