Spaces:
Sleeping
Sleeping
File size: 1,053 Bytes
d57efd6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
"""add updated at session
Revision ID: 6e972ae8b93b
Revises: 82908d30ae5a
Create Date: 2024-10-10 14:10:14.433336
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '6e972ae8b93b'
down_revision: Union[str, None] = '82908d30ae5a'
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('session', sa.Column('updated_at', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False))
op.add_column('session_publisher', sa.Column('updated_at', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False))
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('session_publisher', 'updated_at')
op.drop_column('session', 'updated_at')
# ### end Alembic commands ###
|