Skip to content

Commit 0b561fd

Browse files
committed
refactor: drop setMigrationMode from MigrationBackfillStorage
migration_mode is already a @JsonProperty on PostgreSQLConfig (and exposed via getValidFields()), so the existing multitenancy CRUD endpoint already covers updating it via coreConfig: PUT /recipe/multitenancy/connectionuridomain/v2 { "coreConfig": { "migration_mode": "DUAL_WRITE_READ_OLD" } } That path persists via overwriteTenantConfig + refreshAfterKnownTenantChange, which rebuilds the storage's config from the persisted JSON. No separate storage-interface write method is needed.
1 parent d2bdec4 commit 0b561fd

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/main/java/io/supertokens/pluginInterface/migration/MigrationBackfillStorage.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ public interface MigrationBackfillStorage extends Storage {
3434

3535
/**
3636
* Returns the current migration mode from the storage's configuration.
37+
*
38+
* To change the migration mode at runtime, update the storage's core_config via the
39+
* existing multitenancy CRUD endpoint (e.g. PUT /recipe/multitenancy/connectionuridomain/v2
40+
* with { "coreConfig": { "migration_mode": "..." } }). That path persists through
41+
* overwriteTenantConfig and triggers a config refresh, after which this method returns
42+
* the new value.
3743
*/
3844
MigrationMode getMigrationMode();
3945

40-
/**
41-
* Persists a new migration mode for this storage (CUD).
42-
*/
43-
void setMigrationMode(MigrationMode mode) throws StorageQueryException;
44-
4546
/**
4647
* Returns the count of users that still need backfilling.
4748
* A user needs backfilling when their time_joined is 0 in app_id_to_user_id,

0 commit comments

Comments
 (0)