nkonev / r2dbc-migrate

R2DBC database migration library
https://nkonev.name/post/136
Apache License 2.0
98 stars 9 forks source link

Parse migration version as a long value instead of int #30

Closed V-Nikolenko closed 8 months ago

V-Nikolenko commented 8 months ago

Hi! I'm thrilled to use this library in my project, but unfortunately, it does not support migration versions with the long type.

I'm using the 'Flyway Migration Creation' IntelliJ IDE plugin, which creates files as follows:

V20240309222903__create_new_example_table.sql
V20240309222927__insert_initial_example_data.sql

When I run the application, it throws a NumberFormatException because it cannot parse this long value as an int in name.nkonev.r2dbc.migrate.core.FilenameParser#getVersion. Could you please take a look at it?

Thanks in advance!

nkonev commented 8 months ago

Just released 2.12.0, it should be available after some time. It's recommended (but it still works for low numbers without this change at least in case PostgreSQL) to make id column bigint in migrations table.