Strapi table seems corrupted

Hi, I have run into the same problem as you.
While I couldn’t find a way to actually resolve it, I found a workaround. You can just add a fallback command to your command to run your strapi project.

Like this:

"scripts": {
        "dev": "strapi develop || (if [ $? -eq 1 ]; then echo 'Yarn failed. Running recovery command...'; rm - 
        rf ./types/ && yarn dev; fi)"
}

This command activates if strapi fails with exit code 1, then removes the types folder and starts strapi again.