# Generated by Django 4.2.4 on 2023-10-23 13:50

from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("models", "10149_add_workflow_name_to_workflow_history"),
    ]

    operations = [
        # Note this won't actually appear to have an effect w/o republishing graphs.
        migrations.RunSQL(
            sql="""
            UPDATE widgets
            SET defaultconfig = jsonb_set(defaultconfig, '{defaultValue}', '[]')
            WHERE name = 'file-widget';
            UPDATE cards_x_nodes_x_widgets
            SET config = jsonb_set(config, '{defaultValue}', '[]')
            WHERE widgetid = '10000000-0000-0000-0000-000000000019';
            """,
            reverse_sql="""
            UPDATE widgets
            SET defaultconfig = defaultconfig - 'defaultValue'
            WHERE name = 'file-widget';
            UPDATE cards_x_nodes_x_widgets
            SET config = config - 'defaultValue'
            WHERE widgetid = '10000000-0000-0000-0000-000000000019';
            """,
        ),
    ]
