Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes #284

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python/prohibition_web_svc/middleware/event_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ def save_event_data(**kwargs) -> tuple:
twelve_hour_number=data.get("twelve_hour_number"),
form_id=data.get('form_id'),
event_id=data.get('event_id'),
vehicle_location=data.get('vehicle_location', None),
created_dt=date_created,
updated_dt=date_created,
)
Expand Down
32 changes: 32 additions & 0 deletions python/prohibition_web_svc/migrations/versions/666113694229_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""empty message

Revision ID: 666113694229
Revises: b7fc605b1a27
Create Date: 2024-02-12 13:28:00.762443

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '666113694229'
down_revision = 'b7fc605b1a27'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('twelve_hour_form', schema=None) as batch_op:
batch_op.add_column(sa.Column('vehicle_location', sa.String(), nullable=True))

# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('twelve_hour_form', schema=None) as batch_op:
batch_op.drop_column('vehicle_location')

# ### end Alembic commands ###
2 changes: 2 additions & 0 deletions python/prohibition_web_svc/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,13 +553,15 @@ class TwelveHourForm(db.Model):
updated_dt: datetime
driver_phone: str
twelve_hour_number: str
vehicle_location: str

form_id = db.Column(db.Integer, primary_key=True)
event_id = db.Column(db.Integer, db.ForeignKey('event.event_id'))
created_dt = db.Column(db.DateTime)
updated_dt = db.Column(db.DateTime)
driver_phone = db.Column(db.String)
twelve_hour_number = db.Column(db.String)
vehicle_location = db.Column(db.String)


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
},
"DRIVER_DL_PROVINCE": {
"field_type": "text",
"field_name": "driver_prov_state",
"field_name": "drivers_licence_jurisdiction",
"classNames": "fontSmall",
"start": {
"x": 57,
Expand Down Expand Up @@ -1185,7 +1185,7 @@
},
"DRIVER_DL_PROVINCE": {
"field_type": "text",
"field_name": "driver_prov_state",
"field_name": "drivers_licence_jurisdiction",
"classNames": "fontSmall",
"start": {
"x": 115,
Expand Down
Loading