The dialect for postgres get a wrong col name, it case the schema sync fail to work #1292
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1292
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I found 2 problem atleast.
The first :
the primary key indexName mybe named "primary", not always has stuffix "_pKey". I suggest add "|| strings.Contains(indexName", "primary" )" condition to handle this satuation.
The Second:
parse indexdef string to get col name, it just the string like this
but indexdef string maybe like this
in this situation, the col name will be parse to "id ASC", not "id". it case schema sync get the wrong col name, then sync will be failed. I suggest to alter the code to compatible with this situation.
Normally, the dialect for postgres work good. these problems beacuse of I used the CockroachDB. they said compatible with Postgres protocol, but a little different. I have test the xorm work with CockroachDB. It work well, except schema sync. the cockroach have a lot of users, I hope the postgres dialect compatible with CockroachDB. Please handle this, like the GORM,provide the compatibility support. thinks.