feat: add details and profile fields to User model with JSON support

This commit is contained in:
swve 2025-03-29 16:35:07 +01:00
parent af17deff30
commit 6ff53915a8
2 changed files with 38 additions and 1 deletions

View file

@ -0,0 +1,33 @@
"""Add Users details and Profile
Revision ID: adb944cc8bec
Revises: 4a88b680263c
Create Date: 2025-03-29 16:31:38.797525
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa # noqa: F401
import sqlmodel # noqa: F401
# revision identifiers, used by Alembic.
revision: str = 'adb944cc8bec'
down_revision: Union[str, None] = '4a88b680263c'
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('user', sa.Column('details', sa.JSON(), nullable=True))
op.add_column('user', sa.Column('profile', sa.JSON(), nullable=True))
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('user', 'profile')
op.drop_column('user', 'details')
# ### end Alembic commands ###