mirror of
https://github.com/OHV-IT/collabrix.git
synced 2025-12-15 16:48:36 +01:00
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
"""Add kanban_card_activity_log table
|
|
|
|
Revision ID: 0004
|
|
Revises: 0003
|
|
Create Date: 2024-12-13 00:00:00.000000
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '0004'
|
|
down_revision = '0003'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.create_table(
|
|
'kanban_card_activity_log',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('card_id', sa.Integer(), nullable=False),
|
|
sa.Column('user_id', sa.Integer(), nullable=False),
|
|
sa.Column('action', sa.String(), nullable=False),
|
|
sa.Column('field_name', sa.String(), nullable=True),
|
|
sa.Column('old_value', sa.String(), nullable=True),
|
|
sa.Column('new_value', sa.String(), nullable=True),
|
|
sa.Column('created_at', sa.DateTime(), nullable=False),
|
|
sa.ForeignKeyConstraint(['card_id'], ['kanban_card.id'], ),
|
|
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_table('kanban_card_activity_log')
|