mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09:00
LibSQL: Ungracefully handle database version incompatibilities
In the long run, this is obviously a bad way to handle version changes to the SQL database files. We will want to migrate old databases to new formats. Until we figure out a good way to do that, wipe old databases so that we don't crash trying to read incompatible data.
This commit is contained in:
parent
d5ed07fdc4
commit
b5fd96b7ac
Notes:
sideshowbarker
2024-07-17 06:39:26 +09:00
Author: https://github.com/trflynn89
Commit: b5fd96b7ac
Pull-request: https://github.com/SerenityOS/serenity/pull/16427
Reviewed-by: https://github.com/davidot ✅
3 changed files with 15 additions and 3 deletions
|
@ -110,7 +110,7 @@ TEST_CASE(create_heap)
|
|||
ScopeGuard guard([]() { unlink("/tmp/test.db"); });
|
||||
auto heap = SQL::Heap::construct("/tmp/test.db");
|
||||
EXPECT(!heap->open().is_error());
|
||||
EXPECT_EQ(heap->version(), 0x00000001u);
|
||||
EXPECT_EQ(heap->version(), SQL::Heap::current_version);
|
||||
}
|
||||
|
||||
TEST_CASE(create_from_dev_random)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue