Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow callback on schema import to let upgrade data for channel when schema evolves #7523

Open
khanaffan opened this issue Jan 7, 2025 · 0 comments
Labels
ecdb ECDb and ECSQL related issues needs triage
Milestone

Comments

@khanaffan
Copy link
Contributor

Channel might like to reorganize it data when schema is evolved.

The actual mechanism need to be sorted out. But it may require two briefcases so app can do lazy conversion.

Another alternative would be to read before data into memory and apply changes to briefcase after schema is imported. But that will work if transformation require involve small set of data.

But generally, if it major changes to channel we might want to take schema lock or if its minor we might stick with locking.

  1. Before schema event that notify app
    • In this event we can choose strategy
      • Clone briefcase so full read access to before state of the briefcase.
      • Do not clone instead just read before data into memory if needed.
  2. Schema is imported.
  3. After schema import changes are applied to channel which would include moving data around.
  4. Finalize changes and push changeset out & release locks.
@khanaffan khanaffan added the ecdb ECDb and ECSQL related issues label Jan 7, 2025
@khanaffan khanaffan added this to the iTwin.js 5.0 milestone Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecdb ECDb and ECSQL related issues needs triage
Projects
None yet
Development

No branches or pull requests

1 participant