Skip to content

Commit

Permalink
Update migration
Browse files Browse the repository at this point in the history
katspaugh committed Nov 21, 2024
1 parent becf74d commit d6dfee9
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/chains/migrations/0045_populate_feature_description.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# 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="chain",
name="description",
field=models.CharField(max_length=255, default=''),
),
]

0 comments on commit d6dfee9

Please sign in to comment.