forked from mtusi2026/mtusi2026lab4
31 lines
875 B
Python
31 lines
875 B
Python
"""add updated_at to attachments
|
|
|
|
Revision ID: 133990c80d19
|
|
Revises: abc40f94dd51
|
|
Create Date: 2026-11-11 21:06:40.354578
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = '133990c80d19'
|
|
down_revision: Union[str, None] = 'abc40f94dd51'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('attachments', sa.Column('updated_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=False))
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_column('attachments', 'updated_at')
|
|
# ### end Alembic commands ###
|