Cannot create new collection type even though I've created multiple

System Information
  • Strapi Version: 3.5.4
  • Operating System: windows
  • Database: mysql
  • Node Version: 14.17.1
  • NPM Version: 7.18.1

Hello guys, I’ve already built many collection/single types, customized the admin and some plugins but lately I’ve been having a very strange issue. I run strapi with npm run develop and I cannot create a new collection type!

After I’ve entered all the details in the admin and press save, it tries to restart but fails with either of the following messages:

error Error: ER_NO_SUCH_TABLE: Table 'db_name.table_name' doesn't exist
    at Query.Sequence._packetToError (C:\Users\user/cms\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14) etc

or

Error: insert into `core_store` (`key`, `type`, `value`) values ('model_def_strapi::core-store', 'object', '{\"uid\":\"strapi::core-store\",\"collectionName\":\"core_store\",\"info\":{\"name\":\"core_store\",\"description\":\"\"},\"options\":{\"timestamps\":false},\"attributes\":{\"key\":{\"type\":\"string\"},\"value\":{\"type\":\"text\"},\"type\":{\"type\":\"string\"},\"environment\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}}}') - ER_NO_SUCH_TABLE: Table 'myDB.core_store' doesn't exist
    at Query.Sequence._packetToError (C:\Users\user\Projects\cms\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14)

Any ideas?


Hello guys! Any ideas regarding this issue?

did you get any solution for this ?

I copied the whole project to a new folder and I removed .cache, build and node_modules folders.
I also dropped the whole database and created a new one where I dumped the dumpfile of the old one. I don’t know what happened and what exactly fixed it.

Good luck!

ok, thank you.