Ensure migration_timestamp is a varchar #44
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
error_tracker_meta
table defines bothkey
andvalue
asvarchar(255)
. When inserting themigration_timestamp
we were sending an integer, which was implicitly converted to a varchar in PostgreSQL but not in other PostgreSQL-compatible databases such as CockroachDB.This change ensures that the
migration_timestamp
is sent to the DB with the right type and doesn't depend on implicit type conversions.Fixes #43
To test this I set up a Cockroach DB using Docker and then connected my local ErrorTracker instance to it. It failed right away when running the migrations.