Giter Club home page Giter Club logo

Comments (6)

pauljamescleary avatar pauljamescleary commented on May 17, 2024 1

@daddykotex I mean I ran sbt flywayMigrate and tried to pass in the command line arguments to override the jdbc url, user, password and such and it failed. It wound up putting the schema_version table in my local H2 instance (that is setup in the build.sbt), and NOT in the target database.

I kinda gave up and didn't look much into why to be honest. It should be fixed, at least I should have created an issue.

But for me, it was easy enough to run flyway myself as the api is easy to do.

from scala-pet-store.

pauljamescleary avatar pauljamescleary commented on May 17, 2024

Thanks @RobertLemmens! Always looking to take contributions if you have any ideas :)

I have a decent roadmap planned, including a vue js front end and validation. I don't want to make it too big, just big enough.

Also, I maybe inspired to create a free monad version, as well as an eff version since I have interest there. Those would be easier to complete once the initial version is complete.

from scala-pet-store.

daddykotex avatar daddykotex commented on May 17, 2024

Same thing for me, I'm writing an app myself using almost the same stack, and looking at your code is giving me lots of hints! Thanks! 😃

I saw in one of the file that you'd like to have flyway migrations to setup the database. I did it for postgres ( I know you use H2 ) if you need an example, here's the commit where I introduced it: daddykotex/subs@836d7ce

from scala-pet-store.

pauljamescleary avatar pauljamescleary commented on May 17, 2024

@daddykotex Thanks! I use flyway migrations regularly (I will create an Issue for that work here). Will checkout what you have there

from scala-pet-store.

pauljamescleary avatar pauljamescleary commented on May 17, 2024

@daddykotex The one issue I found was that the sbt plugin just doesn't work when deploying to a real environment. I had to create a little wrapper main around flyway to run migrations.

Not sure if you had better success with running it in production.

There was an issue I hit recently where the build.sbt conflicted with the jvm overrides. Something like the flyway url or flyway user was different between where the SCHEMA_VERSION table is kept and the schema that you are managing is kept. They should be in the same database but they somehow got messed up with sbt.

from scala-pet-store.

daddykotex avatar daddykotex commented on May 17, 2024

The one issue I found was that the sbt plugin just doesn't work when deploying to a real environment.

Do you mean that when you deploy, you usually ship a jar(or docker) or something that can be ran and thus you don't have sbt or the whole project source (including migrations) to run the flywayMigrate command.

I can't say I had much more success in production because I did not do it, but I think that if I was to use it as part of a deployment process, I would trigger the sbt execution via jenkins (or any other CI I'll use).

Anyhow, I'll let you know how it goes 👍

from scala-pet-store.

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.