I am using a database (SingleStore) that can't support more than 6 milliseconds of precision when inserting timestamp values into its database. When migrations are executed, the insert into the tracking table fails. This PR introduces a limit precision option that rounds timestamps prior to their insertion into the migrations table.
I added test coverage on the sql-parse/config.go (both my functionality and previously existing).
If this is too specific, the limit precision option could be modified to provide a variable rounding option so that it's more adaptable/reusable to other scenarios (I know it's a bit niche atm)
I am using a database (SingleStore) that can't support more than 6 milliseconds of precision when inserting timestamp values into its database. When migrations are executed, the insert into the tracking table fails. This PR introduces a limit precision option that rounds timestamps prior to their insertion into the migrations table.
I added test coverage on the
sql-parse/config.go
(both my functionality and previously existing).If this is too specific, the limit precision option could be modified to provide a variable rounding option so that it's more adaptable/reusable to other scenarios (I know it's a bit niche atm)