use file id instead of image url
parent
b0bcda789c
commit
848365b0f7
@ -0,0 +1,35 @@
|
||||
"""add file id instead of image url
|
||||
|
||||
Revision ID: 69f4e59ecafb
|
||||
Revises: 382f0cad6652
|
||||
Create Date: 2025-04-08 21:16:17.846817
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import models as models
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '69f4e59ecafb'
|
||||
down_revision = '382f0cad6652'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('user_generated_images', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('file_id', models.types.StringUUID(), nullable=True))
|
||||
batch_op.drop_column('image_url')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('user_generated_images', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('image_url', sa.TEXT(), autoincrement=False, nullable=True))
|
||||
batch_op.drop_column('file_id')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Reference in New Issue