Skip to content

Commit 67f0f17

Browse files
committed
utility method
1 parent f1c22a0 commit 67f0f17

File tree

1 file changed

+10
-1
lines changed
  • airbyte-cdk/java/airbyte-cdk/typing-deduping/src/main/java/io/airbyte/integrations/base/destination/typing_deduping/migrators

1 file changed

+10
-1
lines changed

airbyte-cdk/java/airbyte-cdk/typing-deduping/src/main/java/io/airbyte/integrations/base/destination/typing_deduping/migrators/Migration.kt

+10-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,14 @@ interface Migration<State> {
3535
*/
3636
fun migrateIfNecessary(state: State, stream: StreamConfig): MigrationResult<State>
3737

38-
data class MigrationResult<State>(val updatedState: State, val softReset: Boolean)
38+
data class MigrationResult<State>(val updatedState: State, val softReset: Boolean) {
39+
companion object {
40+
/**
41+
* If a migration detects no need to migrate, it should return this.
42+
*/
43+
fun <State> noop(updatedState: State): MigrationResult<State> {
44+
return MigrationResult(updatedState, false)
45+
}
46+
}
47+
}
3948
}

0 commit comments

Comments
 (0)