Skip to content

After adding a new property to an existing schema, no document can be retrieved from the InputStream #7260

@alpha-2000

Description

@alpha-2000

I'm using rxDB 16.15. A new field was added to the schema of a collection that was migrated with

2: (oldDoc) => oldDoc

After that, my collection can no longer receive changes via the remote's InputStream. I log my document in the modifier before returning it there. Normally, I should see it in the received field afterward, but nothing happens. No errors, no warnings.
My setup is also very minimalistic. I use the following when creating:

db = await createRxDatabase<Database>({
name: dbName,
storage: wrappedValidateAjvStorage({
storage: getRxStorageIndexedDB(),
});,
localDocuments: true,
multiInstance: true,
});

I've tried performing the migration automatically or starting it manually with:

const needed = await col.migrationNeeded();
if (needed) col.startMigration(1);

But it doesn't make any difference.

This only happens when I add a new field to the schema. If I change the type of an existing field and migrate it, everything works fine. The new field I add isn't written to the required field either.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions