Spaces:
Running

axeronis commited on
Commit
ec81dcd
·
1 Parent(s): fa43ff7

feat: add image_urls migration for products table

Browse files
backend/alembic/versions/2025_12_25_add_image_urls.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """add image_urls column to products
2
+
3
+ Revision ID: add_image_urls
4
+ Revises: ac9083689fbe
5
+ Create Date: 2025-12-25
6
+ """
7
+ from alembic import op
8
+ import sqlalchemy as sa
9
+ from sqlalchemy.dialects.postgresql import JSON
10
+
11
+ # revision identifiers, used by Alembic.
12
+ revision = 'add_image_urls'
13
+ down_revision = 'ac9083689fbe'
14
+ branch_labels = None
15
+ depends_on = None
16
+
17
+
18
+ def upgrade():
19
+ # Add image_urls column to products table
20
+ op.add_column('products', sa.Column('image_urls', JSON, nullable=True))
21
+
22
+
23
+ def downgrade():
24
+ op.drop_column('products', 'image_urls')