Skip to content

[Bug] - Alembic auto generate revision #127

@janssensjelle

Description

@janssensjelle

Describe the bug

When I want to make alembic generate a new migration script it starts to change column widths. Is this related to PR #124 and #118 ?

def upgrade() -> None:
   op.alter_column('ban', 'unban_time',
               existing_type=mysql.BIGINT(display_width=18),
               type_=mysql.BIGINT(display_width=11, unsigned=True),
               existing_nullable=False)
    op.drop_index('ix_ctf_id', table_name='ctf')
    op.alter_column('htb_discord_link', 'account_identifier',
               existing_type=mysql.VARCHAR(length=255),
               nullable=False)
    op.alter_column('htb_discord_link', 'discord_user_id',
               existing_type=mysql.VARCHAR(length=42),
               type_=mysql.BIGINT(display_width=18),
               nullable=False)
    op.alter_column('htb_discord_link', 'htb_user_id',
               existing_type=mysql.VARCHAR(length=255),
               type_=mysql.BIGINT(),
               nullable=False)
    op.alter_column('mute', 'unmute_time',
               existing_type=mysql.BIGINT(display_width=18),
               type_=mysql.BIGINT(display_width=11, unsigned=True),
               existing_nullable=False)

To reproduce

I am working on a new table so I executed command
alembic revision --autogenerate -m "Added macro table"

Expected behavior

I will only see my new table + colums

Relevant log output

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions