weavejester / ragtime

Database-independent migration library
Eclipse Public License 1.0
612 stars 85 forks source link

next/jdbc: migration id should be unique #153

Closed holyjak closed 3 weeks ago

holyjak commented 2 years ago

IMO it makes sense that the ragtime_migrations table's id column is unique because we most certainly do not want to apply the same migration twice.

weavejester commented 1 year ago

Thanks for the PR, and apologies for the delay in looking at this. I believe the original idea was to keep the table creation SQL minimal for maximum compatibility, but I'm not aware of any SQL database that lacks primary keys, so this seems a reasonable change.

This change will need to be added to the ragtime.jdbc subproject as well to keep things consistent. Can you also change the commit message to:

Make id column of migrations table a primary key
holyjak commented 1 year ago

@weavejester done

weavejester commented 3 weeks ago

Merged manually.