obfuscurity / descartes

Introspective dashboard for Graphite
MIT License
502 stars 65 forks source link

support mysql #163

Open josephholsten opened 10 years ago

josephholsten commented 10 years ago

mysql doesn't support the constraint in https://github.com/obfuscurity/descartes/blob/master/lib/descartes/migrations/006_AddGraphDashboardRelationConstraints.rb.

Any thoughts on how I can add this constraint to the app code so we can keep the feature and support mysql as well?

damm commented 10 years ago

:o descartes supports mysql? I didn't see that.

obfuscurity commented 10 years ago

What about it doesn't work? MySQL supports multi-column unique constraints afaik.

damm commented 10 years ago

Well the Sequel gem should support mysql as well.

obfuscurity commented 10 years ago

Yeah, it does. That's why we need more info.

josephholsten commented 10 years ago

Sequel works just fine, but MySQL doesn't like the index name that sequel uses to implement this constraint.

Further investigation showed me that MySQL supports compound unique constraints, so it's possible that this is a bug in sequel or that we're not passing enough info for it to choose a reasonable index name.

I'll dig in further.

On Jul 18, 2014, at 5:25, Jason Dixon notifications@github.com wrote:

Yeah, it does. That's why we need more info.

— Reply to this email directly or view it on GitHub.