From e8df94c881eeb4e8858b0e03220c360f58d47dfc Mon Sep 17 00:00:00 2001 From: Danielle Mayabb Date: Mon, 11 Sep 2023 12:10:03 -0700 Subject: [PATCH] Increase login column size to account for longer usernames --- .../3721dd962b84_increase_username_length.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 api/migrations/versions/3721dd962b84_increase_username_length.py diff --git a/api/migrations/versions/3721dd962b84_increase_username_length.py b/api/migrations/versions/3721dd962b84_increase_username_length.py new file mode 100644 index 000000000..79252e36e --- /dev/null +++ b/api/migrations/versions/3721dd962b84_increase_username_length.py @@ -0,0 +1,28 @@ +"""Increase username length + +Revision ID: 3721dd962b84 +Revises: b7cbb5c2b970 +Create Date: 2023-09-11 11:18:35.529329 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = "3721dd962b84" +down_revision = "b7cbb5c2b970" +branch_labels = None +depends_on = None + + +def upgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.alter_column("usr", "login", type_=sa.String(length=100)) + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.alter_column("usr", "login", type_=sa.String(length=20)) + # ### end Alembic commands ###