From 04698e16656b1a006b28b4586e8eea0d6272a419 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Mon, 8 Apr 2024 04:42:55 +0100 Subject: [PATCH] Set server_default of deleted flag to False --- ...1b101590e74_add_deleted_column_to_category_model.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/alembic/versions/01b101590e74_add_deleted_column_to_category_model.py b/alembic/versions/01b101590e74_add_deleted_column_to_category_model.py index 1325bd2..f01a553 100644 --- a/alembic/versions/01b101590e74_add_deleted_column_to_category_model.py +++ b/alembic/versions/01b101590e74_add_deleted_column_to_category_model.py @@ -6,6 +6,7 @@ Create Date: 2024-04-08 04:39:00.198882 """ + import sqlalchemy as sa from alembic import op @@ -19,13 +20,12 @@ def upgrade() -> None: """Apply the current migration.""" - # ### commands auto generated by Alembic - please adjust! ### - op.add_column("categories", sa.Column("deleted", sa.Boolean(), nullable=False)) - # ### end Alembic commands ### + op.add_column( + "categories", + sa.Column("deleted", sa.Boolean(), nullable=False, server_default="False", default=False), + ) def downgrade() -> None: """Revert the current migration.""" - # ### commands auto generated by Alembic - please adjust! ### op.drop_column("categories", "deleted") - # ### end Alembic commands ###