Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure migration_timestamp is a varchar #44

Merged
merged 1 commit into from
Aug 13, 2024

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
3 checks passed
@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
2 participants