descartes icon indicating copy to clipboard operation
descartes copied to clipboard

support mysql

Open josephholsten opened this issue 10 years ago • 5 comments

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?

josephholsten avatar Jul 18 '14 00:07 josephholsten

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

damm avatar Jul 18 '14 02:07 damm

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

obfuscurity avatar Jul 18 '14 05:07 obfuscurity

Well the Sequel gem should support mysql as well.

damm avatar Jul 18 '14 05:07 damm

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

obfuscurity avatar Jul 18 '14 05:07 obfuscurity

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 [email protected] wrote:

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

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

josephholsten avatar Jul 18 '14 15:07 josephholsten