You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Upgrading to 5.0 will re-run sqlite import even if previously imported, deleting all existing data #727
TL;DR: Data loss will occur if you leave `massCode.db
It looks like the first-run of 5.0 checks if the massCode.db SQLite db still exists and, if so, will run the import/conversion to the Markdown file storage schema.
It does not check if this import/conversion was previously run and will delete anything in the .\markdown-vault folder.
In my case, I completed the import on version 4.7.1; for whatever reason my massCode.db file remained in my massCode data folder:
.\masscode\massCode.db
.\masscode\markdown-vault\.masscode\state.json
.\masscode\markdown-vault\PowerShell\.masscode-folder.yml
.\masscode\markdown-vault\PowerShell\Convert Masscode Snippets to Windows Terminal Snippets.md
[etc...]
My .\markdown-vault folder was completely wiped (without any user prompt or alert) and all additions and modifications to snippets that were done after migrating from the SQLite database format were completely lost.
Install massCode version 4.4.0 (defaults to SQLite for the data storage format)
Add new snippets
Install massCode version 4.7.1
Add/modify/delete snippets
Manually convert from SQLite to Markdown data storage format using settings option
Add/modify/delete snippets
Install massCode 5.0.0
Find all snippet changes since step 4 are lost
My test repo steps:
After installing massCode 5.0.0
Quit massCode
Restore .\masscode\markdown-vault folder to pre-5.0.0 state
Confirm .\masscode\assCode.db still exists (this file has remained in place and unmodified since my initial upgrade)
Launch massCode 5.0.0
Observe masscode.exe open and access .\masscode\massCode.db
Observe masscode.exe move files from .\masscode\markdown-vault\EXAMPLE-NEW-DIR\EXAMPLE-NEW-SNIPPET.md to .\masscode\markdown-vault\code\EXAMPLE-NEW-DIR\EXAMPLE-NEW-SNIPPET.md
Observe masscode.exe create file .\masscode\markdown-vault\code\EXAMPLE-OLD-DIR\EXAMPLE-OLD-SNIPPET.md File actions were observed & confirmed via OS-level process monitoring
Activity