Skip to content

Conversation

@nvanoorschot
Copy link
Contributor

I introduced a primary key into my schema with a character varying as datatype but still id as it's name. In order for this to work I had to disable the ignore_ids functionality, which is a shame since that functionality does a good job of cleaning up de sql file.

In order to make it work I separated the logic that handles primary keys from the logic that handles sequences. This allows to have a primary key with any datatype and any column name and still does the cleanup correctly. As a side benefit it now recognizes the primary key of the ar_internal_metadata table, which is named key instead of id.

There's still room for improvement on the sequences bit but that falls outside the scope of this PR.

@andyatkinson
Copy link
Collaborator

@nvanoorschot Is this still a gem you use, and is this PR something you're still interested in? I'm helping maintain the gem now so doing some housekeeping. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants