Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Commit

Permalink
Make route.route_short_name a text col
Browse files Browse the repository at this point in the history
  • Loading branch information
avilaton committed Jun 28, 2018
1 parent f300ced commit 4ef02eb
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/gtfs/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Route(Base, ToJSONMixin, Versioned, GTFSBase):
agency_id = Column(types.Integer, ForeignKey("agency.agency_id",
onupdate="CASCADE",
ondelete="SET NULL"))
route_short_name = Column(types.String(50))
route_short_name = Column(types.Text())
route_long_name = Column(types.String(150))
route_desc = Column(types.String(150))
route_type = Column(types.String(50))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"""Change column type on route.route_short_name
Revision ID: 444bb0eb07bc
Revises: 1a6e215d57c2
Create Date: 2018-06-28 09:33:04.268147
"""

# revision identifiers, used by Alembic.
revision = '444bb0eb07bc'
down_revision = '1a6e215d57c2'

from alembic import op
import sqlalchemy as sa


def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.alter_column('routes', 'route_short_name',
existing_type=sa.VARCHAR(length=50),
type_=sa.Text(),
existing_nullable=True)
op.alter_column('routes_version', 'route_short_name',
existing_type=sa.VARCHAR(length=50),
type_=sa.Text(),
existing_nullable=True)
### end Alembic commands ###


def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.alter_column('routes', 'route_short_name',
existing_type=sa.Text(),
type_=sa.VARCHAR(length=50),
existing_nullable=True)
op.alter_column('routes_version', 'route_short_name',
existing_type=sa.Text(),
type_=sa.VARCHAR(length=50),
existing_nullable=True)
### end Alembic commands ###

0 comments on commit 4ef02eb

Please sign in to comment.