-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaned up code further. In all modules. Added Migration for renaming…
… Drive Assignment columns
- Loading branch information
1 parent
5956bf3
commit c7e725e
Showing
38 changed files
with
859 additions
and
628 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
alembic/versions/02b8e7c7fbca_rename_driver_assignment_columns.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,50 @@ | ||
"""Rename driver assignment columns | ||
Revision ID: 02b8e7c7fbca | ||
Revises: 69859f4d0367 | ||
Create Date: 2020-08-18 23:17:43.161501 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '02b8e7c7fbca' | ||
down_revision = '69859f4d0367' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('driver_assignment', sa.Column('trip_dropoff_addresses', postgresql.ARRAY(sa.String()), nullable=True)) | ||
op.add_column('driver_assignment', sa.Column('trip_estimated_dropoff_times', postgresql.ARRAY(sa.Interval()), nullable=True)) | ||
op.add_column('driver_assignment', sa.Column('trip_estimated_pickup_times', postgresql.ARRAY(sa.Interval()), nullable=True)) | ||
op.add_column('driver_assignment', sa.Column('trip_pickup_addresses', postgresql.ARRAY(sa.String()), nullable=True)) | ||
op.add_column('driver_assignment', sa.Column('trip_scheduled_dropoff_times', postgresql.ARRAY(sa.Interval()), nullable=True)) | ||
op.add_column('driver_assignment', sa.Column('trip_scheduled_pickup_times', postgresql.ARRAY(sa.Interval()), nullable=True)) | ||
op.drop_column('driver_assignment', 'trip_est_pu') | ||
op.drop_column('driver_assignment', 'trip_sch_pu') | ||
op.drop_column('driver_assignment', 'trip_do') | ||
op.drop_column('driver_assignment', 'trip_pu') | ||
op.drop_column('driver_assignment', 'trip_sch_do') | ||
op.drop_column('driver_assignment', 'trip_est_do') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('driver_assignment', sa.Column('trip_est_do', postgresql.ARRAY(postgresql.INTERVAL()), autoincrement=False, nullable=True)) | ||
op.add_column('driver_assignment', sa.Column('trip_sch_do', postgresql.ARRAY(postgresql.INTERVAL()), autoincrement=False, nullable=True)) | ||
op.add_column('driver_assignment', sa.Column('trip_pu', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True)) | ||
op.add_column('driver_assignment', sa.Column('trip_do', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True)) | ||
op.add_column('driver_assignment', sa.Column('trip_sch_pu', postgresql.ARRAY(postgresql.INTERVAL()), autoincrement=False, nullable=True)) | ||
op.add_column('driver_assignment', sa.Column('trip_est_pu', postgresql.ARRAY(postgresql.INTERVAL()), autoincrement=False, nullable=True)) | ||
op.drop_column('driver_assignment', 'trip_scheduled_pickup_times') | ||
op.drop_column('driver_assignment', 'trip_scheduled_dropoff_times') | ||
op.drop_column('driver_assignment', 'trip_pickup_addresses') | ||
op.drop_column('driver_assignment', 'trip_estimated_pickup_times') | ||
op.drop_column('driver_assignment', 'trip_estimated_dropoff_times') | ||
op.drop_column('driver_assignment', 'trip_dropoff_addresses') | ||
# ### 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 |
---|---|---|
@@ -1 +1 @@ | ||
from . import util, parsers, optimizers, models, app | ||
from . import util, parsers, optimizers, models, app |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import datetime | ||
import random | ||
from typing import List, Iterable | ||
|
||
|
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
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
Oops, something went wrong.