Skip to content
Mauricio David edited this page Jul 27, 2016 · 6 revisions

LiteDB v2 use a different data structure, so if you had a v1 data file will be not compatible with v2. In this case, you need update your data file.

Update process is just an export/import operation. To do this, you will need last version of shell tool (included in Github release page or Nuget tools folder).

Open your command line and run LiteDB.Shell.exe:

open my_old_datafile.db  -- will open in version v1.0.4/v0.9.0
dump > my_dump_file.dmp

open my_new_datafile.db  -- will create a new datafile in v.2.0.0
dump < my_dump_file.dmp

Dump file contains all commands (shell syntax) to re-create your database. It´s like a "insert script" as any RDBMS.

If you don't want this dump file, you can just run:

LiteDB.Shell.exe my-v1-old.db --upgrade my-v2-new.db --exit
Clone this wiki locally