Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 18995

How to use alter_column in alembic?

$
0
0

I am writing a migration in alembic but seems impossible to me the change the value of server_defaults from something to nothing.

My code:

op.alter_column("foo", sa.Column("bar", sa.DateTime(timezone=False), server_default=None, nullable=True))

If i check after the migration the default is still NOW()


Viewing all articles
Browse latest Browse all 18995

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>