slingdata-io / sling-cli

Sling is a CLI tool that extracts data from a source storage/database and loads it in a target storage/database.
https://docs.slingdata.io
GNU General Public License v3.0
446 stars 34 forks source link

MySQL automatic handling of unsigned fields #433

Closed ravenscroftj closed 2 weeks ago

ravenscroftj commented 2 weeks ago

Issue Description

2024-11-05 16:55:02 DBG using text since type 'unsigned int' not mapped for col 'id'
2024-11-05 16:55:02 DBG using text since type 'unsigned int' not mapped for col 'user_id'
2024-11-05 16:55:02 DBG using text since type 'unsigned int' not mapped for col 'company_id'
2024-11-05 16:55:02 DBG using text since type 'unsigned int' not mapped for col 'created_by_user'

I would expect that sling could either support unsigned data types or a simpler solution would be to throw away the "unsigned " prefix and just map int to integer.

I noticed that the NativeTypeToGeneral function has some code for dealing with specific databases and cleaning up non standard data types so perhaps an additional check could be added here for MySQL? I'm happy to submit a PR for this if that solution sounds ok.

Version: 1.2.22

Linux + Mac

flarco commented 2 weeks ago

Done, added in latest dev build: https://github.com/slingdata-io/sling-cli?tab=readme-ov-file#automated-dev-builds Closing.

ravenscroftj commented 1 week ago

Sorry for slow follow up - this has worked, thank you very much!