o
    @Tj                     @   s   U d Z ddlmZmZ ddlmZ ddlZddlZ	ddl
mZ dZeed< dZeeee df ed< dZeeee df ed	< dZeeee df ed
< dddZdddZdS )z]initial tables

Revision ID: 21a606c2592a
Revises: 
Create Date: 2026-04-07 05:53:06.888319

    )SequenceUnion)opN)
postgresql21a606c2592arevisiondown_revisionbranch_labels
depends_onreturnc                   C   s  t dtjdtjddddtjdt ddtjd	t ddtjd
t tdddtjdt tdddt	d	 t dtjdt ddtjdt
 ddtjdtjddddtjd	t ddtjd
t tdddtjdt tdddtjdgdgddt	d		 t dtjdt ddtjdtjddddtjdtjddddtjdt ddtjdtjt dddtjdtjddddtjdtjddddtjdtjjjd d!ddtjd	t ddtjd
t tdddtjdt tdddtjdgdgddt	d	 t jd"ddgdd# t jd$ddgdd%d& t jd'ddgdd# t d( d)S )*zUpgrade schema.usersnamed   )lengthT)nullable	is_globalFid
created_atznow())server_defaultr   
updated_atface_embeddingsuser_id	embedding
image_pathi  zusers.idCASCADE)ondeletegarmentscategory_main   category_sub2   descriptiontags)astext_typesource_image_pathghost_image_pathi   )dimix_garments_category_main)uniqueix_garments_tagsgin)r(   postgresql_usingix_garments_user_idzINSERT INTO users (id, name, is_global, created_at, updated_at) VALUES ('00000000-0000-0000-0000-000000000000', 'Global', true, now(), now()) ON CONFLICT (id) DO NOTHINGN)r   create_tablesaColumnStringBooleanUuidDateTimetextPrimaryKeyConstraintLargeBinaryForeignKeyConstraintTextr   JSONBpgvector
sqlalchemyvectorVECTORcreate_indexexecute r@   r@   L/home/ubuntu/htdocs/ootd-api/alembic/versions/21a606c2592a_initial_tables.pyupgrade   sN   
rB   c                   C   sN   t jddd t jdddd t jddd t d t d t d	 d
S )zDowngrade schema.r,   r   )
table_namer)   r*   )rC   r+   r'   r   r   N)r   
drop_index
drop_tabler@   r@   r@   rA   	downgradeG   s   

rF   )r   N)__doc__typingr   r   alembicr   pgvector.sqlalchemy.vectorr:   r;   r.   sqlalchemy.dialectsr   r   str__annotations__r   r	   r
   rB   rF   r@   r@   r@   rA   <module>   s    
1