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

Added SkipTables Option #1896

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Added SkipTables Option #1896

merged 1 commit into from
Feb 6, 2024

Conversation

nlaurie
Copy link
Contributor

@nlaurie nlaurie commented Feb 5, 2024

In my effort to properly convert dexie-encrypted to work with more complex scenarios, I found the need to completely exclude tables from the import export process. Mainly the encryption metadata.

So I added the options into the project both import and export, to simply skip the requested list of tables in all operations.

I feel this is a good addition to round out the options for controlling the backups.

It's backwards compatible and does nothing if not specified.

Regards
Nick

@dfahlander
Copy link
Collaborator

Would the filter option not be enough to achieve the same as the proposed skipTables option? Or would it still fail with dexie-encrypted if so?

@nlaurie
Copy link
Contributor Author

nlaurie commented Feb 6, 2024

I started with the filter , it mostly worked but ended up colliding with the clearTablesBeforeImport.

When importing into a database set up with encryption. you don't want to loose you metadata nor do you want to import/export it. so I set skipTables: ['_encryptionSettings']. This way the backup is encryption Free and can be easily imported into a new DB possibly with different encryption params and it will reimport all the data perfectly.

Also Its important especially when one is changing encryption strategy between backups.

@dfahlander dfahlander merged commit 8279f1f into dexie:master Feb 6, 2024
5 checks passed
@nlaurie nlaurie deleted the SkipTables branch February 6, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants