Skip to content

Commit

Permalink
Update migration
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Nov 21, 2024
1 parent becf74d commit ea3915b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/chains/migrations/0045_populate_feature_description.py
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=''),
),
]

0 comments on commit ea3915b

Please sign in to comment.