Skip to content

Commit

Permalink
check
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs committed Feb 26, 2024
1 parent 1a1916a commit aed0cea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/scripts/check_migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def check_migration_file(file):
keywords = ["DeleteModel", "RenameModel", "RemoveField", "RenameField"]
if current_keyword := any(keyword in contents for keyword in keywords):
if (f"etna:allow{current_keyword}") not in contents:
print(current_keyword)
print(f"Warning: {file} contains a migration that may cause data loss.")
return True

Expand Down

0 comments on commit aed0cea

Please sign in to comment.