diff --git a/tcsocket/app/management.py b/tcsocket/app/management.py index 81d7a18..57fa741 100644 --- a/tcsocket/app/management.py +++ b/tcsocket/app/management.py @@ -308,3 +308,11 @@ def update_socket_images(conn): print(f'Unable to find {img_thumb_key}, returned 404') else: r.raise_for_status() + + +@patch +def increase_company_name_field_length(conn): + """ + increase company name length from 63 to 255 characters + """ + conn.execute('ALTER TABLE companies ALTER COLUMN name TYPE VARCHAR(255)') diff --git a/tcsocket/app/models.py b/tcsocket/app/models.py index 19ab7eb..0b17f82 100644 --- a/tcsocket/app/models.py +++ b/tcsocket/app/models.py @@ -20,7 +20,7 @@ class Company(Base): public_key = Column(String(20), index=True, nullable=False, unique=True) private_key = Column(String(50), index=True, nullable=False) - name = Column(String(63), unique=True) + name = Column(String(255), unique=True) domains = Column(ARRAY(String(255))) name_display = Column(sa_enum(NameOptions), default=NameOptions.first_name_initial, nullable=False)