-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
11 deletions.
There are no files selected for viewing
19 changes: 8 additions & 11 deletions
19
src/chains/migrations/0045_populate_feature_description.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
# Generated by Django 5.0.8 on 2024-11-21 12:22 | ||
# Generated by Django 5.0.8 on 2024-11-21 13:40 | ||
|
||
from django.db import migrations | ||
from django.db import migrations, models | ||
|
||
def populate_description(apps, schema_editor): | ||
Feature = apps.get_model('chains', 'Feature') | ||
Feature.objects.filter(description__isnull=True).update(description='') | ||
|
||
def reverse_populate_description(apps, schema_editor): | ||
pass | ||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('chains', '0044_chain_beacon_chain_explorer_uri_public_key_template'), | ||
("chains", "0044_chain_beacon_chain_explorer_uri_public_key_template"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(populate_description, reverse_populate_description), | ||
migrations.AddField( | ||
model_name="feature", | ||
name="description", | ||
field=models.CharField(max_length=255, default=''), | ||
), | ||
] |