update model
parent
591f0f9cf0
commit
9fd25f37dc
@ -0,0 +1,37 @@
|
||||
"""change memory into extrac profile, and use same update_at for all profile update
|
||||
|
||||
Revision ID: ceaf4dfed584
|
||||
Revises: 78d1c56fd608
|
||||
Create Date: 2025-03-16 12:00:20.875506
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import models as models
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'ceaf4dfed584'
|
||||
down_revision = '78d1c56fd608'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('end_users', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('profile_updated_at', sa.DateTime(), nullable=True))
|
||||
batch_op.drop_column('memory')
|
||||
batch_op.drop_column('memory_updated_at')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('end_users', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('memory_updated_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True))
|
||||
batch_op.add_column(sa.Column('memory', sa.TEXT(), autoincrement=False, nullable=True))
|
||||
batch_op.drop_column('profile_updated_at')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Reference in New Issue