-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Cannot create compound keys in table constraint with :unique #453
Comments
Does this help? #445 Otherwise I'll look at this when I get back from vacation (next week). |
I'm adding this example to the docs: user=> (-> {:create-table [:bar]
:with-columns
[[:a :integer]
[:b :integer]
[[:constraint :foo_natural_key] :unique [:composite :a :b]]]}
(sql/format))
["CREATE TABLE bar (a INTEGER, b INTEGER, CONSTRAINT foo_natural_key UNIQUE (a, b))"] |
Sorry for the delay in replying. On the face of it, the docs look good. I'll let you know if I have any issues using them to adjust my schemas. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to create a unique constraint on a table across multiple columns by doing something like the following
I'd like to write the query without having to invoke the
:raw
operator. I've tried[:unique :a :b]
,[:unique [:a :b]]
, and so on, but nothing seems to generate the correct code. Is there something I'm missing or is it a limitation of Honey?The text was updated successfully, but these errors were encountered: