-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tracking if venue is open, not closed; fixes #240
- Loading branch information
1 parent
f970e84
commit a896553
Showing
7 changed files
with
77 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Generated by Django 4.2.10 on 2024-03-02 19:38 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("core", "0064_venue_closed"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="AllEventProxy", | ||
fields=[], | ||
options={ | ||
"verbose_name": "event", | ||
"verbose_name_plural": "events", | ||
"proxy": True, | ||
"indexes": [], | ||
"constraints": [], | ||
}, | ||
bases=("core.event",), | ||
), | ||
migrations.AddField( | ||
model_name="venue", | ||
name="is_open", | ||
field=models.BooleanField(default=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 4.2.10 on 2024-03-02 19:39 | ||
|
||
from django.db import migrations | ||
|
||
|
||
def change_venue_field_closed_to_open(apps, schema_editor): | ||
Venue = apps.get_model("core", "Venue") | ||
|
||
# save into venue's new is_open field from closed (flipping the bit) | ||
for venue in Venue.objects.all(): | ||
venue.is_open = not venue.closed | ||
venue.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("core", "0065_alleventproxy_venue_is_open"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(change_venue_field_closed_to_open), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 4.2.10 on 2024-03-02 19:42 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("core", "0066_auto_20240302_1439"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="venue", | ||
name="closed", | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters