Skip to content

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

Description

@artemklimenko-dev

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)
			}
		}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requests: acceptedwas accepted or confirmed

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions