githubbob42 / mingle2github2

0 stars 1 forks source link

Manage Index Versioning for Storage #3437

Open githubbob42 opened 8 years ago

githubbob42 commented 8 years ago

Mingle Card: 3749 Justification

When the schema for a sobjects database changes we need to detect that change and automatically update the indexeddb database.

Acceptance Criteria

When the salesforce schema for an object changes specific things will cause the version to increment and the indexes to change:

  1. Adding an external id.
  2. Adding a lookup field.
  3. Changing the way indexes work in code.

It should do all of this seamlessly without any intervention by the user and it should not involve the loss of data.

Analysis

Schema-builder should probably be renamed schema.

It will need db access so it compare current schema to a describe handed to it.

In which case we will probably want it to version the db and open and close it as necessary.

Related Stories

Tasks

{{table query: SELECT Number, Name, Owner, 'Task Status' WHERE Type = Task and Story = THIS CARD}}

Defects

{{ table query: SELECT Number, Name, Owner, 'Status' WHERE Type = Defect and 'Related Story' = THIS CARD }}

Test Plan

  1. Log in to mobile
  2. Check the Quote object in the indexeddb store
  3. Note the version number (should be 10) and note the indexes
  4. In console, add a text field and set external id to true (toggling permissions is good enough)
  5. Sync again
  6. The version should have incremented and the new field should be added as an index
githubbob42 commented 8 years ago

Feature: #3404 CPQ 2 - Syncing (Mingle)