Last active
December 16, 2024 14:35
-
-
Save mintyPT/49f9a3d0fe1ab1f32b219ee41c96c79c to your computer and use it in GitHub Desktop.
Migrate charfield's choice in django
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.db import migrations | |
| # To get this empty migration: | |
| # > python manage.py makemigrations --empty app_name | |
| class Migration(migrations.Migration): | |
| dependencies = [("app_name", "0001_abc")] | |
| operations = [ | |
| migrations.RunSQL( | |
| "update pipeline_sipsnapshotstatus set state='new_b' where state='new';", | |
| "update pipeline_sipsnapshotstatus set state='new' where state='new_b';", | |
| ) | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment