Skip to content

Commit

Permalink
Merge pull request #850 from GSA/API-847_Clobbering_bad_enum_data
Browse files Browse the repository at this point in the history
[Bug] API-847 - Making the enum migration more smooth.
  • Loading branch information
ccostino authored Mar 12, 2024
2 parents d7edf32 + 111135a commit 6713585
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions migrations/versions/0410_enums_for_everything.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,19 @@ def upgrade():
existing_nullable=False,
postgresql_using=enum_using("notification_type", NotificationType),
)
# Clobbering bad data here. These are values we don't use any more, and anything with them is unnecessary.
op.execute("""
delete from
service_permissions
where
permission in (
'letter',
'letters_as_pdf',
'upload_letters',
'international_letters',
'broadcast'
);
""")
op.alter_column(
"service_permissions",
"permission",
Expand Down

0 comments on commit 6713585

Please sign in to comment.