Delete obsolete app table?


is there a way to delete a table which is not used within my app anymore?
Removing it from database.xml obviously leaves it in the DB.
Migrations are only available as of NC13.

what would be the correct way for some cleanup?

1 Like

Asked myself the same question several times. There should be some cleanup command for this.

i would go with a repair-step and a RequestBuilder to drop the table.

Yeah, seethe 2FA backup code app:

Or in 13+ you use migrations:

For more information on migrations see:

thank you für this reference. this fits our needs perfectly.
Can you explain how this migration script is being executed/triggered?

I thought about some lines in the PageController, but here seems to be a proper process for this.

thank you

Just found it.
can be triggered via index.xml

Well thats for repair steps and should not be necessary for these migrations.
You just need to increment the version of your app, so it checks for the schema migrations.


but incrementing the version does not delete a table which is not in the database.xml anymore.
so we need this step to delete it - isn´t it?


Post must be at least 10 characters