I’m honestly not sure the exact timeline of last night since it all became a blur, but at some point my Mac got the “Your shortcuts database is corrupted” and I had to reset back to zero on that device.
When that happened, I first turned Airplane Mode on my other devices and exported all my shortcuts to Files, just in case I might lose them entirely – thankfully I had a full backup on iCloud now just in case.
When my Mac started syncing back the files, however, something else went wrong – about 600 were missing, many folder titles/icons were blank, and in general the library was not matching my other devices (which also were still staying in sync).
I then made the mistake of trying to fix it myself, rather than just letting the device sit for a while – I remembered seeing on Reddit that Shortcuts stored the data locally in a .sqlite folder, so I went spelunking for that.
Being a fool, I decided to delete my database – and the Shortcuts app became an empty shell…
Then, when I hit Command + Z to undo in Finder, it did actually work… but Shortcuts was now reading only a string of numbers (likely my user ID) in all fields and no actual shortcuts – I’d completely borked it, to say the least.
Thankfully, due to extreme luck & circumstance, I happen to have a Mac mini as well, which includes a full copy of my Shortcuts database. And when I copied & pasted that over from my Mac mini to my MacBook Air & restarted Shortcuts, it worked!
Now, it wasn’t without effects, however, because then all of my instances of Shortcuts (across Macs, multiple iPads, and my phone) all had to resync through every single one of my shortcuts (I am now up to 2.4K, don’t judge).
I sat there for 4 hours and watched on both my Macs as the Recently Modified view proceeded to slowly update each-and-every shortcut – a process that I’m now thinking was already overdue and potentially the original source of my sync issues in the first place.
Thankfully, at the end of the night, Shortcuts had finally finished updating, and some quick folder changes I’d made on one device were actually syncing across all of them.
However, when I woke up, I then found all of my folders are out of sync too (all 400+ of them 😇).
So, before I go spend another few hours fixing those, take this diatribe as a word of warning – seriously, do not delete your Shortcuts database…