Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] - Alembic auto generate revision #127

Open
janssensjelle opened this issue Dec 2, 2024 · 0 comments
Open

[Bug] - Alembic auto generate revision #127

janssensjelle opened this issue Dec 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@janssensjelle
Copy link
Contributor

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

@janssensjelle janssensjelle added the bug Something isn't working label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant