From 230a149e2fe27e6f976012cc14e55de7028e5969 Mon Sep 17 00:00:00 2001 From: jadmsaadaot <91914654+jadmsaadaot@users.noreply.github.com> Date: Tue, 30 Jan 2024 09:51:50 -0800 Subject: [PATCH] remove length specification for simple title in migration (#1774) --- .../versions/74e58a15d180_add_simple_title_to_work.py | 4 ++-- epictrack-api/src/api/models/work.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epictrack-api/migrations/versions/74e58a15d180_add_simple_title_to_work.py b/epictrack-api/migrations/versions/74e58a15d180_add_simple_title_to_work.py index 00b947e4e..2c2010c05 100644 --- a/epictrack-api/migrations/versions/74e58a15d180_add_simple_title_to_work.py +++ b/epictrack-api/migrations/versions/74e58a15d180_add_simple_title_to_work.py @@ -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 diff --git a/epictrack-api/src/api/models/work.py b/epictrack-api/src/api/models/work.py index e0faf6756..4808b5298 100644 --- a/epictrack-api/src/api/models/work.py +++ b/epictrack-api/src/api/models/work.py @@ -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)