Skip to content

Conversation

@crbelaus
Copy link
Contributor

The error_tracker_meta table defines both key and value as varchar(255). When inserting the migration_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.

@crbelaus crbelaus added the bug Something isn't working label Aug 13, 2024
@crbelaus crbelaus self-assigned this Aug 13, 2024
@crbelaus crbelaus requested a review from odarriba August 13, 2024 14:48
Copy link
Contributor

@odarriba odarriba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@crbelaus crbelaus merged commit 20f46b9 into main Aug 13, 2024
@crbelaus crbelaus deleted the migration-timestamp-varchar branch August 13, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migration error when using CockroachDB

3 participants