mirror of
https://github.com/StefBuwalda/cal_counter.git
synced 2025-10-29 19:00:00 +00:00
Reapply "Add must_change_password field to User model"
This reverts commit 47241e341e.
This commit is contained in:
40
migrations/versions/101002a6ef17_.py
Normal file
40
migrations/versions/101002a6ef17_.py
Normal file
@@ -0,0 +1,40 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 101002a6ef17
|
||||
Revises: dea130d45cec
|
||||
Create Date: 2025-08-11 17:16:34.617851
|
||||
|
||||
"""
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "101002a6ef17"
|
||||
down_revision = "dea130d45cec"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table("user", schema=None) as batch_op:
|
||||
batch_op.add_column(
|
||||
sa.Column(
|
||||
"must_change_password",
|
||||
sa.Boolean(),
|
||||
nullable=False,
|
||||
server_default="1",
|
||||
)
|
||||
)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table("user", schema=None) as batch_op:
|
||||
batch_op.drop_column("must_change_password")
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user