-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use dropdown for site numbers for consistency (#89)
This is the most basic fix for #58. It requires running a DB migration. It simply converts the site_number field to a dropdown, and adds all the sites in via development-defaults.ini.
- Loading branch information
Showing
7 changed files
with
106 additions
and
8 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
alembic/versions/8b08c2523a1a_change_site_number_to_choices_column.py
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,33 @@ | ||
"""Change site_number to Choices column | ||
Revision ID: 8b08c2523a1a | ||
Revises: 6a885e4ac48d | ||
Create Date: 2016-06-16 04:08:27.579294 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '8b08c2523a1a' | ||
down_revision = '6a885e4ac48d' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
import sideboard | ||
|
||
|
||
def upgrade(): | ||
op.alter_column('attendee', 'site_number', | ||
existing_type=sa.VARCHAR(), | ||
nullable=True, | ||
existing_server_default=sa.text("''::character varying")) | ||
### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
op.alter_column('attendee', 'site_number', | ||
existing_type=sa.VARCHAR(), | ||
nullable=False, | ||
existing_server_default=sa.text("''::character varying")) | ||
### end Alembic commands ### |
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,48 @@ | ||
[enums] | ||
[[campsite]] | ||
asp1 = "Aspin Point 001" | ||
blake1 = "Bl Lakeside 001" | ||
blue5 = "Blue 5" | ||
brown4 = "Brown 4" | ||
brown5 = "Brown 5" | ||
brown7 = "Brown 7" | ||
brown16 = "Brown 16" | ||
brown17 = "Brown 17" | ||
brown20 = "Brown 20" | ||
purple11 = "Purple 11" | ||
purple12 = "Purple 12" | ||
purple14 = "Purple 14" | ||
purple15 = "Purple 15" | ||
purple16 = "Purple 16" | ||
purple17 = "Purple 17" | ||
purple19 = "Purple 19" | ||
purple20 = "Purple 20" | ||
purple27 = "Purple 27" | ||
purple28 = "Purple 28" | ||
purple33 = "Purple 33" | ||
purple34 = "Purple 34" | ||
purple35 = "Purple 35" | ||
purple37 = "Purple 37" | ||
purple38 = "Purple 38" | ||
red2 = "Red 2" | ||
red17 = "Red 17" | ||
tent49 = "Tent 49" | ||
tent50 = "Tent 50" | ||
tent51 = "Tent 51" | ||
tent52 = "Tent 52" | ||
tent53 = "Tent 53" | ||
tent54 = "Tent 54" | ||
tent55 = "Tent 55" | ||
tent56 = "Tent 56" | ||
tent57 = "Tent 57" | ||
tent58 = "Tent 58" | ||
tent59 = "Tent 59" | ||
tent75 = "Tent 75" | ||
yellow1 = "Yellow 1" | ||
yellow2 = "Yellow 2" | ||
yellow3 = "Yellow 3" | ||
yellow4 = "Yellow 4" | ||
yellow10 = "Yellow 10" | ||
yellow13 = "Yellow 13" | ||
yellow21 = "Yellow 21" | ||
bluejay = "Blue Jay" |
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 |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# The cost of a food wristband, which entitles attendees to meals provided by the event. | ||
food_price = integer(default='20') | ||
food_price = integer(default='20') | ||
|
||
# A list of campsite numbers available to assign. | ||
[enums] | ||
[[campsite]] |
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