Git Product home page Git Product logo

Comments (5)

Gazler avatar Gazler commented on July 17, 2024

I'm not sure on the exact use case here, but if you are using the application with a read-only repository, it means that the Ecto.Repo functions which write to the database are not defined.

There is still an expectation that your applications have the correct tables, otherwise it won't function.

https://hexdocs.pm/ecto/Ecto.Repo.html#module-read-only-repositories

from phoenix_ecto.

ValedL avatar ValedL commented on July 17, 2024

I'm experiencing the same issue.
The use case for my application for instance is that I connect to a production DB for analytics purposes where only 1 table is exposed in read only mode.

from phoenix_ecto.

Gazler avatar Gazler commented on July 17, 2024

@ValedL can you try removing the plug Phoenix.Ecto.CheckRepoStatus line in your endpoint.ex?

from phoenix_ecto.

ValedL avatar ValedL commented on July 17, 2024

@Gazler, removing it resolves the issue, thank you!
I do assume that there's some functionality in the plug that is helpful even if the DB is read only. Hope it will be possible to take the read_only: true into consideration.

from phoenix_ecto.

josevalim avatar josevalim commented on July 17, 2024

In this case the best is to remove the plug altogether. All the plug does is to create a database and making sure it has been migrated, and none of those actions are useful to you if you are connecting to an external read-only database.

from phoenix_ecto.

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.