mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 01:40:38 +01:00
373c30e53b
* Accounts to be scheduled to be deleted cannot receive emails or login * Create model and create migration for user * Add test for the cron function * Move logic to one place * Use the class name to call the static delete method
33 lines
1,008 B
Python
33 lines
1,008 B
Python
"""empty message
|
|
|
|
Revision ID: 0a5701a4f5e4
|
|
Revises: 01827104004b
|
|
Create Date: 2023-09-07 15:28:10.122756
|
|
|
|
"""
|
|
import sqlalchemy_utils
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '0a5701a4f5e4'
|
|
down_revision = '01827104004b'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('users', sa.Column('delete_on', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True))
|
|
with op.get_context().autocommit_block():
|
|
op.create_index('ix_users_delete_on', 'users', ['delete_on'], unique=False, postgresql_concurrently=True)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.get_context().autocommit_block():
|
|
op.drop_index('ix_users_delete_on', table_name='users', postgresql_concurrently=True)
|
|
op.drop_column('users', 'delete_on')
|
|
# ### end Alembic commands ###
|