- all_tables = ActiveRecord::Base.connection.tables
- all_tables.delete 'schema_migrations'
- all_tables.delete 'permission_refresh_lock'
- all_tables.delete 'ar_internal_metadata'
+ all_tables = ActiveRecord::Base.connection.tables - [
+ 'ar_internal_metadata',
+ 'permission_refresh_lock',
+ 'schema_migrations',
+ # tables that may still exist in the database even though model
+ # classes have been deleted:
+ 'humans',
+ 'jobs',
+ 'job_tasks',
+ 'keep_disks',
+ 'nodes',
+ 'pipeline_instances',
+ 'pipeline_templates',
+ 'repositories',
+ 'specimens',
+ 'traits',
+ ]