-
Notifications
You must be signed in to change notification settings - Fork 10
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
Exporting the views as part of schema.rb #7
Comments
Currently I've no idea of how to do it. If you have any documentation, I would look forward to it. However, doesn't it cause problem in case of generation from schema via |
@anykeyh - imo, since your plugin knows about the sql files, can you not inject the contents of the file within a |
the whole reason I am looking at this gem is because rails does not support view creations, and thus can't have them created via the schema.rb file. the alternative, is to dump your DB into a structure.sql file instead, via a config option I like the idea of using a separate rake task to create those when needed.
|
I think |
i found a gem that does it, and that's what I will use |
thanks @mathieujobin - i might also switch over if the transition is palatable. |
Hello ! Scenic is indeed doing this. It acts differently from this gems as it manages views through migration, which I would argue is not want I wanted to do here (to much hassle in my opinion, as views are read only!). It handles also materialized views, something which I will never do. In my case, we use different set of views, which are connected through each other. Having directive to handle the creation process was a must have in my current projects. Due to lack of activities here, this gem is not so well maintained, which is something which can change in the futur if I see a real need. Some good features we built will be merged also here soon, noticeably the ParametrableView system we built, which allow you to use view object with custom filters in your query and improve drastically the performance for view projection on big set of data ( no more CTE scan / view seq scan ! ). Feel free to test both and chose wisely |
Is it possible for the schema export to also dump the views into the
db/schema.rb
file?imo, that would be beneficial for anyone who uses this gem - also useful (imo) when using schemaSpy to generate db schema diagrams.
The text was updated successfully, but these errors were encountered: