Somewhere in your model, likely inside of a Table() object, there is a keyword 
"index" being used which is invalid. Look for that keyword and remove it.





On Thu, Mar 26, 2020, at 1:53 PM, Rob Schottland wrote:
> Suddenly, I can't get alembic (1.3.3?). alembic history does work, but my 
> most recent migration crashes with an enormous stack-trace (as usual): here's 
> my current pretty-simple migration script:
> 
>> """Citation datasource optional
>> 
>> Revision ID: f5a6e316ee8d
>> Revises: 2a181e783d96
>> Create Date: 2020-03-26 08:54:59.547135
>> 
>> """
>> 
>> # revision identifiers, used by Alembic.
>> revision = 'f5a6e316ee8d'
>> down_revision = '2a181e783d96'
>> branch_labels = None
>> depends_on = None
>> 
>> from alembic import op
>> import sqlalchemy as sa
>> 
>> 
>> def upgrade():
>>  op.alter_column('citation', 'id_datasource',
>>  existing_Type=sa.INTEGER(),
>>  nullable=True)
>>  pass
>> 
>> 
>> def downgrade():
>>  op.alter_column('citation', 'id_datasource',
>>  existing_Type=sa.INTEGER(),
>>  nullable=False)
>>  pass
> 
> Here's the last stanza of the stack trace:
> 
>  File 
> "/home/rschottland/.local/share/virtualenvs/astorb_db-u7fxujye/lib/python3.7/site-packages/sqlalchemy/sql/base.py",
>  line 289, in _validate_dialect_kwargs
>  "named <dialectname>_<argument>, got '%s'" % k
> 
> 
> TypeError: Additional arguments should be named <dialectname>_<argument>, got 
> 'index'
> 
> The whole 69 line stack trace is attached.
> 
> This is the 30th migration for this database going back to 2015. Nothing like 
> this has occurred before. Could my alembic package be corrupted? The previous 
> (successful) igration was only 3 days ago.
> 
> Any thoughts on this would be appreciated.
> 
> 
> 
> 
> 

> --
>  You received this message because you are subscribed to the Google Groups 
> "sqlalchemy-alembic" group.
>  To unsubscribe from this group and stop receiving emails from it, send an 
> email to sqlalchemy-alembic+unsubscr...@googlegroups.com.
>  To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sqlalchemy-alembic/619800be-2eb5-4728-a695-5000c3668646%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/sqlalchemy-alembic/619800be-2eb5-4728-a695-5000c3668646%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> *Attachments:*
>  * alembic_stacktrace.txt

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy-alembic/97174b7c-874f-434e-be53-c4996a9045c0%40www.fastmail.com.

Reply via email to