Skip to content
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

Postgres translator does not allow "text" value to be set as a Primary key #64

Open
Tracked by #138
artemklimenko-dev opened this issue Nov 20, 2019 · 1 comment
Labels
enhancement New feature or request s: accepted was accepted or confirmed
Milestone

Comments

@artemklimenko-dev
Copy link

Postgres.go file has filtering which does not consider "text" value to be set as a primary key:

if c.Primary {
			switch c.ColType {
			case "string", "uuid": // make sure that we don't fall into default
			case "integer", "INT", "int":
				c.ColType = "SERIAL"
			case "bigint", "BIGINT":
				c.ColType = "BIGSERIAL"
			default:
				return "", fmt.Errorf("can not use %s as a primary key", c.ColType)
			}
		}
@sio4 sio4 added this to the v1 / cleanup milestone Sep 7, 2022
@sio4 sio4 added the s: triage label Sep 7, 2022
@sio4
Copy link
Member

sio4 commented Sep 15, 2022

Agree. no need to limit to only string, uuid, and integers.

I would like to postpone this issue to the next cycle with clean up related codes.

@sio4 sio4 added s: accepted was accepted or confirmed enhancement New feature or request and removed s: triage labels Sep 15, 2022
@sio4 sio4 modified the milestones: v1 / cleanup, v2 Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request s: accepted was accepted or confirmed
Projects
None yet
Development

No branches or pull requests

2 participants