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

for table migrations, column version should be bigint: error: pq: value "20240918085430" is out of range for type integer #1168

Open
erikschul opened this issue Sep 18, 2024 · 0 comments

Comments

@erikschul
Copy link

erikschul commented Sep 18, 2024

Describe the Bug
In this guide it is stated that

Versions of migrations may be represented as any 64 bit unsigned integer.

When running migrate on an empty database, it creates table migrations.
On YugabyteDB, the column version defaults to int4 when it should be int8 (or just bigint).

This causes the following error when running migrate:

error: pq: value "20240918085430" is out of range for type integer

This can be fixed with

ALTER TABLE public.migrations ALTER COLUMN "version" TYPE bigint USING "version"::bigint;

Steps to Reproduce

Expected Behavior

Migrate Version
4.18.1

Loaded Source Drivers

Loaded Database Drivers
yugabytedb

Go Version

Stacktrace

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant