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

print-schema vs. compound primary keys #790

Closed
killercup opened this Issue Mar 9, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@killercup
Member

killercup commented Mar 9, 2017

Just saw this:

table! {
    badges (crate_id,
    badge_type) {
        crate_id -> Int4,
        badge_type -> Varchar,
        attributes -> Jsonb,
    }
}

The second like should be badges (crate_id, badge_type) {.

Looks like our pretty printing code needs a few more test cases and one more special case.

@sgrif

This comment has been minimized.

Member

sgrif commented Mar 9, 2017

Not sure if I have an open issue for this or not, but it also generates incorrect code for custom schemas.

Eijebong added a commit to Eijebong/diesel that referenced this issue Apr 21, 2017

Fix the pretty_printing for print_schema.
Do not insert a newline after a comma if we're between parenthesis.

Fixes diesel-rs#790

Eijebong added a commit to Eijebong/diesel that referenced this issue Apr 21, 2017

Fix the pretty_printing for print_schema.
Do not insert a newline after a comma if we're between parenthesis.

Fixes diesel-rs#790
@Eijebong

This comment has been minimized.

Member

Eijebong commented Apr 21, 2017

@sgrif Are you talking about the spaces around the dot ?

Eijebong added a commit to Eijebong/diesel that referenced this issue Apr 21, 2017

Fix the pretty_printing for print_schema.
Do not insert a newline after a comma if we're between parenthesis.

Fixes diesel-rs#790

Eijebong added a commit to Eijebong/diesel that referenced this issue Apr 21, 2017

Fix the pretty_printing for print_schema.
Do not insert a newline after a comma if we're between parenthesis.

Fixes diesel-rs#790
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment