Database size is not reduced after deleting records. #1499
Answered
by
simolus3
rajagopalx
asked this question in
Q&A
-
I saw vacuum can be used to remove empty space after deletion. Reference: |
Beta Was this translation helpful? Give feedback.
Answered by
simolus3
Oct 20, 2021
Replies: 1 comment 1 reply
-
You can just use If you want to enable the MigrationStrategy(
// onCreate, onUpdate, ...
beforeOpen: (details) async {
await customStatement('pragma auto_vacuum = 1');
}
) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
rajagopalx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can just use
customStatement('VACUUM')
in your database to execute this command.If you want to enable the
auto_vacuum
pragma, a good place to do that is in thebeforeOpen
callback of your migration: