From 99bf3b697d0e3da908a1d6fe9d42d2693ac30956 Mon Sep 17 00:00:00 2001 From: Patrick Kelley Date: Fri, 20 Feb 2015 12:22:11 -0800 Subject: [PATCH] Fixing error 'relation auditorsettings does not exist' which occurs from a clean DB --- migrations/versions/595e27f36454_.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/migrations/versions/595e27f36454_.py b/migrations/versions/595e27f36454_.py index ee1ecb357..9b3ec9566 100644 --- a/migrations/versions/595e27f36454_.py +++ b/migrations/versions/595e27f36454_.py @@ -12,8 +12,6 @@ from alembic import op import sqlalchemy as sa -from security_monkey.datastore import AuditorSettings -from security_monkey import db def upgrade(): ### commands auto generated by Alembic - please adjust! ### @@ -24,13 +22,6 @@ def upgrade(): op.create_foreign_key(None, 'itemaudit', 'auditorsettings', ['auditor_setting_id'], ['id']) ### end Alembic commands ### - # Delete everything currently in the AuditorSettings table not already associated - # with an ItemAudit. We will rebuild this when the next daily audit check runs - settings = AuditorSettings.query.all() - for setting in settings: - if len(setting.issues) == 0: - db.session.delete(setting) - def downgrade(): ### commands auto generated by Alembic - please adjust! ###