For some reason my hosting only seems to work updating my SQLite database when it is set in WAL mode. So using "DB Browser for SQLite" I edited the Pragma Journal Mode to WAL and everything seems to work.
My database is now 1Mb but the accompanying WAL file is 4Mb. Is this expected? I've been trying to read up on the Pragma options (https://www.sqlite.org/pragma.html#pragma_journal_mode) but it seems over my head at the moment.
The WAL file is apparently used before a "Checkpoint"
Using Entity I do the following:
public DbSet<ProductModel> Products { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlite(@"Filename=" + dbPath);
}
using (ProductDB db = new ProductDB())
{
db.Products.Update(testModel);
try
{
db.SaveChanges();
}
}
Is there something extra I should be doing to commit any changes and reset a checkpoint? Will my WAL file keep growing, or is it always relative to the database filesize?
Thanks