3
tg$                 @   s<   d Z ddlmZ ddlZdZdZdZdZdd Z	dd Z
dS )	zTStart

Revision ID: 471121a9ff68
Revises: 
Create Date: 2025-03-06 11:11:13.342808

    )opNZ471121a9ff68c           *   C   s  t jdtjdtj 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ddddtjdtjddddtjd t jdd df} | j| j	ddgdd | j| j	dd
gdd | j| j	dd	gdd | j| j	ddgdd W d Q R X t jdtjdtj 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d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d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dd dN} | j| j	ddgdd | j| j	d dgdd | j| j	d!dgdd W d Q R X t jd"tjd#tj ddtjd$tj
 ddtjd%tj 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d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ddddtjd,tj ddtjd%gd-gtjd# t jd"d d} | j| j	d.d(gdd | j| j	d/d$gdd | j| j	d0d,gdd | j| j	d1dgdd | j| j	d2d)gdd | j| j	d3d+gdd | j| j	d4d*gdd | j| j	d5d&gdd W d Q R X t jd6tjd7tj ddtjd$tj ddtjd8tjddddtjd9tjd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d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ddddtjd?tj 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ddddtjdAtjddddtjd=gdBgtjd7 t jd6d d&} | j| j	dCd9gdd | j| j	dDdAgdd | j| j	dEd$gdd | j| j	dFdgdd | j| j	dGd>gdd | j| j	dHd<gdd | j| j	dId;gdd | j| j	dJd@gdd | j| j	dKd8gdd | j| j	dLd*gdd | j| j	dMd&gdd | j| j	dNd:gdd W d Q R X t jdOtjdPtj ddtjd%tj ddtjdQtjddddtjdRtjddddtjdStj ddtjdTtj ddtjdUtj ddtjd%gd-gtjdP
 t jdOd d~} | j| j	dVdUgdd | j| j	dWdQgdd | j| j	dXdRgdd | j| j	dYdSgdd | j| j	dZdTgdd W d Q R X d S )[Nlicenze	idlicenzeF)nullablecodFitre@   )lengthTdesFitre	codMatrix	desMatrix)schemaix_licenze_codFitre)uniqueix_licenze_codMatrixix_licenze_desFitreix_licenze_desMatrixuseridusernamenameemailx   password_hash   admin   insertstatsendix_user_emailix_user_nameix_user_usernamePINidPINdatalicenzaragsocK   
codclientensrifpinordcl	dataordclzlicenze.idlicenzeix_PIN_codclienteix_PIN_dataix_PIN_dataordclix_PIN_emailix_PIN_nsrifix_PIN_ordcl
ix_PIN_pinix_PIN_ragsoclic_cli	idlic_cliordinecod_cli	serialPBXmacPBXlicattcodLiclicNEWattivanomecognomezlicenze.codFitreix_lic_cli_cod_cliix_lic_cli_cognomeix_lic_cli_dataix_lic_cli_emailix_lic_cli_licNEWix_lic_cli_licattix_lic_cli_macPBXix_lic_cli_nomeix_lic_cli_ordineix_lic_cli_pinix_lic_cli_ragsocix_lic_cli_serialPBX	lic_priceidlic_pricelic_codlic_nameprice
start_dateend_dateix_lic_price_end_dateix_lic_price_lic_codix_lic_price_lic_nameix_lic_price_priceix_lic_price_start_date)r   create_tablesaColumnIntegerStringPrimaryKeyConstraintbatch_alter_tablecreate_indexfDateTimeDateForeignKeyConstraintFloat)batch_op rg   </data/www/html/LML/migrations/versions/471121a9ff68_start.pyupgrade   s    """"ri   c           &   C   s  t jdd dV} | j| jd | j| jd | j| jd | j| jd | j| jd W d Q R X t jd t jdd d} | j| jd	 | j| jd
 | j| jd | j| jd | j| jd | j| jd | j| jd | j| jd | j| jd | j| jd | j| jd | j| jd W d Q R X t jd t jdd d} | j| jd | j| jd | j| jd | j| jd | j| jd | j| jd | j| jd | j| jd W d Q R X t jd t jdd d6} | j| jd | j| jd  | j| jd! W d Q R X t jd t jd"d dF} | j| jd# | j| jd$ | j| jd% | j| jd& W d Q R X t jd" d S )'NrM   )r   rX   rW   rV   rU   rT   r5   rL   rK   rJ   rI   rH   rG   rF   rE   rD   rC   rB   rA   r"   r4   r3   r2   r1   r0   r/   r.   r-   r   r!   r    r   r   r   r   r   r   )r   r_   
drop_indexra   
drop_table)rf   rg   rg   rh   	downgrade   sT    



rl   )__doc__alembicr   
sqlalchemyrZ   revisiondown_revisionbranch_labels
depends_onri   rl   rg   rg   rg   rh   <module>   s   o