-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track Migrations Per Database (#271)
* Pass ID of database to migrate into Migrator * Migrate each registered DatabaseID unless a specific database is specified * Removed Migrator.run(on:_:) method that passes Database instance into 'query' closure * Removed MigrationError enum * Skip subsequent queries if a previous error has occured in Migrator preview methods * Pass in default database ID (nil) to Migrator.run 'query' closure argument * Changed Migrations.databases type from an Array to a Set * Use .whenAllSucceed instead of .andAllSync to complete Migrator.run 'query' closure results * Defined MigratorTests test cases * Use 'guard' statements to check failed errors in Migrator preview methods * Use .recover instead of .flatMapErrorThrowing to capture failures in Migrator preview methods * Use !contains instead of count check in Migrator.unpreparedMigrations(on:) method * Cleanup newlines in Migrator.run(on:_:) method * Give database configurations access to database ID in DatabaseConfigurationFactory closure * Run MigrationLog queries on Migration.Item database * Require DatabaseIDs for FluentBenchmarker to access separate databases * Created FluentBenchmarker.testMigrator_sequence test case * Removed FluentKit MigratorTests * Assert database2 log count is 0 if no errors are throw from query * Fixed typo in MigrationLog database2 query catch block comment * Removed DatabaseID injection from DatabaseConfigurationFactory * Change Migrations.databases to a computed property * Added .ids() method to Databases type * Get database IDs for FluentBenchmark.testMigrator_sequence from Databases.ids() method * Allow nil in Migrations.databases set * Use underlying DatabaseMigrator type to run migrations in Migrator * Removed stray use of .andAllSync from QueryBuilder * Add missing AsyncKit dependency requirement (breaks the build, why was 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). * Fix typo in Package.swift. Now I have to wonder not only why was this 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? Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
- Loading branch information
1 parent
c73570c
commit 27288c2
Showing
8 changed files
with
238 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.