-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrations: Use explicit
Migration
interface instead of fun type
So the Java people don't have to return Unit everywhere. Also gives us the option to add further methods to `Migration`s in the future if necessary. Does have the downside of requiring Kotlin people to add an explicit `Migration` before the lambda for SAM conversion. But since each lambda will usually be on its own line anyway (unlike in the tests), that doesn't seem too bad.
- Loading branch information
Showing
5 changed files
with
28 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package gg.essential.vigilance.data | ||
|
||
import gg.essential.vigilance.Vigilant | ||
|
||
/** See [Vigilant.migrations]. */ | ||
fun interface Migration { | ||
fun apply(config: MutableMap<String, Any?>) | ||
} |
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