Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centralise and expose configurable db views folder #380

Open
hlascelles opened this issue Jan 24, 2023 · 5 comments
Open

Centralise and expose configurable db views folder #380

hlascelles opened this issue Jan 24, 2023 · 5 comments

Comments

@hlascelles
Copy link

We run an app that needs two migrations folders (one each for two very different DB setups).

So our project folder looks like:

app
db
  migrate
  views
db_2
  migrate
  views
...

We'd like to use scenic for the other database too.

We've implemented it, and everything works great except the path to the views dir.

That is described concretely in two places in scenic:

@views_directory_path ||= Rails.root.join("db", "views")

File.join("db", "views", filename)

Would you be open to a PR that centralises the reference to that path, and exposes it as a configurable value?

Thanks!

@gap777
Copy link

gap777 commented Mar 9, 2023

We also have this need, as we're building a modular monolith via packwerk, and each pack has it's own db/migrate directory. Can you reply to @hlascelles as to whether you would consider such a PR?

@derekprior what about PR #287?

That would address the issue here.

@hlascelles
Copy link
Author

@derekprior what do you think of this proposal?

@hlascelles
Copy link
Author

Would you be open to a PR for it?

@gap777
Copy link

gap777 commented Apr 10, 2024

@hlascelles would you open a PR? I'd like to see how you solved it. We may have to just fork this repo if its no longer maintained.

@derekprior
Copy link
Contributor

@gap777: This library is actively, if sporadically, maintained by @calebhearth and I. We take a conservative approach to its maintenance, which has served us very well for over 8 years and more 23 million downloads. We implement features and fix bugs that we have confidence and familiarity with. We've occasionally strayed from this strategy and have often regretted that decision as we're left to support issues that arise in functionality we aren't experienced with.

A perusal of the issue tracker will show that there are some themes to some of the remaining issues which are helpfully denoted with labels. It's not that we don't want to fix these issues, it's that we want to fix them in a way we feel confident we can support for another 8 years.

In the case of this issue with view-paths , I'm hesitant to accept any pull request until we have #402 sorted. I do not want to implement a fix here only to discover it conflicts with, is superseded by, or diverges from patterns present in the official multi database support from Rails. I understand you may not want to wait for us to figure out #402. If you peruse the label I linked earlier, you'll see a couple of PRs open with various implementations that may suit your needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants