Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Commit

Permalink
Fixing error 'relation auditorsettings does not exist' which occurs f…
Browse files Browse the repository at this point in the history
…rom a clean DB
  • Loading branch information
Patrick Kelley committed Feb 20, 2015
1 parent a35b9be commit 99bf3b6
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions migrations/versions/595e27f36454_.py
Original file line number Diff line number Diff line change
Expand Up @@ -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! ###
Expand All @@ -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! ###
Expand Down

0 comments on commit 99bf3b6

Please sign in to comment.