Comments (12)
from scenic.
If anyone falls on this issue, there are quite a few community made mysql adapters for scenic, the most downloaded one being this one.
Maybe it would be nice to add a section to the README with the community adapters, like omniauth has, so people get to know they exist.
I actually ended up making my own adapter as I did not know one had already been made :)
from scenic.
This is definitely something we intended for the community to provide, though we expect that to be in the form of an adapter gem, scenic-mysql
.
We've found that the ability to plug and play adapters is important but that unless we are frequent users of those adapters, they tend to become buggy over time. That said, I'm interested to see how this goes and how the testing story would go (It'd be great to have a shared set of tests where/if appropriate).
from scenic.
And to be fair, I could see scenic-postgres
itself becoming a separate gem and you simply add the necessary adatper gem to your Gemfile to use scenic
. We're just not stable enough to pursue that right now.
from scenic.
Agreed. At this point all you need to do is provide an adapter and override this line: https://github.com/thoughtbot/scenic/blob/fcfcdbb80560c49cbe415ba675b7fbc9cdef34cc/lib/scenic.rb#L18
from scenic.
I understand and agree with modulizing per db adapter, but similar to AR, I would suggest that modules should exist within the gem. What are the Pro/Cons you're looking at?
I'm looking at using scenic for a non-trivial production app that's on Rails 3.2.x, though we'll be upgrading soon. It's scenic or something else to manage a suite of coming views.
I'm up for working through the kinks and putting in the effort to thoughtfully add to current conventions. Throwing half hearted code towards the project would be unkind on my part :)
from scenic.
He's a working set of mysql2
changes.
I'll touch base again once I get testing figured out.
from scenic.
It's not at all that the code would be of questionable quality and more a
concern over maintenance. When we make breaking changes to scenic we are,
perhaps, not best positioned to asses the impact on adapters we don't use
ourselves. When you move on to another project the code languishes and the
support burden shifts to us.
Additionally, there are versioning issues that arise. A breaking change to
the MySQL adapter would mean bumping the major scenic version, which means
everyone has to asses the appropriateness of that version - even those that
don't use that adapter.
I'm trying to keep an open mind but both @calebthompson and I have seen
this go poorly on our other projects.
On Wednesday, February 25, 2015, weston platter [email protected]
wrote:
I understand and agree with modulizing per db adapter, but similar to AR,
I would suggest that modules should exist within the gem. What are the
Pro/Cons you're looking at?I'm looking at using scenic for a non-trivial production app that's on
Rails 3.2.x, though we'll be upgrading soon. It's scenic or something else
to manage a suite of coming views.I'm up for working through the kinks and putting in the effort to
thoughtfully add to current conventions. Throwing half hearted code towards
the project would be unkind on my part :)β
Reply to this email directly or view it on GitHub
#70 (comment).
from scenic.
Do you have a pattern for adapter-izing different dbs? I got mysql working within this repo, but wanted to push the MySQL logic into a separate gem/repo. If not, I'll hack something together.
from scenic.
As long as your gem defines a class Scenic::Adapters::Mysql which supports the same contract as https://github.com/thoughtbot/scenic/blob/master/lib/scenic/adapters/postgres.rb and overrides https://github.com/thoughtbot/scenic/blob/master/lib/scenic.rb#L17, it should work fine. Thatβs basically what we had in mind for adapters.
As far as testing, I'm not really sure yet. You can take a look at the Postgres adapter specs to get an idea. I'd also ensure that Scenic.database is what you expect and maybe have a high level test that just makes sure Mysql is actually being interacted with when you migrate.
from scenic.
There now exists a configuration point for the adapter. See Scenic::Configuration.
from scenic.
I second @rennanoliveira. The README for Scenic says it will link to any mysql adapters made available but hasn't done so.
https://github.com/thoughtbot/scenic/blob/master/README.md#faqs
scenic-mysql seems to be newer(ish)?
from scenic.
Related Issues (20)
- Getting "Invalid single-table inheritance type" error when using a model based on a view HOT 2
- Sequences HOT 1
- Materialization is dumped to structure.rb incorrectly HOT 2
- Is it possible to make it work with Sinatra or any other Rack app? HOT 2
- schema.rb diff after running migrations HOT 2
- How to persist `'now'::timestamp` / prevent being computed with `rails db:migrate` HOT 3
- ERB.new warnings despite #360 HOT 2
- add a support for pg_ivm ? HOT 1
- Centralise and expose configurable db views folder HOT 5
- make update_view for materialized views create less downtime HOT 1
- Add support for a cache_key and/or cache_version HOT 1
- Ignore scripts outside `db/views` folder HOT 1
- Cannot replace materialized views HOT 2
- Old migration name affecting new view name HOT 10
- cannot rollback drop_view HOT 3
- Multiple databases, main DB is assumed even though it's specified in the model. Is there a better way? HOT 1
- Feature Request: Support Generated Columns HOT 1
- Support Rails' multiple database feature HOT 1
- Default to latest view definition for create_view HOT 1
- Cutting new release? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scenic.