25 lines
730 B
Python
25 lines
730 B
Python
|
|
from django.db import migrations
|
||
|
|
|
||
|
|
|
||
|
|
def increase_gameboard_applet_heights(apps, schema_editor):
|
||
|
|
Applet = apps.get_model('applets', 'Applet')
|
||
|
|
Applet.objects.filter(slug__in=['new-game', 'game-kit', 'wallet-payment']).update(grid_rows=3)
|
||
|
|
|
||
|
|
|
||
|
|
def revert_gameboard_applet_heights(apps, schema_editor):
|
||
|
|
Applet = apps.get_model('applets', 'Applet')
|
||
|
|
Applet.objects.filter(slug__in=['new-game', 'game-kit', 'wallet-payment']).update(grid_rows=2)
|
||
|
|
|
||
|
|
|
||
|
|
class Migration(migrations.Migration):
|
||
|
|
dependencies = [
|
||
|
|
('applets', '0004_rename_list_applet_slugs')
|
||
|
|
]
|
||
|
|
|
||
|
|
operations = [
|
||
|
|
migrations.RunPython(
|
||
|
|
increase_gameboard_applet_heights,
|
||
|
|
revert_gameboard_applet_heights,
|
||
|
|
)
|
||
|
|
]
|