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

Track Migrations Per Database #271

Merged
merged 29 commits into from
May 18, 2020
Merged

Conversation

calebkleveter
Copy link
Member

@calebkleveter calebkleveter commented May 8, 2020

Migrations are now tracked on the database they are run on, instead of all migrations being tracked on the default database. This resolves bugs that could occur when running the same migration on multiple databases.

@gwynne gwynne requested review from gwynne and tanner0101 May 11, 2020 17:18
@gwynne gwynne added the bug Something isn't working label May 11, 2020
@gwynne gwynne added the semver-minor Contains new APIs label May 11, 2020
Copy link
Member

@gwynne gwynne left a comment

Choose a reason for hiding this comment

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

A pile of minor nits but overall looks fine to me so far

Sources/FluentKit/Migration/Migrator.swift Outdated Show resolved Hide resolved
Sources/FluentKit/Migration/Migrator.swift Outdated Show resolved Hide resolved
Sources/FluentKit/Migration/Migrator.swift Outdated Show resolved Hide resolved
Sources/FluentKit/Migration/Migrator.swift Outdated Show resolved Hide resolved
Sources/FluentKit/Migration/Migrator.swift Outdated Show resolved Hide resolved
Sources/FluentKit/Migration/Migrator.swift Outdated Show resolved Hide resolved
Sources/FluentKit/Migration/Migrator.swift Outdated Show resolved Hide resolved
Sources/FluentKit/Migration/Migrator.swift Outdated Show resolved Hide resolved
Sources/FluentKit/Migration/Migrator.swift Outdated Show resolved Hide resolved
Sources/FluentKit/Migration/Migrator.swift Show resolved Hide resolved
@calebkleveter calebkleveter marked this pull request as ready for review May 14, 2020 13:26
@calebkleveter calebkleveter changed the title Run Migrations by Database ID Track Migrations Per Database May 14, 2020
Sources/FluentBenchmark/FluentBenchmarker.swift Outdated Show resolved Hide resolved
Sources/FluentKit/Database/Databases.swift Outdated Show resolved Hide resolved
Sources/FluentKit/Migration/Migrations.swift Outdated Show resolved Hide resolved
Sources/FluentKit/Migration/Migrator.swift Outdated Show resolved Hide resolved
calebkleveter and others added 8 commits May 14, 2020 10:42
…s this working before...?). Fix Migration reversion in FluentBenchmarker (migrations have to be reverted in reverse order). Fix batch numbers (you have to actually change the previous batch number if you expect it to, you know, change).
… working before without having the dependency at all, but why did it work for me locally in this broken form that definitely fails on Linux?
gwynne added a commit to stairtree/fluent-kit that referenced this pull request May 16, 2020
Copy link
Member

@tanner0101 tanner0101 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Just needs release notes.

@calebkleveter calebkleveter merged commit 27288c2 into master May 18, 2020
@calebkleveter calebkleveter deleted the prepared-migration-filtering branch May 18, 2020 17:03
@tanner0101
Copy link
Member

These changes are now available in 1.0.0-rc.1.27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working semver-minor Contains new APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants