Force generate rebuild of database?

Hi, Faced a bug with strapi that came about because deleted a collection type from the admin panel and then reverted the deleted api files within VS code so now I dont have that table in my database giving me an error (cant find relation).

Cant run any useful strapi commands because it fails straight away. Is there anyway to rebuild the database based on the models defined in the code?

Turns out the setting autoMigration in the database config was the issue so strapi wasnt updating my tables or something…
autoMigration: true

In V4 you can remove the single row in strapi_database_schema table to trigger a rebuild of missing tables (seems to keep existing ones).