Skip to content

Commit

Permalink
remove length specification for simple title in migration (#1774)
Browse files Browse the repository at this point in the history
  • Loading branch information
jadmsaadaot authored Jan 30, 2024
1 parent d115f38 commit 230a149
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('works', schema=None) as batch_op:
batch_op.add_column(sa.Column('simple_title', sa.String(length=30), nullable=True))
batch_op.add_column(sa.Column('simple_title', sa.String(), nullable=True))
batch_op.alter_column('title', type_=sa.String(length=150))


with op.batch_alter_table('works_history', schema=None) as batch_op:
batch_op.add_column(sa.Column('simple_title', sa.String(length=30), autoincrement=False, nullable=True))
batch_op.add_column(sa.Column('simple_title', sa.String(), autoincrement=False, nullable=True))
batch_op.alter_column('title', type_=sa.String(length=150))

# e.g. title Mt. Milligan Copper-Gold - Amendment - Certificate Modernization, set simple_title = Certificate Modernization
Expand Down
2 changes: 1 addition & 1 deletion epictrack-api/src/api/models/work.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Work(BaseModelVersioned):

id = Column(Integer, primary_key=True, autoincrement=True)
title = Column(String(150), nullable=False)
simple_title = Column(String(50), nullable=True)
simple_title = Column(String(), nullable=True)
report_description = Column(String(2000))
epic_description = Column(Text)
is_cac_recommended = Column(Boolean, default=False, nullable=False)
Expand Down

0 comments on commit 230a149

Please sign in to comment.