Skip to content

fixes #104: fixes duplicate fields issue and adds support for compound primary keys#118

Open
tomjoro wants to merge 1 commit intojhartwell:masterfrom
tomjoro:fix-104-duplicates
Open

fixes #104: fixes duplicate fields issue and adds support for compound primary keys#118
tomjoro wants to merge 1 commit intojhartwell:masterfrom
tomjoro:fix-104-duplicates

Conversation

@tomjoro
Copy link
Copy Markdown

@tomjoro tomjoro commented Aug 13, 2021

fixes #104

  • Add support for composite primary keys
  • Fixes bug where repeated keys in indexes generate duplicate fields.

Composite primary keys are supported by generated multiple true primary_key fields according to ecto specifications.

I also changed code so it only emits primary_key when it is true. This makes it much more readable.

This fix only affects Postgres.

@tomjoro tomjoro changed the title fixes 104: duplicate fields and adds support for compound primary keys fixes #104: duplicate fields and adds support for compound primary keys Aug 13, 2021
@tomjoro tomjoro changed the title fixes #104: duplicate fields and adds support for compound primary keys fixes #104: fixes duplicate fields issue and adds support for compound primary keys Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unique contraints cause duplicate fields when using postgres

1 participant