"""assignment + settings + notifications Revision ID: 57dec34f11cb Revises: ad8e6cc5de0f Create Date: 2026-07-15 16:43:09.230419 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '57dec34f11cb' down_revision = 'ad8e6cc5de0f' branch_labels = None depends_on = None def upgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.create_table('app_settings', sa.Column('key', sa.String(length=80), nullable=False), sa.Column('value', sa.JSON(), nullable=False), sa.Column('updated_at', sa.DateTime(timezone=True), nullable=False), sa.PrimaryKeyConstraint('key') ) op.create_table('notifications', sa.Column('id', sa.String(length=40), nullable=False), sa.Column('user_id', sa.String(length=40), nullable=False), sa.Column('email', sa.String(length=200), nullable=False), sa.Column('kind', sa.String(length=40), nullable=False), sa.Column('wp_id', sa.String(length=40), nullable=True), sa.Column('project_id', sa.String(length=40), nullable=True), sa.Column('subject', sa.String(length=300), nullable=False), sa.Column('body', sa.Text(), nullable=False), sa.Column('link', sa.String(length=500), nullable=False), sa.Column('status', sa.String(length=20), nullable=False), sa.Column('error', sa.String(length=400), nullable=False), sa.Column('created_at', sa.DateTime(timezone=True), nullable=False), sa.Column('sent_at', sa.DateTime(timezone=True), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_notifications_created_at'), 'notifications', ['created_at'], unique=False) op.create_index(op.f('ix_notifications_kind'), 'notifications', ['kind'], unique=False) op.create_index(op.f('ix_notifications_project_id'), 'notifications', ['project_id'], unique=False) op.create_index(op.f('ix_notifications_status'), 'notifications', ['status'], unique=False) op.create_index(op.f('ix_notifications_user_id'), 'notifications', ['user_id'], unique=False) op.add_column('work_packages', sa.Column('assignee_id', sa.String(length=40), nullable=True)) op.create_index(op.f('ix_work_packages_assignee_id'), 'work_packages', ['assignee_id'], unique=False) # ### end Alembic commands ### def downgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_work_packages_assignee_id'), table_name='work_packages') op.drop_column('work_packages', 'assignee_id') op.drop_index(op.f('ix_notifications_user_id'), table_name='notifications') op.drop_index(op.f('ix_notifications_status'), table_name='notifications') op.drop_index(op.f('ix_notifications_project_id'), table_name='notifications') op.drop_index(op.f('ix_notifications_kind'), table_name='notifications') op.drop_index(op.f('ix_notifications_created_at'), table_name='notifications') op.drop_table('notifications') op.drop_table('app_settings') # ### end Alembic commands ###