Increase size of Category.code
to 20 chars
not real sure where the 8 chars came from, but this seems safe...
This commit is contained in:
parent
a58ac92321
commit
5b1008a83e
|
@ -0,0 +1,33 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
"""grow category.code
|
||||
|
||||
Revision ID: 391fac830cb1
|
||||
Revises: be079e974a52
|
||||
Create Date: 2018-08-24 12:49:29.826310
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '391fac830cb1'
|
||||
down_revision = u'be079e974a52'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import rattail.db.types
|
||||
|
||||
|
||||
|
||||
def upgrade():
|
||||
|
||||
# category
|
||||
op.alter_column('category', 'code', type_=sa.String(length=20))
|
||||
|
||||
|
||||
def downgrade():
|
||||
|
||||
# category
|
||||
op.alter_column('category', 'code', type_=sa.String(length=8))
|
|
@ -113,7 +113,7 @@ class Category(Base):
|
|||
|
||||
uuid = uuid_column()
|
||||
|
||||
code = sa.Column(sa.String(length=8), nullable=True, doc="""
|
||||
code = sa.Column(sa.String(length=20), nullable=True, doc="""
|
||||
Unique code for the category, as string.
|
||||
""")
|
||||
|
||||
|
|
Loading…
Reference in a new issue