Made longitude and latitude in vehicle nullable. Fixed postcode being saved in both postcode and city. City is saved in city properly now

This commit is contained in:
2024-10-16 07:34:23 +00:00
parent a9dd725834
commit fbbdad51c2
2 changed files with 42 additions and 2 deletions

View File

@ -0,0 +1,40 @@
"""Made longitude and latitude in vehicle nullable
Revision ID: 1a457651bb36
Revises: 2ea50aba1814
Create Date: 2024-10-16 07:33:17.926441
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '1a457651bb36'
down_revision: Union[str, None] = '2ea50aba1814'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('vehicles', 'latitude',
existing_type=sa.VARCHAR(),
nullable=True)
op.alter_column('vehicles', 'longitude',
existing_type=sa.VARCHAR(),
nullable=True)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('vehicles', 'longitude',
existing_type=sa.VARCHAR(),
nullable=False)
op.alter_column('vehicles', 'latitude',
existing_type=sa.VARCHAR(),
nullable=False)
# ### end Alembic commands ###