RFC: Use provided type to create the dstTable rather than inferring from the SQL types #1872
No reviewers
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1872
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "zeripath/xorm:dump-infer-from-type"
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?
When using dumptables to convert between dialects if a struct is provided we should use it to generate the SQL types rather than infer them by mapping from the sql types.
Signed-off-by: Andrew Thornton art27@cantab.net
In Gitea we read of reports of bool types being misconverted when converting between different dialect types. This is because the original DumpTables code only inferred the new destination type from the source table's sql type - not the actual field type.
This PR suggests if there is a Type associated with the Table we generate the destination column types from that table Type.
failed
I've fixed the reflection bug - sorry about leaving this one to stew for a while.
Looks like this change requires that we set parseTime=true on the connection string for mysql.Is that acceptable @lunny ?I suspect that there will be other bugs that are hidden and underlying that also require this - but I'm not certain.OK I've managed to change to use a different thing.
MsSQL test failed.
grargh! this works locally!! - Oh it's MSSQL not MySQL. Let's try again!
OK so I think I need to move code from
session.Get()
into convert.go to make this possible. - Done@lunny looks like this may finally be passing tests!
I just need to check that the dumps it is producing actually are correct.
I think I've got it and that the times are now correct.
I guess it would be useful to try building a gitea with this to ensure that the dump is now completely correct there.
I'm not completely au fait with the magic of go.mod aliasing so if you're able to do that easily that would be best but I can try to figure it out if you want me to have a go.
Since all tests PASS, let's merge it and test it with Gitea.
This isn't correct - as the dump doesn't work on Gitea. Sorry - you beat me to it.
OK so the issue is convert.Conversion types are failing to be handled correctly.