migration incomplete : zoneinfo.available_timezones() order not fixed #128

Closed
opened 2023-10-18 07:12:26 +00:00 by ctactic · 1 comment
Collaborator

django migrations is currently unhappy :

Your models in app(s): 'aircox' have changes that are not yet reflected in a migration, and so won't be applied.                       
  Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.

for what it's worth, 5ea092d (fix: default schedule tz + migration) did provide a migration file (aircox/migrations/0013_alter_schedule_timezone_alter_station_hosts.py) but considered incomplete.

The culprit is the set returned by zoneinfo.available_timezones() wich order varies.

django migrations is currently unhappy : ``` Your models in app(s): 'aircox' have changes that are not yet reflected in a migration, and so won't be applied. Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them. ``` for what it's worth, 5ea092d (fix: default schedule tz + migration) did provide a migration file (aircox/migrations/0013_alter_schedule_timezone_alter_station_hosts.py) but considered incomplete. The culprit is the set returned by zoneinfo.available_timezones() wich order varies.
ctactic changed title from migration corrupted : zoneinfo.available_timezones() wich order varies/schedule : changes not yet reflected to migration incomplete : zoneinfo.available_timezones() order not fixed 2023-10-18 07:14:06 +00:00
Author
Collaborator

(sorry for the incomplete report, I pressed enter while editing and did not inteded to post it yet)

hereunder is a diff with a new migration file produced by makemigrations.

A way fix is to fix seems to just sort available_timezones() result. But I wonder if we really need these results in the database.

(sorry for the incomplete report, I pressed enter while editing and did not inteded to post it yet) hereunder is a diff with a new migration file produced by `makemigrations`. A way fix is to fix seems to just sort available_timezones() result. But I wonder if we really need these results in the database.
Sign in to join this conversation.
No description provided.