Skip to content

Instantly share code, notes, and snippets.

@VladimirPal
Last active April 1, 2024 19:14
Show Gist options
  • Save VladimirPal/e256d19df8d85234dde1 to your computer and use it in GitHub Desktop.
Save VladimirPal/e256d19df8d85234dde1 to your computer and use it in GitHub Desktop.
default value alembic
# Boolean
op.add_column('projects', sa.Column('is_closed', sa.Boolean(), server_default=sa.schema.DefaultClause("0"), nullable=False))
# DateTime
op.add_column('projects_users', sa.Column('created_at', sa.DateTime(), server_default=sa.func.current_timestamp(), nullable=False))
@PdrTheCoder
Copy link

awesome

@defp
Copy link

defp commented Feb 2, 2021

👏🏻

@RMagician
Copy link

💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment