took db-breaking migrations change out of 0003 and placed into new migration 0005 (grid_cols, grid_rows)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -3,8 +3,8 @@ from django.db import migrations
|
|||||||
|
|
||||||
def seed_applets(apps, schema_editor):
|
def seed_applets(apps, schema_editor):
|
||||||
Applet = apps.get_model("dashboard", "Applet")
|
Applet = apps.get_model("dashboard", "Applet")
|
||||||
Applet.objects.get_or_create(slug="username", defaults={"name": "Username"}, grid_cols=6, grid_rows=3)
|
Applet.objects.get_or_create(slug="username", defaults={"name": "Username"})
|
||||||
Applet.objects.get_or_create(slug="palette", defaults={"name": "Palette"}, grid_cols=6, grid_rows=3)
|
Applet.objects.get_or_create(slug="palette", defaults={"name": "Palette"})
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
def set_grid_defaults(apps, schema_editor):
|
||||||
|
Applet = apps.get_model("dashboard", "Applet")
|
||||||
|
Applet.objects.filter(slug__in=["username", "palette"]).update(grid_cols=6, grid_rows=3)
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("dashboard", "0004_applet_grid_cols_applet_grid_rows"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(set_grid_defaults, migrations.RunPython.noop),
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user