diff --git a/alembic/versions/31703d707dfb_contributor_name_change.py b/alembic/versions/31703d707dfb_contributor_name_change.py index 0804cf43..60fa9d5f 100644 --- a/alembic/versions/31703d707dfb_contributor_name_change.py +++ b/alembic/versions/31703d707dfb_contributor_name_change.py @@ -5,6 +5,7 @@ Create Date: 2024-02-20 08:25:11.511833 """ + from typing import Sequence, Union from alembic import op @@ -12,15 +13,17 @@ # revision identifiers, used by Alembic. -revision: str = '31703d707dfb' -down_revision: Union[str, None] = '0defbfc71c59' +revision: str = "31703d707dfb" +down_revision: Union[str, None] = "0defbfc71c59" branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None def upgrade() -> None: op.drop_column("dataset_contributor", "name") - op.add_column("dataset_contributor", sa.Column("family_name", sa.String, nullable=True)) + op.add_column( + "dataset_contributor", sa.Column("family_name", sa.String, nullable=True) + ) op.add_column("dataset_contributor", sa.Column("given_name", sa.String)) op.execute("UPDATE dataset_contributor SET given_name = 'name'") with op.batch_alter_table("dataset_contributor") as batch_op: diff --git a/apis/dataset_metadata/dataset_contributor.py b/apis/dataset_metadata/dataset_contributor.py index fb712985..41336079 100644 --- a/apis/dataset_metadata/dataset_contributor.py +++ b/apis/dataset_metadata/dataset_contributor.py @@ -58,10 +58,7 @@ def post(self, study_id: int, dataset_id: int): "type": "string", "minLength": 1, }, - "family_name": { - "type": - ["string", "null"] - }, + "family_name": {"type": ["string", "null"]}, "name_identifier": { "type": "string", "minLength": 1, @@ -202,10 +199,7 @@ def post(self, study_id: int, dataset_id: int): "type": "string", "minLength": 1, }, - "family_name": { - "type": - ["string", "null"] - }, + "family_name": {"type": ["string", "null"]}, "name_identifier": { "type": "string", "minLength": 1,