Clean way to remove a migration/model for Plugin


Is there a clean way to completely delete all the tables and migration files related to a Plugin model in Indico?

I want to start from scratch with my Plugin model.


indico db --plugin YOURPLUGINNAME downgrade base should do the job, unless you changed things outside alembic. In that case (and/or if that command fails), you can run these two queries:

  • DROP SCHEMA plugin_PLUGINNAME CASCADE; (have a backup if it’s not a dev db just in case!)
  • DROP TABLE alembic_version_plugin_PLUGINNAME;

FWIW you can also safely run the commands even if the alembic downgrade did work. They may fail though if the schema/table already have been deleted during the downgrade.

1 Like

Precise and lightning fast answers as always! Thank you @ThiefMaster - stay safe and healthy!