wBf&I?8(kd#lnU!-=Wb^4Q|4GVRXPQ-h!FeTFRhhUfYBQAKY$8^3ww^@7cDl~ZY?
zr3e`^E$HN{)#9TF4hKYTVqSE~vPZpO;B;p#gu`syM}CS}Su*-Hgv#-Z0J+taV%rJ<
z*2w4rWoHG6z0NqV5&6XtAVNLb`D@)~`LoS)
z=pAX0HW5h+qW^6Ba^9U_5MXjj_Y6r;5J4V2vtxN}Y3Z=zA)st-1$&g+-3I%hbPNE%
zPH=#|3}B$DB5dX6!fs*hW@*Fj>jHt<1^^%`;R~^_ahYC;q=l
z|AVhT=JE%x!m@5wUcU!blobR0p0BXAo0WsL@E>2ft@*gP_^fT%Yy`N4*m#93x!Htl
zY%JJ>gt%?EZMZB1IR&l%2Bqlg;c4M&W%C;f2F~sP!?6++uo1H5;bpV32i{5K{SCp-6_leV@JmWLr)z>Lko
z#lp^p1LA7;N0;Af5r!=WMy$ne-+&?i(GFXSu#CHng{Palj+>ja80hz0X?{cg;ZiiB
ze>sb=iksCR9sdxvvHtCEe|em=g&oHqm!cg1o$&vHq;2o!IkbhNSZ{O@u8E8%}4X~ANhho`%r;{Rq*|1UYwKg|^k>+9z3_qXx2ZC?I)^=CkG
zcKCxT8k#?XfUt$tpY(fJc-#DGt1uq_yk%u?;c90Ci?)Bc+CSPI{tGka<+A1D=jP&J
z6R@>}*`A=46`Li@GuZenta+`t1bD5iY%Ts!@ITQ#+-yC4EZl9R>|izk(=*Jq{?IcG
z^B>mt?BAt*>}_B+!otZd%*hG*Q@u2z9KQqVKb9x@JLIUU3jdt|(cd9SSn;>zX?sB+
z&JH&2|4z(54CVhr?r;77GRps5_rHt%*;~d9;s8&?mv
z|8DAk7x|NxzwJA)Ise%P+s|OzBga4Y$G^z~1Vg{rwM=W`6ApYee=`RFy;iiHb}hf+_QH{de6?>M3X7DdXny
zyJ!OZm7df1IC$FA{Lba|!?1_}02+Xztdx%L{NY=_H^yGm{arp~-@RKuWb(Vf*?btx
zYz~F$M5_X&gHg939
zQ!Ezg;XV2Vup?P!sj1N(=b{#D>9FGP!;B!~fhju*~q
zy6uOaSmL3UXaa8QG$hot5ZM4R5QP=E3|xo8nbS597*L|>@e7dvNuJv@yCGcx#IY&L
z`UR#UQi6$5tu7IroTwY!{PJ-bZAB5l}+1o>*b0YLG6bL2On1bz=
zI)b+qMjz*+1GE`zx}qV`nMmlV=4+Q}<`(GIQ3_+hlKjcn>uw>z
z_mwz*(*_w*|8sNx6Ay@KEW);34Xbn0zBTjs&FioNU^j@JxjHNb$BWvy2`Q!sS_icQ
zcniB$>zjTKQcUp!AaNwENagv}6$*}s4rLu6nhP)hWR485MNwWH^lbQ)U68&~wqZs<
zh9f4NxS0iF1A}=U!#NQq3|dCQjw`T!YrSwf1P_AB`5qht2@Al%lnfy>tMY=P$G>_J%E6gpF_!3oOM3kAVWfmFiVH&sx*h
z0-?WR=g0hIwITZau{p^l_wPSmf}fyKFn%L0I>NeB9q)@nseu9e@y+zT$4@cqm*@5H
zb<)pKKh<(Zm?5;s#(ImEx<1f*Rd*pARLs_-hwnRuR);0fb?+$ThQlMtJnuxIsAbFK~bJRP7qIwz(!CVIvi?t!Nh8b
zU=B7}@fGd9bq(o<*a1@0>D
zDqBg3H?r)vO@pP`l#29)&nP$SSd{S1XvSpYsb4JiX38w{1;pU`~HZ(D*OK)sVFH+~KgG>cN{8c~2ZSvP88|n5Do1RK$x-F?cldr(brk>n4&JgdLwhZ&!~P9<
zG#R1T1L+Ql4glY}cl3H~I|EpN2gP`JvRpMODR?kX67fya-CKVmMCIkxCi_%P_V~zyirNbGgo7UW
zQP#bA_8bdfCQ090u6OGF1MvuM6c)POwr*|dLjCz44cV~R%i*Yp&jJr35c<8@CT9(h
zzD;I@v?>&k${1O=A;5g7cwY-+C8k7Jz1qDOxia?#9ij<~7jMRpr&xhsWW$pBh)@#JCv~5i2v@#>sp8nHT|qfO*ff3
zZ7)ws5$7C)7&UaMM*h^XO5QX;Vc6C`@k8opk0W+yJwh<*i`>1rDK^+Jos4`(E@2Mf
z_x)QX`&l^IaL28J=j*g9#ZVq-+attMmF-3Sl_48u>n(QEc0SsH
z+{F7R6NY_{ANS&?=*ws$`*mweu2LBuGUE=qYt3e6|aarKG~p%eR_VY;o-
z7%ny@@O$dVsi4&4a@YbbTVQU+`ckG=r+Fy}O9d
z;hp;6eKAR2an^!abm{Pb5_p2rCLzko55
zZhaXFRF@v
zXq*|3#@xPqcyb|WDcZ8>m|>C)pSa^8dEy5XuRYQJ{Mvlx%oKVadfv|e7{3AsQ>|?Y
zt7mxU$El8A8uSLUNeKHy`@s;@HxAK?42Z0fa0u*)VrHrFOKC@@3h<0{Oy!b#Fis;D1|Kf!$7R_^bTI&gS;%Ao84;8
zY3i{NY`vO@;s$qnmuv#dTItc>2&3zkdzDj9f9xa0qJEQ^jLk>@yY4GBHQ(dpzCTF-
zbLKH`g}p)JyhZW?V#|8|ET>DmmmaLd9@_1SY;w&O#%VIOf+xQ1jr(*bbX*&TeZTgl
z3a{=l37j!JL?{Uefv)Yh2)6cw(EjvM4%-i1vE~MtT)u4*4Jl?PLf#>=!=`UB0M|c~
zF;voPx+G1d3d#k#Zh;(Cuwkmd?CV5TBgG7%PydMSxZ1CNIP&Zj`kO;+ru<>ZBNMIP
zF7-`s+_kbSV1c%W$XFlR{7a9X6qEdvl&f8x}sH>2>ag9TAs*})CA%SR$u>V^o7fSCd29%|y$
zwoBw=8*LxpHLqzCJom!M2eJiH(=Yqu2?zpDaElbE@+)kYNhDg*z0?uk;w6;zA1$Vk
zy%FnDVgk!yR6Lb@{=6Ty5rzxX^y^2+`dd)lWA91lTp7-+zh?YtM{*PVO15H$d;pOx
z&2HCJcd@Et$pXlxbExnHj%H?g0#5-!J_i)vv443VLpL9UpM~?uHp2b50u<2CKKXP)
zy>z=s44VSWY!XDt{6;2?f6ODTJ1xuphJ6x!TthZx6LnQNuZo`P>@ZT+FJn^w8fbS#
z%ySY7@RklQ#(%!*9|CBCtylk|&4mh8KIiJZ<8|uRTjf;1%g*ar)qo@A=7+=h6mSa*l~&b_sxCVhD!T*8sJ!FE5lL)K~VtNx|i%z$>HIE?tvh
z%5mSnhq2{c0(-ZC(DlCZXj5$ub+MAYcpIGy((3)ZZd(6&G9Z````5=a-%ILu1t!n>
zxX`lzAA+`rz#0bux)e-g?-rKL=sKRaHTyK_WWK5>uOUHKb*EVDNM$~<&~dBpezD3$
zZ?e@q+zv=vO5Uw%2tx9?L|UZ?5q#f62X{gz_K;Qh;fX+NnqOe}+65SlNFnW#RUJ}z
z^kf$Lxis;L_$`39)~Au%yAa8BMkZG2z;AP=f}3O!;YH!m+Q98gN)CATs~G%!QJT=+
zw5?qCezV(D!;qCYgyMReUv+nM5v*5*-tUnnj@u|($YX7l{PaeMXsFIyQkYv!b?N%C
z@mfT|CZ9fuJ|578i6KKM$AD__F^qmvlLf3FPV3^#a@>f^gWm#$$?Ws;-W8xbS2m%kbZ5R5Sm%D?#9eWpGM
zObqcTx!cPja1#$KHAk2@n&TM
z3(CeOeD}~l!F93CE=#!m-ZHg4yPjO)1sKXE8^pM!w)|zo=g>DBKRtoS1%@}niQ|hay-K*N%H?7%=0*a!>~g5^AUt8MD|n%PTlg|bE`2B(TcvMvt|r@
zHh~ejPHU#D224yQLVhO4Zu9(5Z1r_rFWat`i9>%#tACo+{(+D`zG6hDHmX?}E%L^S
zdQ#V`jiMR4KCY$MgH!huYetr(Y?A
z`v_DMdxGPRXSu*GJ+%?{cM}BaV-l1JSv1G5#LlA<`$H~j957ps6u~nU%X*Jg^oIg%
z>7AK8C>s)RL%M3GJFkLT{TcO-tlxfoeRgMhi8QklrR)z+z4Lfx64d84?MH18*DL&D
z0O%7-_CP|9*4bPa$p%fnJsvq
z7?8oQKfxA#Zy$(?;>e)I%2zG1F^jou0WLD=AeD#}o>G54a`ORCQgl)x`Z
zv!9MKus~1Ul5f)O(NT0WfUNR!2<~E}5~No8Vuu=*>?DB+{1xa2eNyovQoh}~y#^}4
z_SkY*fb)vYn>fKMxSoZ6rra$ai>^%-lziVHe|;9R$FW+TKlm6M{j@2}`&g3w6q9xH
z^G$H#6OF8h>jK$lR41<#GP%8DYM`k*BwH1$YrE`iK*rJQa=H(Db~|2RzLJ47+j99;
zQ}Zsof)w<7j5o)3-#bI{*4|>>=dW7>k$%p6^l3UsBuF?kjOl+uILRtGlG4S2t?Lc}
zG}5Gvx$-Kj)!(}cC=r3;>1wTlF5QWwuQ$<=23QQ+!(~IpI*Y;oo!x#0hiO!{%`C%-
zza=2q9k^kiB5Z}dk|M~n@U@JsL!c^02i2e~q1%=K_CB=VY9^TT)|r94CzW@jAX3L>
zy74r^8q0fjmK0hIeK<|!fD_%uX3~RGA#!<&f||f$xv4Dwp1Jke_*E>y{V;%nS*otDirU)xrgAw{+fH^o
z#v1o%;$hzdmhiiTgiv7rnopyp|E_cotw-)$$7T|~r44E
zX3v7Yghcs!U|0EEahZ%OU1D@0ywPOqACn}O+kaG-vhMg;CjMTBx?(@<^CRS)2)YAR
zRA$SOp){xkS#X(J?ZVkQGTo;OcpM#C1FI6x!pIC@l_0-Ncm*<@!*|NGQ3VbjJa#R*
zMh%lAHIqXV*~bH4G1p3>`t9k%koG*PqizB?A#nVm%F>-$g*M0_Zu6lYDEtAZI~%+L
zo%JHuJ;;x{4wHdpMdxyip~h3qBMys(u(AlHgxll!WKKhMKL;btbm&McliRlwQO1Ox
z8BpayDY(9yd~aDHZQef#G&3kDH)@h@c>+?Fiz!K3PGMO%2$tvn|
z?P_u6r0;gGoG46B%+euupG_C&q^2|C!Fkv~g;IY8VToe_{{!jk2PRnF+SXWeh6zp^
zb2rbL6+0r+p-8ajIZ7_Ey4F&+^vykbGLl_9NA4q8FnN!VdS)&_`|Fe^GwKtJ#Ms@B
zt4OfCfH~p1i5f!7O*FF4JB7FUyGpUlTZ>HNUJ9Iux!8ZAd9CR*e(cCUrQaSY+q(e<
z&M36zF|`TYT|~L2k$IwX5;&ZY#mF9gnmF7ZZS7H)CVTUhGV>9j_|o)u9j|-dYkU%=
z1Ns54=`9rhtvKI_G6uvgKH#7d`4f_MQ3=vD=e_SJW~gv=6u-9Mf=I(QC;Eg_
zf&H&f)50yEmXtgtYG)pT8GUUFVOBg#t@ce{;96sq9PDT-M~MqHpaDZkG4mEkZV8Lx|-}Y&|LKQG>RvuW>0rHuXbU%om9ol;x}ct2eIn;RQAFuH-!_w_tPX-Fuu@YuHT7V8fzvTAQ{F_xqa9
z(3kKnk8Lzk)nm&yAG*?qB`{4#0X{O}G1_VOCkFJ)+0Gj-((%cT
zMYj#aH%upDCYN_@{Nk&~;BMVc>1r{k9js#NeI_rAi;FPCu-rf)$OSu+v!+%#iE8^7j}a`vm8#qa|gMIi<3WHiJDwguKEVkNdm`u55HZ-fGb9NbOyY
z$%ZS=wbR42xEND{Mm;nzVFXD#?poHSC-Djk;SrqPG+o;7Oz*pSoknwf#pmvpO-q(y
zhL8+9WD=OoIL#S>*XZ?0trW13jjk?2!hCv3kK=2mWkvJzUZM1fH3}skmLM|Gk@+7A
zImhw)P?F6Fo=IR2b)`_Pc03{3Vx9;T$VF;a5e^A{cLEDtA3{A~$v}*7Un)11h>*3l
zW0J}DYp=^rTnDmSw{w+yP(eg5!K&bDgYV$A@#>LE9z3k3I)oV;l9n8?HDn&6m>XyJ
zHQ4FA2{^b{1v^uqAKp7w*t$=u=n0ri@I+gVuXx^d0FC(&p_wDBAcVTgQ1b10>q+%ZY0x=e3Gk=OuvcWx2_lpZVw}uHnPRXh&Fb&rYk;D$Z>xkJa1MtZ-bq
zc#vqq22y8Mk9gt5rIzkgj!oip?roIs4kIw=E2E?us;AIjl`e!Du$BLMo(IsPg1vUl
zk6UuHWU}w2n@AhqNIP%fOnpqLf;0T+^-)iMrC|Q|@
zT>j;8itKVZEoCUY$+lOkP0Jv)T6;kh0y}bNwvEUMGl*b5!xm~xr<<$I-EPMZI-Ooh
zfrSOV!$`7#tGf$vZ%5Wu2MDZw{(YSPRR(S()>p0~(l}gv$*L=+;-IsvZc9s=ExAT_m`L?YG)sbB@dI>
zy_?j3vVv{q@P>L%Rycn3xO~pYPSY$mumgsmew4x&^fXe9L23S>?lwp-_$$Wg&4##a
zG508WE7Ju0?kO|i@awI49~6wj{~{uWPZm+F
zl(gr*vs_1%J-KR!9buHKX}<3hm^ZyIY;Bc*wtbv)?52e_SABc4dn+5}pzw3KgX{_$an7jOE?vyaV5Iu-63PWTum1>hkZfW3KK+$SffFA35OHNUb1^?S{Q;TI
zL>WHH*|+e4X7xi~!%(3~w73tyz|e-S=@2w69}VT{Ty}1TTkF*WSd>MI-rH+Uhzab)
zH3{=bWP4Aw7kyuzpT6`N@JTtYohtuimP@^-dq?qub_Qj|+v$auPi27lKQpc9PQaZI(w`0?Uj}
z=aR*Wat3$xBZ-^#EtKkquD}bxatS%x^*PP|r$6AJw$~G8eXMAs;zv27Cyk7H~bIyIP
z?R{PE`&`!?5fvFf>J!dRpm?Kc!0ei-!c49Fv7J8{xqF^ej}Xcij=C>Xue%nkC1yf)
zwEaOk4gX(}2W-jYol+&RLEq~!?BEo;N31$a-1NVzR)X7c<4k!4tWG;qpEeMK{BGA2t__K_pVjUiQPnDZhtjj||R
z0SmimQh8%?!zdbzrYUwY+*Vd@+4jHQ*|mV`T_u4hegc5KQV?jqK?9j+VKaEL^tW
zNA3(QiPBYk@J8df%!cENYcd3aTHT)okVl2$w+x1g*XdcZ!yH9a)8_)xWtVaI%zM`#3ve4=3Lutkw%bXzSjvkW0H9D$dgMNzEM7
zDTuPiR}nNdg>dSFg9f7uuY}0*!JTHvbkV45czzS5N!6Iaz3YNd`)F_=ZXgn)_4kew
zMYbZolOFj4dx@jvix)$6)e~4C_9S}GpZYR5RNV+ABxBjCV^t6lCf8@~3;e_fi^Co^
za$~3+I{QfOwA$Fe%N;mdqo(|lxh_tdats+I098u2Y)_T%)TLc>=2W%Wd+rVXY44K6H>oUU
z^q}*A2AB`o`e(O(G^ga``M7oym?pJ+L&t2XN^}^?i^M?DTE%P;vV&m*n?7=3!{qu<
z4fv?hB*>8&gfl$|X(=Bc-HCsIfEZNkc3YUf)+jdD7xkc`!p63e384GTG&_lXYRNHi
zy}-bt6wG7XuiSbFv-uKgxkjWTsWL_ObapM}YhWw{pb^1RV+_qKE}8x7dk0`fr@f@9r>LINWO3I$lGjE<&+95-%UoJ$A!aC5
zv8yBHoP>KsUSe`Z#e(cKbJkwC+NgQEo~GC4?-(s)Lcbb|G1E*@d1H+7>SEpD?B$$}
zuc(mWB)LtGEwXz1f@^_kM3`}z+xMWBfXLq&Q-8S9LvQRTvs6855NPd8K#
zcp>Z-AD{n~QJQ*IEK=_(!M;~b7wL~->GfsS4NopserSOvLS_$ydhz8ud36w&|4KgP
z8+Kx7d5kfn8Ckv?8)hw8-|!k!rH
z
m!sQKT
zCxtG%GVXfJcB^`nnm>nOzWE+j$?SHa6wY$jy%|@#7_e^Yd3?fM0hm27K|JvNNu~82
zBo0GDJb{#dX*QAM8m$*1TwlG;3l3n{k6^4qq;t6*nReWPc9ZTlt8OWk~f
z>AMA@r52X!Iv0?)D^@2p_&)aRkxd?MRU*m-u>+5vVl`;eswk`AtkBfXPxdswKTvQn
zHWsE2yAGmq48OVAODY%`;&*u=V}5v0eB+}wxju#X$z^;GPGxlvfuLgWr7IgB;}t3nWxjB-?J&t$1wJZ3Y&%tdkdya~)xWNh^=fhXPAn
zl-)Rw@&p8hgQ9VQuUd6*Fgu&a#b)9_1WK!l@kF}aL)f28_Xc?50d?Z66(q(zsd#4v
zeCLD>O^+SVaLSxWVh*A3|19-M=e_&)Zx}zoMGG#lh_|JlrUp>pN*Ra!kpC&`{8ET^
z>EW|Swh-RiVdDYIvVlYZI7@3PD{MoU!9yL~v(f`^Z-Z5y#gZLm!WR#;yBhckm*&uK
zVzuLBL6`irnRYq8|ut7MrHX
zu>Xcu7rcS~Thy3Uzbmpr@>~Ok(EH)157XdMvU6hZMaV&2@P9gL9)6G)td1Rhvw{5Z
zVrr|Cng96;$c%PQleYS-i`00paaHF;KL~JrIL+sp(YRVl*>!--aBKvFjmimP{*IDJ
z#qZ4gRbSOb4(t9NS9g%E7;kb{7BW!AY&dJ1An=*8{x$3;GzaB@uv_QqoVnc|$u|U}8!?UI8|kQx
z$LzgxjCWdjTbZJ^C^`XQ=jfCsQmUrQlZ~Nhi)~jCrs5kxh1|OkTdhEk-sg9`2%Cr?0%rprC
zids}~d%aQQfpf+h2Cd=2&K;WLsw;OqyR(JJP?CUC`ef+ftoK;TWc>*PP@(wZ#L_P&
ze{DKGZwjpAIBCjwX;=w)w2T`Zqn-a|WOz^iJ7hDzq*Id%9KI$82%5}v=aS#q*}kd!
zYAN=YA&vY
zl$H96wXp4dzNP?sL6q#Os!jYM0M>8ugI|CIr?;VVM&x>TxyJZ+IysK~PbaBKq9WFg
zN1BIu?={z60pCHuWN8
z2#dgd;-R8AQfA@yd@(33dS5=!<_{VSCex-;x@Z{UnG8JC(Tqoo9e<_-mT}}EY9UF|_HaTB&2eQwbaK^E@
zNdbb9ZpxNAuh{w4-=)
zg5H>AtgTsWiZt{o*JyUxY~*Y8eSW|z!x2F#XM29yrUi-`%@ja!4hg@Ai$PjplEZ-6
z26Db|-cSKEZkioOth~{TFOr850Jy#0zYckB1QxJ&WC*qbYfR&d>I@?FMjNjoLRw^+
zxrOg;g_3Y~Xv3S9K%tnO}h7?#E1euueeM}Yi6RAhkn=*PGGKEzs4~%axw&HPH6-Q
zjx6g0eY?bpExoxZ{18>aspZxGHIY_OzB|0nQY0cqR>t$6nauL+8v19&A-4}wwR(z_
zp1Zc$e(D4#;8zeKl*UKr${+QaGBTQovFTjKWc>k(k*{L45V@o?OE&oLgJLe;sNK>a24VTLrk59QP#^^psl5f1Cv`^z?6npr0L}!-g*4%H}
zGqx?1xzRwng9?-Z+Cf@O`sI69(Hesb_rWUVils;uVS@vt4~dtr0dfw0GF0pVb*Y9w
zl^qhl+zIyu(~yAMXK_74dMcc|`t?j0snvZSJ^`@eR9WOUqT$FeI1P3fXqF|zmmx@Hwfc<4
zPloAgTrcKF>I%^8u8h&LK{;#`EL@r-A7>fa4JXchR{%SM*93)Wz~||49=yq?%rje;
zl$?fryPd8z2mIi(RG5bT0jy1yGpGmGv=m=A6mMu8^w>{Z4M})ChHJtR)EQ15jMmCu
zgFlaR;#`VEfLme@AB;j0V5RyjNdmI;0K9732r2z0$!gz@{3(>^zgtxhP6cf+EAj_Q
zy{WPXmqvriedA&m7?;ht*OSN?3kig|M3?}9wmZxpZicb-u{tr+r!}I_E
literal 0
HcmV?d00001
From 60eee55f2d760866ae374dc6d19269e6e920d892 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Wed, 12 Feb 2025 23:41:04 -0600
Subject: [PATCH 012/126] refactor: test migrastion
---
apps/dokploy/drizzle/0066_rapid_morbius.sql | 153 ++++++
apps/dokploy/drizzle/0066_soft_kronos.sql | 187 -------
apps/dokploy/drizzle/meta/0066_snapshot.json | 486 +++++++++++++++---
apps/dokploy/drizzle/meta/_journal.json | 4 +-
apps/dokploy/migrate.ts | 117 +++++
apps/dokploy/package.json | 1 +
packages/server/auth-schema.ts | 4 +-
packages/server/src/db/schema/account.ts | 27 +-
packages/server/src/db/schema/admin.ts | 195 +++----
packages/server/src/db/schema/auth.ts | 4 +-
packages/server/src/db/schema/certificate.ts | 21 +-
packages/server/src/db/schema/destination.ts | 16 +-
packages/server/src/db/schema/git-provider.ts | 20 +-
packages/server/src/db/schema/notification.ts | 20 +-
packages/server/src/db/schema/project.ts | 16 +-
packages/server/src/db/schema/registry.ts | 16 +-
packages/server/src/db/schema/server.ts | 21 +-
packages/server/src/db/schema/session.ts | 20 +-
packages/server/src/db/schema/ssh-key.ts | 19 +-
packages/server/src/db/schema/user.ts | 74 ++-
20 files changed, 978 insertions(+), 443 deletions(-)
create mode 100644 apps/dokploy/drizzle/0066_rapid_morbius.sql
delete mode 100644 apps/dokploy/drizzle/0066_soft_kronos.sql
create mode 100644 apps/dokploy/migrate.ts
diff --git a/apps/dokploy/drizzle/0066_rapid_morbius.sql b/apps/dokploy/drizzle/0066_rapid_morbius.sql
new file mode 100644
index 000000000..9deea8818
--- /dev/null
+++ b/apps/dokploy/drizzle/0066_rapid_morbius.sql
@@ -0,0 +1,153 @@
+CREATE TABLE "user_temp" (
+ "id" text PRIMARY KEY NOT NULL,
+ "name" text DEFAULT '' NOT NULL,
+ "token" text NOT NULL,
+ "isRegistered" boolean DEFAULT false NOT NULL,
+ "expirationDate" text NOT NULL,
+ "createdAt" text NOT NULL,
+ "canCreateProjects" boolean DEFAULT false NOT NULL,
+ "canAccessToSSHKeys" boolean DEFAULT false NOT NULL,
+ "canCreateServices" boolean DEFAULT false NOT NULL,
+ "canDeleteProjects" boolean DEFAULT false NOT NULL,
+ "canDeleteServices" boolean DEFAULT false NOT NULL,
+ "canAccessToDocker" boolean DEFAULT false NOT NULL,
+ "canAccessToAPI" boolean DEFAULT false NOT NULL,
+ "canAccessToGitProviders" boolean DEFAULT false NOT NULL,
+ "canAccessToTraefikFiles" boolean DEFAULT false NOT NULL,
+ "accesedProjects" text[] DEFAULT ARRAY[]::text[] NOT NULL,
+ "accesedServices" text[] DEFAULT ARRAY[]::text[] NOT NULL,
+ "email" text NOT NULL,
+ "email_verified" boolean NOT NULL,
+ "image" text,
+ "role" text,
+ "banned" boolean,
+ "ban_reason" text,
+ "ban_expires" timestamp,
+ "updated_at" timestamp NOT NULL,
+ "serverIp" text,
+ "certificateType" "certificateType" DEFAULT 'none' NOT NULL,
+ "host" text,
+ "letsEncryptEmail" text,
+ "sshPrivateKey" text,
+ "enableDockerCleanup" boolean DEFAULT false NOT NULL,
+ "enableLogRotation" boolean DEFAULT false NOT NULL,
+ "enablePaidFeatures" boolean DEFAULT false NOT NULL,
+ "metricsConfig" jsonb DEFAULT '{"server":{"type":"Dokploy","refreshRate":60,"port":4500,"token":"","retentionDays":2,"cronJob":"","urlCallback":"","thresholds":{"cpu":0,"memory":0}},"containers":{"refreshRate":60,"services":{"include":[],"exclude":[]}}}'::jsonb NOT NULL,
+ "cleanupCacheApplications" boolean DEFAULT false NOT NULL,
+ "cleanupCacheOnPreviews" boolean DEFAULT false NOT NULL,
+ "cleanupCacheOnCompose" boolean DEFAULT false NOT NULL,
+ "stripeCustomerId" text,
+ "stripeSubscriptionId" text,
+ "serversQuantity" integer DEFAULT 0 NOT NULL,
+ CONSTRAINT "user_temp_email_unique" UNIQUE("email")
+);
+--> statement-breakpoint
+CREATE TABLE "session_temp" (
+ "id" text PRIMARY KEY NOT NULL,
+ "expires_at" timestamp NOT NULL,
+ "token" text NOT NULL,
+ "created_at" timestamp NOT NULL,
+ "updated_at" timestamp NOT NULL,
+ "ip_address" text,
+ "user_agent" text,
+ "user_id" text NOT NULL,
+ "impersonated_by" text,
+ "active_organization_id" text,
+ CONSTRAINT "session_temp_token_unique" UNIQUE("token")
+);
+--> statement-breakpoint
+CREATE TABLE "account" (
+ "id" text PRIMARY KEY NOT NULL,
+ "account_id" text NOT NULL,
+ "provider_id" text NOT NULL,
+ "user_id" text NOT NULL,
+ "access_token" text,
+ "refresh_token" text,
+ "id_token" text,
+ "access_token_expires_at" timestamp,
+ "refresh_token_expires_at" timestamp,
+ "scope" text,
+ "password" text,
+ "is2FAEnabled" boolean DEFAULT false NOT NULL,
+ "created_at" timestamp NOT NULL,
+ "updated_at" timestamp NOT NULL,
+ "resetPasswordToken" text,
+ "resetPasswordExpiresAt" text,
+ "confirmationToken" text,
+ "confirmationExpiresAt" text
+);
+--> statement-breakpoint
+CREATE TABLE "invitation" (
+ "id" text PRIMARY KEY NOT NULL,
+ "organization_id" text NOT NULL,
+ "email" text NOT NULL,
+ "role" text,
+ "status" text NOT NULL,
+ "expires_at" timestamp NOT NULL,
+ "inviter_id" text NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "member" (
+ "id" text PRIMARY KEY NOT NULL,
+ "organization_id" text NOT NULL,
+ "user_id" text NOT NULL,
+ "role" text NOT NULL,
+ "created_at" timestamp NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "organization" (
+ "id" text PRIMARY KEY NOT NULL,
+ "name" text NOT NULL,
+ "slug" text,
+ "logo" text,
+ "created_at" timestamp NOT NULL,
+ "metadata" text,
+ "owner_id" text NOT NULL,
+ CONSTRAINT "organization_slug_unique" UNIQUE("slug")
+);
+--> statement-breakpoint
+CREATE TABLE "verification" (
+ "id" text PRIMARY KEY NOT NULL,
+ "identifier" text NOT NULL,
+ "value" text NOT NULL,
+ "expires_at" timestamp NOT NULL,
+ "created_at" timestamp,
+ "updated_at" timestamp
+);
+--> statement-breakpoint
+ALTER TABLE "project" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "destination" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "certificate" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "registry" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "notification" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "git_provider" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "server" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "project" DROP CONSTRAINT "project_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "destination" DROP CONSTRAINT "destination_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "certificate" DROP CONSTRAINT "certificate_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "registry" DROP CONSTRAINT "registry_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "notification" DROP CONSTRAINT "notification_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "git_provider" DROP CONSTRAINT "git_provider_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "server" DROP CONSTRAINT "server_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "ssh-key" ALTER COLUMN "adminId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "session_temp" ADD CONSTRAINT "session_temp_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "account" ADD CONSTRAINT "account_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "invitation" ADD CONSTRAINT "invitation_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "invitation" ADD CONSTRAINT "invitation_inviter_id_user_temp_id_fk" FOREIGN KEY ("inviter_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "member" ADD CONSTRAINT "member_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "member" ADD CONSTRAINT "member_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "organization" ADD CONSTRAINT "organization_owner_id_user_temp_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "project" ADD CONSTRAINT "project_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "destination" ADD CONSTRAINT "destination_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "certificate" ADD CONSTRAINT "certificate_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "registry" ADD CONSTRAINT "registry_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "notification" ADD CONSTRAINT "notification_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "git_provider" ADD CONSTRAINT "git_provider_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "server" ADD CONSTRAINT "server_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0066_soft_kronos.sql b/apps/dokploy/drizzle/0066_soft_kronos.sql
deleted file mode 100644
index cc627fa8e..000000000
--- a/apps/dokploy/drizzle/0066_soft_kronos.sql
+++ /dev/null
@@ -1,187 +0,0 @@
--- Create new tables
-CREATE TABLE IF NOT EXISTS "account" (
- "id" text PRIMARY KEY NOT NULL,
- "accountId" text NOT NULL,
- "providerId" text NOT NULL,
- "userId" text NOT NULL REFERENCES "user"("userId"),
- "accessToken" text,
- "refreshToken" text,
- "idToken" text,
- "accessTokenExpiresAt" timestamp,
- "refreshTokenExpiresAt" timestamp,
- "scope" text,
- "password" text,
- "is2FAEnabled" boolean DEFAULT false NOT NULL,
- "createdAt" timestamp NOT NULL,
- "updatedAt" timestamp NOT NULL,
- "resetPasswordToken" text,
- "resetPasswordExpiresAt" text,
- "confirmationToken" text,
- "confirmationExpiresAt" text
-);
-
-CREATE TABLE IF NOT EXISTS "organization" (
- "id" text PRIMARY KEY NOT NULL,mn cj.
- "name" text NOT NULL,
- "slug" text,
- "logo" text,
- "createdAt" timestamp NOT NULL,
- "metadata" text,
- "ownerId" text NOT NULL REFERENCES "user"("userId"),
- CONSTRAINT "organization_slug_unique" UNIQUE("slug")
-);
-
-CREATE TABLE IF NOT EXISTS "member" (
- "id" text PRIMARY KEY NOT NULL,
- "organizationId" text NOT NULL REFERENCES "organization"("id"),
- "userId" text NOT NULL REFERENCES "user"("userId"),
- "role" text NOT NULL,
- "createdAt" timestamp NOT NULL
-);
-
-CREATE TABLE IF NOT EXISTS "invitation" (
- "id" text PRIMARY KEY NOT NULL,
- "organizationId" text NOT NULL,
- "email" text NOT NULL,
- "role" text,
- "status" text NOT NULL,
- "expiresAt" timestamp NOT NULL,
- "inviterId" text NOT NULL
-);
-
-CREATE TABLE IF NOT EXISTS "verification" (
- "id" text PRIMARY KEY NOT NULL,
- "identifier" text NOT NULL,
- "value" text NOT NULL,
- "expiresAt" timestamp NOT NULL,
- "createdAt" timestamp,
- "updatedAt" timestamp
-);
-
--- Alter existing user table to add new columns
-ALTER TABLE "user"
-ADD COLUMN IF NOT EXISTS "email" text,
-ADD COLUMN IF NOT EXISTS "emailVerified" boolean DEFAULT false,
-ADD COLUMN IF NOT EXISTS "role" text,
-ADD COLUMN IF NOT EXISTS "certificateType" text DEFAULT 'none',
-ADD COLUMN IF NOT EXISTS "serverIp" text,
-ADD COLUMN IF NOT EXISTS "host" text,
-ADD COLUMN IF NOT EXISTS "letsEncryptEmail" text,
-ADD COLUMN IF NOT EXISTS "sshPrivateKey" text,
-ADD COLUMN IF NOT EXISTS "enableDockerCleanup" boolean DEFAULT false,
-ADD COLUMN IF NOT EXISTS "enableLogRotation" boolean DEFAULT false,
-ADD COLUMN IF NOT EXISTS "enablePaidFeatures" boolean DEFAULT false,
-ADD COLUMN IF NOT EXISTS "metricsConfig" jsonb DEFAULT '{}',
-ADD COLUMN IF NOT EXISTS "cleanupCacheApplications" boolean DEFAULT false,
-ADD COLUMN IF NOT EXISTS "cleanupCacheOnPreviews" boolean DEFAULT false,
-ADD COLUMN IF NOT EXISTS "cleanupCacheOnCompose" boolean DEFAULT false,
-ADD COLUMN IF NOT EXISTS "stripeCustomerId" text,
-ADD COLUMN IF NOT EXISTS "stripeSubscriptionId" text,
-ADD COLUMN IF NOT EXISTS "serversQuantity" integer DEFAULT 0;
-
--- Migrate email from auth table to user table
-UPDATE "user" u
-SET "email" = a."email"
-FROM "auth" a
-WHERE a."id" = u."userId";
-
--- Migrate admin users
-WITH admin_users AS (
- UPDATE "user" u
- SET
- "emailVerified" = true,
- "role" = 'admin',
- "token" = a."token",
- "certificateType" = adm."certificateType",
- "serverIp" = adm."serverIp",
- "host" = adm."host",
- "letsEncryptEmail" = adm."letsEncryptEmail",
- "sshPrivateKey" = adm."sshPrivateKey",
- "enableDockerCleanup" = adm."enableDockerCleanup",
- "enableLogRotation" = adm."enableLogRotation",
- "enablePaidFeatures" = adm."enablePaidFeatures",
- "metricsConfig" = adm."metricsConfig",
- "cleanupCacheApplications" = adm."cleanupCacheApplications",
- "cleanupCacheOnPreviews" = adm."cleanupCacheOnPreviews",
- "cleanupCacheOnCompose" = adm."cleanupCacheOnCompose",
- "stripeCustomerId" = adm."stripeCustomerId",
- "stripeSubscriptionId" = adm."stripeSubscriptionId",
- "serversQuantity" = adm."serversQuantity"
- FROM "auth" a
- INNER JOIN "admin" adm ON a."id" = adm."adminId"
- WHERE a."id" = u."userId"
- RETURNING u."userId", u."email"
-)
-INSERT INTO "account" ("id", "accountId", "providerId", "password", "userId", "createdAt", "updatedAt")
-SELECT
- gen_random_uuid(),
- a."id",
- 'credentials',
- a."password",
- au."userId",
- NOW(),
- NOW()
-FROM "auth" a
-INNER JOIN admin_users au ON a."email" = au."email";
-
--- Create organizations for admin users
-WITH admin_orgs AS (
- INSERT INTO "organization" ("id", "name", "slug", "createdAt", "ownerId")
- SELECT
- gen_random_uuid(),
- 'My Organization',
- concat('org/', u."userId"),
- NOW(),
- u."userId"
- FROM "user" u
- WHERE u."role" = 'admin'
- RETURNING *
-)
--- Migrate regular users
-UPDATE "user" u
-SET
- "emailVerified" = true,
- "role" = 'user',
- "token" = a."token",
- "canCreateProjects" = usr."canCreateProjects",
- "canAccessToSSHKeys" = usr."canAccessToSSHKeys"
-FROM "auth" a
-INNER JOIN "user" usr ON a."id" = usr."userId"
-WHERE a."id" = u."userId"
-AND NOT EXISTS (
- SELECT 1 FROM "admin" adm WHERE a."id" = adm."adminId"
-);
-
--- Create accounts for regular users
-INSERT INTO "account" ("id", "accountId", "providerId", "password", "userId", "createdAt", "updatedAt")
-SELECT
- gen_random_uuid(),
- a."id",
- 'credentials',
- a."password",
- u."userId",
- NOW(),
- NOW()
-FROM "auth" a
-INNER JOIN "user" u ON a."email" = u."email"
-WHERE u."role" = 'user';
-
--- Create member relationships
-INSERT INTO "member" ("id", "organizationId", "role", "userId", "createdAt")
-SELECT
- gen_random_uuid(),
- o."id",
- 'user',
- u."userId",
- NOW()
-FROM "user" usr
-INNER JOIN "user" u ON usr."userId" = u."userId"
-INNER JOIN "admin" adm ON usr."adminId" = adm."adminId"
-INNER JOIN "user" admin_u ON adm."adminId" = admin_u."userId"
-INNER JOIN "organization" o ON o."ownerId" = admin_u."userId"
-WHERE u."role" = 'user';
-
--- Drop old tables (after all data is migrated)
-DROP TABLE IF EXISTS "sessionTable" CASCADE;
-DROP TABLE IF EXISTS "admin" CASCADE;
-DROP TABLE IF EXISTS "auth" CASCADE;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0066_snapshot.json b/apps/dokploy/drizzle/meta/0066_snapshot.json
index 3ffb0dbf0..1bf9811a3 100644
--- a/apps/dokploy/drizzle/meta/0066_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0066_snapshot.json
@@ -1,5 +1,5 @@
{
- "id": "d76ab830-b647-4e53-b6cc-0cf515968758",
+ "id": "de382c48-6f10-4578-a307-884fecb4baa3",
"prevId": "1240ec96-1751-4de3-b64f-cef9cb716786",
"version": "7",
"dialect": "postgresql",
@@ -741,6 +741,166 @@
"primaryKey": true,
"notNull": true
},
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "timestamp(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "authId": {
+ "name": "authId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_adminId_admin_adminId_fk": {
+ "name": "user_adminId_admin_adminId_fk",
+ "tableFrom": "user",
+ "tableTo": "admin",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "columnsTo": [
+ "adminId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_authId_auth_id_fk": {
+ "name": "user_authId_auth_id_fk",
+ "tableFrom": "user",
+ "tableTo": "auth",
+ "columnsFrom": [
+ "authId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_temp": {
+ "name": "user_temp",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
"name": {
"name": "name",
"type": "text",
@@ -1003,8 +1163,8 @@
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
- "user_email_unique": {
- "name": "user_email_unique",
+ "user_temp_email_unique": {
+ "name": "user_temp_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
@@ -1018,9 +1178,142 @@
"public.admin": {
"name": "admin",
"schema": "",
- "columns": {},
+ "columns": {
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableLogRotation": {
+ "name": "enableLogRotation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "authId": {
+ "name": "authId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
"indexes": {},
- "foreignKeys": {},
+ "foreignKeys": {
+ "admin_authId_auth_id_fk": {
+ "name": "admin_authId_auth_id_fk",
+ "tableFrom": "admin",
+ "tableTo": "auth",
+ "columnsFrom": [
+ "authId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
@@ -1172,15 +1465,15 @@
},
"indexes": {},
"foreignKeys": {
- "project_userId_user_userId_fk": {
- "name": "project_userId_user_userId_fk",
+ "project_userId_user_temp_id_fk": {
+ "name": "project_userId_user_temp_id_fk",
"tableFrom": "project",
- "tableTo": "user",
+ "tableTo": "user_temp",
"columnsFrom": [
"userId"
],
"columnsTo": [
- "userId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -2042,15 +2335,15 @@
},
"indexes": {},
"foreignKeys": {
- "destination_userId_user_userId_fk": {
- "name": "destination_userId_user_userId_fk",
+ "destination_userId_user_temp_id_fk": {
+ "name": "destination_userId_user_temp_id_fk",
"tableFrom": "destination",
- "tableTo": "user",
+ "tableTo": "user_temp",
"columnsFrom": [
"userId"
],
"columnsTo": [
- "userId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -2445,7 +2738,7 @@
"name": "userId",
"type": "text",
"primaryKey": false,
- "notNull": false
+ "notNull": true
},
"serverId": {
"name": "serverId",
@@ -2456,15 +2749,15 @@
},
"indexes": {},
"foreignKeys": {
- "certificate_userId_user_userId_fk": {
- "name": "certificate_userId_user_userId_fk",
+ "certificate_userId_user_temp_id_fk": {
+ "name": "certificate_userId_user_temp_id_fk",
"tableFrom": "certificate",
- "tableTo": "user",
+ "tableTo": "user_temp",
"columnsFrom": [
"userId"
],
"columnsTo": [
- "userId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -2497,8 +2790,8 @@
"checkConstraints": {},
"isRLSEnabled": false
},
- "public.session": {
- "name": "session",
+ "public.session_temp": {
+ "name": "session_temp",
"schema": "",
"columns": {
"id": {
@@ -2513,6 +2806,12 @@
"primaryKey": false,
"notNull": true
},
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
"created_at": {
"name": "created_at",
"type": "timestamp",
@@ -2558,21 +2857,74 @@
},
"indexes": {},
"foreignKeys": {
- "session_user_id_user_userId_fk": {
- "name": "session_user_id_user_userId_fk",
- "tableFrom": "session",
- "tableTo": "user",
+ "session_temp_user_id_user_temp_id_fk": {
+ "name": "session_temp_user_id_user_temp_id_fk",
+ "tableFrom": "session_temp",
+ "tableTo": "user_temp",
"columnsFrom": [
"user_id"
],
"columnsTo": [
- "userId"
+ "id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_temp_token_unique": {
+ "name": "session_temp_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session": {
+ "name": "session",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_user_id_auth_id_fk": {
+ "name": "session_user_id_auth_id_fk",
+ "tableFrom": "session",
+ "tableTo": "auth",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
@@ -3308,15 +3660,15 @@
},
"indexes": {},
"foreignKeys": {
- "registry_userId_user_userId_fk": {
- "name": "registry_userId_user_userId_fk",
+ "registry_userId_user_temp_id_fk": {
+ "name": "registry_userId_user_temp_id_fk",
"tableFrom": "registry",
- "tableTo": "user",
+ "tableTo": "user_temp",
"columnsFrom": [
"userId"
],
"columnsTo": [
- "userId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -3563,7 +3915,7 @@
"name": "userId",
"type": "text",
"primaryKey": false,
- "notNull": false
+ "notNull": true
}
},
"indexes": {},
@@ -3633,15 +3985,15 @@
"onDelete": "cascade",
"onUpdate": "no action"
},
- "notification_userId_user_userId_fk": {
- "name": "notification_userId_user_userId_fk",
+ "notification_userId_user_temp_id_fk": {
+ "name": "notification_userId_user_temp_id_fk",
"tableFrom": "notification",
- "tableTo": "user",
+ "tableTo": "user_temp",
"columnsFrom": [
"userId"
],
"columnsTo": [
- "userId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -3762,24 +4114,24 @@
"primaryKey": false,
"notNull": false
},
- "userId": {
- "name": "userId",
+ "adminId": {
+ "name": "adminId",
"type": "text",
"primaryKey": false,
- "notNull": false
+ "notNull": true
}
},
"indexes": {},
"foreignKeys": {
- "ssh-key_userId_user_userId_fk": {
- "name": "ssh-key_userId_user_userId_fk",
+ "ssh-key_adminId_admin_adminId_fk": {
+ "name": "ssh-key_adminId_admin_adminId_fk",
"tableFrom": "ssh-key",
- "tableTo": "user",
+ "tableTo": "admin",
"columnsFrom": [
- "userId"
+ "adminId"
],
"columnsTo": [
- "userId"
+ "adminId"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -3825,20 +4177,20 @@
"name": "userId",
"type": "text",
"primaryKey": false,
- "notNull": false
+ "notNull": true
}
},
"indexes": {},
"foreignKeys": {
- "git_provider_userId_user_userId_fk": {
- "name": "git_provider_userId_user_userId_fk",
+ "git_provider_userId_user_temp_id_fk": {
+ "name": "git_provider_userId_user_temp_id_fk",
"tableFrom": "git_provider",
- "tableTo": "user",
+ "tableTo": "user_temp",
"columnsFrom": [
"userId"
],
"columnsTo": [
- "userId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -4173,15 +4525,15 @@
},
"indexes": {},
"foreignKeys": {
- "server_userId_user_userId_fk": {
- "name": "server_userId_user_userId_fk",
+ "server_userId_user_temp_id_fk": {
+ "name": "server_userId_user_temp_id_fk",
"tableFrom": "server",
- "tableTo": "user",
+ "tableTo": "user_temp",
"columnsFrom": [
"userId"
],
"columnsTo": [
- "userId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -4450,15 +4802,15 @@
},
"indexes": {},
"foreignKeys": {
- "account_user_id_user_userId_fk": {
- "name": "account_user_id_user_userId_fk",
+ "account_user_id_user_temp_id_fk": {
+ "name": "account_user_id_user_temp_id_fk",
"tableFrom": "account",
- "tableTo": "user",
+ "tableTo": "user_temp",
"columnsFrom": [
"user_id"
],
"columnsTo": [
- "userId"
+ "id"
],
"onDelete": "no action",
"onUpdate": "no action"
@@ -4532,15 +4884,15 @@
"onDelete": "no action",
"onUpdate": "no action"
},
- "invitation_inviter_id_user_userId_fk": {
- "name": "invitation_inviter_id_user_userId_fk",
+ "invitation_inviter_id_user_temp_id_fk": {
+ "name": "invitation_inviter_id_user_temp_id_fk",
"tableFrom": "invitation",
- "tableTo": "user",
+ "tableTo": "user_temp",
"columnsFrom": [
"inviter_id"
],
"columnsTo": [
- "userId"
+ "id"
],
"onDelete": "no action",
"onUpdate": "no action"
@@ -4602,15 +4954,15 @@
"onDelete": "no action",
"onUpdate": "no action"
},
- "member_user_id_user_userId_fk": {
- "name": "member_user_id_user_userId_fk",
+ "member_user_id_user_temp_id_fk": {
+ "name": "member_user_id_user_temp_id_fk",
"tableFrom": "member",
- "tableTo": "user",
+ "tableTo": "user_temp",
"columnsFrom": [
"user_id"
],
"columnsTo": [
- "userId"
+ "id"
],
"onDelete": "no action",
"onUpdate": "no action"
@@ -4671,15 +5023,15 @@
},
"indexes": {},
"foreignKeys": {
- "organization_owner_id_user_userId_fk": {
- "name": "organization_owner_id_user_userId_fk",
+ "organization_owner_id_user_temp_id_fk": {
+ "name": "organization_owner_id_user_temp_id_fk",
"tableFrom": "organization",
- "tableTo": "user",
+ "tableTo": "user_temp",
"columnsFrom": [
"owner_id"
],
"columnsTo": [
- "userId"
+ "id"
],
"onDelete": "no action",
"onUpdate": "no action"
diff --git a/apps/dokploy/drizzle/meta/_journal.json b/apps/dokploy/drizzle/meta/_journal.json
index d3de75645..188a97009 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -467,8 +467,8 @@
{
"idx": 66,
"version": "7",
- "when": 1739173929725,
- "tag": "0066_soft_kronos",
+ "when": 1739425241338,
+ "tag": "0066_rapid_morbius",
"breakpoints": true
}
]
diff --git a/apps/dokploy/migrate.ts b/apps/dokploy/migrate.ts
new file mode 100644
index 000000000..72bbf2ab0
--- /dev/null
+++ b/apps/dokploy/migrate.ts
@@ -0,0 +1,117 @@
+import { drizzle } from "drizzle-orm/postgres-js";
+import { migrate } from "drizzle-orm/postgres-js/migrator";
+import postgres from "postgres";
+import * as schema from "./server/db/schema";
+import { nanoid } from "nanoid";
+
+const connectionString = process.env.DATABASE_URL!;
+
+const sql = postgres(connectionString, { max: 1 });
+const db = drizzle(sql, {
+ schema,
+});
+
+await db
+ .transaction(async (db) => {
+ const admins = await db.query.admins.findMany({
+ with: {
+ auth: true,
+ users: {
+ with: {
+ auth: true,
+ },
+ },
+ },
+ });
+ for (const admin of admins) {
+ const user = await db
+ .insert(schema.users_temp)
+ .values({
+ id: admin.adminId,
+ email: admin.auth.email,
+ token: admin.auth.token || "",
+ emailVerified: true,
+ updatedAt: new Date(),
+ role: "admin",
+ serverIp: admin.serverIp,
+ image: admin.auth.image,
+ certificateType: admin.certificateType,
+ host: admin.host,
+ letsEncryptEmail: admin.letsEncryptEmail,
+ sshPrivateKey: admin.sshPrivateKey,
+ enableDockerCleanup: admin.enableDockerCleanup,
+ enableLogRotation: admin.enableLogRotation,
+ enablePaidFeatures: admin.enablePaidFeatures,
+ metricsConfig: admin.metricsConfig,
+ cleanupCacheApplications: admin.cleanupCacheApplications,
+ cleanupCacheOnPreviews: admin.cleanupCacheOnPreviews,
+ cleanupCacheOnCompose: admin.cleanupCacheOnCompose,
+ stripeCustomerId: admin.stripeCustomerId,
+ stripeSubscriptionId: admin.stripeSubscriptionId,
+ serversQuantity: admin.serversQuantity,
+ })
+ .returning()
+ .then((user) => user[0]);
+
+ await db.insert(schema.account).values({
+ providerId: "credentials",
+ userId: user?.id || "",
+ password: admin.auth.password,
+ is2FAEnabled: admin.auth.is2FAEnabled || false,
+ createdAt: new Date(admin.auth.createdAt) || new Date(),
+ updatedAt: new Date(admin.auth.createdAt) || new Date(),
+ });
+
+ const organization = await db
+ .insert(schema.organization)
+ .values({
+ name: "My Organization",
+ slug: nanoid(),
+ ownerId: user?.id || "",
+ createdAt: new Date(admin.createdAt) || new Date(),
+ })
+ .returning()
+ .then((organization) => organization[0]);
+
+ for (const member of admin.users) {
+ const userTemp = await db
+ .insert(schema.users_temp)
+ .values({
+ id: member.userId,
+ email: member.auth.email,
+ token: member.token || "",
+ emailVerified: true,
+ updatedAt: new Date(admin.createdAt) || new Date(),
+ role: "user",
+ image: member.auth.image,
+ createdAt: admin.createdAt,
+ canAccessToAPI: member.canAccessToAPI || false,
+ canAccessToDocker: member.canAccessToDocker || false,
+ canAccessToGitProviders: member.canAccessToGitProviders || false,
+ canAccessToSSHKeys: member.canAccessToSSHKeys || false,
+ canAccessToTraefikFiles: member.canAccessToTraefikFiles || false,
+ canCreateProjects: member.canCreateProjects || false,
+ canCreateServices: member.canCreateServices || false,
+ canDeleteProjects: member.canDeleteProjects || false,
+ canDeleteServices: member.canDeleteServices || false,
+ accessedProjects: member.accessedProjects || [],
+ accessedServices: member.accessedServices || [],
+ })
+ .returning()
+ .then((userTemp) => userTemp[0]);
+
+ await db.insert(schema.member).values({
+ organizationId: organization?.id || "",
+ userId: userTemp?.id || "",
+ role: "admin",
+ createdAt: new Date(member.createdAt) || new Date(),
+ });
+ }
+ }
+ })
+ .then(() => {
+ console.log("Migration finished");
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json
index 9e531cf8c..f68978c36 100644
--- a/apps/dokploy/package.json
+++ b/apps/dokploy/package.json
@@ -16,6 +16,7 @@
"studio": "drizzle-kit studio --config ./server/db/drizzle.config.ts",
"migration:generate": "drizzle-kit generate --config ./server/db/drizzle.config.ts",
"migration:run": "tsx -r dotenv/config migration.ts",
+ "manual-migration:run": "tsx -r dotenv/config migrate.ts",
"migration:up": "drizzle-kit up --config ./server/db/drizzle.config.ts",
"migration:drop": "drizzle-kit drop --config ./server/db/drizzle.config.ts",
"db:push": "drizzle-kit push --config ./server/db/drizzle.config.ts",
diff --git a/packages/server/auth-schema.ts b/packages/server/auth-schema.ts
index 3e19bebe0..bfb03d2e4 100644
--- a/packages/server/auth-schema.ts
+++ b/packages/server/auth-schema.ts
@@ -26,7 +26,7 @@ export const session = pgTable("session", {
userAgent: text("user_agent"),
userId: text("user_id")
.notNull()
- .references(() => user.userId),
+ .references(() => user.id),
activeOrganizationId: text("active_organization_id"),
});
@@ -36,7 +36,7 @@ export const account = pgTable("account", {
providerId: text("provider_id").notNull(),
userId: text("user_id")
.notNull()
- .references(() => user.userId),
+ .references(() => user.id),
accessToken: text("access_token"),
refreshToken: text("refresh_token"),
idToken: text("id_token"),
diff --git a/packages/server/src/db/schema/account.ts b/packages/server/src/db/schema/account.ts
index 24350c55c..349428fd8 100644
--- a/packages/server/src/db/schema/account.ts
+++ b/packages/server/src/db/schema/account.ts
@@ -1,13 +1,18 @@
import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core";
-import { user } from "./user";
+import { users_temp } from "./user";
+import { nanoid } from "nanoid";
export const account = pgTable("account", {
- id: text("id").primaryKey(),
- accountId: text("account_id").notNull(),
+ id: text("id")
+ .primaryKey()
+ .$defaultFn(() => nanoid()),
+ accountId: text("account_id")
+ .notNull()
+ .$defaultFn(() => nanoid()),
providerId: text("provider_id").notNull(),
userId: text("user_id")
.notNull()
- .references(() => user.userId),
+ .references(() => users_temp.id),
accessToken: text("access_token"),
refreshToken: text("refresh_token"),
idToken: text("id_token"),
@@ -34,7 +39,9 @@ export const verification = pgTable("verification", {
});
export const organization = pgTable("organization", {
- id: text("id").primaryKey(),
+ id: text("id")
+ .primaryKey()
+ .$defaultFn(() => nanoid()),
name: text("name").notNull(),
slug: text("slug").unique(),
logo: text("logo"),
@@ -42,17 +49,19 @@ export const organization = pgTable("organization", {
metadata: text("metadata"),
ownerId: text("owner_id")
.notNull()
- .references(() => user.userId),
+ .references(() => users_temp.id),
});
export const member = pgTable("member", {
- id: text("id").primaryKey(),
+ id: text("id")
+ .primaryKey()
+ .$defaultFn(() => nanoid()),
organizationId: text("organization_id")
.notNull()
.references(() => organization.id),
userId: text("user_id")
.notNull()
- .references(() => user.userId),
+ .references(() => users_temp.id),
role: text("role").notNull(),
createdAt: timestamp("created_at").notNull(),
});
@@ -68,5 +77,5 @@ export const invitation = pgTable("invitation", {
expiresAt: timestamp("expires_at").notNull(),
inviterId: text("inviter_id")
.notNull()
- .references(() => user.userId),
+ .references(() => users_temp.id),
});
diff --git a/packages/server/src/db/schema/admin.ts b/packages/server/src/db/schema/admin.ts
index c842bd7a3..983f99fd6 100644
--- a/packages/server/src/db/schema/admin.ts
+++ b/packages/server/src/db/schema/admin.ts
@@ -18,127 +18,128 @@ import { sshKeys } from "./ssh-key";
import { users } from "./user";
export const admins = pgTable("admin", {
- // adminId: text("adminId")
- // .notNull()
- // .primaryKey()
- // .$defaultFn(() => nanoid()),
- // serverIp: text("serverIp"),
- // certificateType: certificateType("certificateType").notNull().default("none"),
- // host: text("host"),
- // letsEncryptEmail: text("letsEncryptEmail"),
- // sshPrivateKey: text("sshPrivateKey"),
- // enableDockerCleanup: boolean("enableDockerCleanup").notNull().default(false),
- // enableLogRotation: boolean("enableLogRotation").notNull().default(false),
- // authId: text("authId")
- // .notNull()
- // .references(() => auth.id, { onDelete: "cascade" }),
- // createdAt: text("createdAt")
- // .notNull()
- // .$defaultFn(() => new Date().toISOString()),
- // stripeCustomerId: text("stripeCustomerId"),
- // stripeSubscriptionId: text("stripeSubscriptionId"),
- // serversQuantity: integer("serversQuantity").notNull().default(0),
- // // Metrics
- // enablePaidFeatures: boolean("enablePaidFeatures").notNull().default(false),
- // metricsConfig: jsonb("metricsConfig")
- // .$type<{
- // server: {
- // type: "Dokploy" | "Remote";
- // refreshRate: number;
- // port: number;
- // token: string;
- // urlCallback: string;
- // retentionDays: number;
- // cronJob: string;
- // thresholds: {
- // cpu: number;
- // memory: number;
- // };
- // };
- // containers: {
- // refreshRate: number;
- // services: {
- // include: string[];
- // exclude: string[];
- // };
- // };
- // }>()
- // .notNull()
- // .default({
- // server: {
- // type: "Dokploy",
- // refreshRate: 60,
- // port: 4500,
- // token: "",
- // retentionDays: 2,
- // cronJob: "",
- // urlCallback: "",
- // thresholds: {
- // cpu: 0,
- // memory: 0,
- // },
- // },
- // containers: {
- // refreshRate: 60,
- // services: {
- // include: [],
- // exclude: [],
- // },
- // },
- // }),
- // cleanupCacheApplications: boolean("cleanupCacheApplications")
- // .notNull()
- // .default(false),
- // cleanupCacheOnPreviews: boolean("cleanupCacheOnPreviews")
- // .notNull()
- // .default(false),
- // cleanupCacheOnCompose: boolean("cleanupCacheOnCompose")
- // .notNull()
- // .default(false),
+ adminId: text("adminId")
+ .notNull()
+ .primaryKey()
+ .$defaultFn(() => nanoid()),
+ serverIp: text("serverIp"),
+ certificateType: certificateType("certificateType").notNull().default("none"),
+ host: text("host"),
+ letsEncryptEmail: text("letsEncryptEmail"),
+ sshPrivateKey: text("sshPrivateKey"),
+ enableDockerCleanup: boolean("enableDockerCleanup").notNull().default(false),
+ enableLogRotation: boolean("enableLogRotation").notNull().default(false),
+ authId: text("authId")
+ .notNull()
+ .references(() => auth.id, { onDelete: "cascade" }),
+ createdAt: text("createdAt")
+ .notNull()
+ .$defaultFn(() => new Date().toISOString()),
+ stripeCustomerId: text("stripeCustomerId"),
+ stripeSubscriptionId: text("stripeSubscriptionId"),
+ serversQuantity: integer("serversQuantity").notNull().default(0),
+
+ // Metrics
+ enablePaidFeatures: boolean("enablePaidFeatures").notNull().default(false),
+ metricsConfig: jsonb("metricsConfig")
+ .$type<{
+ server: {
+ type: "Dokploy" | "Remote";
+ refreshRate: number;
+ port: number;
+ token: string;
+ urlCallback: string;
+ retentionDays: number;
+ cronJob: string;
+ thresholds: {
+ cpu: number;
+ memory: number;
+ };
+ };
+ containers: {
+ refreshRate: number;
+ services: {
+ include: string[];
+ exclude: string[];
+ };
+ };
+ }>()
+ .notNull()
+ .default({
+ server: {
+ type: "Dokploy",
+ refreshRate: 60,
+ port: 4500,
+ token: "",
+ retentionDays: 2,
+ cronJob: "",
+ urlCallback: "",
+ thresholds: {
+ cpu: 0,
+ memory: 0,
+ },
+ },
+ containers: {
+ refreshRate: 60,
+ services: {
+ include: [],
+ exclude: [],
+ },
+ },
+ }),
+ cleanupCacheApplications: boolean("cleanupCacheApplications")
+ .notNull()
+ .default(false),
+ cleanupCacheOnPreviews: boolean("cleanupCacheOnPreviews")
+ .notNull()
+ .default(false),
+ cleanupCacheOnCompose: boolean("cleanupCacheOnCompose")
+ .notNull()
+ .default(false),
});
export const adminsRelations = relations(admins, ({ one, many }) => ({
- // auth: one(auth, {
- // fields: [admins.authId],
- // references: [auth.id],
- // }),
- // users: many(users),
- // registry: many(registry),
- // sshKeys: many(sshKeys),
- // certificates: many(certificates),
+ auth: one(auth, {
+ fields: [admins.authId],
+ references: [auth.id],
+ }),
+ users: many(users),
+ registry: many(registry),
+ sshKeys: many(sshKeys),
+ certificates: many(certificates),
}));
const createSchema = createInsertSchema(admins, {
- // adminId: z.string(),
- // enableDockerCleanup: z.boolean().optional(),
- // sshPrivateKey: z.string().optional(),
- // certificateType: z.enum(["letsencrypt", "none"]).default("none"),
- // serverIp: z.string().optional(),
- // letsEncryptEmail: z.string().optional(),
+ adminId: z.string(),
+ enableDockerCleanup: z.boolean().optional(),
+ sshPrivateKey: z.string().optional(),
+ certificateType: z.enum(["letsencrypt", "none"]).default("none"),
+ serverIp: z.string().optional(),
+ letsEncryptEmail: z.string().optional(),
});
export const apiUpdateAdmin = createSchema.partial();
export const apiSaveSSHKey = createSchema
.pick({
- // sshPrivateKey: true,
+ sshPrivateKey: true,
})
.required();
export const apiAssignDomain = createSchema
.pick({
- // host: true,
- // certificateType: true,
- // letsEncryptEmail: true,
+ host: true,
+ certificateType: true,
+ letsEncryptEmail: true,
})
.required()
.partial({
- // letsEncryptEmail: true,
+ letsEncryptEmail: true,
});
export const apiUpdateDockerCleanup = createSchema
.pick({
- // enableDockerCleanup: true,
+ enableDockerCleanup: true,
})
.required()
.extend({
diff --git a/packages/server/src/db/schema/auth.ts b/packages/server/src/db/schema/auth.ts
index 35f4dc853..7093a40c3 100644
--- a/packages/server/src/db/schema/auth.ts
+++ b/packages/server/src/db/schema/auth.ts
@@ -5,7 +5,7 @@ import { createInsertSchema } from "drizzle-zod";
import { nanoid } from "nanoid";
import { z } from "zod";
// import { admins } from "./admin";
-import { user } from "./user";
+import { users } from "./user";
const randomImages = [
"/avatars/avatar-1.png",
@@ -56,7 +56,7 @@ export const auth = pgTable("auth", {
export const authRelations = relations(auth, ({ many }) => ({
// admins: many(admins),
- users: many(user),
+ users: many(users),
}));
const createSchema = createInsertSchema(auth, {
email: z.string().email(),
diff --git a/packages/server/src/db/schema/certificate.ts b/packages/server/src/db/schema/certificate.ts
index c1a57a5ac..c72d189c2 100644
--- a/packages/server/src/db/schema/certificate.ts
+++ b/packages/server/src/db/schema/certificate.ts
@@ -4,8 +4,10 @@ import { createInsertSchema } from "drizzle-zod";
import { nanoid } from "nanoid";
import { z } from "zod";
import { server } from "./server";
-import { user } from "./user";
+// import { user } from "./user";
import { generateAppName } from "./utils";
+import { admins } from "./admin";
+import { users_temp } from "./user";
export const certificates = pgTable("certificate", {
certificateId: text("certificateId")
@@ -20,9 +22,12 @@ export const certificates = pgTable("certificate", {
.$defaultFn(() => generateAppName("certificate"))
.unique(),
autoRenew: boolean("autoRenew"),
- userId: text("userId").references(() => user.userId, {
- onDelete: "cascade",
- }),
+ // userId: text("userId").references(() => user.userId, {
+ // onDelete: "cascade",
+ // }),
+ userId: text("userId")
+ .notNull()
+ .references(() => users_temp.id, { onDelete: "cascade" }),
serverId: text("serverId").references(() => server.serverId, {
onDelete: "cascade",
}),
@@ -35,10 +40,10 @@ export const certificatesRelations = relations(
fields: [certificates.serverId],
references: [server.serverId],
}),
- user: one(user, {
- fields: [certificates.userId],
- references: [user.id],
- }),
+ // user: one(user, {
+ // fields: [certificates.userId],
+ // references: [user.id],
+ // }),
}),
);
diff --git a/packages/server/src/db/schema/destination.ts b/packages/server/src/db/schema/destination.ts
index 1fe48a346..6b9ea5d93 100644
--- a/packages/server/src/db/schema/destination.ts
+++ b/packages/server/src/db/schema/destination.ts
@@ -5,7 +5,8 @@ import { nanoid } from "nanoid";
import { z } from "zod";
import { admins } from "./admin";
import { backups } from "./backups";
-import { user } from "./user";
+import { users_temp } from "./user";
+// import { user } from "./user";
export const destinations = pgTable("destination", {
destinationId: text("destinationId")
@@ -20,19 +21,22 @@ export const destinations = pgTable("destination", {
region: text("region").notNull(),
// maybe it can be null
endpoint: text("endpoint").notNull(),
+ // userId: text("userId")
+ // .notNull()
+ // .references(() => user.userId, { onDelete: "cascade" }),
userId: text("userId")
.notNull()
- .references(() => user.userId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
});
export const destinationsRelations = relations(
destinations,
({ many, one }) => ({
backups: many(backups),
- user: one(user, {
- fields: [destinations.userId],
- references: [user.id],
- }),
+ // user: one(user, {
+ // fields: [destinations.userId],
+ // references: [user.id],
+ // }),
}),
);
diff --git a/packages/server/src/db/schema/git-provider.ts b/packages/server/src/db/schema/git-provider.ts
index 3a3bade81..4d154ee33 100644
--- a/packages/server/src/db/schema/git-provider.ts
+++ b/packages/server/src/db/schema/git-provider.ts
@@ -7,7 +7,8 @@ import { admins } from "./admin";
import { bitbucket } from "./bitbucket";
import { github } from "./github";
import { gitlab } from "./gitlab";
-import { user } from "./user";
+import { users_temp } from "./user";
+// import { user } from "./user";
export const gitProviderType = pgEnum("gitProviderType", [
"github",
@@ -25,9 +26,12 @@ export const gitProvider = pgTable("git_provider", {
createdAt: text("createdAt")
.notNull()
.$defaultFn(() => new Date().toISOString()),
- userId: text("userId").references(() => user.userId, {
- onDelete: "cascade",
- }),
+ // userId: text("userId").references(() => user.userId, {
+ // onDelete: "cascade",
+ // }),
+ userId: text("userId")
+ .notNull()
+ .references(() => users_temp.id, { onDelete: "cascade" }),
});
export const gitProviderRelations = relations(gitProvider, ({ one, many }) => ({
@@ -43,10 +47,10 @@ export const gitProviderRelations = relations(gitProvider, ({ one, many }) => ({
fields: [gitProvider.gitProviderId],
references: [bitbucket.gitProviderId],
}),
- user: one(user, {
- fields: [gitProvider.userId],
- references: [user.id],
- }),
+ // user: one(user, {
+ // fields: [gitProvider.userId],
+ // references: [user.id],
+ // }),
}));
const createSchema = createInsertSchema(gitProvider);
diff --git a/packages/server/src/db/schema/notification.ts b/packages/server/src/db/schema/notification.ts
index 1771a92af..3ab253396 100644
--- a/packages/server/src/db/schema/notification.ts
+++ b/packages/server/src/db/schema/notification.ts
@@ -4,7 +4,8 @@ import { createInsertSchema } from "drizzle-zod";
import { nanoid } from "nanoid";
import { z } from "zod";
import { admins } from "./admin";
-import { user } from "./user";
+import { users_temp } from "./user";
+// import { user } from "./user";
export const notificationType = pgEnum("notificationType", [
"slack",
@@ -45,9 +46,12 @@ export const notifications = pgTable("notification", {
gotifyId: text("gotifyId").references(() => gotify.gotifyId, {
onDelete: "cascade",
}),
- userId: text("userId").references(() => user.userId, {
- onDelete: "cascade",
- }),
+ // userId: text("userId").references(() => user.userId, {
+ // onDelete: "cascade",
+ // }),
+ userId: text("userId")
+ .notNull()
+ .references(() => users_temp.id, { onDelete: "cascade" }),
});
export const slack = pgTable("slack", {
@@ -122,10 +126,10 @@ export const notificationsRelations = relations(notifications, ({ one }) => ({
fields: [notifications.gotifyId],
references: [gotify.gotifyId],
}),
- user: one(user, {
- fields: [notifications.userId],
- references: [user.id],
- }),
+ // user: one(user, {
+ // fields: [notifications.userId],
+ // references: [user.id],
+ // }),
}));
export const notificationsSchema = createInsertSchema(notifications);
diff --git a/packages/server/src/db/schema/project.ts b/packages/server/src/db/schema/project.ts
index d83936a38..efde3c34b 100644
--- a/packages/server/src/db/schema/project.ts
+++ b/packages/server/src/db/schema/project.ts
@@ -12,7 +12,8 @@ import { mongo } from "./mongo";
import { mysql } from "./mysql";
import { postgres } from "./postgres";
import { redis } from "./redis";
-import { user } from "./user";
+import { users, users_temp } from "./user";
+import { admins } from "./admin";
export const projects = pgTable("project", {
projectId: text("projectId")
@@ -24,9 +25,12 @@ export const projects = pgTable("project", {
createdAt: text("createdAt")
.notNull()
.$defaultFn(() => new Date().toISOString()),
+ // userId: text("userId")
+ // .notNull()
+ // .references(() => user.userId, { onDelete: "cascade" }),
userId: text("userId")
.notNull()
- .references(() => user.userId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
env: text("env").notNull().default(""),
});
@@ -38,10 +42,10 @@ export const projectRelations = relations(projects, ({ many, one }) => ({
mongo: many(mongo),
redis: many(redis),
compose: many(compose),
- user: one(user, {
- fields: [projects.userId],
- references: [user.id],
- }),
+ // user: one(user, {
+ // fields: [projects.userId],
+ // references: [user.id],
+ // }),
}));
const createSchema = createInsertSchema(projects, {
diff --git a/packages/server/src/db/schema/registry.ts b/packages/server/src/db/schema/registry.ts
index 936f65fc8..62c2b2d7d 100644
--- a/packages/server/src/db/schema/registry.ts
+++ b/packages/server/src/db/schema/registry.ts
@@ -5,7 +5,8 @@ import { nanoid } from "nanoid";
import { z } from "zod";
import { admins } from "./admin";
import { applications } from "./application";
-import { user } from "./user";
+import { users_temp } from "./user";
+// import { user } from "./user";
/**
* This is an example of how to use the multi-project schema feature of Drizzle ORM. Use the same
* database instance for multiple projects.
@@ -28,16 +29,19 @@ export const registry = pgTable("registry", {
.notNull()
.$defaultFn(() => new Date().toISOString()),
registryType: registryType("selfHosted").notNull().default("cloud"),
+ // userId: text("userId")
+ // .notNull()
+ // .references(() => user.userId, { onDelete: "cascade" }),
userId: text("userId")
.notNull()
- .references(() => user.userId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
});
export const registryRelations = relations(registry, ({ one, many }) => ({
- user: one(user, {
- fields: [registry.userId],
- references: [user.id],
- }),
+ // user: one(user, {
+ // fields: [registry.userId],
+ // references: [user.id],
+ // }),
applications: many(applications),
}));
diff --git a/packages/server/src/db/schema/server.ts b/packages/server/src/db/schema/server.ts
index 4e238e23b..b6b77dbcd 100644
--- a/packages/server/src/db/schema/server.ts
+++ b/packages/server/src/db/schema/server.ts
@@ -22,8 +22,9 @@ import { mysql } from "./mysql";
import { postgres } from "./postgres";
import { redis } from "./redis";
import { sshKeys } from "./ssh-key";
-import { user } from "./user";
+// import { user } from "./user";
import { generateAppName } from "./utils";
+import { users_temp } from "./user";
export const serverStatus = pgEnum("serverStatus", ["active", "inactive"]);
@@ -41,12 +42,14 @@ export const server = pgTable("server", {
.notNull()
.$defaultFn(() => generateAppName("server")),
enableDockerCleanup: boolean("enableDockerCleanup").notNull().default(false),
- createdAt: text("createdAt")
- .notNull()
- .$defaultFn(() => new Date().toISOString()),
+ createdAt: text("createdAt").notNull(),
+ // .$defaultFn(() => new Date().toISOString()),
+ // userId: text("userId")
+ // .notNull()
+ // .references(() => user.userId, { onDelete: "cascade" }),
userId: text("userId")
.notNull()
- .references(() => user.userId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
serverStatus: serverStatus("serverStatus").notNull().default("active"),
command: text("command").notNull().default(""),
sshKeyId: text("sshKeyId").references(() => sshKeys.sshKeyId, {
@@ -101,10 +104,10 @@ export const server = pgTable("server", {
});
export const serverRelations = relations(server, ({ one, many }) => ({
- user: one(user, {
- fields: [server.userId],
- references: [user.id],
- }),
+ // user: one(user, {
+ // fields: [server.userId],
+ // references: [user.id],
+ // }),
deployments: many(deployments),
sshKey: one(sshKeys, {
fields: [server.sshKeyId],
diff --git a/packages/server/src/db/schema/session.ts b/packages/server/src/db/schema/session.ts
index d5932764a..03a70c41a 100644
--- a/packages/server/src/db/schema/session.ts
+++ b/packages/server/src/db/schema/session.ts
@@ -1,19 +1,31 @@
import { sql } from "drizzle-orm";
import { pgTable, text, timestamp } from "drizzle-orm/pg-core";
-import { user } from "./user";
+import { users_temp } from "./user";
+import { auth } from "./auth";
// OLD TABLE
-export const session = pgTable("session", {
+export const session = pgTable("session_temp", {
id: text("id").primaryKey(),
expiresAt: timestamp("expires_at").notNull(),
- // token: text("token").notNull().unique().default(sql`gen_random_uuid()`),
+ token: text("token").notNull().unique(),
createdAt: timestamp("created_at").notNull(),
updatedAt: timestamp("updated_at").notNull(),
ipAddress: text("ip_address"),
userAgent: text("user_agent"),
userId: text("user_id")
.notNull()
- .references(() => user.userId),
+ .references(() => users_temp.id),
impersonatedBy: text("impersonated_by"),
activeOrganizationId: text("active_organization_id"),
});
+
+export const sessionTable = pgTable("session", {
+ id: text("id").primaryKey(),
+ userId: text("user_id")
+ .notNull()
+ .references(() => auth.id, { onDelete: "cascade" }),
+ expiresAt: timestamp("expires_at", {
+ withTimezone: true,
+ mode: "date",
+ }).notNull(),
+});
diff --git a/packages/server/src/db/schema/ssh-key.ts b/packages/server/src/db/schema/ssh-key.ts
index 9bb69fee4..cca9259bc 100644
--- a/packages/server/src/db/schema/ssh-key.ts
+++ b/packages/server/src/db/schema/ssh-key.ts
@@ -7,7 +7,7 @@ import { admins } from "./admin";
import { applications } from "./application";
import { compose } from "./compose";
import { server } from "./server";
-import { user } from "./user";
+// import { user } from "./user";
export const sshKeys = pgTable("ssh-key", {
sshKeyId: text("sshKeyId")
@@ -22,19 +22,22 @@ export const sshKeys = pgTable("ssh-key", {
.notNull()
.$defaultFn(() => new Date().toISOString()),
lastUsedAt: text("lastUsedAt"),
- userId: text("userId").references(() => user.userId, {
- onDelete: "cascade",
- }),
+ // userId: text("userId").references(() => user.userId, {
+ // onDelete: "cascade",
+ // }),
+ adminId: text("adminId")
+ .notNull()
+ .references(() => admins.adminId, { onDelete: "cascade" }),
});
export const sshKeysRelations = relations(sshKeys, ({ many, one }) => ({
applications: many(applications),
compose: many(compose),
servers: many(server),
- user: one(user, {
- fields: [sshKeys.userId],
- references: [user.id],
- }),
+ // user: one(user, {
+ // fields: [sshKeys.userId],
+ // references: [user.id],
+ // }),
}));
const createSchema = createInsertSchema(
diff --git a/packages/server/src/db/schema/user.ts b/packages/server/src/db/schema/user.ts
index 00e16679b..5f2a14e91 100644
--- a/packages/server/src/db/schema/user.ts
+++ b/packages/server/src/db/schema/user.ts
@@ -21,11 +21,57 @@ import { certificateType } from "./shared";
*/
// OLD TABLE
-export const user = pgTable("user", {
+
+export const users = pgTable("user", {
userId: text("userId")
.notNull()
.primaryKey()
.$defaultFn(() => nanoid()),
+
+ token: text("token").notNull(),
+ isRegistered: boolean("isRegistered").notNull().default(false),
+ expirationDate: timestamp("expirationDate", {
+ precision: 3,
+ mode: "string",
+ }).notNull(),
+ createdAt: text("createdAt")
+ .notNull()
+ .$defaultFn(() => new Date().toISOString()),
+ canCreateProjects: boolean("canCreateProjects").notNull().default(false),
+ canAccessToSSHKeys: boolean("canAccessToSSHKeys").notNull().default(false),
+ canCreateServices: boolean("canCreateServices").notNull().default(false),
+ canDeleteProjects: boolean("canDeleteProjects").notNull().default(false),
+ canDeleteServices: boolean("canDeleteServices").notNull().default(false),
+ canAccessToDocker: boolean("canAccessToDocker").notNull().default(false),
+ canAccessToAPI: boolean("canAccessToAPI").notNull().default(false),
+ canAccessToGitProviders: boolean("canAccessToGitProviders")
+ .notNull()
+ .default(false),
+ canAccessToTraefikFiles: boolean("canAccessToTraefikFiles")
+ .notNull()
+ .default(false),
+ accessedProjects: text("accesedProjects")
+ .array()
+ .notNull()
+ .default(sql`ARRAY[]::text[]`),
+ accessedServices: text("accesedServices")
+ .array()
+ .notNull()
+ .default(sql`ARRAY[]::text[]`),
+ adminId: text("adminId")
+ .notNull()
+ .references(() => admins.adminId, { onDelete: "cascade" }),
+ authId: text("authId")
+ .notNull()
+ .references(() => auth.id, { onDelete: "cascade" }),
+});
+
+// TEMP
+export const users_temp = pgTable("user_temp", {
+ id: text("id")
+ .notNull()
+ .primaryKey()
+ .$defaultFn(() => nanoid()),
name: text("name").notNull().default(""),
token: text("token").notNull(),
isRegistered: boolean("isRegistered").notNull().default(false),
@@ -138,19 +184,19 @@ export const user = pgTable("user", {
serversQuantity: integer("serversQuantity").notNull().default(0),
});
-export const usersRelations = relations(user, ({ one }) => ({
- // auth: one(auth, {
- // fields: [users.authId],
- // references: [auth.id],
- // }),
- // admin: one(admins, {
- // fields: [users.adminId],
- // references: [admins.adminId],
- // }),
+export const usersRelations = relations(users, ({ one }) => ({
+ auth: one(auth, {
+ fields: [users.authId],
+ references: [auth.id],
+ }),
+ admin: one(admins, {
+ fields: [users.adminId],
+ references: [admins.adminId],
+ }),
}));
-const createSchema = createInsertSchema(user, {
- id: z.string().min(1),
+const createSchema = createInsertSchema(users, {
+ userId: z.string().min(1),
// authId: z.string().min(1),
token: z.string().min(1),
isRegistered: z.boolean().optional(),
@@ -183,7 +229,7 @@ export const apiFindOneToken = createSchema
export const apiAssignPermissions = createSchema
.pick({
- id: true,
+ userId: true,
canCreateProjects: true,
canCreateServices: true,
canDeleteProjects: true,
@@ -200,7 +246,7 @@ export const apiAssignPermissions = createSchema
export const apiFindOneUser = createSchema
.pick({
- id: true,
+ userId: true,
})
.required();
From 23f1ce17de1f18e65aa9bd8610822968b14c7c34 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Thu, 13 Feb 2025 00:38:22 -0600
Subject: [PATCH 013/126] refactor: add migration
---
...d_morbius.sql => 0066_smiling_warlock.sql} | 0
apps/dokploy/drizzle/0066_yielding_echo.sql | 128 +
apps/dokploy/drizzle/0067_migrate-data.sql | 170 +
apps/dokploy/drizzle/meta/0066_snapshot.json | 100 +-
apps/dokploy/drizzle/meta/0067_snapshot.json | 5278 +++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 11 +-
packages/server/src/db/schema/certificate.ts | 12 +-
packages/server/src/db/schema/destination.ts | 4 +-
packages/server/src/db/schema/git-provider.ts | 12 +-
packages/server/src/db/schema/notification.ts | 12 +-
packages/server/src/db/schema/project.ts | 4 +-
packages/server/src/db/schema/registry.ts | 4 +-
packages/server/src/db/schema/server.ts | 4 +-
13 files changed, 5661 insertions(+), 78 deletions(-)
rename apps/dokploy/drizzle/{0066_rapid_morbius.sql => 0066_smiling_warlock.sql} (100%)
create mode 100644 apps/dokploy/drizzle/0066_yielding_echo.sql
create mode 100644 apps/dokploy/drizzle/0067_migrate-data.sql
create mode 100644 apps/dokploy/drizzle/meta/0067_snapshot.json
diff --git a/apps/dokploy/drizzle/0066_rapid_morbius.sql b/apps/dokploy/drizzle/0066_smiling_warlock.sql
similarity index 100%
rename from apps/dokploy/drizzle/0066_rapid_morbius.sql
rename to apps/dokploy/drizzle/0066_smiling_warlock.sql
diff --git a/apps/dokploy/drizzle/0066_yielding_echo.sql b/apps/dokploy/drizzle/0066_yielding_echo.sql
new file mode 100644
index 000000000..20f9d07b9
--- /dev/null
+++ b/apps/dokploy/drizzle/0066_yielding_echo.sql
@@ -0,0 +1,128 @@
+CREATE TABLE "user_temp" (
+ "id" text PRIMARY KEY NOT NULL,
+ "name" text DEFAULT '' NOT NULL,
+ "token" text NOT NULL,
+ "isRegistered" boolean DEFAULT false NOT NULL,
+ "expirationDate" text NOT NULL,
+ "createdAt" text NOT NULL,
+ "canCreateProjects" boolean DEFAULT false NOT NULL,
+ "canAccessToSSHKeys" boolean DEFAULT false NOT NULL,
+ "canCreateServices" boolean DEFAULT false NOT NULL,
+ "canDeleteProjects" boolean DEFAULT false NOT NULL,
+ "canDeleteServices" boolean DEFAULT false NOT NULL,
+ "canAccessToDocker" boolean DEFAULT false NOT NULL,
+ "canAccessToAPI" boolean DEFAULT false NOT NULL,
+ "canAccessToGitProviders" boolean DEFAULT false NOT NULL,
+ "canAccessToTraefikFiles" boolean DEFAULT false NOT NULL,
+ "accesedProjects" text[] DEFAULT ARRAY[]::text[] NOT NULL,
+ "accesedServices" text[] DEFAULT ARRAY[]::text[] NOT NULL,
+ "email" text NOT NULL,
+ "email_verified" boolean NOT NULL,
+ "image" text,
+ "role" text,
+ "banned" boolean,
+ "ban_reason" text,
+ "ban_expires" timestamp,
+ "updated_at" timestamp NOT NULL,
+ "serverIp" text,
+ "certificateType" "certificateType" DEFAULT 'none' NOT NULL,
+ "host" text,
+ "letsEncryptEmail" text,
+ "sshPrivateKey" text,
+ "enableDockerCleanup" boolean DEFAULT false NOT NULL,
+ "enableLogRotation" boolean DEFAULT false NOT NULL,
+ "enablePaidFeatures" boolean DEFAULT false NOT NULL,
+ "metricsConfig" jsonb DEFAULT '{"server":{"type":"Dokploy","refreshRate":60,"port":4500,"token":"","retentionDays":2,"cronJob":"","urlCallback":"","thresholds":{"cpu":0,"memory":0}},"containers":{"refreshRate":60,"services":{"include":[],"exclude":[]}}}'::jsonb NOT NULL,
+ "cleanupCacheApplications" boolean DEFAULT false NOT NULL,
+ "cleanupCacheOnPreviews" boolean DEFAULT false NOT NULL,
+ "cleanupCacheOnCompose" boolean DEFAULT false NOT NULL,
+ "stripeCustomerId" text,
+ "stripeSubscriptionId" text,
+ "serversQuantity" integer DEFAULT 0 NOT NULL,
+ CONSTRAINT "user_temp_email_unique" UNIQUE("email")
+);
+--> statement-breakpoint
+CREATE TABLE "session_temp" (
+ "id" text PRIMARY KEY NOT NULL,
+ "expires_at" timestamp NOT NULL,
+ "token" text NOT NULL,
+ "created_at" timestamp NOT NULL,
+ "updated_at" timestamp NOT NULL,
+ "ip_address" text,
+ "user_agent" text,
+ "user_id" text NOT NULL,
+ "impersonated_by" text,
+ "active_organization_id" text,
+ CONSTRAINT "session_temp_token_unique" UNIQUE("token")
+);
+--> statement-breakpoint
+CREATE TABLE "account" (
+ "id" text PRIMARY KEY NOT NULL,
+ "account_id" text NOT NULL,
+ "provider_id" text NOT NULL,
+ "user_id" text NOT NULL,
+ "access_token" text,
+ "refresh_token" text,
+ "id_token" text,
+ "access_token_expires_at" timestamp,
+ "refresh_token_expires_at" timestamp,
+ "scope" text,
+ "password" text,
+ "is2FAEnabled" boolean DEFAULT false NOT NULL,
+ "created_at" timestamp NOT NULL,
+ "updated_at" timestamp NOT NULL,
+ "resetPasswordToken" text,
+ "resetPasswordExpiresAt" text,
+ "confirmationToken" text,
+ "confirmationExpiresAt" text
+);
+--> statement-breakpoint
+CREATE TABLE "invitation" (
+ "id" text PRIMARY KEY NOT NULL,
+ "organization_id" text NOT NULL,
+ "email" text NOT NULL,
+ "role" text,
+ "status" text NOT NULL,
+ "expires_at" timestamp NOT NULL,
+ "inviter_id" text NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "member" (
+ "id" text PRIMARY KEY NOT NULL,
+ "organization_id" text NOT NULL,
+ "user_id" text NOT NULL,
+ "role" text NOT NULL,
+ "created_at" timestamp NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "organization" (
+ "id" text PRIMARY KEY NOT NULL,
+ "name" text NOT NULL,
+ "slug" text,
+ "logo" text,
+ "created_at" timestamp NOT NULL,
+ "metadata" text,
+ "owner_id" text NOT NULL,
+ CONSTRAINT "organization_slug_unique" UNIQUE("slug")
+);
+--> statement-breakpoint
+CREATE TABLE "verification" (
+ "id" text PRIMARY KEY NOT NULL,
+ "identifier" text NOT NULL,
+ "value" text NOT NULL,
+ "expires_at" timestamp NOT NULL,
+ "created_at" timestamp,
+ "updated_at" timestamp
+);
+--> statement-breakpoint
+ALTER TABLE "certificate" ALTER COLUMN "adminId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "notification" ALTER COLUMN "adminId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "ssh-key" ALTER COLUMN "adminId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "git_provider" ALTER COLUMN "adminId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "session_temp" ADD CONSTRAINT "session_temp_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "account" ADD CONSTRAINT "account_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "invitation" ADD CONSTRAINT "invitation_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "invitation" ADD CONSTRAINT "invitation_inviter_id_user_temp_id_fk" FOREIGN KEY ("inviter_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "member" ADD CONSTRAINT "member_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "member" ADD CONSTRAINT "member_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "organization" ADD CONSTRAINT "organization_owner_id_user_temp_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0067_migrate-data.sql b/apps/dokploy/drizzle/0067_migrate-data.sql
new file mode 100644
index 000000000..62604d32c
--- /dev/null
+++ b/apps/dokploy/drizzle/0067_migrate-data.sql
@@ -0,0 +1,170 @@
+-- Custom SQL migration file, put your code below! --
+
+WITH inserted_users AS (
+ -- Insertar usuarios desde admins
+ INSERT INTO user_temp (
+ id,
+ email,
+ token,
+ "email_verified",
+ "updated_at",
+ role,
+ "serverIp",
+ image,
+ "certificateType",
+ host,
+ "letsEncryptEmail",
+ "sshPrivateKey",
+ "enableDockerCleanup",
+ "enableLogRotation",
+ "enablePaidFeatures",
+ "metricsConfig",
+ "cleanupCacheApplications",
+ "cleanupCacheOnPreviews",
+ "cleanupCacheOnCompose",
+ "stripeCustomerId",
+ "stripeSubscriptionId",
+ "serversQuantity",
+ "expirationDate",
+ "createdAt"
+ )
+ SELECT
+ a."adminId",
+ auth.email,
+ COALESCE(auth.token, ''),
+ true,
+ CURRENT_TIMESTAMP,
+ 'admin',
+ a."serverIp",
+ auth.image,
+ a."certificateType",
+ a.host,
+ a."letsEncryptEmail",
+ a."sshPrivateKey",
+ a."enableDockerCleanup",
+ a."enableLogRotation",
+ a."enablePaidFeatures",
+ a."metricsConfig",
+ a."cleanupCacheApplications",
+ a."cleanupCacheOnPreviews",
+ a."cleanupCacheOnCompose",
+ a."stripeCustomerId",
+ a."stripeSubscriptionId",
+ a."serversQuantity",
+ NOW() + INTERVAL '1 year',
+ NOW()
+ FROM admin a
+ JOIN auth ON auth.id = a."authId"
+ RETURNING *
+),
+inserted_accounts AS (
+ -- Insertar cuentas para los admins
+ INSERT INTO account (
+ id,
+ "account_id",
+ "provider_id",
+ "user_id",
+ password,
+ "is2FAEnabled",
+ "created_at",
+ "updated_at"
+ )
+ SELECT
+ gen_random_uuid(),
+ gen_random_uuid(),
+ 'credentials',
+ a."adminId",
+ auth.password,
+ COALESCE(auth."is2FAEnabled", false),
+ NOW(),
+ NOW()
+ FROM admin a
+ JOIN auth ON auth.id = a."authId"
+ RETURNING *
+),
+inserted_orgs AS (
+ -- Crear organizaciones para cada admin
+ INSERT INTO organization (
+ id,
+ name,
+ slug,
+ "owner_id",
+ "created_at"
+ )
+ SELECT
+ gen_random_uuid(),
+ 'My Organization',
+ -- Generamos un slug único usando una función de hash
+ encode(sha256((a."adminId" || CURRENT_TIMESTAMP)::bytea), 'hex'),
+ a."adminId",
+ NOW()
+ FROM admin a
+ RETURNING *
+),
+inserted_members AS (
+ -- Insertar usuarios miembros
+ INSERT INTO user_temp (
+ id,
+ email,
+ token,
+ "email_verified",
+ "updated_at",
+ role,
+ image,
+ "createdAt",
+ "canAccessToAPI",
+ "canAccessToDocker",
+ "canAccessToGitProviders",
+ "canAccessToSSHKeys",
+ "canAccessToTraefikFiles",
+ "canCreateProjects",
+ "canCreateServices",
+ "canDeleteProjects",
+ "canDeleteServices",
+ "accesedProjects",
+ "accesedServices",
+ "expirationDate"
+ )
+ SELECT
+ u."userId",
+ auth.email,
+ COALESCE(u.token, ''),
+ true,
+ CURRENT_TIMESTAMP,
+ 'user',
+ auth.image,
+ NOW(),
+ COALESCE(u."canAccessToAPI", false),
+ COALESCE(u."canAccessToDocker", false),
+ COALESCE(u."canAccessToGitProviders", false),
+ COALESCE(u."canAccessToSSHKeys", false),
+ COALESCE(u."canAccessToTraefikFiles", false),
+ COALESCE(u."canCreateProjects", false),
+ COALESCE(u."canCreateServices", false),
+ COALESCE(u."canDeleteProjects", false),
+ COALESCE(u."canDeleteServices", false),
+ COALESCE(u."accesedProjects", '{}'),
+ COALESCE(u."accesedServices", '{}'),
+ NOW() + INTERVAL '1 year'
+ FROM "user" u
+ JOIN admin a ON u."adminId" = a."adminId"
+ JOIN auth ON auth.id = u."authId"
+ RETURNING *
+)
+-- Insertar miembros en las organizaciones
+INSERT INTO member (
+ id,
+ "organization_id",
+ "user_id",
+ role,
+ "created_at"
+)
+SELECT
+ gen_random_uuid(),
+ o.id,
+ u."userId",
+ 'admin',
+ NOW()
+FROM "user" u
+JOIN admin a ON u."adminId" = a."adminId"
+JOIN inserted_orgs o ON o."owner_id" = a."adminId";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0066_snapshot.json b/apps/dokploy/drizzle/meta/0066_snapshot.json
index 1bf9811a3..c51e03851 100644
--- a/apps/dokploy/drizzle/meta/0066_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0066_snapshot.json
@@ -1,5 +1,5 @@
{
- "id": "de382c48-6f10-4578-a307-884fecb4baa3",
+ "id": "67140673-fcd1-4c33-8dd1-bb7a34bdae23",
"prevId": "1240ec96-1751-4de3-b64f-cef9cb716786",
"version": "7",
"dialect": "postgresql",
@@ -1449,8 +1449,8 @@
"primaryKey": false,
"notNull": true
},
- "userId": {
- "name": "userId",
+ "adminId": {
+ "name": "adminId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -1465,15 +1465,15 @@
},
"indexes": {},
"foreignKeys": {
- "project_userId_user_temp_id_fk": {
- "name": "project_userId_user_temp_id_fk",
+ "project_adminId_admin_adminId_fk": {
+ "name": "project_adminId_admin_adminId_fk",
"tableFrom": "project",
- "tableTo": "user_temp",
+ "tableTo": "admin",
"columnsFrom": [
- "userId"
+ "adminId"
],
"columnsTo": [
- "id"
+ "adminId"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -2326,8 +2326,8 @@
"primaryKey": false,
"notNull": true
},
- "userId": {
- "name": "userId",
+ "adminId": {
+ "name": "adminId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -2335,15 +2335,15 @@
},
"indexes": {},
"foreignKeys": {
- "destination_userId_user_temp_id_fk": {
- "name": "destination_userId_user_temp_id_fk",
+ "destination_adminId_admin_adminId_fk": {
+ "name": "destination_adminId_admin_adminId_fk",
"tableFrom": "destination",
- "tableTo": "user_temp",
+ "tableTo": "admin",
"columnsFrom": [
- "userId"
+ "adminId"
],
"columnsTo": [
- "id"
+ "adminId"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -2734,8 +2734,8 @@
"primaryKey": false,
"notNull": false
},
- "userId": {
- "name": "userId",
+ "adminId": {
+ "name": "adminId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -2749,15 +2749,15 @@
},
"indexes": {},
"foreignKeys": {
- "certificate_userId_user_temp_id_fk": {
- "name": "certificate_userId_user_temp_id_fk",
+ "certificate_adminId_admin_adminId_fk": {
+ "name": "certificate_adminId_admin_adminId_fk",
"tableFrom": "certificate",
- "tableTo": "user_temp",
+ "tableTo": "admin",
"columnsFrom": [
- "userId"
+ "adminId"
],
"columnsTo": [
- "id"
+ "adminId"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -3651,8 +3651,8 @@
"notNull": true,
"default": "'cloud'"
},
- "userId": {
- "name": "userId",
+ "adminId": {
+ "name": "adminId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -3660,15 +3660,15 @@
},
"indexes": {},
"foreignKeys": {
- "registry_userId_user_temp_id_fk": {
- "name": "registry_userId_user_temp_id_fk",
+ "registry_adminId_admin_adminId_fk": {
+ "name": "registry_adminId_admin_adminId_fk",
"tableFrom": "registry",
- "tableTo": "user_temp",
+ "tableTo": "admin",
"columnsFrom": [
- "userId"
+ "adminId"
],
"columnsTo": [
- "id"
+ "adminId"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -3911,8 +3911,8 @@
"primaryKey": false,
"notNull": false
},
- "userId": {
- "name": "userId",
+ "adminId": {
+ "name": "adminId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -3985,15 +3985,15 @@
"onDelete": "cascade",
"onUpdate": "no action"
},
- "notification_userId_user_temp_id_fk": {
- "name": "notification_userId_user_temp_id_fk",
+ "notification_adminId_admin_adminId_fk": {
+ "name": "notification_adminId_admin_adminId_fk",
"tableFrom": "notification",
- "tableTo": "user_temp",
+ "tableTo": "admin",
"columnsFrom": [
- "userId"
+ "adminId"
],
"columnsTo": [
- "id"
+ "adminId"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -4173,8 +4173,8 @@
"primaryKey": false,
"notNull": true
},
- "userId": {
- "name": "userId",
+ "adminId": {
+ "name": "adminId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -4182,15 +4182,15 @@
},
"indexes": {},
"foreignKeys": {
- "git_provider_userId_user_temp_id_fk": {
- "name": "git_provider_userId_user_temp_id_fk",
+ "git_provider_adminId_admin_adminId_fk": {
+ "name": "git_provider_adminId_admin_adminId_fk",
"tableFrom": "git_provider",
- "tableTo": "user_temp",
+ "tableTo": "admin",
"columnsFrom": [
- "userId"
+ "adminId"
],
"columnsTo": [
- "id"
+ "adminId"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -4488,8 +4488,8 @@
"primaryKey": false,
"notNull": true
},
- "userId": {
- "name": "userId",
+ "adminId": {
+ "name": "adminId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -4525,15 +4525,15 @@
},
"indexes": {},
"foreignKeys": {
- "server_userId_user_temp_id_fk": {
- "name": "server_userId_user_temp_id_fk",
+ "server_adminId_admin_adminId_fk": {
+ "name": "server_adminId_admin_adminId_fk",
"tableFrom": "server",
- "tableTo": "user_temp",
+ "tableTo": "admin",
"columnsFrom": [
- "userId"
+ "adminId"
],
"columnsTo": [
- "id"
+ "adminId"
],
"onDelete": "cascade",
"onUpdate": "no action"
diff --git a/apps/dokploy/drizzle/meta/0067_snapshot.json b/apps/dokploy/drizzle/meta/0067_snapshot.json
new file mode 100644
index 000000000..33fc48703
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0067_snapshot.json
@@ -0,0 +1,5278 @@
+{
+ "id": "54ba08a1-8861-438a-a89d-f01d09a690c2",
+ "prevId": "67140673-fcd1-4c33-8dd1-bb7a34bdae23",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.application": {
+ "name": "application",
+ "schema": "",
+ "columns": {
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewEnv": {
+ "name": "previewEnv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildArgs": {
+ "name": "previewBuildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewWildcard": {
+ "name": "previewWildcard",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewPort": {
+ "name": "previewPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "previewHttps": {
+ "name": "previewHttps",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "previewPath": {
+ "name": "previewPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "buildArgs": {
+ "name": "buildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildPath": {
+ "name": "buildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBuildPath": {
+ "name": "gitlabBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBuildPath": {
+ "name": "bitbucketBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBuildPath": {
+ "name": "customGitBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerfile": {
+ "name": "dockerfile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerContextPath": {
+ "name": "dockerContextPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerBuildStage": {
+ "name": "dockerBuildStage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dropBuildPath": {
+ "name": "dropBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "buildType": {
+ "name": "buildType",
+ "type": "buildType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'nixpacks'"
+ },
+ "herokuVersion": {
+ "name": "herokuVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'24'"
+ },
+ "publishDirectory": {
+ "name": "publishDirectory",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "application",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "tableTo": "ssh-key",
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "set null"
+ },
+ "application_registryId_registry_registryId_fk": {
+ "name": "application_registryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "columnsFrom": [
+ "registryId"
+ ],
+ "tableTo": "registry",
+ "columnsTo": [
+ "registryId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "set null"
+ },
+ "application_projectId_project_projectId_fk": {
+ "name": "application_projectId_project_projectId_fk",
+ "tableFrom": "application",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "tableTo": "project",
+ "columnsTo": [
+ "projectId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "application_githubId_github_githubId_fk": {
+ "name": "application_githubId_github_githubId_fk",
+ "tableFrom": "application",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "tableTo": "github",
+ "columnsTo": [
+ "githubId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "set null"
+ },
+ "application_gitlabId_gitlab_gitlabId_fk": {
+ "name": "application_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "application",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "tableTo": "gitlab",
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "set null"
+ },
+ "application_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "application",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "tableTo": "bitbucket",
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "set null"
+ },
+ "application_serverId_server_serverId_fk": {
+ "name": "application_serverId_server_serverId_fk",
+ "tableFrom": "application",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "tableTo": "server",
+ "columnsTo": [
+ "serverId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "application_appName_unique": {
+ "name": "application_appName_unique",
+ "columns": [
+ "appName"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.postgres": {
+ "name": "postgres",
+ "schema": "",
+ "columns": {
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "postgres_projectId_project_projectId_fk": {
+ "name": "postgres_projectId_project_projectId_fk",
+ "tableFrom": "postgres",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "tableTo": "project",
+ "columnsTo": [
+ "projectId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "postgres_serverId_server_serverId_fk": {
+ "name": "postgres_serverId_server_serverId_fk",
+ "tableFrom": "postgres",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "tableTo": "server",
+ "columnsTo": [
+ "serverId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "postgres_appName_unique": {
+ "name": "postgres_appName_unique",
+ "columns": [
+ "appName"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "timestamp(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "authId": {
+ "name": "authId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_adminId_admin_adminId_fk": {
+ "name": "user_adminId_admin_adminId_fk",
+ "tableFrom": "user",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "tableTo": "admin",
+ "columnsTo": [
+ "adminId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "user_authId_auth_id_fk": {
+ "name": "user_authId_auth_id_fk",
+ "tableFrom": "user",
+ "columnsFrom": [
+ "authId"
+ ],
+ "tableTo": "auth",
+ "columnsTo": [
+ "id"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_temp": {
+ "name": "user_temp",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_verified": {
+ "name": "email_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableLogRotation": {
+ "name": "enableLogRotation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_temp_email_unique": {
+ "name": "user_temp_email_unique",
+ "columns": [
+ "email"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.admin": {
+ "name": "admin",
+ "schema": "",
+ "columns": {
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableLogRotation": {
+ "name": "enableLogRotation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "authId": {
+ "name": "authId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "admin_authId_auth_id_fk": {
+ "name": "admin_authId_auth_id_fk",
+ "tableFrom": "admin",
+ "columnsFrom": [
+ "authId"
+ ],
+ "tableTo": "auth",
+ "columnsTo": [
+ "id"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.auth": {
+ "name": "auth",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rol": {
+ "name": "rol",
+ "type": "Roles",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "auth_email_unique": {
+ "name": "auth_email_unique",
+ "columns": [
+ "email"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_adminId_admin_adminId_fk": {
+ "name": "project_adminId_admin_adminId_fk",
+ "tableFrom": "project",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "tableTo": "admin",
+ "columnsTo": [
+ "adminId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.domain": {
+ "name": "domain",
+ "schema": "",
+ "columns": {
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domainType": {
+ "name": "domainType",
+ "type": "domainType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'application'"
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "domain_composeId_compose_composeId_fk": {
+ "name": "domain_composeId_compose_composeId_fk",
+ "tableFrom": "domain",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "tableTo": "compose",
+ "columnsTo": [
+ "composeId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "domain_applicationId_application_applicationId_fk": {
+ "name": "domain_applicationId_application_applicationId_fk",
+ "tableFrom": "domain",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "tableTo": "application",
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "domain",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "tableTo": "preview_deployments",
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mariadb": {
+ "name": "mariadb",
+ "schema": "",
+ "columns": {
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mariadb_projectId_project_projectId_fk": {
+ "name": "mariadb_projectId_project_projectId_fk",
+ "tableFrom": "mariadb",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "tableTo": "project",
+ "columnsTo": [
+ "projectId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "mariadb_serverId_server_serverId_fk": {
+ "name": "mariadb_serverId_server_serverId_fk",
+ "tableFrom": "mariadb",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "tableTo": "server",
+ "columnsTo": [
+ "serverId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mariadb_appName_unique": {
+ "name": "mariadb_appName_unique",
+ "columns": [
+ "appName"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mongo": {
+ "name": "mongo",
+ "schema": "",
+ "columns": {
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicaSets": {
+ "name": "replicaSets",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mongo_projectId_project_projectId_fk": {
+ "name": "mongo_projectId_project_projectId_fk",
+ "tableFrom": "mongo",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "tableTo": "project",
+ "columnsTo": [
+ "projectId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "mongo_serverId_server_serverId_fk": {
+ "name": "mongo_serverId_server_serverId_fk",
+ "tableFrom": "mongo",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "tableTo": "server",
+ "columnsTo": [
+ "serverId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mongo_appName_unique": {
+ "name": "mongo_appName_unique",
+ "columns": [
+ "appName"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mysql": {
+ "name": "mysql",
+ "schema": "",
+ "columns": {
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mysql_projectId_project_projectId_fk": {
+ "name": "mysql_projectId_project_projectId_fk",
+ "tableFrom": "mysql",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "tableTo": "project",
+ "columnsTo": [
+ "projectId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "mysql_serverId_server_serverId_fk": {
+ "name": "mysql_serverId_server_serverId_fk",
+ "tableFrom": "mysql",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "tableTo": "server",
+ "columnsTo": [
+ "serverId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mysql_appName_unique": {
+ "name": "mysql_appName_unique",
+ "columns": [
+ "appName"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.backup": {
+ "name": "backup",
+ "schema": "",
+ "columns": {
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "database": {
+ "name": "database",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "backup_destinationId_destination_destinationId_fk": {
+ "name": "backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "backup",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "tableTo": "destination",
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "backup_postgresId_postgres_postgresId_fk": {
+ "name": "backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "backup",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "tableTo": "postgres",
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "backup",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "tableTo": "mariadb",
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "backup",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "tableTo": "mysql",
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "backup_mongoId_mongo_mongoId_fk": {
+ "name": "backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "backup",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "tableTo": "mongo",
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.destination": {
+ "name": "destination",
+ "schema": "",
+ "columns": {
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessKey": {
+ "name": "accessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secretAccessKey": {
+ "name": "secretAccessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bucket": {
+ "name": "bucket",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region": {
+ "name": "region",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "destination_adminId_admin_adminId_fk": {
+ "name": "destination_adminId_admin_adminId_fk",
+ "tableFrom": "destination",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "tableTo": "admin",
+ "columnsTo": [
+ "adminId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.deployment": {
+ "name": "deployment",
+ "schema": "",
+ "columns": {
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "deploymentStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'running'"
+ },
+ "logPath": {
+ "name": "logPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isPreviewDeployment": {
+ "name": "isPreviewDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "deployment_applicationId_application_applicationId_fk": {
+ "name": "deployment_applicationId_application_applicationId_fk",
+ "tableFrom": "deployment",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "tableTo": "application",
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "deployment_composeId_compose_composeId_fk": {
+ "name": "deployment_composeId_compose_composeId_fk",
+ "tableFrom": "deployment",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "tableTo": "compose",
+ "columnsTo": [
+ "composeId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "deployment_serverId_server_serverId_fk": {
+ "name": "deployment_serverId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "tableTo": "server",
+ "columnsTo": [
+ "serverId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "deployment",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "tableTo": "preview_deployments",
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mount": {
+ "name": "mount",
+ "schema": "",
+ "columns": {
+ "mountId": {
+ "name": "mountId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "mountType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "mountPath": {
+ "name": "mountPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mount_applicationId_application_applicationId_fk": {
+ "name": "mount_applicationId_application_applicationId_fk",
+ "tableFrom": "mount",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "tableTo": "application",
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "mount_postgresId_postgres_postgresId_fk": {
+ "name": "mount_postgresId_postgres_postgresId_fk",
+ "tableFrom": "mount",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "tableTo": "postgres",
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "mount_mariadbId_mariadb_mariadbId_fk": {
+ "name": "mount_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "mount",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "tableTo": "mariadb",
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "mount_mongoId_mongo_mongoId_fk": {
+ "name": "mount_mongoId_mongo_mongoId_fk",
+ "tableFrom": "mount",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "tableTo": "mongo",
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "mount_mysqlId_mysql_mysqlId_fk": {
+ "name": "mount_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "mount",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "tableTo": "mysql",
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "mount_redisId_redis_redisId_fk": {
+ "name": "mount_redisId_redis_redisId_fk",
+ "tableFrom": "mount",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "tableTo": "redis",
+ "columnsTo": [
+ "redisId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "mount_composeId_compose_composeId_fk": {
+ "name": "mount_composeId_compose_composeId_fk",
+ "tableFrom": "mount",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "tableTo": "compose",
+ "columnsTo": [
+ "composeId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.certificate": {
+ "name": "certificate",
+ "schema": "",
+ "columns": {
+ "certificateId": {
+ "name": "certificateId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificateData": {
+ "name": "certificateData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificatePath": {
+ "name": "certificatePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "autoRenew": {
+ "name": "autoRenew",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "certificate_adminId_admin_adminId_fk": {
+ "name": "certificate_adminId_admin_adminId_fk",
+ "tableFrom": "certificate",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "tableTo": "admin",
+ "columnsTo": [
+ "adminId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "certificate_serverId_server_serverId_fk": {
+ "name": "certificate_serverId_server_serverId_fk",
+ "tableFrom": "certificate",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "tableTo": "server",
+ "columnsTo": [
+ "serverId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "certificate_certificatePath_unique": {
+ "name": "certificate_certificatePath_unique",
+ "columns": [
+ "certificatePath"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_temp": {
+ "name": "session_temp",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_temp_user_id_user_temp_id_fk": {
+ "name": "session_temp_user_id_user_temp_id_fk",
+ "tableFrom": "session_temp",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "tableTo": "user_temp",
+ "columnsTo": [
+ "id"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_temp_token_unique": {
+ "name": "session_temp_token_unique",
+ "columns": [
+ "token"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session": {
+ "name": "session",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_user_id_auth_id_fk": {
+ "name": "session_user_id_auth_id_fk",
+ "tableFrom": "session",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "tableTo": "auth",
+ "columnsTo": [
+ "id"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redirect": {
+ "name": "redirect",
+ "schema": "",
+ "columns": {
+ "redirectId": {
+ "name": "redirectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "regex": {
+ "name": "regex",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "replacement": {
+ "name": "replacement",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permanent": {
+ "name": "permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redirect_applicationId_application_applicationId_fk": {
+ "name": "redirect_applicationId_application_applicationId_fk",
+ "tableFrom": "redirect",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "tableTo": "application",
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security": {
+ "name": "security",
+ "schema": "",
+ "columns": {
+ "securityId": {
+ "name": "securityId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "security_applicationId_application_applicationId_fk": {
+ "name": "security_applicationId_application_applicationId_fk",
+ "tableFrom": "security",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "tableTo": "application",
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "security_username_applicationId_unique": {
+ "name": "security_username_applicationId_unique",
+ "columns": [
+ "username",
+ "applicationId"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.port": {
+ "name": "port",
+ "schema": "",
+ "columns": {
+ "portId": {
+ "name": "portId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "publishedPort": {
+ "name": "publishedPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "targetPort": {
+ "name": "targetPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "protocolType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "port_applicationId_application_applicationId_fk": {
+ "name": "port_applicationId_application_applicationId_fk",
+ "tableFrom": "port",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "tableTo": "application",
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redis": {
+ "name": "redis",
+ "schema": "",
+ "columns": {
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redis_projectId_project_projectId_fk": {
+ "name": "redis_projectId_project_projectId_fk",
+ "tableFrom": "redis",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "tableTo": "project",
+ "columnsTo": [
+ "projectId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "redis_serverId_server_serverId_fk": {
+ "name": "redis_serverId_server_serverId_fk",
+ "tableFrom": "redis",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "tableTo": "server",
+ "columnsTo": [
+ "serverId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "redis_appName_unique": {
+ "name": "redis_appName_unique",
+ "columns": [
+ "appName"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.compose": {
+ "name": "compose",
+ "schema": "",
+ "columns": {
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeFile": {
+ "name": "composeFile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceTypeCompose",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "composeType": {
+ "name": "composeType",
+ "type": "composeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'docker-compose'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "composePath": {
+ "name": "composePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'./docker-compose.yml'"
+ },
+ "suffix": {
+ "name": "suffix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "randomize": {
+ "name": "randomize",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeployment": {
+ "name": "isolatedDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "composeStatus": {
+ "name": "composeStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "compose",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "tableTo": "ssh-key",
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "set null"
+ },
+ "compose_projectId_project_projectId_fk": {
+ "name": "compose_projectId_project_projectId_fk",
+ "tableFrom": "compose",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "tableTo": "project",
+ "columnsTo": [
+ "projectId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "compose_githubId_github_githubId_fk": {
+ "name": "compose_githubId_github_githubId_fk",
+ "tableFrom": "compose",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "tableTo": "github",
+ "columnsTo": [
+ "githubId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "set null"
+ },
+ "compose_gitlabId_gitlab_gitlabId_fk": {
+ "name": "compose_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "compose",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "tableTo": "gitlab",
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "set null"
+ },
+ "compose_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "compose",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "tableTo": "bitbucket",
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "set null"
+ },
+ "compose_serverId_server_serverId_fk": {
+ "name": "compose_serverId_server_serverId_fk",
+ "tableFrom": "compose",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "tableTo": "server",
+ "columnsTo": [
+ "serverId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.registry": {
+ "name": "registry",
+ "schema": "",
+ "columns": {
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "registryName": {
+ "name": "registryName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "imagePrefix": {
+ "name": "imagePrefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selfHosted": {
+ "name": "selfHosted",
+ "type": "RegistryType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'cloud'"
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "registry_adminId_admin_adminId_fk": {
+ "name": "registry_adminId_admin_adminId_fk",
+ "tableFrom": "registry",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "tableTo": "admin",
+ "columnsTo": [
+ "adminId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.discord": {
+ "name": "discord",
+ "schema": "",
+ "columns": {
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.email": {
+ "name": "email",
+ "schema": "",
+ "columns": {
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "smtpServer": {
+ "name": "smtpServer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "smtpPort": {
+ "name": "smtpPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gotify": {
+ "name": "gotify",
+ "schema": "",
+ "columns": {
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appToken": {
+ "name": "appToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "notificationId": {
+ "name": "notificationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appDeploy": {
+ "name": "appDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "appBuildError": {
+ "name": "appBuildError",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "databaseBackup": {
+ "name": "databaseBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dokployRestart": {
+ "name": "dokployRestart",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerCleanup": {
+ "name": "dockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "serverThreshold": {
+ "name": "serverThreshold",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "notificationType": {
+ "name": "notificationType",
+ "type": "notificationType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_slackId_slack_slackId_fk": {
+ "name": "notification_slackId_slack_slackId_fk",
+ "tableFrom": "notification",
+ "columnsFrom": [
+ "slackId"
+ ],
+ "tableTo": "slack",
+ "columnsTo": [
+ "slackId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "notification_telegramId_telegram_telegramId_fk": {
+ "name": "notification_telegramId_telegram_telegramId_fk",
+ "tableFrom": "notification",
+ "columnsFrom": [
+ "telegramId"
+ ],
+ "tableTo": "telegram",
+ "columnsTo": [
+ "telegramId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "notification_discordId_discord_discordId_fk": {
+ "name": "notification_discordId_discord_discordId_fk",
+ "tableFrom": "notification",
+ "columnsFrom": [
+ "discordId"
+ ],
+ "tableTo": "discord",
+ "columnsTo": [
+ "discordId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "notification_emailId_email_emailId_fk": {
+ "name": "notification_emailId_email_emailId_fk",
+ "tableFrom": "notification",
+ "columnsFrom": [
+ "emailId"
+ ],
+ "tableTo": "email",
+ "columnsTo": [
+ "emailId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "notification_gotifyId_gotify_gotifyId_fk": {
+ "name": "notification_gotifyId_gotify_gotifyId_fk",
+ "tableFrom": "notification",
+ "columnsFrom": [
+ "gotifyId"
+ ],
+ "tableTo": "gotify",
+ "columnsTo": [
+ "gotifyId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "notification_adminId_admin_adminId_fk": {
+ "name": "notification_adminId_admin_adminId_fk",
+ "tableFrom": "notification",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "tableTo": "admin",
+ "columnsTo": [
+ "adminId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.slack": {
+ "name": "slack",
+ "schema": "",
+ "columns": {
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.telegram": {
+ "name": "telegram",
+ "schema": "",
+ "columns": {
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "botToken": {
+ "name": "botToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "chatId": {
+ "name": "chatId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh-key": {
+ "name": "ssh-key",
+ "schema": "",
+ "columns": {
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "publicKey": {
+ "name": "publicKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lastUsedAt": {
+ "name": "lastUsedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh-key_adminId_admin_adminId_fk": {
+ "name": "ssh-key_adminId_admin_adminId_fk",
+ "tableFrom": "ssh-key",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "tableTo": "admin",
+ "columnsTo": [
+ "adminId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.git_provider": {
+ "name": "git_provider",
+ "schema": "",
+ "columns": {
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerType": {
+ "name": "providerType",
+ "type": "gitProviderType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "git_provider_adminId_admin_adminId_fk": {
+ "name": "git_provider_adminId_admin_adminId_fk",
+ "tableFrom": "git_provider",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "tableTo": "admin",
+ "columnsTo": [
+ "adminId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bitbucket": {
+ "name": "bitbucket",
+ "schema": "",
+ "columns": {
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bitbucketUsername": {
+ "name": "bitbucketUsername",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "appPassword": {
+ "name": "appPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketWorkspaceName": {
+ "name": "bitbucketWorkspaceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "bitbucket",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "tableTo": "git_provider",
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github": {
+ "name": "github",
+ "schema": "",
+ "columns": {
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "githubAppName": {
+ "name": "githubAppName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubAppId": {
+ "name": "githubAppId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientId": {
+ "name": "githubClientId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientSecret": {
+ "name": "githubClientSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubInstallationId": {
+ "name": "githubInstallationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubPrivateKey": {
+ "name": "githubPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubWebhookSecret": {
+ "name": "githubWebhookSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "github_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "github",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "tableTo": "git_provider",
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitlab": {
+ "name": "gitlab",
+ "schema": "",
+ "columns": {
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "gitlabUrl": {
+ "name": "gitlabUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitlab.com'"
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitlab",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "tableTo": "git_provider",
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.server": {
+ "name": "server",
+ "schema": "",
+ "columns": {
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ipAddress": {
+ "name": "ipAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'root'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverStatus": {
+ "name": "serverStatus",
+ "type": "serverStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "server_adminId_admin_adminId_fk": {
+ "name": "server_adminId_admin_adminId_fk",
+ "tableFrom": "server",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "tableTo": "admin",
+ "columnsTo": [
+ "adminId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "server_sshKeyId_ssh-key_sshKeyId_fk": {
+ "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "server",
+ "columnsFrom": [
+ "sshKeyId"
+ ],
+ "tableTo": "ssh-key",
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "set null"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preview_deployments": {
+ "name": "preview_deployments",
+ "schema": "",
+ "columns": {
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestId": {
+ "name": "pullRequestId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestNumber": {
+ "name": "pullRequestNumber",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestURL": {
+ "name": "pullRequestURL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestTitle": {
+ "name": "pullRequestTitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestCommentId": {
+ "name": "pullRequestCommentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previewStatus": {
+ "name": "previewStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preview_deployments_applicationId_application_applicationId_fk": {
+ "name": "preview_deployments_applicationId_application_applicationId_fk",
+ "tableFrom": "preview_deployments",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "tableTo": "application",
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ },
+ "preview_deployments_domainId_domain_domainId_fk": {
+ "name": "preview_deployments_domainId_domain_domainId_fk",
+ "tableFrom": "preview_deployments",
+ "columnsFrom": [
+ "domainId"
+ ],
+ "tableTo": "domain",
+ "columnsTo": [
+ "domainId"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "preview_deployments_appName_unique": {
+ "name": "preview_deployments_appName_unique",
+ "columns": [
+ "appName"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.account": {
+ "name": "account",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "account_id": {
+ "name": "account_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "id_token": {
+ "name": "id_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token_expires_at": {
+ "name": "access_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token_expires_at": {
+ "name": "refresh_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "account_user_id_user_temp_id_fk": {
+ "name": "account_user_id_user_temp_id_fk",
+ "tableFrom": "account",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "tableTo": "user_temp",
+ "columnsTo": [
+ "id"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "invitation_organization_id_organization_id_fk": {
+ "name": "invitation_organization_id_organization_id_fk",
+ "tableFrom": "invitation",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "tableTo": "organization",
+ "columnsTo": [
+ "id"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "no action"
+ },
+ "invitation_inviter_id_user_temp_id_fk": {
+ "name": "invitation_inviter_id_user_temp_id_fk",
+ "tableFrom": "invitation",
+ "columnsFrom": [
+ "inviter_id"
+ ],
+ "tableTo": "user_temp",
+ "columnsTo": [
+ "id"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.member": {
+ "name": "member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "member_organization_id_organization_id_fk": {
+ "name": "member_organization_id_organization_id_fk",
+ "tableFrom": "member",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "tableTo": "organization",
+ "columnsTo": [
+ "id"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "no action"
+ },
+ "member_user_id_user_temp_id_fk": {
+ "name": "member_user_id_user_temp_id_fk",
+ "tableFrom": "member",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "tableTo": "user_temp",
+ "columnsTo": [
+ "id"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization": {
+ "name": "organization",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_id": {
+ "name": "owner_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "organization_owner_id_user_temp_id_fk": {
+ "name": "organization_owner_id_user_temp_id_fk",
+ "tableFrom": "organization",
+ "columnsFrom": [
+ "owner_id"
+ ],
+ "tableTo": "user_temp",
+ "columnsTo": [
+ "id"
+ ],
+ "onUpdate": "no action",
+ "onDelete": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "organization_slug_unique": {
+ "name": "organization_slug_unique",
+ "columns": [
+ "slug"
+ ],
+ "nullsNotDistinct": false
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.verification": {
+ "name": "verification",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "drop"
+ ]
+ },
+ "public.Roles": {
+ "name": "Roles",
+ "schema": "public",
+ "values": [
+ "admin",
+ "user"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo"
+ ]
+ },
+ "public.deploymentStatus": {
+ "name": "deploymentStatus",
+ "schema": "public",
+ "values": [
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.mountType": {
+ "name": "mountType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "public.serviceType": {
+ "name": "serviceType",
+ "schema": "public",
+ "values": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "public.protocolType": {
+ "name": "protocolType",
+ "schema": "public",
+ "values": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "raw"
+ ]
+ },
+ "public.RegistryType": {
+ "name": "RegistryType",
+ "schema": "public",
+ "values": [
+ "selfHosted",
+ "cloud"
+ ]
+ },
+ "public.notificationType": {
+ "name": "notificationType",
+ "schema": "public",
+ "values": [
+ "slack",
+ "telegram",
+ "discord",
+ "email",
+ "gotify"
+ ]
+ },
+ "public.gitProviderType": {
+ "name": "gitProviderType",
+ "schema": "public",
+ "values": [
+ "github",
+ "gitlab",
+ "bitbucket"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ }
+ },
+ "schemas": {},
+ "views": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/_journal.json b/apps/dokploy/drizzle/meta/_journal.json
index 188a97009..c01cd500c 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -467,8 +467,15 @@
{
"idx": 66,
"version": "7",
- "when": 1739425241338,
- "tag": "0066_rapid_morbius",
+ "when": 1739426913392,
+ "tag": "0066_yielding_echo",
+ "breakpoints": true
+ },
+ {
+ "idx": 67,
+ "version": "7",
+ "when": 1739427057545,
+ "tag": "0067_migrate-data",
"breakpoints": true
}
]
diff --git a/packages/server/src/db/schema/certificate.ts b/packages/server/src/db/schema/certificate.ts
index c72d189c2..bbdb1915d 100644
--- a/packages/server/src/db/schema/certificate.ts
+++ b/packages/server/src/db/schema/certificate.ts
@@ -25,9 +25,9 @@ export const certificates = pgTable("certificate", {
// userId: text("userId").references(() => user.userId, {
// onDelete: "cascade",
// }),
- userId: text("userId")
+ adminId: text("adminId")
.notNull()
- .references(() => users_temp.id, { onDelete: "cascade" }),
+ .references(() => admins.adminId, { onDelete: "cascade" }),
serverId: text("serverId").references(() => server.serverId, {
onDelete: "cascade",
}),
@@ -40,10 +40,10 @@ export const certificatesRelations = relations(
fields: [certificates.serverId],
references: [server.serverId],
}),
- // user: one(user, {
- // fields: [certificates.userId],
- // references: [user.id],
- // }),
+ admin: one(admins, {
+ fields: [certificates.adminId],
+ references: [admins.adminId],
+ }),
}),
);
diff --git a/packages/server/src/db/schema/destination.ts b/packages/server/src/db/schema/destination.ts
index 6b9ea5d93..cbbb4c2d5 100644
--- a/packages/server/src/db/schema/destination.ts
+++ b/packages/server/src/db/schema/destination.ts
@@ -24,9 +24,9 @@ export const destinations = pgTable("destination", {
// userId: text("userId")
// .notNull()
// .references(() => user.userId, { onDelete: "cascade" }),
- userId: text("userId")
+ adminId: text("adminId")
.notNull()
- .references(() => users_temp.id, { onDelete: "cascade" }),
+ .references(() => admins.adminId, { onDelete: "cascade" }),
});
export const destinationsRelations = relations(
diff --git a/packages/server/src/db/schema/git-provider.ts b/packages/server/src/db/schema/git-provider.ts
index 4d154ee33..d6720ce06 100644
--- a/packages/server/src/db/schema/git-provider.ts
+++ b/packages/server/src/db/schema/git-provider.ts
@@ -29,9 +29,9 @@ export const gitProvider = pgTable("git_provider", {
// userId: text("userId").references(() => user.userId, {
// onDelete: "cascade",
// }),
- userId: text("userId")
+ adminId: text("adminId")
.notNull()
- .references(() => users_temp.id, { onDelete: "cascade" }),
+ .references(() => admins.adminId, { onDelete: "cascade" }),
});
export const gitProviderRelations = relations(gitProvider, ({ one, many }) => ({
@@ -47,10 +47,10 @@ export const gitProviderRelations = relations(gitProvider, ({ one, many }) => ({
fields: [gitProvider.gitProviderId],
references: [bitbucket.gitProviderId],
}),
- // user: one(user, {
- // fields: [gitProvider.userId],
- // references: [user.id],
- // }),
+ admin: one(admins, {
+ fields: [gitProvider.adminId],
+ references: [admins.adminId],
+ }),
}));
const createSchema = createInsertSchema(gitProvider);
diff --git a/packages/server/src/db/schema/notification.ts b/packages/server/src/db/schema/notification.ts
index 3ab253396..0270bd567 100644
--- a/packages/server/src/db/schema/notification.ts
+++ b/packages/server/src/db/schema/notification.ts
@@ -49,9 +49,9 @@ export const notifications = pgTable("notification", {
// userId: text("userId").references(() => user.userId, {
// onDelete: "cascade",
// }),
- userId: text("userId")
+ adminId: text("adminId")
.notNull()
- .references(() => users_temp.id, { onDelete: "cascade" }),
+ .references(() => admins.adminId, { onDelete: "cascade" }),
});
export const slack = pgTable("slack", {
@@ -126,10 +126,10 @@ export const notificationsRelations = relations(notifications, ({ one }) => ({
fields: [notifications.gotifyId],
references: [gotify.gotifyId],
}),
- // user: one(user, {
- // fields: [notifications.userId],
- // references: [user.id],
- // }),
+ admin: one(admins, {
+ fields: [notifications.adminId],
+ references: [admins.adminId],
+ }),
}));
export const notificationsSchema = createInsertSchema(notifications);
diff --git a/packages/server/src/db/schema/project.ts b/packages/server/src/db/schema/project.ts
index efde3c34b..e352e47fb 100644
--- a/packages/server/src/db/schema/project.ts
+++ b/packages/server/src/db/schema/project.ts
@@ -28,9 +28,9 @@ export const projects = pgTable("project", {
// userId: text("userId")
// .notNull()
// .references(() => user.userId, { onDelete: "cascade" }),
- userId: text("userId")
+ adminId: text("adminId")
.notNull()
- .references(() => users_temp.id, { onDelete: "cascade" }),
+ .references(() => admins.adminId, { onDelete: "cascade" }),
env: text("env").notNull().default(""),
});
diff --git a/packages/server/src/db/schema/registry.ts b/packages/server/src/db/schema/registry.ts
index 62c2b2d7d..9efd6536f 100644
--- a/packages/server/src/db/schema/registry.ts
+++ b/packages/server/src/db/schema/registry.ts
@@ -32,9 +32,9 @@ export const registry = pgTable("registry", {
// userId: text("userId")
// .notNull()
// .references(() => user.userId, { onDelete: "cascade" }),
- userId: text("userId")
+ adminId: text("adminId")
.notNull()
- .references(() => users_temp.id, { onDelete: "cascade" }),
+ .references(() => admins.adminId, { onDelete: "cascade" }),
});
export const registryRelations = relations(registry, ({ one, many }) => ({
diff --git a/packages/server/src/db/schema/server.ts b/packages/server/src/db/schema/server.ts
index b6b77dbcd..ee1083bd6 100644
--- a/packages/server/src/db/schema/server.ts
+++ b/packages/server/src/db/schema/server.ts
@@ -47,9 +47,9 @@ export const server = pgTable("server", {
// userId: text("userId")
// .notNull()
// .references(() => user.userId, { onDelete: "cascade" }),
- userId: text("userId")
+ adminId: text("adminId")
.notNull()
- .references(() => users_temp.id, { onDelete: "cascade" }),
+ .references(() => admins.adminId, { onDelete: "cascade" }),
serverStatus: serverStatus("serverStatus").notNull().default("active"),
command: text("command").notNull().default(""),
sshKeyId: text("sshKeyId").references(() => sshKeys.sshKeyId, {
From 7c624080704134999fb5325ae1739339337b4be6 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Thu, 13 Feb 2025 00:38:39 -0600
Subject: [PATCH 014/126] refactor: delete
---
apps/dokploy/drizzle/0066_smiling_warlock.sql | 153 ------------------
apps/dokploy/migrate.ts | 2 +-
packages/server/src/db/schema/account.ts | 2 +-
packages/server/src/db/schema/certificate.ts | 4 +-
packages/server/src/db/schema/project.ts | 2 +-
packages/server/src/db/schema/server.ts | 2 +-
packages/server/src/db/schema/session.ts | 2 +-
7 files changed, 7 insertions(+), 160 deletions(-)
delete mode 100644 apps/dokploy/drizzle/0066_smiling_warlock.sql
diff --git a/apps/dokploy/drizzle/0066_smiling_warlock.sql b/apps/dokploy/drizzle/0066_smiling_warlock.sql
deleted file mode 100644
index 9deea8818..000000000
--- a/apps/dokploy/drizzle/0066_smiling_warlock.sql
+++ /dev/null
@@ -1,153 +0,0 @@
-CREATE TABLE "user_temp" (
- "id" text PRIMARY KEY NOT NULL,
- "name" text DEFAULT '' NOT NULL,
- "token" text NOT NULL,
- "isRegistered" boolean DEFAULT false NOT NULL,
- "expirationDate" text NOT NULL,
- "createdAt" text NOT NULL,
- "canCreateProjects" boolean DEFAULT false NOT NULL,
- "canAccessToSSHKeys" boolean DEFAULT false NOT NULL,
- "canCreateServices" boolean DEFAULT false NOT NULL,
- "canDeleteProjects" boolean DEFAULT false NOT NULL,
- "canDeleteServices" boolean DEFAULT false NOT NULL,
- "canAccessToDocker" boolean DEFAULT false NOT NULL,
- "canAccessToAPI" boolean DEFAULT false NOT NULL,
- "canAccessToGitProviders" boolean DEFAULT false NOT NULL,
- "canAccessToTraefikFiles" boolean DEFAULT false NOT NULL,
- "accesedProjects" text[] DEFAULT ARRAY[]::text[] NOT NULL,
- "accesedServices" text[] DEFAULT ARRAY[]::text[] NOT NULL,
- "email" text NOT NULL,
- "email_verified" boolean NOT NULL,
- "image" text,
- "role" text,
- "banned" boolean,
- "ban_reason" text,
- "ban_expires" timestamp,
- "updated_at" timestamp NOT NULL,
- "serverIp" text,
- "certificateType" "certificateType" DEFAULT 'none' NOT NULL,
- "host" text,
- "letsEncryptEmail" text,
- "sshPrivateKey" text,
- "enableDockerCleanup" boolean DEFAULT false NOT NULL,
- "enableLogRotation" boolean DEFAULT false NOT NULL,
- "enablePaidFeatures" boolean DEFAULT false NOT NULL,
- "metricsConfig" jsonb DEFAULT '{"server":{"type":"Dokploy","refreshRate":60,"port":4500,"token":"","retentionDays":2,"cronJob":"","urlCallback":"","thresholds":{"cpu":0,"memory":0}},"containers":{"refreshRate":60,"services":{"include":[],"exclude":[]}}}'::jsonb NOT NULL,
- "cleanupCacheApplications" boolean DEFAULT false NOT NULL,
- "cleanupCacheOnPreviews" boolean DEFAULT false NOT NULL,
- "cleanupCacheOnCompose" boolean DEFAULT false NOT NULL,
- "stripeCustomerId" text,
- "stripeSubscriptionId" text,
- "serversQuantity" integer DEFAULT 0 NOT NULL,
- CONSTRAINT "user_temp_email_unique" UNIQUE("email")
-);
---> statement-breakpoint
-CREATE TABLE "session_temp" (
- "id" text PRIMARY KEY NOT NULL,
- "expires_at" timestamp NOT NULL,
- "token" text NOT NULL,
- "created_at" timestamp NOT NULL,
- "updated_at" timestamp NOT NULL,
- "ip_address" text,
- "user_agent" text,
- "user_id" text NOT NULL,
- "impersonated_by" text,
- "active_organization_id" text,
- CONSTRAINT "session_temp_token_unique" UNIQUE("token")
-);
---> statement-breakpoint
-CREATE TABLE "account" (
- "id" text PRIMARY KEY NOT NULL,
- "account_id" text NOT NULL,
- "provider_id" text NOT NULL,
- "user_id" text NOT NULL,
- "access_token" text,
- "refresh_token" text,
- "id_token" text,
- "access_token_expires_at" timestamp,
- "refresh_token_expires_at" timestamp,
- "scope" text,
- "password" text,
- "is2FAEnabled" boolean DEFAULT false NOT NULL,
- "created_at" timestamp NOT NULL,
- "updated_at" timestamp NOT NULL,
- "resetPasswordToken" text,
- "resetPasswordExpiresAt" text,
- "confirmationToken" text,
- "confirmationExpiresAt" text
-);
---> statement-breakpoint
-CREATE TABLE "invitation" (
- "id" text PRIMARY KEY NOT NULL,
- "organization_id" text NOT NULL,
- "email" text NOT NULL,
- "role" text,
- "status" text NOT NULL,
- "expires_at" timestamp NOT NULL,
- "inviter_id" text NOT NULL
-);
---> statement-breakpoint
-CREATE TABLE "member" (
- "id" text PRIMARY KEY NOT NULL,
- "organization_id" text NOT NULL,
- "user_id" text NOT NULL,
- "role" text NOT NULL,
- "created_at" timestamp NOT NULL
-);
---> statement-breakpoint
-CREATE TABLE "organization" (
- "id" text PRIMARY KEY NOT NULL,
- "name" text NOT NULL,
- "slug" text,
- "logo" text,
- "created_at" timestamp NOT NULL,
- "metadata" text,
- "owner_id" text NOT NULL,
- CONSTRAINT "organization_slug_unique" UNIQUE("slug")
-);
---> statement-breakpoint
-CREATE TABLE "verification" (
- "id" text PRIMARY KEY NOT NULL,
- "identifier" text NOT NULL,
- "value" text NOT NULL,
- "expires_at" timestamp NOT NULL,
- "created_at" timestamp,
- "updated_at" timestamp
-);
---> statement-breakpoint
-ALTER TABLE "project" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "destination" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "certificate" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "registry" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "notification" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "git_provider" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "server" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "project" DROP CONSTRAINT "project_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "destination" DROP CONSTRAINT "destination_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "certificate" DROP CONSTRAINT "certificate_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "registry" DROP CONSTRAINT "registry_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "notification" DROP CONSTRAINT "notification_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "git_provider" DROP CONSTRAINT "git_provider_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "server" DROP CONSTRAINT "server_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "ssh-key" ALTER COLUMN "adminId" SET NOT NULL;--> statement-breakpoint
-ALTER TABLE "session_temp" ADD CONSTRAINT "session_temp_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "account" ADD CONSTRAINT "account_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "invitation" ADD CONSTRAINT "invitation_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "invitation" ADD CONSTRAINT "invitation_inviter_id_user_temp_id_fk" FOREIGN KEY ("inviter_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "member" ADD CONSTRAINT "member_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "member" ADD CONSTRAINT "member_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "organization" ADD CONSTRAINT "organization_owner_id_user_temp_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "project" ADD CONSTRAINT "project_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "destination" ADD CONSTRAINT "destination_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "certificate" ADD CONSTRAINT "certificate_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "registry" ADD CONSTRAINT "registry_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "notification" ADD CONSTRAINT "notification_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "git_provider" ADD CONSTRAINT "git_provider_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "server" ADD CONSTRAINT "server_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/migrate.ts b/apps/dokploy/migrate.ts
index 72bbf2ab0..bcbac2336 100644
--- a/apps/dokploy/migrate.ts
+++ b/apps/dokploy/migrate.ts
@@ -1,8 +1,8 @@
import { drizzle } from "drizzle-orm/postgres-js";
import { migrate } from "drizzle-orm/postgres-js/migrator";
+import { nanoid } from "nanoid";
import postgres from "postgres";
import * as schema from "./server/db/schema";
-import { nanoid } from "nanoid";
const connectionString = process.env.DATABASE_URL!;
diff --git a/packages/server/src/db/schema/account.ts b/packages/server/src/db/schema/account.ts
index 349428fd8..3e81fbf69 100644
--- a/packages/server/src/db/schema/account.ts
+++ b/packages/server/src/db/schema/account.ts
@@ -1,6 +1,6 @@
import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core";
-import { users_temp } from "./user";
import { nanoid } from "nanoid";
+import { users_temp } from "./user";
export const account = pgTable("account", {
id: text("id")
diff --git a/packages/server/src/db/schema/certificate.ts b/packages/server/src/db/schema/certificate.ts
index bbdb1915d..02b00f65e 100644
--- a/packages/server/src/db/schema/certificate.ts
+++ b/packages/server/src/db/schema/certificate.ts
@@ -3,11 +3,11 @@ import { boolean, pgTable, text } from "drizzle-orm/pg-core";
import { createInsertSchema } from "drizzle-zod";
import { nanoid } from "nanoid";
import { z } from "zod";
+import { admins } from "./admin";
import { server } from "./server";
+import { users_temp } from "./user";
// import { user } from "./user";
import { generateAppName } from "./utils";
-import { admins } from "./admin";
-import { users_temp } from "./user";
export const certificates = pgTable("certificate", {
certificateId: text("certificateId")
diff --git a/packages/server/src/db/schema/project.ts b/packages/server/src/db/schema/project.ts
index e352e47fb..48effa81c 100644
--- a/packages/server/src/db/schema/project.ts
+++ b/packages/server/src/db/schema/project.ts
@@ -4,6 +4,7 @@ import { pgTable, text } from "drizzle-orm/pg-core";
import { createInsertSchema } from "drizzle-zod";
import { nanoid } from "nanoid";
import { z } from "zod";
+import { admins } from "./admin";
// import { admins } from "./admin";
import { applications } from "./application";
import { compose } from "./compose";
@@ -13,7 +14,6 @@ import { mysql } from "./mysql";
import { postgres } from "./postgres";
import { redis } from "./redis";
import { users, users_temp } from "./user";
-import { admins } from "./admin";
export const projects = pgTable("project", {
projectId: text("projectId")
diff --git a/packages/server/src/db/schema/server.ts b/packages/server/src/db/schema/server.ts
index ee1083bd6..c0b44ef97 100644
--- a/packages/server/src/db/schema/server.ts
+++ b/packages/server/src/db/schema/server.ts
@@ -22,9 +22,9 @@ import { mysql } from "./mysql";
import { postgres } from "./postgres";
import { redis } from "./redis";
import { sshKeys } from "./ssh-key";
+import { users_temp } from "./user";
// import { user } from "./user";
import { generateAppName } from "./utils";
-import { users_temp } from "./user";
export const serverStatus = pgEnum("serverStatus", ["active", "inactive"]);
diff --git a/packages/server/src/db/schema/session.ts b/packages/server/src/db/schema/session.ts
index 03a70c41a..4e9d28835 100644
--- a/packages/server/src/db/schema/session.ts
+++ b/packages/server/src/db/schema/session.ts
@@ -1,7 +1,7 @@
import { sql } from "drizzle-orm";
import { pgTable, text, timestamp } from "drizzle-orm/pg-core";
-import { users_temp } from "./user";
import { auth } from "./auth";
+import { users_temp } from "./user";
// OLD TABLE
export const session = pgTable("session_temp", {
From 0d525398a83fff995dd1c4eda8ad4541d24ec11f Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Thu, 13 Feb 2025 00:45:29 -0600
Subject: [PATCH 015/126] feat: migrate rest schemas
---
.../drizzle/0068_sour_professor_monster.sql | 32 +
apps/dokploy/drizzle/meta/0068_snapshot.json | 5278 +++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 7 +
packages/server/src/db/schema/certificate.ts | 10 +-
packages/server/src/db/schema/destination.ts | 4 +-
packages/server/src/db/schema/git-provider.ts | 4 +-
packages/server/src/db/schema/notification.ts | 10 +-
packages/server/src/db/schema/project.ts | 4 +-
packages/server/src/db/schema/registry.ts | 4 +-
packages/server/src/db/schema/server.ts | 4 +-
packages/server/src/db/schema/ssh-key.ts | 13 +-
packages/server/src/db/schema/user.ts | 8 +-
12 files changed, 5348 insertions(+), 30 deletions(-)
create mode 100644 apps/dokploy/drizzle/0068_sour_professor_monster.sql
create mode 100644 apps/dokploy/drizzle/meta/0068_snapshot.json
diff --git a/apps/dokploy/drizzle/0068_sour_professor_monster.sql b/apps/dokploy/drizzle/0068_sour_professor_monster.sql
new file mode 100644
index 000000000..f69152b5d
--- /dev/null
+++ b/apps/dokploy/drizzle/0068_sour_professor_monster.sql
@@ -0,0 +1,32 @@
+ALTER TABLE "project" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "destination" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "certificate" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "registry" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "notification" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "ssh-key" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "git_provider" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "server" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "project" DROP CONSTRAINT "project_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "destination" DROP CONSTRAINT "destination_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "certificate" DROP CONSTRAINT "certificate_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "registry" DROP CONSTRAINT "registry_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "notification" DROP CONSTRAINT "notification_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "ssh-key" DROP CONSTRAINT "ssh-key_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "git_provider" DROP CONSTRAINT "git_provider_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "server" DROP CONSTRAINT "server_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "project" ADD CONSTRAINT "project_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "destination" ADD CONSTRAINT "destination_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "certificate" ADD CONSTRAINT "certificate_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "registry" ADD CONSTRAINT "registry_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "notification" ADD CONSTRAINT "notification_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh-key" ADD CONSTRAINT "ssh-key_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "git_provider" ADD CONSTRAINT "git_provider_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "server" ADD CONSTRAINT "server_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0068_snapshot.json b/apps/dokploy/drizzle/meta/0068_snapshot.json
new file mode 100644
index 000000000..c9f50b5ee
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0068_snapshot.json
@@ -0,0 +1,5278 @@
+{
+ "id": "c2e134de-9865-4892-a24d-048aa5be22e8",
+ "prevId": "54ba08a1-8861-438a-a89d-f01d09a690c2",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.application": {
+ "name": "application",
+ "schema": "",
+ "columns": {
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewEnv": {
+ "name": "previewEnv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildArgs": {
+ "name": "previewBuildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewWildcard": {
+ "name": "previewWildcard",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewPort": {
+ "name": "previewPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "previewHttps": {
+ "name": "previewHttps",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "previewPath": {
+ "name": "previewPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "buildArgs": {
+ "name": "buildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildPath": {
+ "name": "buildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBuildPath": {
+ "name": "gitlabBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBuildPath": {
+ "name": "bitbucketBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBuildPath": {
+ "name": "customGitBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerfile": {
+ "name": "dockerfile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerContextPath": {
+ "name": "dockerContextPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerBuildStage": {
+ "name": "dockerBuildStage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dropBuildPath": {
+ "name": "dropBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "buildType": {
+ "name": "buildType",
+ "type": "buildType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'nixpacks'"
+ },
+ "herokuVersion": {
+ "name": "herokuVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'24'"
+ },
+ "publishDirectory": {
+ "name": "publishDirectory",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "application",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_registryId_registry_registryId_fk": {
+ "name": "application_registryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "registryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_projectId_project_projectId_fk": {
+ "name": "application_projectId_project_projectId_fk",
+ "tableFrom": "application",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_githubId_github_githubId_fk": {
+ "name": "application_githubId_github_githubId_fk",
+ "tableFrom": "application",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_gitlabId_gitlab_gitlabId_fk": {
+ "name": "application_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "application",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_serverId_server_serverId_fk": {
+ "name": "application_serverId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "application_appName_unique": {
+ "name": "application_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.postgres": {
+ "name": "postgres",
+ "schema": "",
+ "columns": {
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "postgres_projectId_project_projectId_fk": {
+ "name": "postgres_projectId_project_projectId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "postgres_serverId_server_serverId_fk": {
+ "name": "postgres_serverId_server_serverId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "postgres_appName_unique": {
+ "name": "postgres_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "timestamp(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "authId": {
+ "name": "authId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_adminId_admin_adminId_fk": {
+ "name": "user_adminId_admin_adminId_fk",
+ "tableFrom": "user",
+ "tableTo": "admin",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "columnsTo": [
+ "adminId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_authId_auth_id_fk": {
+ "name": "user_authId_auth_id_fk",
+ "tableFrom": "user",
+ "tableTo": "auth",
+ "columnsFrom": [
+ "authId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_temp": {
+ "name": "user_temp",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_verified": {
+ "name": "email_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableLogRotation": {
+ "name": "enableLogRotation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_temp_email_unique": {
+ "name": "user_temp_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.admin": {
+ "name": "admin",
+ "schema": "",
+ "columns": {
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableLogRotation": {
+ "name": "enableLogRotation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "authId": {
+ "name": "authId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "admin_authId_auth_id_fk": {
+ "name": "admin_authId_auth_id_fk",
+ "tableFrom": "admin",
+ "tableTo": "auth",
+ "columnsFrom": [
+ "authId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.auth": {
+ "name": "auth",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rol": {
+ "name": "rol",
+ "type": "Roles",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "auth_email_unique": {
+ "name": "auth_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_userId_user_temp_id_fk": {
+ "name": "project_userId_user_temp_id_fk",
+ "tableFrom": "project",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.domain": {
+ "name": "domain",
+ "schema": "",
+ "columns": {
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domainType": {
+ "name": "domainType",
+ "type": "domainType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'application'"
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "domain_composeId_compose_composeId_fk": {
+ "name": "domain_composeId_compose_composeId_fk",
+ "tableFrom": "domain",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_applicationId_application_applicationId_fk": {
+ "name": "domain_applicationId_application_applicationId_fk",
+ "tableFrom": "domain",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "domain",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mariadb": {
+ "name": "mariadb",
+ "schema": "",
+ "columns": {
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mariadb_projectId_project_projectId_fk": {
+ "name": "mariadb_projectId_project_projectId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mariadb_serverId_server_serverId_fk": {
+ "name": "mariadb_serverId_server_serverId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mariadb_appName_unique": {
+ "name": "mariadb_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mongo": {
+ "name": "mongo",
+ "schema": "",
+ "columns": {
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicaSets": {
+ "name": "replicaSets",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mongo_projectId_project_projectId_fk": {
+ "name": "mongo_projectId_project_projectId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mongo_serverId_server_serverId_fk": {
+ "name": "mongo_serverId_server_serverId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mongo_appName_unique": {
+ "name": "mongo_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mysql": {
+ "name": "mysql",
+ "schema": "",
+ "columns": {
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mysql_projectId_project_projectId_fk": {
+ "name": "mysql_projectId_project_projectId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mysql_serverId_server_serverId_fk": {
+ "name": "mysql_serverId_server_serverId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mysql_appName_unique": {
+ "name": "mysql_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.backup": {
+ "name": "backup",
+ "schema": "",
+ "columns": {
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "database": {
+ "name": "database",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "backup_destinationId_destination_destinationId_fk": {
+ "name": "backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_postgresId_postgres_postgresId_fk": {
+ "name": "backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mongoId_mongo_mongoId_fk": {
+ "name": "backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.destination": {
+ "name": "destination",
+ "schema": "",
+ "columns": {
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessKey": {
+ "name": "accessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secretAccessKey": {
+ "name": "secretAccessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bucket": {
+ "name": "bucket",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region": {
+ "name": "region",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "destination_userId_user_temp_id_fk": {
+ "name": "destination_userId_user_temp_id_fk",
+ "tableFrom": "destination",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.deployment": {
+ "name": "deployment",
+ "schema": "",
+ "columns": {
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "deploymentStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'running'"
+ },
+ "logPath": {
+ "name": "logPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isPreviewDeployment": {
+ "name": "isPreviewDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "deployment_applicationId_application_applicationId_fk": {
+ "name": "deployment_applicationId_application_applicationId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_composeId_compose_composeId_fk": {
+ "name": "deployment_composeId_compose_composeId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_serverId_server_serverId_fk": {
+ "name": "deployment_serverId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mount": {
+ "name": "mount",
+ "schema": "",
+ "columns": {
+ "mountId": {
+ "name": "mountId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "mountType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "mountPath": {
+ "name": "mountPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mount_applicationId_application_applicationId_fk": {
+ "name": "mount_applicationId_application_applicationId_fk",
+ "tableFrom": "mount",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_postgresId_postgres_postgresId_fk": {
+ "name": "mount_postgresId_postgres_postgresId_fk",
+ "tableFrom": "mount",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mariadbId_mariadb_mariadbId_fk": {
+ "name": "mount_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mongoId_mongo_mongoId_fk": {
+ "name": "mount_mongoId_mongo_mongoId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mysqlId_mysql_mysqlId_fk": {
+ "name": "mount_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_redisId_redis_redisId_fk": {
+ "name": "mount_redisId_redis_redisId_fk",
+ "tableFrom": "mount",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_composeId_compose_composeId_fk": {
+ "name": "mount_composeId_compose_composeId_fk",
+ "tableFrom": "mount",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.certificate": {
+ "name": "certificate",
+ "schema": "",
+ "columns": {
+ "certificateId": {
+ "name": "certificateId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificateData": {
+ "name": "certificateData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificatePath": {
+ "name": "certificatePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "autoRenew": {
+ "name": "autoRenew",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "certificate_userId_user_temp_id_fk": {
+ "name": "certificate_userId_user_temp_id_fk",
+ "tableFrom": "certificate",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "certificate_serverId_server_serverId_fk": {
+ "name": "certificate_serverId_server_serverId_fk",
+ "tableFrom": "certificate",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "certificate_certificatePath_unique": {
+ "name": "certificate_certificatePath_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "certificatePath"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_temp": {
+ "name": "session_temp",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_temp_user_id_user_temp_id_fk": {
+ "name": "session_temp_user_id_user_temp_id_fk",
+ "tableFrom": "session_temp",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_temp_token_unique": {
+ "name": "session_temp_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session": {
+ "name": "session",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_user_id_auth_id_fk": {
+ "name": "session_user_id_auth_id_fk",
+ "tableFrom": "session",
+ "tableTo": "auth",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redirect": {
+ "name": "redirect",
+ "schema": "",
+ "columns": {
+ "redirectId": {
+ "name": "redirectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "regex": {
+ "name": "regex",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "replacement": {
+ "name": "replacement",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permanent": {
+ "name": "permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redirect_applicationId_application_applicationId_fk": {
+ "name": "redirect_applicationId_application_applicationId_fk",
+ "tableFrom": "redirect",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security": {
+ "name": "security",
+ "schema": "",
+ "columns": {
+ "securityId": {
+ "name": "securityId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "security_applicationId_application_applicationId_fk": {
+ "name": "security_applicationId_application_applicationId_fk",
+ "tableFrom": "security",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "security_username_applicationId_unique": {
+ "name": "security_username_applicationId_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "username",
+ "applicationId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.port": {
+ "name": "port",
+ "schema": "",
+ "columns": {
+ "portId": {
+ "name": "portId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "publishedPort": {
+ "name": "publishedPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "targetPort": {
+ "name": "targetPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "protocolType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "port_applicationId_application_applicationId_fk": {
+ "name": "port_applicationId_application_applicationId_fk",
+ "tableFrom": "port",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redis": {
+ "name": "redis",
+ "schema": "",
+ "columns": {
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redis_projectId_project_projectId_fk": {
+ "name": "redis_projectId_project_projectId_fk",
+ "tableFrom": "redis",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "redis_serverId_server_serverId_fk": {
+ "name": "redis_serverId_server_serverId_fk",
+ "tableFrom": "redis",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "redis_appName_unique": {
+ "name": "redis_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.compose": {
+ "name": "compose",
+ "schema": "",
+ "columns": {
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeFile": {
+ "name": "composeFile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceTypeCompose",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "composeType": {
+ "name": "composeType",
+ "type": "composeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'docker-compose'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "composePath": {
+ "name": "composePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'./docker-compose.yml'"
+ },
+ "suffix": {
+ "name": "suffix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "randomize": {
+ "name": "randomize",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeployment": {
+ "name": "isolatedDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "composeStatus": {
+ "name": "composeStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "compose",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_projectId_project_projectId_fk": {
+ "name": "compose_projectId_project_projectId_fk",
+ "tableFrom": "compose",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "compose_githubId_github_githubId_fk": {
+ "name": "compose_githubId_github_githubId_fk",
+ "tableFrom": "compose",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_gitlabId_gitlab_gitlabId_fk": {
+ "name": "compose_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "compose",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_serverId_server_serverId_fk": {
+ "name": "compose_serverId_server_serverId_fk",
+ "tableFrom": "compose",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.registry": {
+ "name": "registry",
+ "schema": "",
+ "columns": {
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "registryName": {
+ "name": "registryName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "imagePrefix": {
+ "name": "imagePrefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selfHosted": {
+ "name": "selfHosted",
+ "type": "RegistryType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'cloud'"
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "registry_userId_user_temp_id_fk": {
+ "name": "registry_userId_user_temp_id_fk",
+ "tableFrom": "registry",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.discord": {
+ "name": "discord",
+ "schema": "",
+ "columns": {
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.email": {
+ "name": "email",
+ "schema": "",
+ "columns": {
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "smtpServer": {
+ "name": "smtpServer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "smtpPort": {
+ "name": "smtpPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gotify": {
+ "name": "gotify",
+ "schema": "",
+ "columns": {
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appToken": {
+ "name": "appToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "notificationId": {
+ "name": "notificationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appDeploy": {
+ "name": "appDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "appBuildError": {
+ "name": "appBuildError",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "databaseBackup": {
+ "name": "databaseBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dokployRestart": {
+ "name": "dokployRestart",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerCleanup": {
+ "name": "dockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "serverThreshold": {
+ "name": "serverThreshold",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "notificationType": {
+ "name": "notificationType",
+ "type": "notificationType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_slackId_slack_slackId_fk": {
+ "name": "notification_slackId_slack_slackId_fk",
+ "tableFrom": "notification",
+ "tableTo": "slack",
+ "columnsFrom": [
+ "slackId"
+ ],
+ "columnsTo": [
+ "slackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_telegramId_telegram_telegramId_fk": {
+ "name": "notification_telegramId_telegram_telegramId_fk",
+ "tableFrom": "notification",
+ "tableTo": "telegram",
+ "columnsFrom": [
+ "telegramId"
+ ],
+ "columnsTo": [
+ "telegramId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_discordId_discord_discordId_fk": {
+ "name": "notification_discordId_discord_discordId_fk",
+ "tableFrom": "notification",
+ "tableTo": "discord",
+ "columnsFrom": [
+ "discordId"
+ ],
+ "columnsTo": [
+ "discordId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_emailId_email_emailId_fk": {
+ "name": "notification_emailId_email_emailId_fk",
+ "tableFrom": "notification",
+ "tableTo": "email",
+ "columnsFrom": [
+ "emailId"
+ ],
+ "columnsTo": [
+ "emailId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_gotifyId_gotify_gotifyId_fk": {
+ "name": "notification_gotifyId_gotify_gotifyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "gotify",
+ "columnsFrom": [
+ "gotifyId"
+ ],
+ "columnsTo": [
+ "gotifyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_userId_user_temp_id_fk": {
+ "name": "notification_userId_user_temp_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.slack": {
+ "name": "slack",
+ "schema": "",
+ "columns": {
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.telegram": {
+ "name": "telegram",
+ "schema": "",
+ "columns": {
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "botToken": {
+ "name": "botToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "chatId": {
+ "name": "chatId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh-key": {
+ "name": "ssh-key",
+ "schema": "",
+ "columns": {
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "publicKey": {
+ "name": "publicKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lastUsedAt": {
+ "name": "lastUsedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh-key_userId_user_temp_id_fk": {
+ "name": "ssh-key_userId_user_temp_id_fk",
+ "tableFrom": "ssh-key",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.git_provider": {
+ "name": "git_provider",
+ "schema": "",
+ "columns": {
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerType": {
+ "name": "providerType",
+ "type": "gitProviderType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "git_provider_userId_user_temp_id_fk": {
+ "name": "git_provider_userId_user_temp_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bitbucket": {
+ "name": "bitbucket",
+ "schema": "",
+ "columns": {
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bitbucketUsername": {
+ "name": "bitbucketUsername",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "appPassword": {
+ "name": "appPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketWorkspaceName": {
+ "name": "bitbucketWorkspaceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "bitbucket",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github": {
+ "name": "github",
+ "schema": "",
+ "columns": {
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "githubAppName": {
+ "name": "githubAppName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubAppId": {
+ "name": "githubAppId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientId": {
+ "name": "githubClientId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientSecret": {
+ "name": "githubClientSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubInstallationId": {
+ "name": "githubInstallationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubPrivateKey": {
+ "name": "githubPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubWebhookSecret": {
+ "name": "githubWebhookSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "github_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "github",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitlab": {
+ "name": "gitlab",
+ "schema": "",
+ "columns": {
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "gitlabUrl": {
+ "name": "gitlabUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitlab.com'"
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitlab",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.server": {
+ "name": "server",
+ "schema": "",
+ "columns": {
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ipAddress": {
+ "name": "ipAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'root'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverStatus": {
+ "name": "serverStatus",
+ "type": "serverStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "server_userId_user_temp_id_fk": {
+ "name": "server_userId_user_temp_id_fk",
+ "tableFrom": "server",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "server_sshKeyId_ssh-key_sshKeyId_fk": {
+ "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "server",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "sshKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preview_deployments": {
+ "name": "preview_deployments",
+ "schema": "",
+ "columns": {
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestId": {
+ "name": "pullRequestId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestNumber": {
+ "name": "pullRequestNumber",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestURL": {
+ "name": "pullRequestURL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestTitle": {
+ "name": "pullRequestTitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestCommentId": {
+ "name": "pullRequestCommentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previewStatus": {
+ "name": "previewStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preview_deployments_applicationId_application_applicationId_fk": {
+ "name": "preview_deployments_applicationId_application_applicationId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "preview_deployments_domainId_domain_domainId_fk": {
+ "name": "preview_deployments_domainId_domain_domainId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "domain",
+ "columnsFrom": [
+ "domainId"
+ ],
+ "columnsTo": [
+ "domainId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "preview_deployments_appName_unique": {
+ "name": "preview_deployments_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.account": {
+ "name": "account",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "account_id": {
+ "name": "account_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "id_token": {
+ "name": "id_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token_expires_at": {
+ "name": "access_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token_expires_at": {
+ "name": "refresh_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "account_user_id_user_temp_id_fk": {
+ "name": "account_user_id_user_temp_id_fk",
+ "tableFrom": "account",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "invitation_organization_id_organization_id_fk": {
+ "name": "invitation_organization_id_organization_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "invitation_inviter_id_user_temp_id_fk": {
+ "name": "invitation_inviter_id_user_temp_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "inviter_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.member": {
+ "name": "member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "member_organization_id_organization_id_fk": {
+ "name": "member_organization_id_organization_id_fk",
+ "tableFrom": "member",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "member_user_id_user_temp_id_fk": {
+ "name": "member_user_id_user_temp_id_fk",
+ "tableFrom": "member",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization": {
+ "name": "organization",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_id": {
+ "name": "owner_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "organization_owner_id_user_temp_id_fk": {
+ "name": "organization_owner_id_user_temp_id_fk",
+ "tableFrom": "organization",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "organization_slug_unique": {
+ "name": "organization_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.verification": {
+ "name": "verification",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "drop"
+ ]
+ },
+ "public.Roles": {
+ "name": "Roles",
+ "schema": "public",
+ "values": [
+ "admin",
+ "user"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo"
+ ]
+ },
+ "public.deploymentStatus": {
+ "name": "deploymentStatus",
+ "schema": "public",
+ "values": [
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.mountType": {
+ "name": "mountType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "public.serviceType": {
+ "name": "serviceType",
+ "schema": "public",
+ "values": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "public.protocolType": {
+ "name": "protocolType",
+ "schema": "public",
+ "values": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "raw"
+ ]
+ },
+ "public.RegistryType": {
+ "name": "RegistryType",
+ "schema": "public",
+ "values": [
+ "selfHosted",
+ "cloud"
+ ]
+ },
+ "public.notificationType": {
+ "name": "notificationType",
+ "schema": "public",
+ "values": [
+ "slack",
+ "telegram",
+ "discord",
+ "email",
+ "gotify"
+ ]
+ },
+ "public.gitProviderType": {
+ "name": "gitProviderType",
+ "schema": "public",
+ "values": [
+ "github",
+ "gitlab",
+ "bitbucket"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/_journal.json b/apps/dokploy/drizzle/meta/_journal.json
index c01cd500c..e0bdf1c64 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -477,6 +477,13 @@
"when": 1739427057545,
"tag": "0067_migrate-data",
"breakpoints": true
+ },
+ {
+ "idx": 68,
+ "version": "7",
+ "when": 1739428942964,
+ "tag": "0068_sour_professor_monster",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/packages/server/src/db/schema/certificate.ts b/packages/server/src/db/schema/certificate.ts
index 02b00f65e..d31e5929f 100644
--- a/packages/server/src/db/schema/certificate.ts
+++ b/packages/server/src/db/schema/certificate.ts
@@ -25,9 +25,9 @@ export const certificates = pgTable("certificate", {
// userId: text("userId").references(() => user.userId, {
// onDelete: "cascade",
// }),
- adminId: text("adminId")
+ userId: text("userId")
.notNull()
- .references(() => admins.adminId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
serverId: text("serverId").references(() => server.serverId, {
onDelete: "cascade",
}),
@@ -40,9 +40,9 @@ export const certificatesRelations = relations(
fields: [certificates.serverId],
references: [server.serverId],
}),
- admin: one(admins, {
- fields: [certificates.adminId],
- references: [admins.adminId],
+ user: one(users_temp, {
+ fields: [certificates.userId],
+ references: [users_temp.id],
}),
}),
);
diff --git a/packages/server/src/db/schema/destination.ts b/packages/server/src/db/schema/destination.ts
index cbbb4c2d5..6b9ea5d93 100644
--- a/packages/server/src/db/schema/destination.ts
+++ b/packages/server/src/db/schema/destination.ts
@@ -24,9 +24,9 @@ export const destinations = pgTable("destination", {
// userId: text("userId")
// .notNull()
// .references(() => user.userId, { onDelete: "cascade" }),
- adminId: text("adminId")
+ userId: text("userId")
.notNull()
- .references(() => admins.adminId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
});
export const destinationsRelations = relations(
diff --git a/packages/server/src/db/schema/git-provider.ts b/packages/server/src/db/schema/git-provider.ts
index d6720ce06..a3410af53 100644
--- a/packages/server/src/db/schema/git-provider.ts
+++ b/packages/server/src/db/schema/git-provider.ts
@@ -29,9 +29,9 @@ export const gitProvider = pgTable("git_provider", {
// userId: text("userId").references(() => user.userId, {
// onDelete: "cascade",
// }),
- adminId: text("adminId")
+ userId: text("userId")
.notNull()
- .references(() => admins.adminId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
});
export const gitProviderRelations = relations(gitProvider, ({ one, many }) => ({
diff --git a/packages/server/src/db/schema/notification.ts b/packages/server/src/db/schema/notification.ts
index 0270bd567..462b67109 100644
--- a/packages/server/src/db/schema/notification.ts
+++ b/packages/server/src/db/schema/notification.ts
@@ -49,9 +49,9 @@ export const notifications = pgTable("notification", {
// userId: text("userId").references(() => user.userId, {
// onDelete: "cascade",
// }),
- adminId: text("adminId")
+ userId: text("userId")
.notNull()
- .references(() => admins.adminId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
});
export const slack = pgTable("slack", {
@@ -126,9 +126,9 @@ export const notificationsRelations = relations(notifications, ({ one }) => ({
fields: [notifications.gotifyId],
references: [gotify.gotifyId],
}),
- admin: one(admins, {
- fields: [notifications.adminId],
- references: [admins.adminId],
+ user: one(users_temp, {
+ fields: [notifications.userId],
+ references: [users_temp.id],
}),
}));
diff --git a/packages/server/src/db/schema/project.ts b/packages/server/src/db/schema/project.ts
index 48effa81c..60f7842b1 100644
--- a/packages/server/src/db/schema/project.ts
+++ b/packages/server/src/db/schema/project.ts
@@ -28,9 +28,9 @@ export const projects = pgTable("project", {
// userId: text("userId")
// .notNull()
// .references(() => user.userId, { onDelete: "cascade" }),
- adminId: text("adminId")
+ userId: text("userId")
.notNull()
- .references(() => admins.adminId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
env: text("env").notNull().default(""),
});
diff --git a/packages/server/src/db/schema/registry.ts b/packages/server/src/db/schema/registry.ts
index 9efd6536f..62c2b2d7d 100644
--- a/packages/server/src/db/schema/registry.ts
+++ b/packages/server/src/db/schema/registry.ts
@@ -32,9 +32,9 @@ export const registry = pgTable("registry", {
// userId: text("userId")
// .notNull()
// .references(() => user.userId, { onDelete: "cascade" }),
- adminId: text("adminId")
+ userId: text("userId")
.notNull()
- .references(() => admins.adminId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
});
export const registryRelations = relations(registry, ({ one, many }) => ({
diff --git a/packages/server/src/db/schema/server.ts b/packages/server/src/db/schema/server.ts
index c0b44ef97..26023e96c 100644
--- a/packages/server/src/db/schema/server.ts
+++ b/packages/server/src/db/schema/server.ts
@@ -47,9 +47,9 @@ export const server = pgTable("server", {
// userId: text("userId")
// .notNull()
// .references(() => user.userId, { onDelete: "cascade" }),
- adminId: text("adminId")
+ userId: text("userId")
.notNull()
- .references(() => admins.adminId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
serverStatus: serverStatus("serverStatus").notNull().default("active"),
command: text("command").notNull().default(""),
sshKeyId: text("sshKeyId").references(() => sshKeys.sshKeyId, {
diff --git a/packages/server/src/db/schema/ssh-key.ts b/packages/server/src/db/schema/ssh-key.ts
index cca9259bc..4daa438ce 100644
--- a/packages/server/src/db/schema/ssh-key.ts
+++ b/packages/server/src/db/schema/ssh-key.ts
@@ -7,6 +7,7 @@ import { admins } from "./admin";
import { applications } from "./application";
import { compose } from "./compose";
import { server } from "./server";
+import { users_temp } from "./user";
// import { user } from "./user";
export const sshKeys = pgTable("ssh-key", {
@@ -25,19 +26,19 @@ export const sshKeys = pgTable("ssh-key", {
// userId: text("userId").references(() => user.userId, {
// onDelete: "cascade",
// }),
- adminId: text("adminId")
+ userId: text("userId")
.notNull()
- .references(() => admins.adminId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
});
export const sshKeysRelations = relations(sshKeys, ({ many, one }) => ({
applications: many(applications),
compose: many(compose),
servers: many(server),
- // user: one(user, {
- // fields: [sshKeys.userId],
- // references: [user.id],
- // }),
+ user: one(users_temp, {
+ fields: [sshKeys.userId],
+ references: [users_temp.id],
+ }),
}));
const createSchema = createInsertSchema(
diff --git a/packages/server/src/db/schema/user.ts b/packages/server/src/db/schema/user.ts
index 5f2a14e91..932a0a09c 100644
--- a/packages/server/src/db/schema/user.ts
+++ b/packages/server/src/db/schema/user.ts
@@ -189,10 +189,10 @@ export const usersRelations = relations(users, ({ one }) => ({
fields: [users.authId],
references: [auth.id],
}),
- admin: one(admins, {
- fields: [users.adminId],
- references: [admins.adminId],
- }),
+ // admin: one(admins, {
+ // fields: [users.adminId],
+ // references: [admins.adminId],
+ // }),
}));
const createSchema = createInsertSchema(users, {
From d1f72a2e20fdc2304a380c684ea7f77e52daa95a Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Thu, 13 Feb 2025 00:57:22 -0600
Subject: [PATCH 016/126] refactor: update migration
---
apps/dokploy/drizzle/0067_migrate-data.sql | 26 ++++++++++++++++++++++
apps/dokploy/migrate.ts | 9 ++++++++
2 files changed, 35 insertions(+)
diff --git a/apps/dokploy/drizzle/0067_migrate-data.sql b/apps/dokploy/drizzle/0067_migrate-data.sql
index 62604d32c..b5cefd7b7 100644
--- a/apps/dokploy/drizzle/0067_migrate-data.sql
+++ b/apps/dokploy/drizzle/0067_migrate-data.sql
@@ -150,6 +150,32 @@ inserted_members AS (
JOIN admin a ON u."adminId" = a."adminId"
JOIN auth ON auth.id = u."authId"
RETURNING *
+),
+inserted_member_accounts AS (
+ -- Insertar cuentas para los usuarios miembros
+ INSERT INTO account (
+ id,
+ "account_id",
+ "provider_id",
+ "user_id",
+ password,
+ "is2FAEnabled",
+ "created_at",
+ "updated_at"
+ )
+ SELECT
+ gen_random_uuid(),
+ gen_random_uuid(),
+ 'credentials',
+ u."userId",
+ auth.password,
+ COALESCE(auth."is2FAEnabled", false),
+ NOW(),
+ NOW()
+ FROM "user" u
+ JOIN admin a ON u."adminId" = a."adminId"
+ JOIN auth ON auth.id = u."authId"
+ RETURNING *
)
-- Insertar miembros en las organizaciones
INSERT INTO member (
diff --git a/apps/dokploy/migrate.ts b/apps/dokploy/migrate.ts
index bcbac2336..8a8e0dcbe 100644
--- a/apps/dokploy/migrate.ts
+++ b/apps/dokploy/migrate.ts
@@ -100,6 +100,15 @@ await db
.returning()
.then((userTemp) => userTemp[0]);
+ await db.insert(schema.account).values({
+ providerId: "credentials",
+ userId: member?.userId || "",
+ password: member.auth.password,
+ is2FAEnabled: member.auth.is2FAEnabled || false,
+ createdAt: new Date(member.auth.createdAt) || new Date(),
+ updatedAt: new Date(member.auth.createdAt) || new Date(),
+ });
+
await db.insert(schema.member).values({
organizationId: organization?.id || "",
userId: userTemp?.id || "",
From 140a871275a7d61ed74e34d1c6f81c69a89c7fc6 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Thu, 13 Feb 2025 01:21:49 -0600
Subject: [PATCH 017/126] refactor: update
---
packages/server/src/db/schema/git-provider.ts | 6 +++---
packages/server/src/services/admin.ts | 2 +-
packages/server/src/services/auth.ts | 2 +-
packages/server/src/services/user.ts | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/packages/server/src/db/schema/git-provider.ts b/packages/server/src/db/schema/git-provider.ts
index a3410af53..be2c50001 100644
--- a/packages/server/src/db/schema/git-provider.ts
+++ b/packages/server/src/db/schema/git-provider.ts
@@ -47,9 +47,9 @@ export const gitProviderRelations = relations(gitProvider, ({ one, many }) => ({
fields: [gitProvider.gitProviderId],
references: [bitbucket.gitProviderId],
}),
- admin: one(admins, {
- fields: [gitProvider.adminId],
- references: [admins.adminId],
+ user: one(users_temp, {
+ fields: [gitProvider.userId],
+ references: [users_temp.id],
}),
}));
diff --git a/packages/server/src/services/admin.ts b/packages/server/src/services/admin.ts
index 21c8f13e5..5155231b0 100644
--- a/packages/server/src/services/admin.ts
+++ b/packages/server/src/services/admin.ts
@@ -4,7 +4,7 @@ import {
admins,
type apiCreateUserInvitation,
auth,
- user,
+ users_temp,
} from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
import * as bcrypt from "bcrypt";
diff --git a/packages/server/src/services/auth.ts b/packages/server/src/services/auth.ts
index f391d011d..787ceedb8 100644
--- a/packages/server/src/services/auth.ts
+++ b/packages/server/src/services/auth.ts
@@ -5,7 +5,7 @@ import {
type apiCreateAdmin,
type apiCreateUser,
auth,
- user,
+ users_temp,
} from "@dokploy/server/db/schema";
import { getPublicIpWithFallback } from "@dokploy/server/wss/utils";
import { TRPCError } from "@trpc/server";
diff --git a/packages/server/src/services/user.ts b/packages/server/src/services/user.ts
index afc3ec009..5a9898cde 100644
--- a/packages/server/src/services/user.ts
+++ b/packages/server/src/services/user.ts
@@ -1,9 +1,9 @@
import { db } from "@dokploy/server/db";
-import { user } from "@dokploy/server/db/schema";
+import type { users_temp } from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
-export type User = typeof user.$inferSelect;
+export type User = typeof users_temp.$inferSelect;
export const findUserById = async (userId: string) => {
const userR = await db.query.user.findFirst({
From 74ee024cf90e6ba66e2d6ef31443d8763adf1718 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Thu, 13 Feb 2025 01:24:25 -0600
Subject: [PATCH 018/126] refactor: update temps
---
apps/dokploy/pages/index.tsx | 4 ++++
packages/server/src/lib/auth.ts | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/apps/dokploy/pages/index.tsx b/apps/dokploy/pages/index.tsx
index e5cc0500d..210160843 100644
--- a/apps/dokploy/pages/index.tsx
+++ b/apps/dokploy/pages/index.tsx
@@ -94,6 +94,10 @@ export default function Home({ IS_CLOUD }: Props) {
});
// router.push("/dashboard/projects");
// }
+ } else {
+ toast.error("Error to sign up", {
+ description: error.message,
+ });
}
console.log(data, error);
diff --git a/packages/server/src/lib/auth.ts b/packages/server/src/lib/auth.ts
index 8a3e1781c..2706bceac 100644
--- a/packages/server/src/lib/auth.ts
+++ b/packages/server/src/lib/auth.ts
@@ -18,15 +18,16 @@ export const auth = betterAuth({
if (ctx.path.startsWith("/sign-up")) {
const newSession = ctx.context.newSession;
await db
- .update(schema.user)
+ .update(schema.users_temp)
.set({
role: "admin",
})
- .where(eq(schema.user.id, newSession?.user?.id || ""));
+ .where(eq(schema.users_temp.id, newSession?.user?.id || ""));
}
}),
},
user: {
+ modelName: "users_temp",
additionalFields: {},
},
plugins: [organization()],
From 7c0d223e1794a2721c6368cca06c284087fdc241 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Thu, 13 Feb 2025 01:42:58 -0600
Subject: [PATCH 019/126] refactor: add fields
---
apps/dokploy/drizzle/0069_known_aqueduct.sql | 1 +
.../drizzle/0070_overrated_the_stranger.sql | 1 +
apps/dokploy/drizzle/meta/0069_snapshot.json | 5285 ++++++++++++++++
apps/dokploy/drizzle/meta/0070_snapshot.json | 5286 +++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 14 +
packages/server/package.json | 2 +
packages/server/src/auth/auth.ts | 1 +
packages/server/src/db/schema/user.ts | 5 +-
packages/server/src/lib/auth.ts | 7 +
packages/server/src/lib/crypto.ts | 94 +
packages/server/src/lib/scrypt/index.ts | 1 +
pnpm-lock.yaml | 31 +
12 files changed, 10726 insertions(+), 2 deletions(-)
create mode 100644 apps/dokploy/drizzle/0069_known_aqueduct.sql
create mode 100644 apps/dokploy/drizzle/0070_overrated_the_stranger.sql
create mode 100644 apps/dokploy/drizzle/meta/0069_snapshot.json
create mode 100644 apps/dokploy/drizzle/meta/0070_snapshot.json
create mode 100644 packages/server/src/lib/crypto.ts
create mode 100644 packages/server/src/lib/scrypt/index.ts
diff --git a/apps/dokploy/drizzle/0069_known_aqueduct.sql b/apps/dokploy/drizzle/0069_known_aqueduct.sql
new file mode 100644
index 000000000..d6f4dea76
--- /dev/null
+++ b/apps/dokploy/drizzle/0069_known_aqueduct.sql
@@ -0,0 +1 @@
+ALTER TABLE "user_temp" ADD COLUMN "created_at" timestamp DEFAULT now();
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0070_overrated_the_stranger.sql b/apps/dokploy/drizzle/0070_overrated_the_stranger.sql
new file mode 100644
index 000000000..dab91327b
--- /dev/null
+++ b/apps/dokploy/drizzle/0070_overrated_the_stranger.sql
@@ -0,0 +1 @@
+ALTER TABLE "user_temp" ALTER COLUMN "token" SET DEFAULT '';
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0069_snapshot.json b/apps/dokploy/drizzle/meta/0069_snapshot.json
new file mode 100644
index 000000000..084216167
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0069_snapshot.json
@@ -0,0 +1,5285 @@
+{
+ "id": "82a6a31d-7611-410d-8a32-31a36ab369c5",
+ "prevId": "c2e134de-9865-4892-a24d-048aa5be22e8",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.application": {
+ "name": "application",
+ "schema": "",
+ "columns": {
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewEnv": {
+ "name": "previewEnv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildArgs": {
+ "name": "previewBuildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewWildcard": {
+ "name": "previewWildcard",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewPort": {
+ "name": "previewPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "previewHttps": {
+ "name": "previewHttps",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "previewPath": {
+ "name": "previewPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "buildArgs": {
+ "name": "buildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildPath": {
+ "name": "buildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBuildPath": {
+ "name": "gitlabBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBuildPath": {
+ "name": "bitbucketBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBuildPath": {
+ "name": "customGitBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerfile": {
+ "name": "dockerfile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerContextPath": {
+ "name": "dockerContextPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerBuildStage": {
+ "name": "dockerBuildStage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dropBuildPath": {
+ "name": "dropBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "buildType": {
+ "name": "buildType",
+ "type": "buildType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'nixpacks'"
+ },
+ "herokuVersion": {
+ "name": "herokuVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'24'"
+ },
+ "publishDirectory": {
+ "name": "publishDirectory",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "application",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_registryId_registry_registryId_fk": {
+ "name": "application_registryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "registryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_projectId_project_projectId_fk": {
+ "name": "application_projectId_project_projectId_fk",
+ "tableFrom": "application",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_githubId_github_githubId_fk": {
+ "name": "application_githubId_github_githubId_fk",
+ "tableFrom": "application",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_gitlabId_gitlab_gitlabId_fk": {
+ "name": "application_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "application",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_serverId_server_serverId_fk": {
+ "name": "application_serverId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "application_appName_unique": {
+ "name": "application_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.postgres": {
+ "name": "postgres",
+ "schema": "",
+ "columns": {
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "postgres_projectId_project_projectId_fk": {
+ "name": "postgres_projectId_project_projectId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "postgres_serverId_server_serverId_fk": {
+ "name": "postgres_serverId_server_serverId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "postgres_appName_unique": {
+ "name": "postgres_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "timestamp(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "authId": {
+ "name": "authId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_adminId_admin_adminId_fk": {
+ "name": "user_adminId_admin_adminId_fk",
+ "tableFrom": "user",
+ "tableTo": "admin",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "columnsTo": [
+ "adminId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_authId_auth_id_fk": {
+ "name": "user_authId_auth_id_fk",
+ "tableFrom": "user",
+ "tableTo": "auth",
+ "columnsFrom": [
+ "authId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_temp": {
+ "name": "user_temp",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_verified": {
+ "name": "email_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableLogRotation": {
+ "name": "enableLogRotation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_temp_email_unique": {
+ "name": "user_temp_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.admin": {
+ "name": "admin",
+ "schema": "",
+ "columns": {
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableLogRotation": {
+ "name": "enableLogRotation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "authId": {
+ "name": "authId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "admin_authId_auth_id_fk": {
+ "name": "admin_authId_auth_id_fk",
+ "tableFrom": "admin",
+ "tableTo": "auth",
+ "columnsFrom": [
+ "authId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.auth": {
+ "name": "auth",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rol": {
+ "name": "rol",
+ "type": "Roles",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "auth_email_unique": {
+ "name": "auth_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_userId_user_temp_id_fk": {
+ "name": "project_userId_user_temp_id_fk",
+ "tableFrom": "project",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.domain": {
+ "name": "domain",
+ "schema": "",
+ "columns": {
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domainType": {
+ "name": "domainType",
+ "type": "domainType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'application'"
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "domain_composeId_compose_composeId_fk": {
+ "name": "domain_composeId_compose_composeId_fk",
+ "tableFrom": "domain",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_applicationId_application_applicationId_fk": {
+ "name": "domain_applicationId_application_applicationId_fk",
+ "tableFrom": "domain",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "domain",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mariadb": {
+ "name": "mariadb",
+ "schema": "",
+ "columns": {
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mariadb_projectId_project_projectId_fk": {
+ "name": "mariadb_projectId_project_projectId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mariadb_serverId_server_serverId_fk": {
+ "name": "mariadb_serverId_server_serverId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mariadb_appName_unique": {
+ "name": "mariadb_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mongo": {
+ "name": "mongo",
+ "schema": "",
+ "columns": {
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicaSets": {
+ "name": "replicaSets",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mongo_projectId_project_projectId_fk": {
+ "name": "mongo_projectId_project_projectId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mongo_serverId_server_serverId_fk": {
+ "name": "mongo_serverId_server_serverId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mongo_appName_unique": {
+ "name": "mongo_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mysql": {
+ "name": "mysql",
+ "schema": "",
+ "columns": {
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mysql_projectId_project_projectId_fk": {
+ "name": "mysql_projectId_project_projectId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mysql_serverId_server_serverId_fk": {
+ "name": "mysql_serverId_server_serverId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mysql_appName_unique": {
+ "name": "mysql_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.backup": {
+ "name": "backup",
+ "schema": "",
+ "columns": {
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "database": {
+ "name": "database",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "backup_destinationId_destination_destinationId_fk": {
+ "name": "backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_postgresId_postgres_postgresId_fk": {
+ "name": "backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mongoId_mongo_mongoId_fk": {
+ "name": "backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.destination": {
+ "name": "destination",
+ "schema": "",
+ "columns": {
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessKey": {
+ "name": "accessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secretAccessKey": {
+ "name": "secretAccessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bucket": {
+ "name": "bucket",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region": {
+ "name": "region",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "destination_userId_user_temp_id_fk": {
+ "name": "destination_userId_user_temp_id_fk",
+ "tableFrom": "destination",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.deployment": {
+ "name": "deployment",
+ "schema": "",
+ "columns": {
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "deploymentStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'running'"
+ },
+ "logPath": {
+ "name": "logPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isPreviewDeployment": {
+ "name": "isPreviewDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "deployment_applicationId_application_applicationId_fk": {
+ "name": "deployment_applicationId_application_applicationId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_composeId_compose_composeId_fk": {
+ "name": "deployment_composeId_compose_composeId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_serverId_server_serverId_fk": {
+ "name": "deployment_serverId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mount": {
+ "name": "mount",
+ "schema": "",
+ "columns": {
+ "mountId": {
+ "name": "mountId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "mountType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "mountPath": {
+ "name": "mountPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mount_applicationId_application_applicationId_fk": {
+ "name": "mount_applicationId_application_applicationId_fk",
+ "tableFrom": "mount",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_postgresId_postgres_postgresId_fk": {
+ "name": "mount_postgresId_postgres_postgresId_fk",
+ "tableFrom": "mount",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mariadbId_mariadb_mariadbId_fk": {
+ "name": "mount_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mongoId_mongo_mongoId_fk": {
+ "name": "mount_mongoId_mongo_mongoId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mysqlId_mysql_mysqlId_fk": {
+ "name": "mount_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_redisId_redis_redisId_fk": {
+ "name": "mount_redisId_redis_redisId_fk",
+ "tableFrom": "mount",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_composeId_compose_composeId_fk": {
+ "name": "mount_composeId_compose_composeId_fk",
+ "tableFrom": "mount",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.certificate": {
+ "name": "certificate",
+ "schema": "",
+ "columns": {
+ "certificateId": {
+ "name": "certificateId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificateData": {
+ "name": "certificateData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificatePath": {
+ "name": "certificatePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "autoRenew": {
+ "name": "autoRenew",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "certificate_userId_user_temp_id_fk": {
+ "name": "certificate_userId_user_temp_id_fk",
+ "tableFrom": "certificate",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "certificate_serverId_server_serverId_fk": {
+ "name": "certificate_serverId_server_serverId_fk",
+ "tableFrom": "certificate",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "certificate_certificatePath_unique": {
+ "name": "certificate_certificatePath_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "certificatePath"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_temp": {
+ "name": "session_temp",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_temp_user_id_user_temp_id_fk": {
+ "name": "session_temp_user_id_user_temp_id_fk",
+ "tableFrom": "session_temp",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_temp_token_unique": {
+ "name": "session_temp_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session": {
+ "name": "session",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_user_id_auth_id_fk": {
+ "name": "session_user_id_auth_id_fk",
+ "tableFrom": "session",
+ "tableTo": "auth",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redirect": {
+ "name": "redirect",
+ "schema": "",
+ "columns": {
+ "redirectId": {
+ "name": "redirectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "regex": {
+ "name": "regex",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "replacement": {
+ "name": "replacement",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permanent": {
+ "name": "permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redirect_applicationId_application_applicationId_fk": {
+ "name": "redirect_applicationId_application_applicationId_fk",
+ "tableFrom": "redirect",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security": {
+ "name": "security",
+ "schema": "",
+ "columns": {
+ "securityId": {
+ "name": "securityId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "security_applicationId_application_applicationId_fk": {
+ "name": "security_applicationId_application_applicationId_fk",
+ "tableFrom": "security",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "security_username_applicationId_unique": {
+ "name": "security_username_applicationId_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "username",
+ "applicationId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.port": {
+ "name": "port",
+ "schema": "",
+ "columns": {
+ "portId": {
+ "name": "portId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "publishedPort": {
+ "name": "publishedPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "targetPort": {
+ "name": "targetPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "protocolType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "port_applicationId_application_applicationId_fk": {
+ "name": "port_applicationId_application_applicationId_fk",
+ "tableFrom": "port",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redis": {
+ "name": "redis",
+ "schema": "",
+ "columns": {
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redis_projectId_project_projectId_fk": {
+ "name": "redis_projectId_project_projectId_fk",
+ "tableFrom": "redis",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "redis_serverId_server_serverId_fk": {
+ "name": "redis_serverId_server_serverId_fk",
+ "tableFrom": "redis",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "redis_appName_unique": {
+ "name": "redis_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.compose": {
+ "name": "compose",
+ "schema": "",
+ "columns": {
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeFile": {
+ "name": "composeFile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceTypeCompose",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "composeType": {
+ "name": "composeType",
+ "type": "composeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'docker-compose'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "composePath": {
+ "name": "composePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'./docker-compose.yml'"
+ },
+ "suffix": {
+ "name": "suffix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "randomize": {
+ "name": "randomize",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeployment": {
+ "name": "isolatedDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "composeStatus": {
+ "name": "composeStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "compose",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_projectId_project_projectId_fk": {
+ "name": "compose_projectId_project_projectId_fk",
+ "tableFrom": "compose",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "compose_githubId_github_githubId_fk": {
+ "name": "compose_githubId_github_githubId_fk",
+ "tableFrom": "compose",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_gitlabId_gitlab_gitlabId_fk": {
+ "name": "compose_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "compose",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_serverId_server_serverId_fk": {
+ "name": "compose_serverId_server_serverId_fk",
+ "tableFrom": "compose",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.registry": {
+ "name": "registry",
+ "schema": "",
+ "columns": {
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "registryName": {
+ "name": "registryName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "imagePrefix": {
+ "name": "imagePrefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selfHosted": {
+ "name": "selfHosted",
+ "type": "RegistryType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'cloud'"
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "registry_userId_user_temp_id_fk": {
+ "name": "registry_userId_user_temp_id_fk",
+ "tableFrom": "registry",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.discord": {
+ "name": "discord",
+ "schema": "",
+ "columns": {
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.email": {
+ "name": "email",
+ "schema": "",
+ "columns": {
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "smtpServer": {
+ "name": "smtpServer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "smtpPort": {
+ "name": "smtpPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gotify": {
+ "name": "gotify",
+ "schema": "",
+ "columns": {
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appToken": {
+ "name": "appToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "notificationId": {
+ "name": "notificationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appDeploy": {
+ "name": "appDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "appBuildError": {
+ "name": "appBuildError",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "databaseBackup": {
+ "name": "databaseBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dokployRestart": {
+ "name": "dokployRestart",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerCleanup": {
+ "name": "dockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "serverThreshold": {
+ "name": "serverThreshold",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "notificationType": {
+ "name": "notificationType",
+ "type": "notificationType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_slackId_slack_slackId_fk": {
+ "name": "notification_slackId_slack_slackId_fk",
+ "tableFrom": "notification",
+ "tableTo": "slack",
+ "columnsFrom": [
+ "slackId"
+ ],
+ "columnsTo": [
+ "slackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_telegramId_telegram_telegramId_fk": {
+ "name": "notification_telegramId_telegram_telegramId_fk",
+ "tableFrom": "notification",
+ "tableTo": "telegram",
+ "columnsFrom": [
+ "telegramId"
+ ],
+ "columnsTo": [
+ "telegramId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_discordId_discord_discordId_fk": {
+ "name": "notification_discordId_discord_discordId_fk",
+ "tableFrom": "notification",
+ "tableTo": "discord",
+ "columnsFrom": [
+ "discordId"
+ ],
+ "columnsTo": [
+ "discordId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_emailId_email_emailId_fk": {
+ "name": "notification_emailId_email_emailId_fk",
+ "tableFrom": "notification",
+ "tableTo": "email",
+ "columnsFrom": [
+ "emailId"
+ ],
+ "columnsTo": [
+ "emailId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_gotifyId_gotify_gotifyId_fk": {
+ "name": "notification_gotifyId_gotify_gotifyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "gotify",
+ "columnsFrom": [
+ "gotifyId"
+ ],
+ "columnsTo": [
+ "gotifyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_userId_user_temp_id_fk": {
+ "name": "notification_userId_user_temp_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.slack": {
+ "name": "slack",
+ "schema": "",
+ "columns": {
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.telegram": {
+ "name": "telegram",
+ "schema": "",
+ "columns": {
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "botToken": {
+ "name": "botToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "chatId": {
+ "name": "chatId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh-key": {
+ "name": "ssh-key",
+ "schema": "",
+ "columns": {
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "publicKey": {
+ "name": "publicKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lastUsedAt": {
+ "name": "lastUsedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh-key_userId_user_temp_id_fk": {
+ "name": "ssh-key_userId_user_temp_id_fk",
+ "tableFrom": "ssh-key",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.git_provider": {
+ "name": "git_provider",
+ "schema": "",
+ "columns": {
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerType": {
+ "name": "providerType",
+ "type": "gitProviderType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "git_provider_userId_user_temp_id_fk": {
+ "name": "git_provider_userId_user_temp_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bitbucket": {
+ "name": "bitbucket",
+ "schema": "",
+ "columns": {
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bitbucketUsername": {
+ "name": "bitbucketUsername",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "appPassword": {
+ "name": "appPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketWorkspaceName": {
+ "name": "bitbucketWorkspaceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "bitbucket",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github": {
+ "name": "github",
+ "schema": "",
+ "columns": {
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "githubAppName": {
+ "name": "githubAppName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubAppId": {
+ "name": "githubAppId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientId": {
+ "name": "githubClientId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientSecret": {
+ "name": "githubClientSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubInstallationId": {
+ "name": "githubInstallationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubPrivateKey": {
+ "name": "githubPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubWebhookSecret": {
+ "name": "githubWebhookSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "github_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "github",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitlab": {
+ "name": "gitlab",
+ "schema": "",
+ "columns": {
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "gitlabUrl": {
+ "name": "gitlabUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitlab.com'"
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitlab",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.server": {
+ "name": "server",
+ "schema": "",
+ "columns": {
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ipAddress": {
+ "name": "ipAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'root'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverStatus": {
+ "name": "serverStatus",
+ "type": "serverStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "server_userId_user_temp_id_fk": {
+ "name": "server_userId_user_temp_id_fk",
+ "tableFrom": "server",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "server_sshKeyId_ssh-key_sshKeyId_fk": {
+ "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "server",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "sshKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preview_deployments": {
+ "name": "preview_deployments",
+ "schema": "",
+ "columns": {
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestId": {
+ "name": "pullRequestId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestNumber": {
+ "name": "pullRequestNumber",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestURL": {
+ "name": "pullRequestURL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestTitle": {
+ "name": "pullRequestTitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestCommentId": {
+ "name": "pullRequestCommentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previewStatus": {
+ "name": "previewStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preview_deployments_applicationId_application_applicationId_fk": {
+ "name": "preview_deployments_applicationId_application_applicationId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "preview_deployments_domainId_domain_domainId_fk": {
+ "name": "preview_deployments_domainId_domain_domainId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "domain",
+ "columnsFrom": [
+ "domainId"
+ ],
+ "columnsTo": [
+ "domainId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "preview_deployments_appName_unique": {
+ "name": "preview_deployments_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.account": {
+ "name": "account",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "account_id": {
+ "name": "account_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "id_token": {
+ "name": "id_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token_expires_at": {
+ "name": "access_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token_expires_at": {
+ "name": "refresh_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "account_user_id_user_temp_id_fk": {
+ "name": "account_user_id_user_temp_id_fk",
+ "tableFrom": "account",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "invitation_organization_id_organization_id_fk": {
+ "name": "invitation_organization_id_organization_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "invitation_inviter_id_user_temp_id_fk": {
+ "name": "invitation_inviter_id_user_temp_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "inviter_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.member": {
+ "name": "member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "member_organization_id_organization_id_fk": {
+ "name": "member_organization_id_organization_id_fk",
+ "tableFrom": "member",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "member_user_id_user_temp_id_fk": {
+ "name": "member_user_id_user_temp_id_fk",
+ "tableFrom": "member",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization": {
+ "name": "organization",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_id": {
+ "name": "owner_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "organization_owner_id_user_temp_id_fk": {
+ "name": "organization_owner_id_user_temp_id_fk",
+ "tableFrom": "organization",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "organization_slug_unique": {
+ "name": "organization_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.verification": {
+ "name": "verification",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "drop"
+ ]
+ },
+ "public.Roles": {
+ "name": "Roles",
+ "schema": "public",
+ "values": [
+ "admin",
+ "user"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo"
+ ]
+ },
+ "public.deploymentStatus": {
+ "name": "deploymentStatus",
+ "schema": "public",
+ "values": [
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.mountType": {
+ "name": "mountType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "public.serviceType": {
+ "name": "serviceType",
+ "schema": "public",
+ "values": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "public.protocolType": {
+ "name": "protocolType",
+ "schema": "public",
+ "values": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "raw"
+ ]
+ },
+ "public.RegistryType": {
+ "name": "RegistryType",
+ "schema": "public",
+ "values": [
+ "selfHosted",
+ "cloud"
+ ]
+ },
+ "public.notificationType": {
+ "name": "notificationType",
+ "schema": "public",
+ "values": [
+ "slack",
+ "telegram",
+ "discord",
+ "email",
+ "gotify"
+ ]
+ },
+ "public.gitProviderType": {
+ "name": "gitProviderType",
+ "schema": "public",
+ "values": [
+ "github",
+ "gitlab",
+ "bitbucket"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0070_snapshot.json b/apps/dokploy/drizzle/meta/0070_snapshot.json
new file mode 100644
index 000000000..b0a1eea7c
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0070_snapshot.json
@@ -0,0 +1,5286 @@
+{
+ "id": "c01cab17-e046-4691-b5ab-43f6a92879d4",
+ "prevId": "82a6a31d-7611-410d-8a32-31a36ab369c5",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.application": {
+ "name": "application",
+ "schema": "",
+ "columns": {
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewEnv": {
+ "name": "previewEnv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildArgs": {
+ "name": "previewBuildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewWildcard": {
+ "name": "previewWildcard",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewPort": {
+ "name": "previewPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "previewHttps": {
+ "name": "previewHttps",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "previewPath": {
+ "name": "previewPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "buildArgs": {
+ "name": "buildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildPath": {
+ "name": "buildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBuildPath": {
+ "name": "gitlabBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBuildPath": {
+ "name": "bitbucketBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBuildPath": {
+ "name": "customGitBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerfile": {
+ "name": "dockerfile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerContextPath": {
+ "name": "dockerContextPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerBuildStage": {
+ "name": "dockerBuildStage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dropBuildPath": {
+ "name": "dropBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "buildType": {
+ "name": "buildType",
+ "type": "buildType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'nixpacks'"
+ },
+ "herokuVersion": {
+ "name": "herokuVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'24'"
+ },
+ "publishDirectory": {
+ "name": "publishDirectory",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "application",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_registryId_registry_registryId_fk": {
+ "name": "application_registryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "registryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_projectId_project_projectId_fk": {
+ "name": "application_projectId_project_projectId_fk",
+ "tableFrom": "application",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_githubId_github_githubId_fk": {
+ "name": "application_githubId_github_githubId_fk",
+ "tableFrom": "application",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_gitlabId_gitlab_gitlabId_fk": {
+ "name": "application_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "application",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_serverId_server_serverId_fk": {
+ "name": "application_serverId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "application_appName_unique": {
+ "name": "application_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.postgres": {
+ "name": "postgres",
+ "schema": "",
+ "columns": {
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "postgres_projectId_project_projectId_fk": {
+ "name": "postgres_projectId_project_projectId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "postgres_serverId_server_serverId_fk": {
+ "name": "postgres_serverId_server_serverId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "postgres_appName_unique": {
+ "name": "postgres_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "timestamp(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "authId": {
+ "name": "authId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_adminId_admin_adminId_fk": {
+ "name": "user_adminId_admin_adminId_fk",
+ "tableFrom": "user",
+ "tableTo": "admin",
+ "columnsFrom": [
+ "adminId"
+ ],
+ "columnsTo": [
+ "adminId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_authId_auth_id_fk": {
+ "name": "user_authId_auth_id_fk",
+ "tableFrom": "user",
+ "tableTo": "auth",
+ "columnsFrom": [
+ "authId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_temp": {
+ "name": "user_temp",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_verified": {
+ "name": "email_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableLogRotation": {
+ "name": "enableLogRotation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_temp_email_unique": {
+ "name": "user_temp_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.admin": {
+ "name": "admin",
+ "schema": "",
+ "columns": {
+ "adminId": {
+ "name": "adminId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableLogRotation": {
+ "name": "enableLogRotation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "authId": {
+ "name": "authId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "admin_authId_auth_id_fk": {
+ "name": "admin_authId_auth_id_fk",
+ "tableFrom": "admin",
+ "tableTo": "auth",
+ "columnsFrom": [
+ "authId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.auth": {
+ "name": "auth",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rol": {
+ "name": "rol",
+ "type": "Roles",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "auth_email_unique": {
+ "name": "auth_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_userId_user_temp_id_fk": {
+ "name": "project_userId_user_temp_id_fk",
+ "tableFrom": "project",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.domain": {
+ "name": "domain",
+ "schema": "",
+ "columns": {
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domainType": {
+ "name": "domainType",
+ "type": "domainType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'application'"
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "domain_composeId_compose_composeId_fk": {
+ "name": "domain_composeId_compose_composeId_fk",
+ "tableFrom": "domain",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_applicationId_application_applicationId_fk": {
+ "name": "domain_applicationId_application_applicationId_fk",
+ "tableFrom": "domain",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "domain",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mariadb": {
+ "name": "mariadb",
+ "schema": "",
+ "columns": {
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mariadb_projectId_project_projectId_fk": {
+ "name": "mariadb_projectId_project_projectId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mariadb_serverId_server_serverId_fk": {
+ "name": "mariadb_serverId_server_serverId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mariadb_appName_unique": {
+ "name": "mariadb_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mongo": {
+ "name": "mongo",
+ "schema": "",
+ "columns": {
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicaSets": {
+ "name": "replicaSets",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mongo_projectId_project_projectId_fk": {
+ "name": "mongo_projectId_project_projectId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mongo_serverId_server_serverId_fk": {
+ "name": "mongo_serverId_server_serverId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mongo_appName_unique": {
+ "name": "mongo_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mysql": {
+ "name": "mysql",
+ "schema": "",
+ "columns": {
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mysql_projectId_project_projectId_fk": {
+ "name": "mysql_projectId_project_projectId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mysql_serverId_server_serverId_fk": {
+ "name": "mysql_serverId_server_serverId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mysql_appName_unique": {
+ "name": "mysql_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.backup": {
+ "name": "backup",
+ "schema": "",
+ "columns": {
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "database": {
+ "name": "database",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "backup_destinationId_destination_destinationId_fk": {
+ "name": "backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_postgresId_postgres_postgresId_fk": {
+ "name": "backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mongoId_mongo_mongoId_fk": {
+ "name": "backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.destination": {
+ "name": "destination",
+ "schema": "",
+ "columns": {
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessKey": {
+ "name": "accessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secretAccessKey": {
+ "name": "secretAccessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bucket": {
+ "name": "bucket",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region": {
+ "name": "region",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "destination_userId_user_temp_id_fk": {
+ "name": "destination_userId_user_temp_id_fk",
+ "tableFrom": "destination",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.deployment": {
+ "name": "deployment",
+ "schema": "",
+ "columns": {
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "deploymentStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'running'"
+ },
+ "logPath": {
+ "name": "logPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isPreviewDeployment": {
+ "name": "isPreviewDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "deployment_applicationId_application_applicationId_fk": {
+ "name": "deployment_applicationId_application_applicationId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_composeId_compose_composeId_fk": {
+ "name": "deployment_composeId_compose_composeId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_serverId_server_serverId_fk": {
+ "name": "deployment_serverId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mount": {
+ "name": "mount",
+ "schema": "",
+ "columns": {
+ "mountId": {
+ "name": "mountId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "mountType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "mountPath": {
+ "name": "mountPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mount_applicationId_application_applicationId_fk": {
+ "name": "mount_applicationId_application_applicationId_fk",
+ "tableFrom": "mount",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_postgresId_postgres_postgresId_fk": {
+ "name": "mount_postgresId_postgres_postgresId_fk",
+ "tableFrom": "mount",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mariadbId_mariadb_mariadbId_fk": {
+ "name": "mount_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mongoId_mongo_mongoId_fk": {
+ "name": "mount_mongoId_mongo_mongoId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mysqlId_mysql_mysqlId_fk": {
+ "name": "mount_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_redisId_redis_redisId_fk": {
+ "name": "mount_redisId_redis_redisId_fk",
+ "tableFrom": "mount",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_composeId_compose_composeId_fk": {
+ "name": "mount_composeId_compose_composeId_fk",
+ "tableFrom": "mount",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.certificate": {
+ "name": "certificate",
+ "schema": "",
+ "columns": {
+ "certificateId": {
+ "name": "certificateId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificateData": {
+ "name": "certificateData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificatePath": {
+ "name": "certificatePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "autoRenew": {
+ "name": "autoRenew",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "certificate_userId_user_temp_id_fk": {
+ "name": "certificate_userId_user_temp_id_fk",
+ "tableFrom": "certificate",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "certificate_serverId_server_serverId_fk": {
+ "name": "certificate_serverId_server_serverId_fk",
+ "tableFrom": "certificate",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "certificate_certificatePath_unique": {
+ "name": "certificate_certificatePath_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "certificatePath"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_temp": {
+ "name": "session_temp",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_temp_user_id_user_temp_id_fk": {
+ "name": "session_temp_user_id_user_temp_id_fk",
+ "tableFrom": "session_temp",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_temp_token_unique": {
+ "name": "session_temp_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session": {
+ "name": "session",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_user_id_auth_id_fk": {
+ "name": "session_user_id_auth_id_fk",
+ "tableFrom": "session",
+ "tableTo": "auth",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redirect": {
+ "name": "redirect",
+ "schema": "",
+ "columns": {
+ "redirectId": {
+ "name": "redirectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "regex": {
+ "name": "regex",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "replacement": {
+ "name": "replacement",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permanent": {
+ "name": "permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redirect_applicationId_application_applicationId_fk": {
+ "name": "redirect_applicationId_application_applicationId_fk",
+ "tableFrom": "redirect",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security": {
+ "name": "security",
+ "schema": "",
+ "columns": {
+ "securityId": {
+ "name": "securityId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "security_applicationId_application_applicationId_fk": {
+ "name": "security_applicationId_application_applicationId_fk",
+ "tableFrom": "security",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "security_username_applicationId_unique": {
+ "name": "security_username_applicationId_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "username",
+ "applicationId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.port": {
+ "name": "port",
+ "schema": "",
+ "columns": {
+ "portId": {
+ "name": "portId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "publishedPort": {
+ "name": "publishedPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "targetPort": {
+ "name": "targetPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "protocolType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "port_applicationId_application_applicationId_fk": {
+ "name": "port_applicationId_application_applicationId_fk",
+ "tableFrom": "port",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redis": {
+ "name": "redis",
+ "schema": "",
+ "columns": {
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redis_projectId_project_projectId_fk": {
+ "name": "redis_projectId_project_projectId_fk",
+ "tableFrom": "redis",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "redis_serverId_server_serverId_fk": {
+ "name": "redis_serverId_server_serverId_fk",
+ "tableFrom": "redis",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "redis_appName_unique": {
+ "name": "redis_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.compose": {
+ "name": "compose",
+ "schema": "",
+ "columns": {
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeFile": {
+ "name": "composeFile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceTypeCompose",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "composeType": {
+ "name": "composeType",
+ "type": "composeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'docker-compose'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "composePath": {
+ "name": "composePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'./docker-compose.yml'"
+ },
+ "suffix": {
+ "name": "suffix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "randomize": {
+ "name": "randomize",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeployment": {
+ "name": "isolatedDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "composeStatus": {
+ "name": "composeStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "compose",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_projectId_project_projectId_fk": {
+ "name": "compose_projectId_project_projectId_fk",
+ "tableFrom": "compose",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "compose_githubId_github_githubId_fk": {
+ "name": "compose_githubId_github_githubId_fk",
+ "tableFrom": "compose",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_gitlabId_gitlab_gitlabId_fk": {
+ "name": "compose_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "compose",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_serverId_server_serverId_fk": {
+ "name": "compose_serverId_server_serverId_fk",
+ "tableFrom": "compose",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.registry": {
+ "name": "registry",
+ "schema": "",
+ "columns": {
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "registryName": {
+ "name": "registryName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "imagePrefix": {
+ "name": "imagePrefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selfHosted": {
+ "name": "selfHosted",
+ "type": "RegistryType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'cloud'"
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "registry_userId_user_temp_id_fk": {
+ "name": "registry_userId_user_temp_id_fk",
+ "tableFrom": "registry",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.discord": {
+ "name": "discord",
+ "schema": "",
+ "columns": {
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.email": {
+ "name": "email",
+ "schema": "",
+ "columns": {
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "smtpServer": {
+ "name": "smtpServer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "smtpPort": {
+ "name": "smtpPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gotify": {
+ "name": "gotify",
+ "schema": "",
+ "columns": {
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appToken": {
+ "name": "appToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "notificationId": {
+ "name": "notificationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appDeploy": {
+ "name": "appDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "appBuildError": {
+ "name": "appBuildError",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "databaseBackup": {
+ "name": "databaseBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dokployRestart": {
+ "name": "dokployRestart",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerCleanup": {
+ "name": "dockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "serverThreshold": {
+ "name": "serverThreshold",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "notificationType": {
+ "name": "notificationType",
+ "type": "notificationType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_slackId_slack_slackId_fk": {
+ "name": "notification_slackId_slack_slackId_fk",
+ "tableFrom": "notification",
+ "tableTo": "slack",
+ "columnsFrom": [
+ "slackId"
+ ],
+ "columnsTo": [
+ "slackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_telegramId_telegram_telegramId_fk": {
+ "name": "notification_telegramId_telegram_telegramId_fk",
+ "tableFrom": "notification",
+ "tableTo": "telegram",
+ "columnsFrom": [
+ "telegramId"
+ ],
+ "columnsTo": [
+ "telegramId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_discordId_discord_discordId_fk": {
+ "name": "notification_discordId_discord_discordId_fk",
+ "tableFrom": "notification",
+ "tableTo": "discord",
+ "columnsFrom": [
+ "discordId"
+ ],
+ "columnsTo": [
+ "discordId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_emailId_email_emailId_fk": {
+ "name": "notification_emailId_email_emailId_fk",
+ "tableFrom": "notification",
+ "tableTo": "email",
+ "columnsFrom": [
+ "emailId"
+ ],
+ "columnsTo": [
+ "emailId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_gotifyId_gotify_gotifyId_fk": {
+ "name": "notification_gotifyId_gotify_gotifyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "gotify",
+ "columnsFrom": [
+ "gotifyId"
+ ],
+ "columnsTo": [
+ "gotifyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_userId_user_temp_id_fk": {
+ "name": "notification_userId_user_temp_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.slack": {
+ "name": "slack",
+ "schema": "",
+ "columns": {
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.telegram": {
+ "name": "telegram",
+ "schema": "",
+ "columns": {
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "botToken": {
+ "name": "botToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "chatId": {
+ "name": "chatId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh-key": {
+ "name": "ssh-key",
+ "schema": "",
+ "columns": {
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "publicKey": {
+ "name": "publicKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lastUsedAt": {
+ "name": "lastUsedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh-key_userId_user_temp_id_fk": {
+ "name": "ssh-key_userId_user_temp_id_fk",
+ "tableFrom": "ssh-key",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.git_provider": {
+ "name": "git_provider",
+ "schema": "",
+ "columns": {
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerType": {
+ "name": "providerType",
+ "type": "gitProviderType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "git_provider_userId_user_temp_id_fk": {
+ "name": "git_provider_userId_user_temp_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bitbucket": {
+ "name": "bitbucket",
+ "schema": "",
+ "columns": {
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bitbucketUsername": {
+ "name": "bitbucketUsername",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "appPassword": {
+ "name": "appPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketWorkspaceName": {
+ "name": "bitbucketWorkspaceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "bitbucket",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github": {
+ "name": "github",
+ "schema": "",
+ "columns": {
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "githubAppName": {
+ "name": "githubAppName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubAppId": {
+ "name": "githubAppId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientId": {
+ "name": "githubClientId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientSecret": {
+ "name": "githubClientSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubInstallationId": {
+ "name": "githubInstallationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubPrivateKey": {
+ "name": "githubPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubWebhookSecret": {
+ "name": "githubWebhookSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "github_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "github",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitlab": {
+ "name": "gitlab",
+ "schema": "",
+ "columns": {
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "gitlabUrl": {
+ "name": "gitlabUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitlab.com'"
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitlab",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.server": {
+ "name": "server",
+ "schema": "",
+ "columns": {
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ipAddress": {
+ "name": "ipAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'root'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverStatus": {
+ "name": "serverStatus",
+ "type": "serverStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "server_userId_user_temp_id_fk": {
+ "name": "server_userId_user_temp_id_fk",
+ "tableFrom": "server",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "server_sshKeyId_ssh-key_sshKeyId_fk": {
+ "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "server",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "sshKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preview_deployments": {
+ "name": "preview_deployments",
+ "schema": "",
+ "columns": {
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestId": {
+ "name": "pullRequestId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestNumber": {
+ "name": "pullRequestNumber",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestURL": {
+ "name": "pullRequestURL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestTitle": {
+ "name": "pullRequestTitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestCommentId": {
+ "name": "pullRequestCommentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previewStatus": {
+ "name": "previewStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preview_deployments_applicationId_application_applicationId_fk": {
+ "name": "preview_deployments_applicationId_application_applicationId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "preview_deployments_domainId_domain_domainId_fk": {
+ "name": "preview_deployments_domainId_domain_domainId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "domain",
+ "columnsFrom": [
+ "domainId"
+ ],
+ "columnsTo": [
+ "domainId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "preview_deployments_appName_unique": {
+ "name": "preview_deployments_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.account": {
+ "name": "account",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "account_id": {
+ "name": "account_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "id_token": {
+ "name": "id_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token_expires_at": {
+ "name": "access_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token_expires_at": {
+ "name": "refresh_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "account_user_id_user_temp_id_fk": {
+ "name": "account_user_id_user_temp_id_fk",
+ "tableFrom": "account",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "invitation_organization_id_organization_id_fk": {
+ "name": "invitation_organization_id_organization_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "invitation_inviter_id_user_temp_id_fk": {
+ "name": "invitation_inviter_id_user_temp_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "inviter_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.member": {
+ "name": "member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "member_organization_id_organization_id_fk": {
+ "name": "member_organization_id_organization_id_fk",
+ "tableFrom": "member",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "member_user_id_user_temp_id_fk": {
+ "name": "member_user_id_user_temp_id_fk",
+ "tableFrom": "member",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization": {
+ "name": "organization",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_id": {
+ "name": "owner_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "organization_owner_id_user_temp_id_fk": {
+ "name": "organization_owner_id_user_temp_id_fk",
+ "tableFrom": "organization",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "organization_slug_unique": {
+ "name": "organization_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.verification": {
+ "name": "verification",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "drop"
+ ]
+ },
+ "public.Roles": {
+ "name": "Roles",
+ "schema": "public",
+ "values": [
+ "admin",
+ "user"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo"
+ ]
+ },
+ "public.deploymentStatus": {
+ "name": "deploymentStatus",
+ "schema": "public",
+ "values": [
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.mountType": {
+ "name": "mountType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "public.serviceType": {
+ "name": "serviceType",
+ "schema": "public",
+ "values": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "public.protocolType": {
+ "name": "protocolType",
+ "schema": "public",
+ "values": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "raw"
+ ]
+ },
+ "public.RegistryType": {
+ "name": "RegistryType",
+ "schema": "public",
+ "values": [
+ "selfHosted",
+ "cloud"
+ ]
+ },
+ "public.notificationType": {
+ "name": "notificationType",
+ "schema": "public",
+ "values": [
+ "slack",
+ "telegram",
+ "discord",
+ "email",
+ "gotify"
+ ]
+ },
+ "public.gitProviderType": {
+ "name": "gitProviderType",
+ "schema": "public",
+ "values": [
+ "github",
+ "gitlab",
+ "bitbucket"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/_journal.json b/apps/dokploy/drizzle/meta/_journal.json
index e0bdf1c64..d10d6816e 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -484,6 +484,20 @@
"when": 1739428942964,
"tag": "0068_sour_professor_monster",
"breakpoints": true
+ },
+ {
+ "idx": 69,
+ "version": "7",
+ "when": 1739432476590,
+ "tag": "0069_known_aqueduct",
+ "breakpoints": true
+ },
+ {
+ "idx": 70,
+ "version": "7",
+ "when": 1739432513877,
+ "tag": "0070_overrated_the_stranger",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/packages/server/package.json b/packages/server/package.json
index a8cf97c66..d8f72a868 100644
--- a/packages/server/package.json
+++ b/packages/server/package.json
@@ -28,6 +28,8 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
+ "@oslojs/encoding":"1.1.0",
+ "@oslojs/crypto":"1.0.1",
"drizzle-dbml-generator":"0.10.0",
"better-auth":"1.1.16",
"rotating-file-stream": "3.2.3",
diff --git a/packages/server/src/auth/auth.ts b/packages/server/src/auth/auth.ts
index 423c4333f..7dc26c95f 100644
--- a/packages/server/src/auth/auth.ts
+++ b/packages/server/src/auth/auth.ts
@@ -16,6 +16,7 @@ export const lucia = new Lucia(adapter, {
secure: false,
},
},
+
sessionExpiresIn: new TimeSpan(1, "d"),
getUserAttributes: (attributes) => {
return {
diff --git a/packages/server/src/db/schema/user.ts b/packages/server/src/db/schema/user.ts
index 932a0a09c..d754687cd 100644
--- a/packages/server/src/db/schema/user.ts
+++ b/packages/server/src/db/schema/user.ts
@@ -73,14 +73,15 @@ export const users_temp = pgTable("user_temp", {
.primaryKey()
.$defaultFn(() => nanoid()),
name: text("name").notNull().default(""),
- token: text("token").notNull(),
+ token: text("token").notNull().default(""),
isRegistered: boolean("isRegistered").notNull().default(false),
expirationDate: text("expirationDate")
.notNull()
.$defaultFn(() => new Date().toISOString()),
- createdAt: text("createdAt")
+ createdAt2: text("createdAt")
.notNull()
.$defaultFn(() => new Date().toISOString()),
+ createdAt: timestamp("created_at").defaultNow(),
canCreateProjects: boolean("canCreateProjects").notNull().default(false),
canAccessToSSHKeys: boolean("canAccessToSSHKeys").notNull().default(false),
canCreateServices: boolean("canCreateServices").notNull().default(false),
diff --git a/packages/server/src/lib/auth.ts b/packages/server/src/lib/auth.ts
index 2706bceac..9555e9b6c 100644
--- a/packages/server/src/lib/auth.ts
+++ b/packages/server/src/lib/auth.ts
@@ -5,6 +5,9 @@ import { admin, createAuthMiddleware, organization } from "better-auth/plugins";
import { eq } from "drizzle-orm";
import { db } from "../db";
import * as schema from "../db/schema";
+import { Scrypt } from "lucia";
+const scrypt = new Scrypt();
+
export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg",
@@ -12,6 +15,10 @@ export const auth = betterAuth({
}),
emailAndPassword: {
enabled: true,
+ password: {
+ hash: scrypt.hash,
+ verify: scrypt.verify,
+ },
},
hooks: {
after: createAuthMiddleware(async (ctx) => {
diff --git a/packages/server/src/lib/crypto.ts b/packages/server/src/lib/crypto.ts
new file mode 100644
index 000000000..27d86dbd5
--- /dev/null
+++ b/packages/server/src/lib/crypto.ts
@@ -0,0 +1,94 @@
+// import {
+// decodeHex,
+// encodeBase32LowerCaseNoPadding,
+// encodeHexLowerCase,
+// } from "@oslojs/encoding";
+// import { generateRandomString } from "@oslojs/crypto/random";
+// import { constantTimeEqual } from "@oslojs/crypto/subtle";
+// import { scrypt } from "./scrypt/index";
+
+// import type { RandomReader } from "@oslojs/crypto/random";
+
+// async function generateScryptKey(
+// data: string,
+// salt: string,
+// blockSize = 16,
+// ): Promise {
+// const encodedData = new TextEncoder().encode(data);
+// const encodedSalt = new TextEncoder().encode(salt);
+// const keyUint8Array = await scrypt(encodedData, encodedSalt, {
+// N: 16384,
+// r: blockSize,
+// p: 1,
+// dkLen: 64,
+// });
+// return new Uint8Array(keyUint8Array);
+// }
+
+// const random: RandomReader = {
+// read(bytes: Uint8Array): void {
+// crypto.getRandomValues(bytes);
+// },
+// };
+
+// export function generateId(length: number): string {
+// const alphabet = "abcdefghijklmnopqrstuvwxyz0123456789";
+// return generateRandomString(random, alphabet, length);
+// }
+
+// export function generateIdFromEntropySize(size: number): string {
+// const buffer = crypto.getRandomValues(new Uint8Array(size));
+// return encodeBase32LowerCaseNoPadding(buffer);
+// }
+
+// export class Scrypt implements PasswordHashingAlgorithm {
+// async hash(password: string): Promise {
+// const salt = encodeHexLowerCase(crypto.getRandomValues(new Uint8Array(16)));
+// const key = await generateScryptKey(password.normalize("NFKC"), salt);
+// return `${salt}:${encodeHexLowerCase(key)}`;
+// }
+// async verify(hash: string, password: string): Promise {
+// const parts = hash.split(":");
+// if (parts.length !== 2) return false;
+
+// const [salt, key] = parts;
+// const targetKey = await generateScryptKey(password.normalize("NFKC"), salt);
+// return constantTimeEqual(targetKey, decodeHex(key));
+// }
+// }
+
+// export class LegacyScrypt implements PasswordHashingAlgorithm {
+// async hash(password: string): Promise {
+// const salt = encodeHexLowerCase(crypto.getRandomValues(new Uint8Array(16)));
+// const key = await generateScryptKey(password.normalize("NFKC"), salt);
+// return `s2:${salt}:${encodeHexLowerCase(key)}`;
+// }
+// async verify(hash: string, password: string): Promise {
+// const parts = hash.split(":");
+// if (parts.length === 2) {
+// const [salt, key] = parts;
+// const targetKey = await generateScryptKey(
+// password.normalize("NFKC"),
+// salt,
+// 8,
+// );
+// const result = constantTimeEqual(targetKey, decodeHex(key));
+// return result;
+// }
+// if (parts.length !== 3) return false;
+// const [version, salt, key] = parts;
+// if (version === "s2") {
+// const targetKey = await generateScryptKey(
+// password.normalize("NFKC"),
+// salt,
+// );
+// return constantTimeEqual(targetKey, decodeHex(key));
+// }
+// return false;
+// }
+// }
+
+// export interface PasswordHashingAlgorithm {
+// hash(password: string): Promise;
+// verify(hash: string, password: string): Promise;
+// }
diff --git a/packages/server/src/lib/scrypt/index.ts b/packages/server/src/lib/scrypt/index.ts
new file mode 100644
index 000000000..8337712ea
--- /dev/null
+++ b/packages/server/src/lib/scrypt/index.ts
@@ -0,0 +1 @@
+//
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index bb49174f4..09f7885b4 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -558,6 +558,12 @@ importers:
'@octokit/auth-app':
specifier: ^6.0.4
version: 6.1.1
+ '@oslojs/crypto':
+ specifier: 1.0.1
+ version: 1.0.1
+ '@oslojs/encoding':
+ specifier: 1.1.0
+ version: 1.1.0
'@react-email/components':
specifier: ^0.0.21
version: 0.0.21(@types/react@18.3.5)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
@@ -2164,6 +2170,18 @@ packages:
'@one-ini/wasm@0.1.1':
resolution: {integrity: sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==}
+ '@oslojs/asn1@1.0.0':
+ resolution: {integrity: sha512-zw/wn0sj0j0QKbIXfIlnEcTviaCzYOY3V5rAyjR6YtOByFtJiT574+8p9Wlach0lZH9fddD4yb9laEAIl4vXQA==}
+
+ '@oslojs/binary@1.0.0':
+ resolution: {integrity: sha512-9RCU6OwXU6p67H4NODbuxv2S3eenuQ4/WFLrsq+K/k682xrznH5EVWA7N4VFk9VYVcbFtKqur5YQQZc0ySGhsQ==}
+
+ '@oslojs/crypto@1.0.1':
+ resolution: {integrity: sha512-7n08G8nWjAr/Yu3vu9zzrd0L9XnrJfpMioQcvCMxBIiF5orECHe5/3J0jmXRVvgfqMm/+4oxlQ+Sq39COYLcNQ==}
+
+ '@oslojs/encoding@1.1.0':
+ resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==}
+
'@peculiar/asn1-android@2.3.15':
resolution: {integrity: sha512-8U2TIj59cRlSXTX2d0mzUKP7whfWGFMzTeC3qPgAbccXFrPNZLaDhpNEdG5U2QZ/tBv/IHlCJ8s+KYXpJeop6w==}
@@ -8507,6 +8525,19 @@ snapshots:
'@one-ini/wasm@0.1.1': {}
+ '@oslojs/asn1@1.0.0':
+ dependencies:
+ '@oslojs/binary': 1.0.0
+
+ '@oslojs/binary@1.0.0': {}
+
+ '@oslojs/crypto@1.0.1':
+ dependencies:
+ '@oslojs/asn1': 1.0.0
+ '@oslojs/binary': 1.0.0
+
+ '@oslojs/encoding@1.1.0': {}
+
'@peculiar/asn1-android@2.3.15':
dependencies:
'@peculiar/asn1-schema': 2.3.15
From bc901bcb255e655f6e8481672c09d170a322b333 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Thu, 13 Feb 2025 02:36:08 -0600
Subject: [PATCH 020/126] refactor: update
---
apps/dokploy/drizzle/0067_migrate-data.sql | 4 ++--
apps/dokploy/migrate.ts | 4 ++--
apps/dokploy/pages/index.tsx | 4 ++--
packages/server/src/auth/auth.ts | 2 +-
packages/server/src/lib/auth.ts | 16 ++++++++++------
5 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/apps/dokploy/drizzle/0067_migrate-data.sql b/apps/dokploy/drizzle/0067_migrate-data.sql
index b5cefd7b7..2057bd965 100644
--- a/apps/dokploy/drizzle/0067_migrate-data.sql
+++ b/apps/dokploy/drizzle/0067_migrate-data.sql
@@ -72,7 +72,7 @@ inserted_accounts AS (
SELECT
gen_random_uuid(),
gen_random_uuid(),
- 'credentials',
+ 'credential',
a."adminId",
auth.password,
COALESCE(auth."is2FAEnabled", false),
@@ -166,7 +166,7 @@ inserted_member_accounts AS (
SELECT
gen_random_uuid(),
gen_random_uuid(),
- 'credentials',
+ 'credential',
u."userId",
auth.password,
COALESCE(auth."is2FAEnabled", false),
diff --git a/apps/dokploy/migrate.ts b/apps/dokploy/migrate.ts
index 8a8e0dcbe..d56006f18 100644
--- a/apps/dokploy/migrate.ts
+++ b/apps/dokploy/migrate.ts
@@ -54,7 +54,7 @@ await db
.then((user) => user[0]);
await db.insert(schema.account).values({
- providerId: "credentials",
+ providerId: "credential",
userId: user?.id || "",
password: admin.auth.password,
is2FAEnabled: admin.auth.is2FAEnabled || false,
@@ -101,7 +101,7 @@ await db
.then((userTemp) => userTemp[0]);
await db.insert(schema.account).values({
- providerId: "credentials",
+ providerId: "credential",
userId: member?.userId || "",
password: member.auth.password,
is2FAEnabled: member.auth.is2FAEnabled || false,
diff --git a/apps/dokploy/pages/index.tsx b/apps/dokploy/pages/index.tsx
index 210160843..4c53f4797 100644
--- a/apps/dokploy/pages/index.tsx
+++ b/apps/dokploy/pages/index.tsx
@@ -69,8 +69,8 @@ export default function Home({ IS_CLOUD }: Props) {
const router = useRouter();
const form = useForm({
defaultValues: {
- email: "user5@yopmail.com",
- password: "Password1234",
+ email: "",
+ password: "",
},
resolver: zodResolver(loginSchema),
});
diff --git a/packages/server/src/auth/auth.ts b/packages/server/src/auth/auth.ts
index 7dc26c95f..09372fa5b 100644
--- a/packages/server/src/auth/auth.ts
+++ b/packages/server/src/auth/auth.ts
@@ -16,7 +16,7 @@ export const lucia = new Lucia(adapter, {
secure: false,
},
},
-
+
sessionExpiresIn: new TimeSpan(1, "d"),
getUserAttributes: (attributes) => {
return {
diff --git a/packages/server/src/lib/auth.ts b/packages/server/src/lib/auth.ts
index 9555e9b6c..2844d1d17 100644
--- a/packages/server/src/lib/auth.ts
+++ b/packages/server/src/lib/auth.ts
@@ -1,23 +1,28 @@
import type { IncomingMessage } from "node:http";
+import * as bcrypt from "bcrypt";
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
-import { admin, createAuthMiddleware, organization } from "better-auth/plugins";
+import { createAuthMiddleware, organization } from "better-auth/plugins";
import { eq } from "drizzle-orm";
import { db } from "../db";
import * as schema from "../db/schema";
-import { Scrypt } from "lucia";
-const scrypt = new Scrypt();
export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg",
schema: schema,
}),
+
emailAndPassword: {
enabled: true,
+
password: {
- hash: scrypt.hash,
- verify: scrypt.verify,
+ async hash(password) {
+ return bcrypt.hashSync(password, 10);
+ },
+ async verify({ hash, password }) {
+ return bcrypt.compareSync(password, hash);
+ },
},
},
hooks: {
@@ -35,7 +40,6 @@ export const auth = betterAuth({
},
user: {
modelName: "users_temp",
- additionalFields: {},
},
plugins: [organization()],
});
From 5c24281f720578df8ab26c4113c6057ee61835a8 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Thu, 13 Feb 2025 02:45:33 -0600
Subject: [PATCH 021/126] refactor: return correct information
---
apps/dokploy/server/api/routers/auth.ts | 1 -
packages/server/src/lib/auth.ts | 7 +++++++
packages/server/src/services/auth.ts | 4 ++--
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/apps/dokploy/server/api/routers/auth.ts b/apps/dokploy/server/api/routers/auth.ts
index b6b915f69..c1c2e0a75 100644
--- a/apps/dokploy/server/api/routers/auth.ts
+++ b/apps/dokploy/server/api/routers/auth.ts
@@ -169,7 +169,6 @@ export const authRouter = createTRPCRouter({
}),
get: protectedProcedure.query(async ({ ctx }) => {
- console.log(ctx.user);
const auth = await findAuthById(ctx.user.id);
return auth;
}),
diff --git a/packages/server/src/lib/auth.ts b/packages/server/src/lib/auth.ts
index 2844d1d17..878313ae5 100644
--- a/packages/server/src/lib/auth.ts
+++ b/packages/server/src/lib/auth.ts
@@ -40,6 +40,11 @@ export const auth = betterAuth({
},
user: {
modelName: "users_temp",
+ additionalFields: {
+ role: {
+ type: "string",
+ },
+ },
},
plugins: [organization()],
});
@@ -51,6 +56,8 @@ export const validateRequest = async (request: IncomingMessage) => {
}),
});
+ console.log(session);
+
if (!session?.session || !session.user) {
return {
session: null,
diff --git a/packages/server/src/services/auth.ts b/packages/server/src/services/auth.ts
index 787ceedb8..8781f4f19 100644
--- a/packages/server/src/services/auth.ts
+++ b/packages/server/src/services/auth.ts
@@ -100,8 +100,8 @@ export const findAuthByEmail = async (email: string) => {
};
export const findAuthById = async (authId: string) => {
- const result = await db.query.user.findFirst({
- where: eq(user.id, authId),
+ const result = await db.query.users_temp.findFirst({
+ where: eq(users_temp.id, authId),
columns: {
createdAt: false,
updatedAt: false,
From d9c83b7010fe099ef4d0e83291eb3c62e38c26b5 Mon Sep 17 00:00:00 2001
From: Khiet Tam Nguyen
Date: Thu, 13 Feb 2025 20:36:03 +1100
Subject: [PATCH 022/126] docs(template): note on networking for superset
---
.../templates/superset/docker-compose.yml | 30 +++++++++++++++++--
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/apps/dokploy/templates/superset/docker-compose.yml b/apps/dokploy/templates/superset/docker-compose.yml
index 8dd1cd2d4..b73bf55e5 100644
--- a/apps/dokploy/templates/superset/docker-compose.yml
+++ b/apps/dokploy/templates/superset/docker-compose.yml
@@ -1,5 +1,8 @@
-# Note: this is an UNOFFICIAL production docker image build for Superset:
+# This is an UNOFFICIAL production docker image build for Superset:
# - https://github.com/amancevice/docker-superset
+
+
+# ## SETUP INSTRUCTIONS
#
# After deploying this image, you will need to run one of the two
# commands below in a terminal within the superset container:
@@ -7,11 +10,30 @@
# $ superset-init # Initialise database only
#
# You will be prompted to enter the credentials for the admin user.
+
+
+# ## NETWORK INSTRUCTIONS
+#
+# If you want to connect superset with other internal databases managed by
+# Dokploy (on dokploy-network) using internal hostnames, you will need to
+# uncomment the `networks` section, both for the superset container and
+# at the very bottom of this docker-compose template.
+#
+# Note that the `superset` service name/hostname will not be unique on the
+# global `dokploy-network`. If you plan to:
+#
+# 1. deploy a second instance of superset on dokploy-network, and
+# 2. have other containers on dokploy-network utilise the second instance's
+# Superset API (https://superset.apache.org/docs/api)
+#
+# Please change the service name of the second instance.
services:
superset:
image: amancevice/superset
restart: always
+ #networks:
+ # - dokploy-network
depends_on:
- superset_postgres
- superset_redis
@@ -44,8 +66,7 @@ services:
timeout: 10s
retries: 3
-
- superset_redis:
+superset_redis:
image: redis
restart: always
volumes:
@@ -57,6 +78,9 @@ services:
timeout: 10s
retries: 3
+#networks:
+# dokploy-network:
+# external: true
volumes:
superset_postgres_data:
From bbdda014d88c874386ec2d463ec63c52bf9399ac Mon Sep 17 00:00:00 2001
From: Dominik Koch
Date: Thu, 13 Feb 2025 21:46:06 +0100
Subject: [PATCH 023/126] feat(template): update plausible
---
apps/dokploy/templates/plausible/docker-compose.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/apps/dokploy/templates/plausible/docker-compose.yml b/apps/dokploy/templates/plausible/docker-compose.yml
index f17bdfa31..ad483ecf6 100644
--- a/apps/dokploy/templates/plausible/docker-compose.yml
+++ b/apps/dokploy/templates/plausible/docker-compose.yml
@@ -1,4 +1,3 @@
-version: "3.8"
services:
plausible_db:
image: postgres:16-alpine
@@ -24,7 +23,7 @@ services:
hard: 262144
plausible:
- image: ghcr.io/plausible/community-edition:v2.1.4
+ image: ghcr.io/plausible/community-edition:v2.1.5
restart: always
command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
depends_on:
From bf6c2698d4e5a60c8018d7b1d5166650d6296bc5 Mon Sep 17 00:00:00 2001
From: Dominik Koch
Date: Thu, 13 Feb 2025 21:52:01 +0100
Subject: [PATCH 024/126] fix: update plausible version
---
apps/dokploy/templates/templates.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts
index 8143bbb2f..1c0a9a40c 100644
--- a/apps/dokploy/templates/templates.ts
+++ b/apps/dokploy/templates/templates.ts
@@ -34,7 +34,7 @@ export const templates: TemplateData[] = [
{
id: "plausible",
name: "Plausible",
- version: "v2.1.4",
+ version: "v2.1.5",
description:
"Plausible is a open source, self-hosted web analytics platform that lets you track website traffic and user behavior.",
logo: "plausible.svg",
From ed54df9bd2889daa44a220f027d70e8b5a7dfa2a Mon Sep 17 00:00:00 2001
From: mafrasil
Date: Fri, 14 Feb 2025 09:23:41 +0400
Subject: [PATCH 025/126] feat(template): add convex.dev
---
apps/dokploy/public/templates/convex.svg | 5 +
.../templates/convex/docker-compose.yml | 37 +
apps/dokploy/templates/convex/index.ts | 38 +
apps/dokploy/templates/templates.ts | 2975 +++++++++--------
4 files changed, 1575 insertions(+), 1480 deletions(-)
create mode 100644 apps/dokploy/public/templates/convex.svg
create mode 100644 apps/dokploy/templates/convex/docker-compose.yml
create mode 100644 apps/dokploy/templates/convex/index.ts
diff --git a/apps/dokploy/public/templates/convex.svg b/apps/dokploy/public/templates/convex.svg
new file mode 100644
index 000000000..8622c4c07
--- /dev/null
+++ b/apps/dokploy/public/templates/convex.svg
@@ -0,0 +1,5 @@
+
diff --git a/apps/dokploy/templates/convex/docker-compose.yml b/apps/dokploy/templates/convex/docker-compose.yml
new file mode 100644
index 000000000..12e2b5ada
--- /dev/null
+++ b/apps/dokploy/templates/convex/docker-compose.yml
@@ -0,0 +1,37 @@
+services:
+ backend:
+ image: ghcr.io/get-convex/convex-backend:6c974d219776b753cd23d26f4a296629ff7c2cad
+ ports:
+ - "${PORT:-3210}:3210"
+ - "${SITE_PROXY_PORT:-3211}:3211"
+ volumes:
+ - data:/convex/data
+ environment:
+ - INSTANCE_NAME=${INSTANCE_NAME:-}
+ - INSTANCE_SECRET=${INSTANCE_SECRET:-}
+ - CONVEX_RELEASE_VERSION_DEV=${CONVEX_RELEASE_VERSION_DEV:-}
+ - ACTIONS_USER_TIMEOUT_SECS=${ACTIONS_USER_TIMEOUT_SECS:-}
+ - CONVEX_CLOUD_ORIGIN=${CONVEX_CLOUD_ORIGIN:-http://127.0.0.1:3210}
+ - CONVEX_SITE_ORIGIN=${CONVEX_SITE_ORIGIN:-http://127.0.0.1:3211}
+ - DATABASE_URL=${DATABASE_URL:-}
+ - DISABLE_BEACON=${DISABLE_BEACON:-}
+ - REDACT_LOGS_TO_CLIENT=${REDACT_LOGS_TO_CLIENT:-}
+ - RUST_LOG=${RUST_LOG:-info}
+ - RUST_BACKTRACE=${RUST_BACKTRACE:-}
+ healthcheck:
+ test: curl -f http://localhost:3210/version
+ interval: 5s
+ start_period: 5s
+
+ dashboard:
+ image: ghcr.io/get-convex/convex-dashboard:4499dd4fd7f2148687a7774599c613d052950f46
+ ports:
+ - "${DASHBOARD_PORT:-6791}:6791"
+ environment:
+ - NEXT_PUBLIC_DEPLOYMENT_URL=${NEXT_PUBLIC_DEPLOYMENT_URL:-http://127.0.0.1:3210}
+ depends_on:
+ backend:
+ condition: service_healthy
+
+volumes:
+ data:
diff --git a/apps/dokploy/templates/convex/index.ts b/apps/dokploy/templates/convex/index.ts
new file mode 100644
index 000000000..0b3a981ac
--- /dev/null
+++ b/apps/dokploy/templates/convex/index.ts
@@ -0,0 +1,38 @@
+import {
+ type DomainSchema,
+ type Schema,
+ type Template,
+ generateRandomDomain,
+} from "../utils";
+
+export function generate(schema: Schema): Template {
+ const dashboardDomain = generateRandomDomain(schema);
+ const backendDomain = generateRandomDomain(schema);
+ const actionsDomain = generateRandomDomain(schema);
+
+ const domains: DomainSchema[] = [
+ {
+ host: dashboardDomain,
+ port: 6791,
+ serviceName: "dashboard",
+ },
+ {
+ host: backendDomain,
+ port: 3210,
+ serviceName: "backend",
+ },
+ {
+ host: actionsDomain,
+ port: 3211,
+ serviceName: "backend",
+ },
+ ];
+
+ const envs = [
+ `NEXT_PUBLIC_DEPLOYMENT_URL=${backendDomain}`,
+ `CONVEX_CLOUD_ORIGIN=${backendDomain}`,
+ `CONVEX_SITE_ORIGIN=${actionsDomain}`,
+ ];
+
+ return { envs, domains };
+}
diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts
index 8143bbb2f..f708c55ee 100644
--- a/apps/dokploy/templates/templates.ts
+++ b/apps/dokploy/templates/templates.ts
@@ -1,1486 +1,1501 @@
import type { TemplateData } from "./types/templates-data.type";
export const templates: TemplateData[] = [
- {
- id: "supabase",
- name: "SupaBase",
- version: "1.24.07",
- description:
- "The open source Firebase alternative. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications. ",
- links: {
- github: "https://github.com/supabase/supabase",
- website: "https://supabase.com/",
- docs: "https://supabase.com/docs/guides/self-hosting",
- },
- logo: "supabase.svg",
- load: () => import("./supabase/index").then((m) => m.generate),
- tags: ["database", "firebase", "postgres"],
- },
- {
- id: "pocketbase",
- name: "Pocketbase",
- version: "v0.22.12",
- description:
- "Pocketbase is a self-hosted alternative to Firebase that allows you to build and host your own backend services.",
- links: {
- github: "https://github.com/pocketbase/pocketbase",
- website: "https://pocketbase.io/",
- docs: "https://pocketbase.io/docs/",
- },
- logo: "pocketbase.svg",
- load: () => import("./pocketbase/index").then((m) => m.generate),
- tags: ["database", "cms", "headless"],
- },
- {
- id: "plausible",
- name: "Plausible",
- version: "v2.1.4",
- description:
- "Plausible is a open source, self-hosted web analytics platform that lets you track website traffic and user behavior.",
- logo: "plausible.svg",
- links: {
- github: "https://github.com/plausible/plausible",
- website: "https://plausible.io/",
- docs: "https://plausible.io/docs",
- },
- tags: ["analytics"],
- load: () => import("./plausible/index").then((m) => m.generate),
- },
- {
- id: "calcom",
- name: "Calcom",
- version: "v2.7.6",
- description:
- "Calcom is a open source alternative to Calendly that allows to create scheduling and booking services.",
+ {
+ id: "supabase",
+ name: "SupaBase",
+ version: "1.24.07",
+ description:
+ "The open source Firebase alternative. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications. ",
+ links: {
+ github: "https://github.com/supabase/supabase",
+ website: "https://supabase.com/",
+ docs: "https://supabase.com/docs/guides/self-hosting",
+ },
+ logo: "supabase.svg",
+ load: () => import("./supabase/index").then((m) => m.generate),
+ tags: ["database", "firebase", "postgres"],
+ },
+ {
+ id: "pocketbase",
+ name: "Pocketbase",
+ version: "v0.22.12",
+ description:
+ "Pocketbase is a self-hosted alternative to Firebase that allows you to build and host your own backend services.",
+ links: {
+ github: "https://github.com/pocketbase/pocketbase",
+ website: "https://pocketbase.io/",
+ docs: "https://pocketbase.io/docs/",
+ },
+ logo: "pocketbase.svg",
+ load: () => import("./pocketbase/index").then((m) => m.generate),
+ tags: ["database", "cms", "headless"],
+ },
+ {
+ id: "plausible",
+ name: "Plausible",
+ version: "v2.1.4",
+ description:
+ "Plausible is a open source, self-hosted web analytics platform that lets you track website traffic and user behavior.",
+ logo: "plausible.svg",
+ links: {
+ github: "https://github.com/plausible/plausible",
+ website: "https://plausible.io/",
+ docs: "https://plausible.io/docs",
+ },
+ tags: ["analytics"],
+ load: () => import("./plausible/index").then((m) => m.generate),
+ },
+ {
+ id: "calcom",
+ name: "Calcom",
+ version: "v2.7.6",
+ description:
+ "Calcom is a open source alternative to Calendly that allows to create scheduling and booking services.",
- links: {
- github: "https://github.com/calcom/cal.com",
- website: "https://cal.com/",
- docs: "https://cal.com/docs",
- },
- logo: "calcom.jpg",
- tags: ["scheduling", "booking"],
- load: () => import("./calcom/index").then((m) => m.generate),
- },
- {
- id: "grafana",
- name: "Grafana",
- version: "9.5.20",
- description:
- "Grafana is an open source platform for data visualization and monitoring.",
- logo: "grafana.svg",
- links: {
- github: "https://github.com/grafana/grafana",
- website: "https://grafana.com/",
- docs: "https://grafana.com/docs/",
- },
- tags: ["monitoring"],
- load: () => import("./grafana/index").then((m) => m.generate),
- },
- {
- id: "directus",
- name: "Directus",
- version: "11.0.2",
- description:
- "Directus is an open source headless CMS that provides an API-first solution for building custom backends.",
- logo: "directus.jpg",
- links: {
- github: "https://github.com/directus/directus",
- website: "https://directus.io/",
- docs: "https://docs.directus.io/",
- },
- tags: ["cms"],
- load: () => import("./directus/index").then((m) => m.generate),
- },
- {
- id: "baserow",
- name: "Baserow",
- version: "1.25.2",
- description:
- "Baserow is an open source database management tool that allows you to create and manage databases.",
- logo: "baserow.webp",
- links: {
- github: "https://github.com/Baserow/baserow",
- website: "https://baserow.io/",
- docs: "https://baserow.io/docs/index",
- },
- tags: ["database"],
- load: () => import("./baserow/index").then((m) => m.generate),
- },
- {
- id: "budibase",
- name: "Budibase",
- version: "3.2.25",
- description:
- "Budibase is an open-source low-code platform that saves engineers 100s of hours building forms, portals, and approval apps, securely.",
- logo: "budibase.svg",
- links: {
- github: "https://github.com/Budibase/budibase",
- website: "https://budibase.com/",
- docs: "https://docs.budibase.com/docs/",
- },
- tags: ["database", "low-code", "nocode", "applications"],
- load: () => import("./budibase/index").then((m) => m.generate),
- },
- {
- id: "ghost",
- name: "Ghost",
- version: "5.0.0",
- description:
- "Ghost is a free and open source, professional publishing platform built on a modern Node.js technology stack.",
- logo: "ghost.jpeg",
- links: {
- github: "https://github.com/TryGhost/Ghost",
- website: "https://ghost.org/",
- docs: "https://ghost.org/docs/",
- },
- tags: ["cms"],
- load: () => import("./ghost/index").then((m) => m.generate),
- },
- {
- id: "uptime-kuma",
- name: "Uptime Kuma",
- version: "1.23.15",
- description:
- "Uptime Kuma is a free and open source monitoring tool that allows you to monitor your websites and applications.",
- logo: "uptime-kuma.png",
- links: {
- github: "https://github.com/louislam/uptime-kuma",
- website: "https://uptime.kuma.pet/",
- docs: "https://github.com/louislam/uptime-kuma/wiki",
- },
- tags: ["monitoring"],
- load: () => import("./uptime-kuma/index").then((m) => m.generate),
- },
- {
- id: "n8n",
- name: "n8n",
- version: "1.70.3",
- description:
- "n8n is an open source low-code platform for automating workflows and integrations.",
- logo: "n8n.png",
- links: {
- github: "https://github.com/n8n-io/n8n",
- website: "https://n8n.io/",
- docs: "https://docs.n8n.io/",
- },
- tags: ["automation"],
- load: () => import("./n8n/index").then((m) => m.generate),
- },
- {
- id: "wordpress",
- name: "Wordpress",
- version: "6.7.1",
- description:
- "Wordpress is a free and open source content management system (CMS) for publishing and managing websites.",
- logo: "wordpress.png",
- links: {
- github: "https://github.com/WordPress/WordPress",
- website: "https://wordpress.org/",
- docs: "https://wordpress.org/documentation/",
- },
- tags: ["cms"],
- load: () => import("./wordpress/index").then((m) => m.generate),
- },
- {
- id: "odoo",
- name: "Odoo",
- version: "16.0",
- description:
- "Odoo is a free and open source business management software that helps you manage your company's operations.",
- logo: "odoo.png",
- links: {
- github: "https://github.com/odoo/odoo",
- website: "https://odoo.com/",
- docs: "https://www.odoo.com/documentation/",
- },
- tags: ["cms"],
- load: () => import("./odoo/index").then((m) => m.generate),
- },
- {
- id: "appsmith",
- name: "Appsmith",
- version: "v1.29",
- description:
- "Appsmith is a free and open source platform for building internal tools and applications.",
- logo: "appsmith.png",
- links: {
- github: "https://github.com/appsmithorg/appsmith",
- website: "https://appsmith.com/",
- docs: "https://docs.appsmith.com/",
- },
- tags: ["cms"],
- load: () => import("./appsmith/index").then((m) => m.generate),
- },
- {
- id: "excalidraw",
- name: "Excalidraw",
- version: "latest",
- description:
- "Excalidraw is a free and open source online diagramming tool that lets you easily create and share beautiful diagrams.",
- logo: "excalidraw.jpg",
- links: {
- github: "https://github.com/excalidraw/excalidraw",
- website: "https://excalidraw.com/",
- docs: "https://docs.excalidraw.com/",
- },
- tags: ["drawing"],
- load: () => import("./excalidraw/index").then((m) => m.generate),
- },
- {
- id: "documenso",
- name: "Documenso",
- version: "v1.5.6",
- description:
- "Documenso is the open source alternative to DocuSign for signing documents digitally",
- links: {
- github: "https://github.com/documenso/documenso",
- website: "https://documenso.com/",
- docs: "https://documenso.com/docs",
- },
- logo: "documenso.png",
- tags: ["document-signing"],
- load: () => import("./documenso/index").then((m) => m.generate),
- },
- {
- id: "nocodb",
- name: "NocoDB",
- version: "0.257.2",
- description:
- "NocoDB is an opensource Airtable alternative that turns any MySQL, PostgreSQL, SQL Server, SQLite & MariaDB into a smart spreadsheet.",
+ links: {
+ github: "https://github.com/calcom/cal.com",
+ website: "https://cal.com/",
+ docs: "https://cal.com/docs",
+ },
+ logo: "calcom.jpg",
+ tags: ["scheduling", "booking"],
+ load: () => import("./calcom/index").then((m) => m.generate),
+ },
+ {
+ id: "grafana",
+ name: "Grafana",
+ version: "9.5.20",
+ description:
+ "Grafana is an open source platform for data visualization and monitoring.",
+ logo: "grafana.svg",
+ links: {
+ github: "https://github.com/grafana/grafana",
+ website: "https://grafana.com/",
+ docs: "https://grafana.com/docs/",
+ },
+ tags: ["monitoring"],
+ load: () => import("./grafana/index").then((m) => m.generate),
+ },
+ {
+ id: "directus",
+ name: "Directus",
+ version: "11.0.2",
+ description:
+ "Directus is an open source headless CMS that provides an API-first solution for building custom backends.",
+ logo: "directus.jpg",
+ links: {
+ github: "https://github.com/directus/directus",
+ website: "https://directus.io/",
+ docs: "https://docs.directus.io/",
+ },
+ tags: ["cms"],
+ load: () => import("./directus/index").then((m) => m.generate),
+ },
+ {
+ id: "baserow",
+ name: "Baserow",
+ version: "1.25.2",
+ description:
+ "Baserow is an open source database management tool that allows you to create and manage databases.",
+ logo: "baserow.webp",
+ links: {
+ github: "https://github.com/Baserow/baserow",
+ website: "https://baserow.io/",
+ docs: "https://baserow.io/docs/index",
+ },
+ tags: ["database"],
+ load: () => import("./baserow/index").then((m) => m.generate),
+ },
+ {
+ id: "budibase",
+ name: "Budibase",
+ version: "3.2.25",
+ description:
+ "Budibase is an open-source low-code platform that saves engineers 100s of hours building forms, portals, and approval apps, securely.",
+ logo: "budibase.svg",
+ links: {
+ github: "https://github.com/Budibase/budibase",
+ website: "https://budibase.com/",
+ docs: "https://docs.budibase.com/docs/",
+ },
+ tags: ["database", "low-code", "nocode", "applications"],
+ load: () => import("./budibase/index").then((m) => m.generate),
+ },
+ {
+ id: "ghost",
+ name: "Ghost",
+ version: "5.0.0",
+ description:
+ "Ghost is a free and open source, professional publishing platform built on a modern Node.js technology stack.",
+ logo: "ghost.jpeg",
+ links: {
+ github: "https://github.com/TryGhost/Ghost",
+ website: "https://ghost.org/",
+ docs: "https://ghost.org/docs/",
+ },
+ tags: ["cms"],
+ load: () => import("./ghost/index").then((m) => m.generate),
+ },
+ {
+ id: "uptime-kuma",
+ name: "Uptime Kuma",
+ version: "1.23.15",
+ description:
+ "Uptime Kuma is a free and open source monitoring tool that allows you to monitor your websites and applications.",
+ logo: "uptime-kuma.png",
+ links: {
+ github: "https://github.com/louislam/uptime-kuma",
+ website: "https://uptime.kuma.pet/",
+ docs: "https://github.com/louislam/uptime-kuma/wiki",
+ },
+ tags: ["monitoring"],
+ load: () => import("./uptime-kuma/index").then((m) => m.generate),
+ },
+ {
+ id: "n8n",
+ name: "n8n",
+ version: "1.70.3",
+ description:
+ "n8n is an open source low-code platform for automating workflows and integrations.",
+ logo: "n8n.png",
+ links: {
+ github: "https://github.com/n8n-io/n8n",
+ website: "https://n8n.io/",
+ docs: "https://docs.n8n.io/",
+ },
+ tags: ["automation"],
+ load: () => import("./n8n/index").then((m) => m.generate),
+ },
+ {
+ id: "wordpress",
+ name: "Wordpress",
+ version: "6.7.1",
+ description:
+ "Wordpress is a free and open source content management system (CMS) for publishing and managing websites.",
+ logo: "wordpress.png",
+ links: {
+ github: "https://github.com/WordPress/WordPress",
+ website: "https://wordpress.org/",
+ docs: "https://wordpress.org/documentation/",
+ },
+ tags: ["cms"],
+ load: () => import("./wordpress/index").then((m) => m.generate),
+ },
+ {
+ id: "odoo",
+ name: "Odoo",
+ version: "16.0",
+ description:
+ "Odoo is a free and open source business management software that helps you manage your company's operations.",
+ logo: "odoo.png",
+ links: {
+ github: "https://github.com/odoo/odoo",
+ website: "https://odoo.com/",
+ docs: "https://www.odoo.com/documentation/",
+ },
+ tags: ["cms"],
+ load: () => import("./odoo/index").then((m) => m.generate),
+ },
+ {
+ id: "appsmith",
+ name: "Appsmith",
+ version: "v1.29",
+ description:
+ "Appsmith is a free and open source platform for building internal tools and applications.",
+ logo: "appsmith.png",
+ links: {
+ github: "https://github.com/appsmithorg/appsmith",
+ website: "https://appsmith.com/",
+ docs: "https://docs.appsmith.com/",
+ },
+ tags: ["cms"],
+ load: () => import("./appsmith/index").then((m) => m.generate),
+ },
+ {
+ id: "excalidraw",
+ name: "Excalidraw",
+ version: "latest",
+ description:
+ "Excalidraw is a free and open source online diagramming tool that lets you easily create and share beautiful diagrams.",
+ logo: "excalidraw.jpg",
+ links: {
+ github: "https://github.com/excalidraw/excalidraw",
+ website: "https://excalidraw.com/",
+ docs: "https://docs.excalidraw.com/",
+ },
+ tags: ["drawing"],
+ load: () => import("./excalidraw/index").then((m) => m.generate),
+ },
+ {
+ id: "documenso",
+ name: "Documenso",
+ version: "v1.5.6",
+ description:
+ "Documenso is the open source alternative to DocuSign for signing documents digitally",
+ links: {
+ github: "https://github.com/documenso/documenso",
+ website: "https://documenso.com/",
+ docs: "https://documenso.com/docs",
+ },
+ logo: "documenso.png",
+ tags: ["document-signing"],
+ load: () => import("./documenso/index").then((m) => m.generate),
+ },
+ {
+ id: "nocodb",
+ name: "NocoDB",
+ version: "0.257.2",
+ description:
+ "NocoDB is an opensource Airtable alternative that turns any MySQL, PostgreSQL, SQL Server, SQLite & MariaDB into a smart spreadsheet.",
- links: {
- github: "https://github.com/nocodb/nocodb",
- website: "https://nocodb.com/",
- docs: "https://docs.nocodb.com/",
- },
- logo: "nocodb.png",
- tags: ["database", "spreadsheet", "low-code", "nocode"],
- load: () => import("./nocodb/index").then((m) => m.generate),
- },
- {
- id: "meilisearch",
- name: "Meilisearch",
- version: "v1.8.3",
- description:
- "Meilisearch is a free and open-source search engine that allows you to easily add search functionality to your web applications.",
- logo: "meilisearch.png",
- links: {
- github: "https://github.com/meilisearch/meilisearch",
- website: "https://www.meilisearch.com/",
- docs: "https://docs.meilisearch.com/",
- },
- tags: ["search"],
- load: () => import("./meilisearch/index").then((m) => m.generate),
- },
- {
- id: "phpmyadmin",
- name: "Phpmyadmin",
- version: "5.2.1",
- description:
- "Phpmyadmin is a free and open-source web interface for MySQL and MariaDB that allows you to manage your databases.",
- logo: "phpmyadmin.png",
- links: {
- github: "https://github.com/phpmyadmin/phpmyadmin",
- website: "https://www.phpmyadmin.net/",
- docs: "https://www.phpmyadmin.net/docs/",
- },
- tags: ["database"],
- load: () => import("./phpmyadmin/index").then((m) => m.generate),
- },
- {
- id: "rocketchat",
- name: "Rocketchat",
- version: "6.9.2",
- description:
- "Rocket.Chat is a free and open-source web chat platform that allows you to build and manage your own chat applications.",
- logo: "rocketchat.png",
- links: {
- github: "https://github.com/RocketChat/Rocket.Chat",
- website: "https://rocket.chat/",
- docs: "https://rocket.chat/docs/",
- },
- tags: ["chat"],
- load: () => import("./rocketchat/index").then((m) => m.generate),
- },
- {
- id: "minio",
- name: "Minio",
- description:
- "Minio is an open source object storage server compatible with Amazon S3 cloud storage service.",
- logo: "minio.png",
- version: "latest",
- links: {
- github: "https://github.com/minio/minio",
- website: "https://minio.io/",
- docs: "https://docs.minio.io/",
- },
- tags: ["storage"],
- load: () => import("./minio/index").then((m) => m.generate),
- },
- {
- id: "metabase",
- name: "Metabase",
- version: "v0.50.8",
- description:
- "Metabase is an open source business intelligence tool that allows you to ask questions and visualize data.",
- logo: "metabase.png",
- links: {
- github: "https://github.com/metabase/metabase",
- website: "https://www.metabase.com/",
- docs: "https://www.metabase.com/docs/",
- },
- tags: ["database", "dashboard"],
- load: () => import("./metabase/index").then((m) => m.generate),
- },
- {
- id: "glitchtip",
- name: "Glitchtip",
- version: "v4.0",
- description: "Glitchtip is simple, open source error tracking",
- logo: "glitchtip.png",
- links: {
- github: "https://gitlab.com/glitchtip/",
- website: "https://glitchtip.com/",
- docs: "https://glitchtip.com/documentation",
- },
- tags: ["hosting"],
- load: () => import("./glitchtip/index").then((m) => m.generate),
- },
- {
- id: "open-webui",
- name: "Open WebUI",
- version: "v0.3.7",
- description:
- "Open WebUI is a free and open source chatgpt alternative. Open WebUI is an extensible, feature-rich, and user-friendly self-hosted WebUI designed to operate entirely offline. It supports various LLM runners, including Ollama and OpenAI-compatible APIs. The template include ollama and webui services.",
- logo: "open-webui.png",
- links: {
- github: "https://github.com/open-webui/open-webui",
- website: "https://openwebui.com/",
- docs: "https://docs.openwebui.com/",
- },
- tags: ["chat"],
- load: () => import("./open-webui/index").then((m) => m.generate),
- },
- {
- id: "listmonk",
- name: "Listmonk",
- version: "v3.0.0",
- description:
- "High performance, self-hosted, newsletter and mailing list manager with a modern dashboard.",
- logo: "listmonk.png",
- links: {
- github: "https://github.com/knadh/listmonk",
- website: "https://listmonk.app/",
- docs: "https://listmonk.app/docs/",
- },
- tags: ["email", "newsletter", "mailing-list"],
- load: () => import("./listmonk/index").then((m) => m.generate),
- },
- {
- id: "doublezero",
- name: "Double Zero",
- version: "v0.2.1",
- description:
- "00 is a self hostable SES dashboard for sending and monitoring emails with AWS",
- logo: "doublezero.svg",
- links: {
- github: "https://github.com/technomancy-dev/00",
- website: "https://www.double-zero.cloud/",
- docs: "https://github.com/technomancy-dev/00",
- },
- tags: ["email"],
- load: () => import("./doublezero/index").then((m) => m.generate),
- },
- {
- id: "umami",
- name: "Umami",
- version: "v2.14.0",
- description:
- "Umami is a simple, fast, privacy-focused alternative to Google Analytics.",
- logo: "umami.png",
- links: {
- github: "https://github.com/umami-software/umami",
- website: "https://umami.is",
- docs: "https://umami.is/docs",
- },
- tags: ["analytics"],
- load: () => import("./umami/index").then((m) => m.generate),
- },
- {
- id: "jellyfin",
- name: "jellyfin",
- version: "v10.9.7",
- description:
- "Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. ",
- logo: "jellyfin.svg",
- links: {
- github: "https://github.com/jellyfin/jellyfin",
- website: "https://jellyfin.org/",
- docs: "https://jellyfin.org/docs/",
- },
- tags: ["media system"],
- load: () => import("./jellyfin/index").then((m) => m.generate),
- },
- {
- id: "teable",
- name: "teable",
- version: "v1.3.1-alpha-build.460",
- description:
- "Teable is a Super fast, Real-time, Professional, Developer friendly, No-code database built on Postgres. It uses a simple, spreadsheet-like interface to create complex enterprise-level database applications. Unlock efficient app development with no-code, free from the hurdles of data security and scalability.",
- logo: "teable.png",
- links: {
- github: "https://github.com/teableio/teable",
- website: "https://teable.io/",
- docs: "https://help.teable.io/",
- },
- tags: ["database", "spreadsheet", "low-code", "nocode"],
- load: () => import("./teable/index").then((m) => m.generate),
- },
- {
- id: "zipline",
- name: "Zipline",
- version: "v3.7.9",
- description:
- "A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!",
- logo: "zipline.png",
- links: {
- github: "https://github.com/diced/zipline",
- website: "https://zipline.diced.sh/",
- docs: "https://zipline.diced.sh/docs/",
- },
- tags: ["media system", "storage"],
- load: () => import("./zipline/index").then((m) => m.generate),
- },
- {
- id: "soketi",
- name: "Soketi",
- version: "v1.6.1-16",
- description:
- "Soketi is your simple, fast, and resilient open-source WebSockets server.",
- logo: "soketi.png",
- links: {
- github: "https://github.com/soketi/soketi",
- website: "https://soketi.app/",
- docs: "https://docs.soketi.app/",
- },
- tags: ["chat"],
- load: () => import("./soketi/index").then((m) => m.generate),
- },
- {
- id: "aptabase",
- name: "Aptabase",
- version: "v1.0.0",
- description:
- "Aptabase is a self-hosted web analytics platform that lets you track website traffic and user behavior.",
- logo: "aptabase.svg",
- links: {
- github: "https://github.com/aptabase/aptabase",
- website: "https://aptabase.com/",
- docs: "https://github.com/aptabase/aptabase/blob/main/README.md",
- },
- tags: ["analytics", "self-hosted"],
- load: () => import("./aptabase/index").then((m) => m.generate),
- },
- {
- id: "typebot",
- name: "Typebot",
- version: "2.27.0",
- description: "Typebot is an open-source chatbot builder platform.",
- logo: "typebot.svg",
- links: {
- github: "https://github.com/baptisteArno/typebot.io",
- website: "https://typebot.io/",
- docs: "https://docs.typebot.io/get-started/introduction",
- },
- tags: ["chatbot", "builder", "open-source"],
- load: () => import("./typebot/index").then((m) => m.generate),
- },
- {
- id: "gitea",
- name: "Gitea",
- version: "1.22.3",
- description:
- "Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD.",
- logo: "gitea.png",
- links: {
- github: "https://github.com/go-gitea/gitea.git",
- website: "https://gitea.com/",
- docs: "https://docs.gitea.com/installation/install-with-docker",
- },
- tags: ["self-hosted", "storage"],
- load: () => import("./gitea/index").then((m) => m.generate),
- },
- {
- id: "roundcube",
- name: "Roundcube",
- version: "1.6.9",
- description:
- "Free and open source webmail software for the masses, written in PHP.",
- logo: "roundcube.svg",
- links: {
- github: "https://github.com/roundcube/roundcubemail",
- website: "https://roundcube.net/",
- docs: "https://roundcube.net/about/",
- },
- tags: ["self-hosted", "email", "webmail"],
- load: () => import("./roundcube/index").then((m) => m.generate),
- },
- {
- id: "filebrowser",
- name: "File Browser",
- version: "2.31.2",
- description:
- "Filebrowser is a standalone file manager for uploading, deleting, previewing, renaming, and editing files, with support for multiple users, each with their own directory.",
- logo: "filebrowser.svg",
- links: {
- github: "https://github.com/filebrowser/filebrowser",
- website: "https://filebrowser.org/",
- docs: "https://filebrowser.org/",
- },
- tags: ["file-manager", "storage"],
- load: () => import("./filebrowser/index").then((m) => m.generate),
- },
- {
- id: "tolgee",
- name: "Tolgee",
- version: "v3.80.4",
- description:
- "Developer & translator friendly web-based localization platform",
- logo: "tolgee.svg",
- links: {
- github: "https://github.com/tolgee/tolgee-platform",
- website: "https://tolgee.io",
- docs: "https://tolgee.io/platform",
- },
- tags: ["self-hosted", "i18n", "localization", "translations"],
- load: () => import("./tolgee/index").then((m) => m.generate),
- },
- {
- id: "portainer",
- name: "Portainer",
- version: "2.21.4",
- description:
- "Portainer is a container management tool for deploying, troubleshooting, and securing applications across cloud, data centers, and IoT.",
- logo: "portainer.svg",
- links: {
- github: "https://github.com/portainer/portainer",
- website: "https://www.portainer.io/",
- docs: "https://docs.portainer.io/",
- },
- tags: ["cloud", "monitoring"],
- load: () => import("./portainer/index").then((m) => m.generate),
- },
- {
- id: "influxdb",
- name: "InfluxDB",
- version: "2.7.10",
- description:
- "InfluxDB 2.7 is the platform purpose-built to collect, store, process and visualize time series data.",
- logo: "influxdb.png",
- links: {
- github: "https://github.com/influxdata/influxdb",
- website: "https://www.influxdata.com/",
- docs: "https://docs.influxdata.com/influxdb/v2/",
- },
- tags: ["self-hosted", "open-source", "storage", "database"],
- load: () => import("./influxdb/index").then((m) => m.generate),
- },
- {
- id: "infisical",
- name: "Infisical",
- version: "0.90.1",
- description:
- "All-in-one platform to securely manage application configuration and secrets across your team and infrastructure.",
- logo: "infisical.jpg",
- links: {
- github: "https://github.com/Infisical/infisical",
- website: "https://infisical.com/",
- docs: "https://infisical.com/docs/documentation/getting-started/introduction",
- },
- tags: ["self-hosted", "open-source"],
- load: () => import("./infisical/index").then((m) => m.generate),
- },
- {
- id: "docmost",
- name: "Docmost",
- version: "0.4.1",
- description:
- "Docmost, is an open-source collaborative wiki and documentation software.",
- logo: "docmost.png",
- links: {
- github: "https://github.com/docmost/docmost",
- website: "https://docmost.com/",
- docs: "https://docmost.com/docs/",
- },
- tags: ["self-hosted", "open-source", "manager"],
- load: () => import("./docmost/index").then((m) => m.generate),
- },
- {
- id: "vaultwarden",
- name: "Vaultwarden",
- version: "1.32.7",
- description:
- "Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs",
- logo: "vaultwarden.svg",
- links: {
- github: "https://github.com/dani-garcia/vaultwarden",
- website: "",
- docs: "https://github.com/dani-garcia/vaultwarden/wiki",
- },
- tags: ["open-source"],
- load: () => import("./vaultwarden/index").then((m) => m.generate),
- },
- {
- id: "hi-events",
- name: "Hi.events",
- version: "0.8.0-beta.1",
- description:
- "Hi.Events is a self-hosted event management and ticket selling platform that allows you to create, manage and promote events easily.",
- logo: "hi-events.svg",
- links: {
- github: "https://github.com/HiEventsDev/hi.events",
- website: "https://hi.events/",
- docs: "https://hi.events/docs",
- },
- tags: ["self-hosted", "open-source", "manager"],
- load: () => import("./hi-events/index").then((m) => m.generate),
- },
- {
- id: "windows",
- name: "Windows (dockerized)",
- version: "4.00",
- description: "Windows inside a Docker container.",
- logo: "windows.png",
- links: {
- github: "https://github.com/dockur/windows",
- website: "",
- docs: "https://github.com/dockur/windows?tab=readme-ov-file#how-do-i-use-it",
- },
- tags: ["self-hosted", "open-source", "os"],
- load: () => import("./windows/index").then((m) => m.generate),
- },
- {
- id: "macos",
- name: "MacOS (dockerized)",
- version: "1.14",
- description: "MacOS inside a Docker container.",
- logo: "macos.png",
- links: {
- github: "https://github.com/dockur/macos",
- website: "",
- docs: "https://github.com/dockur/macos?tab=readme-ov-file#how-do-i-use-it",
- },
- tags: ["self-hosted", "open-source", "os"],
- load: () => import("./macos/index").then((m) => m.generate),
- },
- {
- id: "coder",
- name: "Coder",
- version: "2.15.3",
- description:
- "Coder is an open-source cloud development environment (CDE) that you host in your cloud or on-premises.",
- logo: "coder.svg",
- links: {
- github: "https://github.com/coder/coder",
- website: "https://coder.com/",
- docs: "https://coder.com/docs",
- },
- tags: ["self-hosted", "open-source", "builder"],
- load: () => import("./coder/index").then((m) => m.generate),
- },
- {
- id: "stirling",
- name: "Stirling PDF",
- version: "0.30.1",
- description: "A locally hosted one-stop shop for all your PDF needs",
- logo: "stirling.svg",
- links: {
- github: "https://github.com/Stirling-Tools/Stirling-PDF",
- website: "https://www.stirlingpdf.com/",
- docs: "https://docs.stirlingpdf.com/",
- },
- tags: ["pdf", "tools"],
- load: () => import("./stirling/index").then((m) => m.generate),
- },
- {
- id: "lobe-chat",
- name: "Lobe Chat",
- version: "v1.26.1",
- description: "Lobe Chat - an open-source, modern-design AI chat framework.",
- logo: "lobe-chat.png",
- links: {
- github: "https://github.com/lobehub/lobe-chat",
- website: "https://chat-preview.lobehub.com/",
- docs: "https://lobehub.com/docs/self-hosting/platform/docker-compose",
- },
- tags: ["IA", "chat"],
- load: () => import("./lobe-chat/index").then((m) => m.generate),
- },
- {
- id: "peppermint",
- name: "Peppermint",
- version: "latest",
- description:
- "Peppermint is a modern, open-source API development platform that helps you build, test and document your APIs.",
- logo: "peppermint.svg",
- links: {
- github: "https://github.com/Peppermint-Lab/peppermint",
- website: "https://peppermint.sh/",
- docs: "https://docs.peppermint.sh/",
- },
- tags: ["api", "development", "documentation"],
- load: () => import("./peppermint/index").then((m) => m.generate),
- },
- {
- id: "windmill",
- name: "Windmill",
- version: "latest",
- description:
- "A developer platform to build production-grade workflows and internal apps. Open-source alternative to Airplane, Retool, and GitHub Actions.",
- logo: "windmill.svg",
- links: {
- github: "https://github.com/windmill-labs/windmill",
- website: "https://www.windmill.dev/",
- docs: "https://docs.windmill.dev/",
- },
- tags: ["workflow", "automation", "development"],
- load: () => import("./windmill/index").then((m) => m.generate),
- },
- {
- id: "activepieces",
- name: "Activepieces",
- version: "0.35.0",
- description:
- "Open-source no-code business automation tool. An alternative to Zapier, Make.com, and Tray.",
- logo: "activepieces.svg",
- links: {
- github: "https://github.com/activepieces/activepieces",
- website: "https://www.activepieces.com/",
- docs: "https://www.activepieces.com/docs",
- },
- tags: ["automation", "workflow", "no-code"],
- load: () => import("./activepieces/index").then((m) => m.generate),
- },
- {
- id: "invoiceshelf",
- name: "InvoiceShelf",
- version: "latest",
- description:
- "InvoiceShelf is a self-hosted open source invoicing system for freelancers and small businesses.",
- logo: "invoiceshelf.png",
- links: {
- github: "https://github.com/InvoiceShelf/invoiceshelf",
- website: "https://invoiceshelf.com",
- docs: "https://github.com/InvoiceShelf/invoiceshelf#readme",
- },
- tags: ["invoice", "business", "finance"],
- load: () => import("./invoiceshelf/index").then((m) => m.generate),
- },
- {
- id: "postiz",
- name: "Postiz",
- version: "latest",
- description:
- "Postiz is a modern, open-source platform for managing and publishing content across multiple channels.",
- logo: "postiz.png",
- links: {
- github: "https://github.com/gitroomhq/postiz",
- website: "https://postiz.com",
- docs: "https://docs.postiz.com",
- },
- tags: ["cms", "content-management", "publishing"],
- load: () => import("./postiz/index").then((m) => m.generate),
- },
- {
- id: "slash",
- name: "Slash",
- version: "latest",
- description:
- "Slash is a modern, self-hosted bookmarking service and link shortener that helps you organize and share your favorite links.",
- logo: "slash.png",
- links: {
- github: "https://github.com/yourselfhosted/slash",
- website: "https://github.com/yourselfhosted/slash#readme",
- docs: "https://github.com/yourselfhosted/slash/wiki",
- },
- tags: ["bookmarks", "link-shortener", "self-hosted"],
- load: () => import("./slash/index").then((m) => m.generate),
- },
- {
- id: "discord-tickets",
- name: "Discord Tickets",
- version: "4.0.21",
- description:
- "An open-source Discord bot for creating and managing support ticket channels.",
- logo: "discord-tickets.png",
- links: {
- github: "https://github.com/discord-tickets/bot",
- website: "https://discordtickets.app",
- docs: "https://discordtickets.app/self-hosting/installation/docker/",
- },
- tags: ["discord", "tickets", "support"],
- load: () => import("./discord-tickets/index").then((m) => m.generate),
- },
- {
- id: "nextcloud-aio",
- name: "Nextcloud All in One",
- version: "30.0.2",
- description:
- "Nextcloud (AIO) is a self-hosted file storage and sync platform with powerful collaboration capabilities. It integrates Files, Talk, Groupware, Office, Assistant and more into a single platform for remote work and data protection.",
- logo: "nextcloud-aio.svg",
- links: {
- github: "https://github.com/nextcloud/docker",
- website: "https://nextcloud.com/",
- docs: "https://docs.nextcloud.com/",
- },
- tags: ["file-manager", "sync"],
- load: () => import("./nextcloud-aio/index").then((m) => m.generate),
- },
- {
- id: "blender",
- name: "Blender",
- version: "latest",
- description:
- "Blender is a free and open-source 3D creation suite. It supports the entire 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing and motion tracking, video editing and 2D animation pipeline.",
- logo: "blender.svg",
- links: {
- github: "https://github.com/linuxserver/docker-blender",
- website: "https://www.blender.org/",
- docs: "https://docs.blender.org/",
- },
- tags: ["3d", "rendering", "animation"],
- load: () => import("./blender/index").then((m) => m.generate),
- },
- {
- id: "heyform",
- name: "HeyForm",
- version: "latest",
- description:
- "Allows anyone to create engaging conversational forms for surveys, questionnaires, quizzes, and polls. No coding skills required.",
- logo: "heyform.svg",
- links: {
- github: "https://github.com/heyform/heyform",
- website: "https://heyform.net",
- docs: "https://docs.heyform.net",
- },
- tags: ["form", "builder", "questionnaire", "quiz", "survey"],
- load: () => import("./heyform/index").then((m) => m.generate),
- },
- {
- id: "chatwoot",
- name: "Chatwoot",
- version: "v3.14.1",
- description:
- "Open-source customer engagement platform that provides a shared inbox for teams, live chat, and omnichannel support.",
- logo: "chatwoot.svg",
- links: {
- github: "https://github.com/chatwoot/chatwoot",
- website: "https://www.chatwoot.com",
- docs: "https://www.chatwoot.com/docs",
- },
- tags: ["support", "chat", "customer-service"],
- load: () => import("./chatwoot/index").then((m) => m.generate),
- },
- {
- id: "discourse",
- name: "Discourse",
- version: "3.3.2",
- description:
- "Discourse is a modern forum software for your community. Use it as a mailing list, discussion forum, or long-form chat room.",
- logo: "discourse.svg",
- links: {
- github: "https://github.com/discourse/discourse",
- website: "https://www.discourse.org/",
- docs: "https://meta.discourse.org/",
- },
- tags: ["forum", "community", "discussion"],
- load: () => import("./discourse/index").then((m) => m.generate),
- },
- {
- id: "immich",
- name: "Immich",
- version: "v1.121.0",
- description:
- "High performance self-hosted photo and video backup solution directly from your mobile phone.",
- logo: "immich.svg",
- links: {
- github: "https://github.com/immich-app/immich",
- website: "https://immich.app/",
- docs: "https://immich.app/docs/overview/introduction",
- },
- tags: ["photos", "videos", "backup", "media"],
- load: () => import("./immich/index").then((m) => m.generate),
- },
- {
- id: "twenty",
- name: "Twenty CRM",
- version: "latest",
- description:
- "Twenty is a modern CRM offering a powerful spreadsheet interface and open-source alternative to Salesforce.",
- logo: "twenty.svg",
- links: {
- github: "https://github.com/twentyhq/twenty",
- website: "https://twenty.com",
- docs: "https://docs.twenty.com",
- },
- tags: ["crm", "sales", "business"],
- load: () => import("./twenty/index").then((m) => m.generate),
- },
- {
- id: "yourls",
- name: "YOURLS",
- version: "1.9.2",
- description:
- "YOURLS (Your Own URL Shortener) is a set of PHP scripts that will allow you to run your own URL shortening service (a la TinyURL or Bitly).",
- logo: "yourls.svg",
- links: {
- github: "https://github.com/YOURLS/YOURLS",
- website: "https://yourls.org/",
- docs: "https://yourls.org/#documentation",
- },
- tags: ["url-shortener", "php"],
- load: () => import("./yourls/index").then((m) => m.generate),
- },
- {
- id: "ryot",
- name: "Ryot",
- version: "v7.10",
- description:
- "A self-hosted platform for tracking various media types including movies, TV shows, video games, books, audiobooks, and more.",
- logo: "ryot.png",
- links: {
- github: "https://github.com/IgnisDa/ryot",
- website: "https://ryot.io/",
- docs: "https://docs.ryot.io/",
- },
- tags: ["media", "tracking", "self-hosted"],
- load: () => import("./ryot/index").then((m) => m.generate),
- },
- {
- id: "photoprism",
- name: "Photoprism",
- version: "latest",
- description:
- "PhotoPrism® is an AI-Powered Photos App for the Decentralized Web. It makes use of the latest technologies to tag and find pictures automatically without getting in your way.",
- logo: "photoprism.svg",
- links: {
- github: "https://github.com/photoprism/photoprism",
- website: "https://www.photoprism.app/",
- docs: "https://docs.photoprism.app/",
- },
- tags: ["media", "photos", "self-hosted"],
- load: () => import("./photoprism/index").then((m) => m.generate),
- },
- {
- id: "ontime",
- name: "Ontime",
- version: "v3.8.0",
- description:
- "Ontime is browser-based application that manages event rundowns, scheduliing and cuing",
- logo: "ontime.png",
- links: {
- github: "https://github.com/cpvalente/ontime/",
- website: "https://getontime.no",
- docs: "https://docs.getontime.no",
- },
- tags: ["event"],
- load: () => import("./ontime/index").then((m) => m.generate),
- },
- {
- id: "triggerdotdev",
- name: "Trigger.dev",
- version: "v3",
- description:
- "Trigger is a platform for building event-driven applications.",
- logo: "triggerdotdev.svg",
- links: {
- github: "https://github.com/triggerdotdev/trigger.dev",
- website: "https://trigger.dev/",
- docs: "https://trigger.dev/docs",
- },
- tags: ["event-driven", "applications"],
- load: () => import("./triggerdotdev/index").then((m) => m.generate),
- },
- {
- id: "browserless",
- name: "Browserless",
- version: "2.23.0",
- description:
- "Browserless allows remote clients to connect and execute headless work, all inside of docker. It supports the standard, unforked Puppeteer and Playwright libraries, as well offering REST-based APIs for common actions like data collection, PDF generation and more.",
- logo: "browserless.svg",
- links: {
- github: "https://github.com/browserless/browserless",
- website: "https://www.browserless.io/",
- docs: "https://docs.browserless.io/",
- },
- tags: ["browser", "automation"],
- load: () => import("./browserless/index").then((m) => m.generate),
- },
- {
- id: "drawio",
- name: "draw.io",
- version: "24.7.17",
- description:
- "draw.io is a configurable diagramming/whiteboarding visualization application.",
- logo: "drawio.svg",
- links: {
- github: "https://github.com/jgraph/drawio",
- website: "https://draw.io/",
- docs: "https://www.drawio.com/doc/",
- },
- tags: ["drawing", "diagrams"],
- load: () => import("./drawio/index").then((m) => m.generate),
- },
- {
- id: "kimai",
- name: "Kimai",
- version: "2.26.0",
- description:
- "Kimai is a web-based multi-user time-tracking application. Works great for everyone: freelancers, companies, organizations - everyone can track their times, generate reports, create invoices and do so much more.",
- logo: "kimai.svg",
- links: {
- github: "https://github.com/kimai/kimai",
- website: "https://www.kimai.org",
- docs: "https://www.kimai.org/documentation",
- },
- tags: ["invoice", "business", "finance"],
- load: () => import("./kimai/index").then((m) => m.generate),
- },
- {
- id: "logto",
- name: "Logto",
- version: "1.22.0",
- description:
- "Logto is an open-source Identity and Access Management (IAM) platform designed to streamline Customer Identity and Access Management (CIAM) and Workforce Identity Management.",
- logo: "logto.png",
- links: {
- github: "https://github.com/logto-io/logto",
- website: "https://logto.io/",
- docs: "https://docs.logto.io/introduction",
- },
- tags: ["identity", "auth"],
- load: () => import("./logto/index").then((m) => m.generate),
- },
- {
- id: "penpot",
- name: "Penpot",
- version: "2.3.2",
- description:
- "Penpot is the web-based open-source design tool that bridges the gap between designers and developers.",
- logo: "penpot.svg",
- links: {
- github: "https://github.com/penpot/penpot",
- website: "https://penpot.app/",
- docs: "https://docs.penpot.app/",
- },
- tags: ["design", "collaboration"],
- load: () => import("./penpot/index").then((m) => m.generate),
- },
- {
- id: "huly",
- name: "Huly",
- version: "0.6.377",
- description:
- "Huly — All-in-One Project Management Platform (alternative to Linear, Jira, Slack, Notion, Motion)",
- logo: "huly.svg",
- links: {
- github: "https://github.com/hcengineering/huly-selfhost",
- website: "https://huly.io/",
- docs: "https://docs.huly.io/",
- },
- tags: ["project-management", "community", "discussion"],
- load: () => import("./huly/index").then((m) => m.generate),
- },
- {
- id: "unsend",
- name: "Unsend",
- version: "v1.3.2",
- description: "Open source alternative to Resend,Sendgrid, Postmark etc. ",
- logo: "unsend.png",
- links: {
- github: "https://github.com/unsend-dev/unsend",
- website: "https://unsend.dev/",
- docs: "https://docs.unsend.dev/get-started/",
- },
- tags: ["e-mail", "marketing", "business"],
- load: () => import("./unsend/index").then((m) => m.generate),
- },
- {
- id: "langflow",
- name: "Langflow",
- version: "1.1.1",
- description:
- "Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database. ",
- logo: "langflow.svg",
- links: {
- github: "https://github.com/langflow-ai/langflow/tree/main",
- website: "https://www.langflow.org/",
- docs: "https://docs.langflow.org/",
- },
- tags: ["ai"],
- load: () => import("./langflow/index").then((m) => m.generate),
- },
- {
- id: "elastic-search",
- name: "Elasticsearch",
- version: "8.10.2",
- description:
- "Elasticsearch is an open-source search and analytics engine, used for full-text search and analytics on structured data such as text, web pages, images, and videos.",
- logo: "elasticsearch.svg",
- links: {
- github: "https://github.com/elastic/elasticsearch",
- website: "https://www.elastic.co/elasticsearch/",
- docs: "https://docs.elastic.co/elasticsearch/",
- },
- tags: ["search", "analytics"],
- load: () => import("./elastic-search/index").then((m) => m.generate),
- },
- {
- id: "onedev",
- name: "OneDev",
- version: "11.6.6",
- description:
- "Git server with CI/CD, kanban, and packages. Seamless integration. Unparalleled experience.",
- logo: "onedev.png",
- links: {
- github: "https://github.com/theonedev/onedev/",
- website: "https://onedev.io/",
- docs: "https://docs.onedev.io/",
- },
- tags: ["self-hosted", "development"],
- load: () => import("./onedev/index").then((m) => m.generate),
- },
- {
- id: "unifi",
- name: "Unifi Network",
- version: "11.6.6",
- description:
- "Unifi Network is an open-source enterprise network management platform for wireless networks.",
- logo: "unifi.webp",
- links: {
- github: "https://github.com/ubiquiti",
- website: "https://www.ui.com/",
- docs: "https://help.ui.com/hc/en-us/articles/360012282453-Self-Hosting-a-UniFi-Network-Server",
- },
- tags: ["self-hosted", "networking"],
- load: () => import("./unifi/index").then((m) => m.generate),
- },
- {
- id: "glpi",
- name: "GLPI Project",
- version: "10.0.16",
- description: "The most complete open source service management software",
- logo: "glpi.webp",
- links: {
- github: "https://github.com/glpi-project/glpi",
- website: "https://glpi-project.org/",
- docs: "https://glpi-project.org/documentation/",
- },
- tags: ["self-hosted", "project-management", "management"],
- load: () => import("./glpi/index").then((m) => m.generate),
- },
- {
- id: "checkmate",
- name: "Checkmate",
- version: "2.0.1",
- description:
- "Checkmate is an open-source, self-hosted tool designed to track and monitor server hardware, uptime, response times, and incidents in real-time with beautiful visualizations.",
- logo: "checkmate.png",
- links: {
- github: "https://github.com/bluewave-labs/checkmate",
- website: "https://bluewavelabs.ca",
- docs: "https://bluewavelabs.gitbook.io/checkmate",
- },
- tags: ["self-hosted", "monitoring", "uptime"],
- load: () => import("./checkmate/index").then((m) => m.generate),
- },
- {
- id: "gotenberg",
- name: "Gotenberg",
- version: "latest",
- description: "Gotenberg is a Docker-powered stateless API for PDF files.",
- logo: "gotenberg.png",
- links: {
- github: "https://github.com/gotenberg/gotenberg",
- website: "https://gotenberg.dev",
- docs: "https://gotenberg.dev/docs/getting-started/introduction",
- },
- tags: ["api", "backend", "pdf", "tools"],
- load: () => import("./gotenberg/index").then((m) => m.generate),
- },
- {
- id: "actualbudget",
- name: "Actual Budget",
- version: "latest",
- description:
- "A super fast and privacy-focused app for managing your finances.",
- logo: "actualbudget.png",
- links: {
- github: "https://github.com/actualbudget/actual",
- website: "https://actualbudget.org",
- docs: "https://actualbudget.org/docs",
- },
- tags: ["budgeting", "finance", "money"],
- load: () => import("./actualbudget/index").then((m) => m.generate),
- },
- {
- id: "conduit",
- name: "Conduit",
- version: "v0.9.0",
- description:
- "Conduit is a simple, fast and reliable chat server powered by Matrix",
- logo: "conduit.svg",
- links: {
- github: "https://gitlab.com/famedly/conduit",
- website: "https://conduit.rs/",
- docs: "https://docs.conduit.rs/",
- },
- tags: ["matrix", "communication"],
- load: () => import("./conduit/index").then((m) => m.generate),
- },
- {
- id: "evolutionapi",
- name: "Evolution API",
- version: "v2.1.2",
- description:
- "Evolution API is a robust platform dedicated to empowering small businesses with limited resources, going beyond a simple messaging solution via WhatsApp.",
- logo: "evolutionapi.png",
- links: {
- github: "https://github.com/EvolutionAPI/evolution-api",
- docs: "https://doc.evolution-api.com/v2/en/get-started/introduction",
- website: "https://evolution-api.com/opensource-whatsapp-api/",
- },
- tags: ["api", "whatsapp", "messaging"],
- load: () => import("./evolutionapi/index").then((m) => m.generate),
- },
- {
- id: "conduwuit",
- name: "Conduwuit",
- version: "latest",
- description:
- "Well-maintained, featureful Matrix chat homeserver (fork of Conduit)",
- logo: "conduwuit.svg",
- links: {
- github: "https://github.com/girlbossceo/conduwuit",
- website: "https://conduwuit.puppyirl.gay",
- docs: "https://conduwuit.puppyirl.gay/configuration.html",
- },
- tags: ["backend", "chat", "communication", "matrix", "server"],
- load: () => import("./conduwuit/index").then((m) => m.generate),
- },
- {
- id: "cloudflared",
- name: "Cloudflared",
- version: "latest",
- description:
- "A lightweight daemon that securely connects local services to the internet through Cloudflare Tunnel.",
- logo: "cloudflared.svg",
- links: {
- github: "https://github.com/cloudflare/cloudflared",
- website:
- "https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/",
- docs: "https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/",
- },
- tags: ["cloud", "networking", "security", "tunnel"],
- load: () => import("./cloudflared/index").then((m) => m.generate),
- },
- {
- id: "couchdb",
- name: "CouchDB",
- version: "latest",
- description:
- "CouchDB is a document-oriented NoSQL database that excels at replication and horizontal scaling.",
- logo: "couchdb.png",
- links: {
- github: "https://github.com/apache/couchdb",
- website: "https://couchdb.apache.org/",
- docs: "https://docs.couchdb.org/en/stable/",
- },
- tags: ["database", "storage"],
- load: () => import("./couchdb/index").then((m) => m.generate),
- },
- {
- id: "it-tools",
- name: "IT Tools",
- version: "latest",
- description: "A collection of handy online it-tools for developers.",
- logo: "it-tools.svg",
- links: {
- github: "https://github.com/CorentinTh/it-tools",
- website: "https://it-tools.tech",
- },
- tags: ["developer", "tools"],
- load: () => import("./it-tools/index").then((m) => m.generate),
- },
- {
- id: "superset",
- name: "Superset (Unofficial)",
- version: "latest",
- description: "Data visualization and data exploration platform.",
- logo: "superset.svg",
- links: {
- github: "https://github.com/amancevice/docker-superset",
- website: "https://superset.apache.org",
- docs: "https://superset.apache.org/docs/intro",
- },
- tags: ["analytics", "bi", "dashboard", "database", "sql"],
- load: () => import("./superset/index").then((m) => m.generate),
- },
- {
- id: "glance",
- name: "Glance",
- version: "latest",
- description:
- "A self-hosted dashboard that puts all your feeds in one place. Features RSS feeds, weather, bookmarks, site monitoring, and more in a minimal, fast interface.",
- logo: "glance.png",
- links: {
- github: "https://github.com/glanceapp/glance",
- docs: "https://github.com/glanceapp/glance/blob/main/docs/configuration.md",
- },
- tags: ["dashboard", "monitoring", "widgets", "rss"],
- load: () => import("./glance/index").then((m) => m.generate),
- },
- {
- id: "homarr",
- name: "Homarr",
- version: "latest",
- description:
- "A sleek, modern dashboard that puts all your apps and services in one place with Docker integration.",
- logo: "homarr.png",
- links: {
- github: "https://github.com/homarr-labs/homarr",
- docs: "https://homarr.dev/docs/getting-started/installation/docker",
- website: "https://homarr.dev/",
- },
- tags: ["dashboard", "monitoring"],
- load: () => import("./homarr/index").then((m) => m.generate),
- },
- {
- id: "erpnext",
- name: "ERPNext",
- version: "version-15",
- description: "100% Open Source and highly customizable ERP software.",
- logo: "erpnext.svg",
- links: {
- github: "https://github.com/frappe/erpnext",
- docs: "https://docs.frappe.io/erpnext",
- website: "https://erpnext.com",
- },
- tags: [
- "erp",
- "accounts",
- "manufacturing",
- "retail",
- "sales",
- "pos",
- "hrms",
- ],
- load: () => import("./erpnext/index").then((m) => m.generate),
- },
- {
- id: "maybe",
- name: "Maybe",
- version: "latest",
- description:
- "Maybe is a self-hosted finance tracking application designed to simplify budgeting and expenses.",
- logo: "maybe.svg",
- links: {
- github: "https://github.com/maybe-finance/maybe",
- website: "https://maybe.finance/",
- docs: "https://docs.maybe.finance/",
- },
- tags: ["finance", "self-hosted"],
- load: () => import("./maybe/index").then((m) => m.generate),
- },
- {
- id: "spacedrive",
- name: "Spacedrive",
- version: "latest",
- description:
- "Spacedrive is a cross-platform file manager. It connects your devices together to help you organize files from anywhere. powered by a virtual distributed filesystem (VDFS) written in Rust. Organize files across many devices in one place.",
- links: {
- github: "https://github.com/spacedriveapp/spacedrive",
- website: "https://spacedrive.com/",
- docs: "https://www.spacedrive.com/docs/product/getting-started/introduction",
- },
- logo: "spacedrive.png",
- tags: ["file-manager", "vdfs", "storage"],
- load: () => import("./spacedrive/index").then((m) => m.generate),
- },
- {
- id: "alist",
- name: "AList",
- version: "v3.41.0",
- description:
- "🗂️A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs.",
- logo: "alist.svg",
- links: {
- github: "https://github.com/AlistGo/alist",
- website: "https://alist.nn.ci",
- docs: "https://alist.nn.ci/guide/install/docker.html",
- },
- tags: ["file", "webdav", "storage"],
- load: () => import("./alist/index").then((m) => m.generate),
- },
- {
- id: "answer",
- name: "Answer",
- version: "v1.4.1",
- description:
- "Answer is an open-source Q&A platform for building a self-hosted question-and-answer service.",
- logo: "answer.png",
- links: {
- github: "https://github.com/apache/answer",
- website: "https://answer.apache.org/",
- docs: "https://answer.apache.org/docs",
- },
- tags: ["q&a", "self-hosted"],
- load: () => import("./answer/index").then((m) => m.generate),
- },
- {
- id: "shlink",
- name: "Shlink",
- version: "stable",
- description:
- "URL shortener that can be used to serve shortened URLs under your own domain.",
- logo: "shlink.svg",
- links: {
- github: "https://github.com/shlinkio/shlink",
- website: "https://shlink.io",
- docs: "https://shlink.io/documentation",
- },
- tags: ["sharing", "shortener", "url"],
- load: () => import("./shlink/index").then((m) => m.generate),
- },
- {
- id: "frappe-hr",
- name: "Frappe HR",
- version: "version-15",
- description:
- "Feature rich HR & Payroll software. 100% FOSS and customizable.",
- logo: "frappe-hr.svg",
- links: {
- github: "https://github.com/frappe/hrms",
- docs: "https://docs.frappe.io/hr",
- website: "https://frappe.io/hr",
- },
- tags: ["hrms", "payroll", "leaves", "expenses", "attendance", "performace"],
- load: () => import("./frappe-hr/index").then((m) => m.generate),
- },
- {
- id: "formbricks",
- name: "Formbricks",
- version: "v3.1.3",
- description:
- "Formbricks is an open-source survey and form platform for collecting user data.",
- logo: "formbricks.png",
- links: {
- github: "https://github.com/formbricks/formbricks",
- website: "https://formbricks.com/",
- docs: "https://formbricks.com/docs",
- },
- tags: ["forms", "analytics"],
- load: () => import("./formbricks/index").then((m) => m.generate),
- },
+ links: {
+ github: "https://github.com/nocodb/nocodb",
+ website: "https://nocodb.com/",
+ docs: "https://docs.nocodb.com/",
+ },
+ logo: "nocodb.png",
+ tags: ["database", "spreadsheet", "low-code", "nocode"],
+ load: () => import("./nocodb/index").then((m) => m.generate),
+ },
+ {
+ id: "meilisearch",
+ name: "Meilisearch",
+ version: "v1.8.3",
+ description:
+ "Meilisearch is a free and open-source search engine that allows you to easily add search functionality to your web applications.",
+ logo: "meilisearch.png",
+ links: {
+ github: "https://github.com/meilisearch/meilisearch",
+ website: "https://www.meilisearch.com/",
+ docs: "https://docs.meilisearch.com/",
+ },
+ tags: ["search"],
+ load: () => import("./meilisearch/index").then((m) => m.generate),
+ },
+ {
+ id: "phpmyadmin",
+ name: "Phpmyadmin",
+ version: "5.2.1",
+ description:
+ "Phpmyadmin is a free and open-source web interface for MySQL and MariaDB that allows you to manage your databases.",
+ logo: "phpmyadmin.png",
+ links: {
+ github: "https://github.com/phpmyadmin/phpmyadmin",
+ website: "https://www.phpmyadmin.net/",
+ docs: "https://www.phpmyadmin.net/docs/",
+ },
+ tags: ["database"],
+ load: () => import("./phpmyadmin/index").then((m) => m.generate),
+ },
+ {
+ id: "rocketchat",
+ name: "Rocketchat",
+ version: "6.9.2",
+ description:
+ "Rocket.Chat is a free and open-source web chat platform that allows you to build and manage your own chat applications.",
+ logo: "rocketchat.png",
+ links: {
+ github: "https://github.com/RocketChat/Rocket.Chat",
+ website: "https://rocket.chat/",
+ docs: "https://rocket.chat/docs/",
+ },
+ tags: ["chat"],
+ load: () => import("./rocketchat/index").then((m) => m.generate),
+ },
+ {
+ id: "minio",
+ name: "Minio",
+ description:
+ "Minio is an open source object storage server compatible with Amazon S3 cloud storage service.",
+ logo: "minio.png",
+ version: "latest",
+ links: {
+ github: "https://github.com/minio/minio",
+ website: "https://minio.io/",
+ docs: "https://docs.minio.io/",
+ },
+ tags: ["storage"],
+ load: () => import("./minio/index").then((m) => m.generate),
+ },
+ {
+ id: "metabase",
+ name: "Metabase",
+ version: "v0.50.8",
+ description:
+ "Metabase is an open source business intelligence tool that allows you to ask questions and visualize data.",
+ logo: "metabase.png",
+ links: {
+ github: "https://github.com/metabase/metabase",
+ website: "https://www.metabase.com/",
+ docs: "https://www.metabase.com/docs/",
+ },
+ tags: ["database", "dashboard"],
+ load: () => import("./metabase/index").then((m) => m.generate),
+ },
+ {
+ id: "glitchtip",
+ name: "Glitchtip",
+ version: "v4.0",
+ description: "Glitchtip is simple, open source error tracking",
+ logo: "glitchtip.png",
+ links: {
+ github: "https://gitlab.com/glitchtip/",
+ website: "https://glitchtip.com/",
+ docs: "https://glitchtip.com/documentation",
+ },
+ tags: ["hosting"],
+ load: () => import("./glitchtip/index").then((m) => m.generate),
+ },
+ {
+ id: "open-webui",
+ name: "Open WebUI",
+ version: "v0.3.7",
+ description:
+ "Open WebUI is a free and open source chatgpt alternative. Open WebUI is an extensible, feature-rich, and user-friendly self-hosted WebUI designed to operate entirely offline. It supports various LLM runners, including Ollama and OpenAI-compatible APIs. The template include ollama and webui services.",
+ logo: "open-webui.png",
+ links: {
+ github: "https://github.com/open-webui/open-webui",
+ website: "https://openwebui.com/",
+ docs: "https://docs.openwebui.com/",
+ },
+ tags: ["chat"],
+ load: () => import("./open-webui/index").then((m) => m.generate),
+ },
+ {
+ id: "listmonk",
+ name: "Listmonk",
+ version: "v3.0.0",
+ description:
+ "High performance, self-hosted, newsletter and mailing list manager with a modern dashboard.",
+ logo: "listmonk.png",
+ links: {
+ github: "https://github.com/knadh/listmonk",
+ website: "https://listmonk.app/",
+ docs: "https://listmonk.app/docs/",
+ },
+ tags: ["email", "newsletter", "mailing-list"],
+ load: () => import("./listmonk/index").then((m) => m.generate),
+ },
+ {
+ id: "doublezero",
+ name: "Double Zero",
+ version: "v0.2.1",
+ description:
+ "00 is a self hostable SES dashboard for sending and monitoring emails with AWS",
+ logo: "doublezero.svg",
+ links: {
+ github: "https://github.com/technomancy-dev/00",
+ website: "https://www.double-zero.cloud/",
+ docs: "https://github.com/technomancy-dev/00",
+ },
+ tags: ["email"],
+ load: () => import("./doublezero/index").then((m) => m.generate),
+ },
+ {
+ id: "umami",
+ name: "Umami",
+ version: "v2.14.0",
+ description:
+ "Umami is a simple, fast, privacy-focused alternative to Google Analytics.",
+ logo: "umami.png",
+ links: {
+ github: "https://github.com/umami-software/umami",
+ website: "https://umami.is",
+ docs: "https://umami.is/docs",
+ },
+ tags: ["analytics"],
+ load: () => import("./umami/index").then((m) => m.generate),
+ },
+ {
+ id: "jellyfin",
+ name: "jellyfin",
+ version: "v10.9.7",
+ description:
+ "Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. ",
+ logo: "jellyfin.svg",
+ links: {
+ github: "https://github.com/jellyfin/jellyfin",
+ website: "https://jellyfin.org/",
+ docs: "https://jellyfin.org/docs/",
+ },
+ tags: ["media system"],
+ load: () => import("./jellyfin/index").then((m) => m.generate),
+ },
+ {
+ id: "teable",
+ name: "teable",
+ version: "v1.3.1-alpha-build.460",
+ description:
+ "Teable is a Super fast, Real-time, Professional, Developer friendly, No-code database built on Postgres. It uses a simple, spreadsheet-like interface to create complex enterprise-level database applications. Unlock efficient app development with no-code, free from the hurdles of data security and scalability.",
+ logo: "teable.png",
+ links: {
+ github: "https://github.com/teableio/teable",
+ website: "https://teable.io/",
+ docs: "https://help.teable.io/",
+ },
+ tags: ["database", "spreadsheet", "low-code", "nocode"],
+ load: () => import("./teable/index").then((m) => m.generate),
+ },
+ {
+ id: "zipline",
+ name: "Zipline",
+ version: "v3.7.9",
+ description:
+ "A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!",
+ logo: "zipline.png",
+ links: {
+ github: "https://github.com/diced/zipline",
+ website: "https://zipline.diced.sh/",
+ docs: "https://zipline.diced.sh/docs/",
+ },
+ tags: ["media system", "storage"],
+ load: () => import("./zipline/index").then((m) => m.generate),
+ },
+ {
+ id: "soketi",
+ name: "Soketi",
+ version: "v1.6.1-16",
+ description:
+ "Soketi is your simple, fast, and resilient open-source WebSockets server.",
+ logo: "soketi.png",
+ links: {
+ github: "https://github.com/soketi/soketi",
+ website: "https://soketi.app/",
+ docs: "https://docs.soketi.app/",
+ },
+ tags: ["chat"],
+ load: () => import("./soketi/index").then((m) => m.generate),
+ },
+ {
+ id: "aptabase",
+ name: "Aptabase",
+ version: "v1.0.0",
+ description:
+ "Aptabase is a self-hosted web analytics platform that lets you track website traffic and user behavior.",
+ logo: "aptabase.svg",
+ links: {
+ github: "https://github.com/aptabase/aptabase",
+ website: "https://aptabase.com/",
+ docs: "https://github.com/aptabase/aptabase/blob/main/README.md",
+ },
+ tags: ["analytics", "self-hosted"],
+ load: () => import("./aptabase/index").then((m) => m.generate),
+ },
+ {
+ id: "typebot",
+ name: "Typebot",
+ version: "2.27.0",
+ description: "Typebot is an open-source chatbot builder platform.",
+ logo: "typebot.svg",
+ links: {
+ github: "https://github.com/baptisteArno/typebot.io",
+ website: "https://typebot.io/",
+ docs: "https://docs.typebot.io/get-started/introduction",
+ },
+ tags: ["chatbot", "builder", "open-source"],
+ load: () => import("./typebot/index").then((m) => m.generate),
+ },
+ {
+ id: "gitea",
+ name: "Gitea",
+ version: "1.22.3",
+ description:
+ "Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD.",
+ logo: "gitea.png",
+ links: {
+ github: "https://github.com/go-gitea/gitea.git",
+ website: "https://gitea.com/",
+ docs: "https://docs.gitea.com/installation/install-with-docker",
+ },
+ tags: ["self-hosted", "storage"],
+ load: () => import("./gitea/index").then((m) => m.generate),
+ },
+ {
+ id: "roundcube",
+ name: "Roundcube",
+ version: "1.6.9",
+ description:
+ "Free and open source webmail software for the masses, written in PHP.",
+ logo: "roundcube.svg",
+ links: {
+ github: "https://github.com/roundcube/roundcubemail",
+ website: "https://roundcube.net/",
+ docs: "https://roundcube.net/about/",
+ },
+ tags: ["self-hosted", "email", "webmail"],
+ load: () => import("./roundcube/index").then((m) => m.generate),
+ },
+ {
+ id: "filebrowser",
+ name: "File Browser",
+ version: "2.31.2",
+ description:
+ "Filebrowser is a standalone file manager for uploading, deleting, previewing, renaming, and editing files, with support for multiple users, each with their own directory.",
+ logo: "filebrowser.svg",
+ links: {
+ github: "https://github.com/filebrowser/filebrowser",
+ website: "https://filebrowser.org/",
+ docs: "https://filebrowser.org/",
+ },
+ tags: ["file-manager", "storage"],
+ load: () => import("./filebrowser/index").then((m) => m.generate),
+ },
+ {
+ id: "tolgee",
+ name: "Tolgee",
+ version: "v3.80.4",
+ description:
+ "Developer & translator friendly web-based localization platform",
+ logo: "tolgee.svg",
+ links: {
+ github: "https://github.com/tolgee/tolgee-platform",
+ website: "https://tolgee.io",
+ docs: "https://tolgee.io/platform",
+ },
+ tags: ["self-hosted", "i18n", "localization", "translations"],
+ load: () => import("./tolgee/index").then((m) => m.generate),
+ },
+ {
+ id: "portainer",
+ name: "Portainer",
+ version: "2.21.4",
+ description:
+ "Portainer is a container management tool for deploying, troubleshooting, and securing applications across cloud, data centers, and IoT.",
+ logo: "portainer.svg",
+ links: {
+ github: "https://github.com/portainer/portainer",
+ website: "https://www.portainer.io/",
+ docs: "https://docs.portainer.io/",
+ },
+ tags: ["cloud", "monitoring"],
+ load: () => import("./portainer/index").then((m) => m.generate),
+ },
+ {
+ id: "influxdb",
+ name: "InfluxDB",
+ version: "2.7.10",
+ description:
+ "InfluxDB 2.7 is the platform purpose-built to collect, store, process and visualize time series data.",
+ logo: "influxdb.png",
+ links: {
+ github: "https://github.com/influxdata/influxdb",
+ website: "https://www.influxdata.com/",
+ docs: "https://docs.influxdata.com/influxdb/v2/",
+ },
+ tags: ["self-hosted", "open-source", "storage", "database"],
+ load: () => import("./influxdb/index").then((m) => m.generate),
+ },
+ {
+ id: "infisical",
+ name: "Infisical",
+ version: "0.90.1",
+ description:
+ "All-in-one platform to securely manage application configuration and secrets across your team and infrastructure.",
+ logo: "infisical.jpg",
+ links: {
+ github: "https://github.com/Infisical/infisical",
+ website: "https://infisical.com/",
+ docs: "https://infisical.com/docs/documentation/getting-started/introduction",
+ },
+ tags: ["self-hosted", "open-source"],
+ load: () => import("./infisical/index").then((m) => m.generate),
+ },
+ {
+ id: "docmost",
+ name: "Docmost",
+ version: "0.4.1",
+ description:
+ "Docmost, is an open-source collaborative wiki and documentation software.",
+ logo: "docmost.png",
+ links: {
+ github: "https://github.com/docmost/docmost",
+ website: "https://docmost.com/",
+ docs: "https://docmost.com/docs/",
+ },
+ tags: ["self-hosted", "open-source", "manager"],
+ load: () => import("./docmost/index").then((m) => m.generate),
+ },
+ {
+ id: "vaultwarden",
+ name: "Vaultwarden",
+ version: "1.32.7",
+ description:
+ "Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs",
+ logo: "vaultwarden.svg",
+ links: {
+ github: "https://github.com/dani-garcia/vaultwarden",
+ website: "",
+ docs: "https://github.com/dani-garcia/vaultwarden/wiki",
+ },
+ tags: ["open-source"],
+ load: () => import("./vaultwarden/index").then((m) => m.generate),
+ },
+ {
+ id: "hi-events",
+ name: "Hi.events",
+ version: "0.8.0-beta.1",
+ description:
+ "Hi.Events is a self-hosted event management and ticket selling platform that allows you to create, manage and promote events easily.",
+ logo: "hi-events.svg",
+ links: {
+ github: "https://github.com/HiEventsDev/hi.events",
+ website: "https://hi.events/",
+ docs: "https://hi.events/docs",
+ },
+ tags: ["self-hosted", "open-source", "manager"],
+ load: () => import("./hi-events/index").then((m) => m.generate),
+ },
+ {
+ id: "windows",
+ name: "Windows (dockerized)",
+ version: "4.00",
+ description: "Windows inside a Docker container.",
+ logo: "windows.png",
+ links: {
+ github: "https://github.com/dockur/windows",
+ website: "",
+ docs: "https://github.com/dockur/windows?tab=readme-ov-file#how-do-i-use-it",
+ },
+ tags: ["self-hosted", "open-source", "os"],
+ load: () => import("./windows/index").then((m) => m.generate),
+ },
+ {
+ id: "macos",
+ name: "MacOS (dockerized)",
+ version: "1.14",
+ description: "MacOS inside a Docker container.",
+ logo: "macos.png",
+ links: {
+ github: "https://github.com/dockur/macos",
+ website: "",
+ docs: "https://github.com/dockur/macos?tab=readme-ov-file#how-do-i-use-it",
+ },
+ tags: ["self-hosted", "open-source", "os"],
+ load: () => import("./macos/index").then((m) => m.generate),
+ },
+ {
+ id: "coder",
+ name: "Coder",
+ version: "2.15.3",
+ description:
+ "Coder is an open-source cloud development environment (CDE) that you host in your cloud or on-premises.",
+ logo: "coder.svg",
+ links: {
+ github: "https://github.com/coder/coder",
+ website: "https://coder.com/",
+ docs: "https://coder.com/docs",
+ },
+ tags: ["self-hosted", "open-source", "builder"],
+ load: () => import("./coder/index").then((m) => m.generate),
+ },
+ {
+ id: "stirling",
+ name: "Stirling PDF",
+ version: "0.30.1",
+ description: "A locally hosted one-stop shop for all your PDF needs",
+ logo: "stirling.svg",
+ links: {
+ github: "https://github.com/Stirling-Tools/Stirling-PDF",
+ website: "https://www.stirlingpdf.com/",
+ docs: "https://docs.stirlingpdf.com/",
+ },
+ tags: ["pdf", "tools"],
+ load: () => import("./stirling/index").then((m) => m.generate),
+ },
+ {
+ id: "lobe-chat",
+ name: "Lobe Chat",
+ version: "v1.26.1",
+ description: "Lobe Chat - an open-source, modern-design AI chat framework.",
+ logo: "lobe-chat.png",
+ links: {
+ github: "https://github.com/lobehub/lobe-chat",
+ website: "https://chat-preview.lobehub.com/",
+ docs: "https://lobehub.com/docs/self-hosting/platform/docker-compose",
+ },
+ tags: ["IA", "chat"],
+ load: () => import("./lobe-chat/index").then((m) => m.generate),
+ },
+ {
+ id: "peppermint",
+ name: "Peppermint",
+ version: "latest",
+ description:
+ "Peppermint is a modern, open-source API development platform that helps you build, test and document your APIs.",
+ logo: "peppermint.svg",
+ links: {
+ github: "https://github.com/Peppermint-Lab/peppermint",
+ website: "https://peppermint.sh/",
+ docs: "https://docs.peppermint.sh/",
+ },
+ tags: ["api", "development", "documentation"],
+ load: () => import("./peppermint/index").then((m) => m.generate),
+ },
+ {
+ id: "windmill",
+ name: "Windmill",
+ version: "latest",
+ description:
+ "A developer platform to build production-grade workflows and internal apps. Open-source alternative to Airplane, Retool, and GitHub Actions.",
+ logo: "windmill.svg",
+ links: {
+ github: "https://github.com/windmill-labs/windmill",
+ website: "https://www.windmill.dev/",
+ docs: "https://docs.windmill.dev/",
+ },
+ tags: ["workflow", "automation", "development"],
+ load: () => import("./windmill/index").then((m) => m.generate),
+ },
+ {
+ id: "activepieces",
+ name: "Activepieces",
+ version: "0.35.0",
+ description:
+ "Open-source no-code business automation tool. An alternative to Zapier, Make.com, and Tray.",
+ logo: "activepieces.svg",
+ links: {
+ github: "https://github.com/activepieces/activepieces",
+ website: "https://www.activepieces.com/",
+ docs: "https://www.activepieces.com/docs",
+ },
+ tags: ["automation", "workflow", "no-code"],
+ load: () => import("./activepieces/index").then((m) => m.generate),
+ },
+ {
+ id: "invoiceshelf",
+ name: "InvoiceShelf",
+ version: "latest",
+ description:
+ "InvoiceShelf is a self-hosted open source invoicing system for freelancers and small businesses.",
+ logo: "invoiceshelf.png",
+ links: {
+ github: "https://github.com/InvoiceShelf/invoiceshelf",
+ website: "https://invoiceshelf.com",
+ docs: "https://github.com/InvoiceShelf/invoiceshelf#readme",
+ },
+ tags: ["invoice", "business", "finance"],
+ load: () => import("./invoiceshelf/index").then((m) => m.generate),
+ },
+ {
+ id: "postiz",
+ name: "Postiz",
+ version: "latest",
+ description:
+ "Postiz is a modern, open-source platform for managing and publishing content across multiple channels.",
+ logo: "postiz.png",
+ links: {
+ github: "https://github.com/gitroomhq/postiz",
+ website: "https://postiz.com",
+ docs: "https://docs.postiz.com",
+ },
+ tags: ["cms", "content-management", "publishing"],
+ load: () => import("./postiz/index").then((m) => m.generate),
+ },
+ {
+ id: "slash",
+ name: "Slash",
+ version: "latest",
+ description:
+ "Slash is a modern, self-hosted bookmarking service and link shortener that helps you organize and share your favorite links.",
+ logo: "slash.png",
+ links: {
+ github: "https://github.com/yourselfhosted/slash",
+ website: "https://github.com/yourselfhosted/slash#readme",
+ docs: "https://github.com/yourselfhosted/slash/wiki",
+ },
+ tags: ["bookmarks", "link-shortener", "self-hosted"],
+ load: () => import("./slash/index").then((m) => m.generate),
+ },
+ {
+ id: "discord-tickets",
+ name: "Discord Tickets",
+ version: "4.0.21",
+ description:
+ "An open-source Discord bot for creating and managing support ticket channels.",
+ logo: "discord-tickets.png",
+ links: {
+ github: "https://github.com/discord-tickets/bot",
+ website: "https://discordtickets.app",
+ docs: "https://discordtickets.app/self-hosting/installation/docker/",
+ },
+ tags: ["discord", "tickets", "support"],
+ load: () => import("./discord-tickets/index").then((m) => m.generate),
+ },
+ {
+ id: "nextcloud-aio",
+ name: "Nextcloud All in One",
+ version: "30.0.2",
+ description:
+ "Nextcloud (AIO) is a self-hosted file storage and sync platform with powerful collaboration capabilities. It integrates Files, Talk, Groupware, Office, Assistant and more into a single platform for remote work and data protection.",
+ logo: "nextcloud-aio.svg",
+ links: {
+ github: "https://github.com/nextcloud/docker",
+ website: "https://nextcloud.com/",
+ docs: "https://docs.nextcloud.com/",
+ },
+ tags: ["file-manager", "sync"],
+ load: () => import("./nextcloud-aio/index").then((m) => m.generate),
+ },
+ {
+ id: "blender",
+ name: "Blender",
+ version: "latest",
+ description:
+ "Blender is a free and open-source 3D creation suite. It supports the entire 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing and motion tracking, video editing and 2D animation pipeline.",
+ logo: "blender.svg",
+ links: {
+ github: "https://github.com/linuxserver/docker-blender",
+ website: "https://www.blender.org/",
+ docs: "https://docs.blender.org/",
+ },
+ tags: ["3d", "rendering", "animation"],
+ load: () => import("./blender/index").then((m) => m.generate),
+ },
+ {
+ id: "heyform",
+ name: "HeyForm",
+ version: "latest",
+ description:
+ "Allows anyone to create engaging conversational forms for surveys, questionnaires, quizzes, and polls. No coding skills required.",
+ logo: "heyform.svg",
+ links: {
+ github: "https://github.com/heyform/heyform",
+ website: "https://heyform.net",
+ docs: "https://docs.heyform.net",
+ },
+ tags: ["form", "builder", "questionnaire", "quiz", "survey"],
+ load: () => import("./heyform/index").then((m) => m.generate),
+ },
+ {
+ id: "chatwoot",
+ name: "Chatwoot",
+ version: "v3.14.1",
+ description:
+ "Open-source customer engagement platform that provides a shared inbox for teams, live chat, and omnichannel support.",
+ logo: "chatwoot.svg",
+ links: {
+ github: "https://github.com/chatwoot/chatwoot",
+ website: "https://www.chatwoot.com",
+ docs: "https://www.chatwoot.com/docs",
+ },
+ tags: ["support", "chat", "customer-service"],
+ load: () => import("./chatwoot/index").then((m) => m.generate),
+ },
+ {
+ id: "discourse",
+ name: "Discourse",
+ version: "3.3.2",
+ description:
+ "Discourse is a modern forum software for your community. Use it as a mailing list, discussion forum, or long-form chat room.",
+ logo: "discourse.svg",
+ links: {
+ github: "https://github.com/discourse/discourse",
+ website: "https://www.discourse.org/",
+ docs: "https://meta.discourse.org/",
+ },
+ tags: ["forum", "community", "discussion"],
+ load: () => import("./discourse/index").then((m) => m.generate),
+ },
+ {
+ id: "immich",
+ name: "Immich",
+ version: "v1.121.0",
+ description:
+ "High performance self-hosted photo and video backup solution directly from your mobile phone.",
+ logo: "immich.svg",
+ links: {
+ github: "https://github.com/immich-app/immich",
+ website: "https://immich.app/",
+ docs: "https://immich.app/docs/overview/introduction",
+ },
+ tags: ["photos", "videos", "backup", "media"],
+ load: () => import("./immich/index").then((m) => m.generate),
+ },
+ {
+ id: "twenty",
+ name: "Twenty CRM",
+ version: "latest",
+ description:
+ "Twenty is a modern CRM offering a powerful spreadsheet interface and open-source alternative to Salesforce.",
+ logo: "twenty.svg",
+ links: {
+ github: "https://github.com/twentyhq/twenty",
+ website: "https://twenty.com",
+ docs: "https://docs.twenty.com",
+ },
+ tags: ["crm", "sales", "business"],
+ load: () => import("./twenty/index").then((m) => m.generate),
+ },
+ {
+ id: "yourls",
+ name: "YOURLS",
+ version: "1.9.2",
+ description:
+ "YOURLS (Your Own URL Shortener) is a set of PHP scripts that will allow you to run your own URL shortening service (a la TinyURL or Bitly).",
+ logo: "yourls.svg",
+ links: {
+ github: "https://github.com/YOURLS/YOURLS",
+ website: "https://yourls.org/",
+ docs: "https://yourls.org/#documentation",
+ },
+ tags: ["url-shortener", "php"],
+ load: () => import("./yourls/index").then((m) => m.generate),
+ },
+ {
+ id: "ryot",
+ name: "Ryot",
+ version: "v7.10",
+ description:
+ "A self-hosted platform for tracking various media types including movies, TV shows, video games, books, audiobooks, and more.",
+ logo: "ryot.png",
+ links: {
+ github: "https://github.com/IgnisDa/ryot",
+ website: "https://ryot.io/",
+ docs: "https://docs.ryot.io/",
+ },
+ tags: ["media", "tracking", "self-hosted"],
+ load: () => import("./ryot/index").then((m) => m.generate),
+ },
+ {
+ id: "photoprism",
+ name: "Photoprism",
+ version: "latest",
+ description:
+ "PhotoPrism® is an AI-Powered Photos App for the Decentralized Web. It makes use of the latest technologies to tag and find pictures automatically without getting in your way.",
+ logo: "photoprism.svg",
+ links: {
+ github: "https://github.com/photoprism/photoprism",
+ website: "https://www.photoprism.app/",
+ docs: "https://docs.photoprism.app/",
+ },
+ tags: ["media", "photos", "self-hosted"],
+ load: () => import("./photoprism/index").then((m) => m.generate),
+ },
+ {
+ id: "ontime",
+ name: "Ontime",
+ version: "v3.8.0",
+ description:
+ "Ontime is browser-based application that manages event rundowns, scheduliing and cuing",
+ logo: "ontime.png",
+ links: {
+ github: "https://github.com/cpvalente/ontime/",
+ website: "https://getontime.no",
+ docs: "https://docs.getontime.no",
+ },
+ tags: ["event"],
+ load: () => import("./ontime/index").then((m) => m.generate),
+ },
+ {
+ id: "triggerdotdev",
+ name: "Trigger.dev",
+ version: "v3",
+ description:
+ "Trigger is a platform for building event-driven applications.",
+ logo: "triggerdotdev.svg",
+ links: {
+ github: "https://github.com/triggerdotdev/trigger.dev",
+ website: "https://trigger.dev/",
+ docs: "https://trigger.dev/docs",
+ },
+ tags: ["event-driven", "applications"],
+ load: () => import("./triggerdotdev/index").then((m) => m.generate),
+ },
+ {
+ id: "browserless",
+ name: "Browserless",
+ version: "2.23.0",
+ description:
+ "Browserless allows remote clients to connect and execute headless work, all inside of docker. It supports the standard, unforked Puppeteer and Playwright libraries, as well offering REST-based APIs for common actions like data collection, PDF generation and more.",
+ logo: "browserless.svg",
+ links: {
+ github: "https://github.com/browserless/browserless",
+ website: "https://www.browserless.io/",
+ docs: "https://docs.browserless.io/",
+ },
+ tags: ["browser", "automation"],
+ load: () => import("./browserless/index").then((m) => m.generate),
+ },
+ {
+ id: "drawio",
+ name: "draw.io",
+ version: "24.7.17",
+ description:
+ "draw.io is a configurable diagramming/whiteboarding visualization application.",
+ logo: "drawio.svg",
+ links: {
+ github: "https://github.com/jgraph/drawio",
+ website: "https://draw.io/",
+ docs: "https://www.drawio.com/doc/",
+ },
+ tags: ["drawing", "diagrams"],
+ load: () => import("./drawio/index").then((m) => m.generate),
+ },
+ {
+ id: "kimai",
+ name: "Kimai",
+ version: "2.26.0",
+ description:
+ "Kimai is a web-based multi-user time-tracking application. Works great for everyone: freelancers, companies, organizations - everyone can track their times, generate reports, create invoices and do so much more.",
+ logo: "kimai.svg",
+ links: {
+ github: "https://github.com/kimai/kimai",
+ website: "https://www.kimai.org",
+ docs: "https://www.kimai.org/documentation",
+ },
+ tags: ["invoice", "business", "finance"],
+ load: () => import("./kimai/index").then((m) => m.generate),
+ },
+ {
+ id: "logto",
+ name: "Logto",
+ version: "1.22.0",
+ description:
+ "Logto is an open-source Identity and Access Management (IAM) platform designed to streamline Customer Identity and Access Management (CIAM) and Workforce Identity Management.",
+ logo: "logto.png",
+ links: {
+ github: "https://github.com/logto-io/logto",
+ website: "https://logto.io/",
+ docs: "https://docs.logto.io/introduction",
+ },
+ tags: ["identity", "auth"],
+ load: () => import("./logto/index").then((m) => m.generate),
+ },
+ {
+ id: "penpot",
+ name: "Penpot",
+ version: "2.3.2",
+ description:
+ "Penpot is the web-based open-source design tool that bridges the gap between designers and developers.",
+ logo: "penpot.svg",
+ links: {
+ github: "https://github.com/penpot/penpot",
+ website: "https://penpot.app/",
+ docs: "https://docs.penpot.app/",
+ },
+ tags: ["design", "collaboration"],
+ load: () => import("./penpot/index").then((m) => m.generate),
+ },
+ {
+ id: "huly",
+ name: "Huly",
+ version: "0.6.377",
+ description:
+ "Huly — All-in-One Project Management Platform (alternative to Linear, Jira, Slack, Notion, Motion)",
+ logo: "huly.svg",
+ links: {
+ github: "https://github.com/hcengineering/huly-selfhost",
+ website: "https://huly.io/",
+ docs: "https://docs.huly.io/",
+ },
+ tags: ["project-management", "community", "discussion"],
+ load: () => import("./huly/index").then((m) => m.generate),
+ },
+ {
+ id: "unsend",
+ name: "Unsend",
+ version: "v1.3.2",
+ description: "Open source alternative to Resend,Sendgrid, Postmark etc. ",
+ logo: "unsend.png",
+ links: {
+ github: "https://github.com/unsend-dev/unsend",
+ website: "https://unsend.dev/",
+ docs: "https://docs.unsend.dev/get-started/",
+ },
+ tags: ["e-mail", "marketing", "business"],
+ load: () => import("./unsend/index").then((m) => m.generate),
+ },
+ {
+ id: "langflow",
+ name: "Langflow",
+ version: "1.1.1",
+ description:
+ "Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database. ",
+ logo: "langflow.svg",
+ links: {
+ github: "https://github.com/langflow-ai/langflow/tree/main",
+ website: "https://www.langflow.org/",
+ docs: "https://docs.langflow.org/",
+ },
+ tags: ["ai"],
+ load: () => import("./langflow/index").then((m) => m.generate),
+ },
+ {
+ id: "elastic-search",
+ name: "Elasticsearch",
+ version: "8.10.2",
+ description:
+ "Elasticsearch is an open-source search and analytics engine, used for full-text search and analytics on structured data such as text, web pages, images, and videos.",
+ logo: "elasticsearch.svg",
+ links: {
+ github: "https://github.com/elastic/elasticsearch",
+ website: "https://www.elastic.co/elasticsearch/",
+ docs: "https://docs.elastic.co/elasticsearch/",
+ },
+ tags: ["search", "analytics"],
+ load: () => import("./elastic-search/index").then((m) => m.generate),
+ },
+ {
+ id: "onedev",
+ name: "OneDev",
+ version: "11.6.6",
+ description:
+ "Git server with CI/CD, kanban, and packages. Seamless integration. Unparalleled experience.",
+ logo: "onedev.png",
+ links: {
+ github: "https://github.com/theonedev/onedev/",
+ website: "https://onedev.io/",
+ docs: "https://docs.onedev.io/",
+ },
+ tags: ["self-hosted", "development"],
+ load: () => import("./onedev/index").then((m) => m.generate),
+ },
+ {
+ id: "unifi",
+ name: "Unifi Network",
+ version: "11.6.6",
+ description:
+ "Unifi Network is an open-source enterprise network management platform for wireless networks.",
+ logo: "unifi.webp",
+ links: {
+ github: "https://github.com/ubiquiti",
+ website: "https://www.ui.com/",
+ docs: "https://help.ui.com/hc/en-us/articles/360012282453-Self-Hosting-a-UniFi-Network-Server",
+ },
+ tags: ["self-hosted", "networking"],
+ load: () => import("./unifi/index").then((m) => m.generate),
+ },
+ {
+ id: "glpi",
+ name: "GLPI Project",
+ version: "10.0.16",
+ description: "The most complete open source service management software",
+ logo: "glpi.webp",
+ links: {
+ github: "https://github.com/glpi-project/glpi",
+ website: "https://glpi-project.org/",
+ docs: "https://glpi-project.org/documentation/",
+ },
+ tags: ["self-hosted", "project-management", "management"],
+ load: () => import("./glpi/index").then((m) => m.generate),
+ },
+ {
+ id: "checkmate",
+ name: "Checkmate",
+ version: "2.0.1",
+ description:
+ "Checkmate is an open-source, self-hosted tool designed to track and monitor server hardware, uptime, response times, and incidents in real-time with beautiful visualizations.",
+ logo: "checkmate.png",
+ links: {
+ github: "https://github.com/bluewave-labs/checkmate",
+ website: "https://bluewavelabs.ca",
+ docs: "https://bluewavelabs.gitbook.io/checkmate",
+ },
+ tags: ["self-hosted", "monitoring", "uptime"],
+ load: () => import("./checkmate/index").then((m) => m.generate),
+ },
+ {
+ id: "gotenberg",
+ name: "Gotenberg",
+ version: "latest",
+ description: "Gotenberg is a Docker-powered stateless API for PDF files.",
+ logo: "gotenberg.png",
+ links: {
+ github: "https://github.com/gotenberg/gotenberg",
+ website: "https://gotenberg.dev",
+ docs: "https://gotenberg.dev/docs/getting-started/introduction",
+ },
+ tags: ["api", "backend", "pdf", "tools"],
+ load: () => import("./gotenberg/index").then((m) => m.generate),
+ },
+ {
+ id: "actualbudget",
+ name: "Actual Budget",
+ version: "latest",
+ description:
+ "A super fast and privacy-focused app for managing your finances.",
+ logo: "actualbudget.png",
+ links: {
+ github: "https://github.com/actualbudget/actual",
+ website: "https://actualbudget.org",
+ docs: "https://actualbudget.org/docs",
+ },
+ tags: ["budgeting", "finance", "money"],
+ load: () => import("./actualbudget/index").then((m) => m.generate),
+ },
+ {
+ id: "conduit",
+ name: "Conduit",
+ version: "v0.9.0",
+ description:
+ "Conduit is a simple, fast and reliable chat server powered by Matrix",
+ logo: "conduit.svg",
+ links: {
+ github: "https://gitlab.com/famedly/conduit",
+ website: "https://conduit.rs/",
+ docs: "https://docs.conduit.rs/",
+ },
+ tags: ["matrix", "communication"],
+ load: () => import("./conduit/index").then((m) => m.generate),
+ },
+ {
+ id: "evolutionapi",
+ name: "Evolution API",
+ version: "v2.1.2",
+ description:
+ "Evolution API is a robust platform dedicated to empowering small businesses with limited resources, going beyond a simple messaging solution via WhatsApp.",
+ logo: "evolutionapi.png",
+ links: {
+ github: "https://github.com/EvolutionAPI/evolution-api",
+ docs: "https://doc.evolution-api.com/v2/en/get-started/introduction",
+ website: "https://evolution-api.com/opensource-whatsapp-api/",
+ },
+ tags: ["api", "whatsapp", "messaging"],
+ load: () => import("./evolutionapi/index").then((m) => m.generate),
+ },
+ {
+ id: "conduwuit",
+ name: "Conduwuit",
+ version: "latest",
+ description:
+ "Well-maintained, featureful Matrix chat homeserver (fork of Conduit)",
+ logo: "conduwuit.svg",
+ links: {
+ github: "https://github.com/girlbossceo/conduwuit",
+ website: "https://conduwuit.puppyirl.gay",
+ docs: "https://conduwuit.puppyirl.gay/configuration.html",
+ },
+ tags: ["backend", "chat", "communication", "matrix", "server"],
+ load: () => import("./conduwuit/index").then((m) => m.generate),
+ },
+ {
+ id: "cloudflared",
+ name: "Cloudflared",
+ version: "latest",
+ description:
+ "A lightweight daemon that securely connects local services to the internet through Cloudflare Tunnel.",
+ logo: "cloudflared.svg",
+ links: {
+ github: "https://github.com/cloudflare/cloudflared",
+ website:
+ "https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/",
+ docs: "https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/",
+ },
+ tags: ["cloud", "networking", "security", "tunnel"],
+ load: () => import("./cloudflared/index").then((m) => m.generate),
+ },
+ {
+ id: "couchdb",
+ name: "CouchDB",
+ version: "latest",
+ description:
+ "CouchDB is a document-oriented NoSQL database that excels at replication and horizontal scaling.",
+ logo: "couchdb.png",
+ links: {
+ github: "https://github.com/apache/couchdb",
+ website: "https://couchdb.apache.org/",
+ docs: "https://docs.couchdb.org/en/stable/",
+ },
+ tags: ["database", "storage"],
+ load: () => import("./couchdb/index").then((m) => m.generate),
+ },
+ {
+ id: "it-tools",
+ name: "IT Tools",
+ version: "latest",
+ description: "A collection of handy online it-tools for developers.",
+ logo: "it-tools.svg",
+ links: {
+ github: "https://github.com/CorentinTh/it-tools",
+ website: "https://it-tools.tech",
+ },
+ tags: ["developer", "tools"],
+ load: () => import("./it-tools/index").then((m) => m.generate),
+ },
+ {
+ id: "superset",
+ name: "Superset (Unofficial)",
+ version: "latest",
+ description: "Data visualization and data exploration platform.",
+ logo: "superset.svg",
+ links: {
+ github: "https://github.com/amancevice/docker-superset",
+ website: "https://superset.apache.org",
+ docs: "https://superset.apache.org/docs/intro",
+ },
+ tags: ["analytics", "bi", "dashboard", "database", "sql"],
+ load: () => import("./superset/index").then((m) => m.generate),
+ },
+ {
+ id: "glance",
+ name: "Glance",
+ version: "latest",
+ description:
+ "A self-hosted dashboard that puts all your feeds in one place. Features RSS feeds, weather, bookmarks, site monitoring, and more in a minimal, fast interface.",
+ logo: "glance.png",
+ links: {
+ github: "https://github.com/glanceapp/glance",
+ docs: "https://github.com/glanceapp/glance/blob/main/docs/configuration.md",
+ },
+ tags: ["dashboard", "monitoring", "widgets", "rss"],
+ load: () => import("./glance/index").then((m) => m.generate),
+ },
+ {
+ id: "homarr",
+ name: "Homarr",
+ version: "latest",
+ description:
+ "A sleek, modern dashboard that puts all your apps and services in one place with Docker integration.",
+ logo: "homarr.png",
+ links: {
+ github: "https://github.com/homarr-labs/homarr",
+ docs: "https://homarr.dev/docs/getting-started/installation/docker",
+ website: "https://homarr.dev/",
+ },
+ tags: ["dashboard", "monitoring"],
+ load: () => import("./homarr/index").then((m) => m.generate),
+ },
+ {
+ id: "erpnext",
+ name: "ERPNext",
+ version: "version-15",
+ description: "100% Open Source and highly customizable ERP software.",
+ logo: "erpnext.svg",
+ links: {
+ github: "https://github.com/frappe/erpnext",
+ docs: "https://docs.frappe.io/erpnext",
+ website: "https://erpnext.com",
+ },
+ tags: [
+ "erp",
+ "accounts",
+ "manufacturing",
+ "retail",
+ "sales",
+ "pos",
+ "hrms",
+ ],
+ load: () => import("./erpnext/index").then((m) => m.generate),
+ },
+ {
+ id: "maybe",
+ name: "Maybe",
+ version: "latest",
+ description:
+ "Maybe is a self-hosted finance tracking application designed to simplify budgeting and expenses.",
+ logo: "maybe.svg",
+ links: {
+ github: "https://github.com/maybe-finance/maybe",
+ website: "https://maybe.finance/",
+ docs: "https://docs.maybe.finance/",
+ },
+ tags: ["finance", "self-hosted"],
+ load: () => import("./maybe/index").then((m) => m.generate),
+ },
+ {
+ id: "spacedrive",
+ name: "Spacedrive",
+ version: "latest",
+ description:
+ "Spacedrive is a cross-platform file manager. It connects your devices together to help you organize files from anywhere. powered by a virtual distributed filesystem (VDFS) written in Rust. Organize files across many devices in one place.",
+ links: {
+ github: "https://github.com/spacedriveapp/spacedrive",
+ website: "https://spacedrive.com/",
+ docs: "https://www.spacedrive.com/docs/product/getting-started/introduction",
+ },
+ logo: "spacedrive.png",
+ tags: ["file-manager", "vdfs", "storage"],
+ load: () => import("./spacedrive/index").then((m) => m.generate),
+ },
+ {
+ id: "alist",
+ name: "AList",
+ version: "v3.41.0",
+ description:
+ "🗂️A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs.",
+ logo: "alist.svg",
+ links: {
+ github: "https://github.com/AlistGo/alist",
+ website: "https://alist.nn.ci",
+ docs: "https://alist.nn.ci/guide/install/docker.html",
+ },
+ tags: ["file", "webdav", "storage"],
+ load: () => import("./alist/index").then((m) => m.generate),
+ },
+ {
+ id: "answer",
+ name: "Answer",
+ version: "v1.4.1",
+ description:
+ "Answer is an open-source Q&A platform for building a self-hosted question-and-answer service.",
+ logo: "answer.png",
+ links: {
+ github: "https://github.com/apache/answer",
+ website: "https://answer.apache.org/",
+ docs: "https://answer.apache.org/docs",
+ },
+ tags: ["q&a", "self-hosted"],
+ load: () => import("./answer/index").then((m) => m.generate),
+ },
+ {
+ id: "shlink",
+ name: "Shlink",
+ version: "stable",
+ description:
+ "URL shortener that can be used to serve shortened URLs under your own domain.",
+ logo: "shlink.svg",
+ links: {
+ github: "https://github.com/shlinkio/shlink",
+ website: "https://shlink.io",
+ docs: "https://shlink.io/documentation",
+ },
+ tags: ["sharing", "shortener", "url"],
+ load: () => import("./shlink/index").then((m) => m.generate),
+ },
+ {
+ id: "frappe-hr",
+ name: "Frappe HR",
+ version: "version-15",
+ description:
+ "Feature rich HR & Payroll software. 100% FOSS and customizable.",
+ logo: "frappe-hr.svg",
+ links: {
+ github: "https://github.com/frappe/hrms",
+ docs: "https://docs.frappe.io/hr",
+ website: "https://frappe.io/hr",
+ },
+ tags: ["hrms", "payroll", "leaves", "expenses", "attendance", "performace"],
+ load: () => import("./frappe-hr/index").then((m) => m.generate),
+ },
+ {
+ id: "formbricks",
+ name: "Formbricks",
+ version: "v3.1.3",
+ description:
+ "Formbricks is an open-source survey and form platform for collecting user data.",
+ logo: "formbricks.png",
+ links: {
+ github: "https://github.com/formbricks/formbricks",
+ website: "https://formbricks.com/",
+ docs: "https://formbricks.com/docs",
+ },
+ tags: ["forms", "analytics"],
+ load: () => import("./formbricks/index").then((m) => m.generate),
+ },
+ {
+ id: "convex",
+ name: "Convex",
+ version: "latest",
+ description:
+ "Convex is an open-source reactive database designed to make life easy for web app developers.",
+ logo: "convex.svg",
+ links: {
+ github: "https://github.com/get-convex/convex",
+ website: "https://www.convex.dev/",
+ docs: "https://www.convex.dev/docs",
+ },
+ tags: ["backend", "database", "api"],
+ load: () => import("./convex/index").then((m) => m.generate),
+ },
];
From ca217affe66d860381100417b286615189e90d38 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Fri, 14 Feb 2025 02:18:53 -0600
Subject: [PATCH 026/126] feat: update references
---
.../dashboard/projects/handle-project.tsx | 24 +----
apps/dokploy/pages/index.tsx | 18 ++--
apps/dokploy/server/api/routers/admin.ts | 100 +++++++++---------
.../dokploy/server/api/routers/application.ts | 44 ++++----
apps/dokploy/server/api/routers/auth.ts | 1 -
apps/dokploy/server/api/routers/bitbucket.ts | 16 +--
.../dokploy/server/api/routers/certificate.ts | 8 +-
apps/dokploy/server/api/routers/compose.ts | 32 +++---
apps/dokploy/server/api/routers/deployment.ts | 6 +-
.../dokploy/server/api/routers/destination.ts | 14 +--
apps/dokploy/server/api/routers/domain.ts | 24 ++---
.../server/api/routers/git-provider.ts | 4 +-
apps/dokploy/server/api/routers/github.ts | 14 +--
apps/dokploy/server/api/routers/gitlab.ts | 16 +--
apps/dokploy/server/api/routers/mariadb.ts | 22 ++--
apps/dokploy/server/api/routers/mongo.ts | 24 ++---
apps/dokploy/server/api/routers/mysql.ts | 24 ++---
.../server/api/routers/notification.ts | 54 +++++-----
apps/dokploy/server/api/routers/postgres.ts | 24 ++---
.../server/api/routers/preview-deployment.ts | 6 +-
apps/dokploy/server/api/routers/project.ts | 8 +-
apps/dokploy/server/api/routers/redirects.ts | 8 +-
apps/dokploy/server/api/routers/redis.ts | 22 ++--
apps/dokploy/server/api/routers/registry.ts | 12 +--
apps/dokploy/server/api/routers/security.ts | 8 +-
apps/dokploy/server/api/routers/server.ts | 41 ++++---
apps/dokploy/server/api/routers/settings.ts | 1 -
apps/dokploy/server/api/routers/ssh-key.ts | 11 +-
apps/dokploy/server/api/routers/stripe.ts | 31 +++---
apps/dokploy/server/api/trpc.ts | 4 +-
packages/server/src/db/schema/account.ts | 33 ++++++
packages/server/src/db/schema/bitbucket.ts | 2 +-
packages/server/src/db/schema/notification.ts | 11 +-
packages/server/src/db/schema/user.ts | 10 +-
packages/server/src/lib/auth.ts | 18 +++-
packages/server/src/services/admin.ts | 44 ++++----
packages/server/src/services/bitbucket.ts | 8 +-
packages/server/src/services/github.ts | 4 +-
packages/server/src/services/notification.ts | 30 +++---
packages/server/src/services/registry.ts | 8 +-
packages/server/src/services/server.ts | 8 +-
41 files changed, 416 insertions(+), 381 deletions(-)
diff --git a/apps/dokploy/components/dashboard/projects/handle-project.tsx b/apps/dokploy/components/dashboard/projects/handle-project.tsx
index 5b0777716..fb2cbf67a 100644
--- a/apps/dokploy/components/dashboard/projects/handle-project.tsx
+++ b/apps/dokploy/components/dashboard/projects/handle-project.tsx
@@ -123,26 +123,10 @@ export const HandleProject = ({ projectId }: Props) => {
Update
) : (
- <>
-
-
- >
+
)}
diff --git a/apps/dokploy/pages/index.tsx b/apps/dokploy/pages/index.tsx
index 4c53f4797..0fecc209c 100644
--- a/apps/dokploy/pages/index.tsx
+++ b/apps/dokploy/pages/index.tsx
@@ -60,17 +60,18 @@ interface Props {
IS_CLOUD: boolean;
}
export default function Home({ IS_CLOUD }: Props) {
+ const [isLoading, setIsLoading] = useState(false);
+ const [isError, setIsError] = useState(false);
+ const [error, setError] = useState(null);
const [temp, setTemp] = useState({
is2FAEnabled: false,
authId: "",
});
- const { mutateAsync, isLoading, error, isError } =
- api.auth.login.useMutation();
const router = useRouter();
const form = useForm({
defaultValues: {
- email: "",
- password: "",
+ email: "siumauricio@hotmail.com",
+ password: "Password123",
},
resolver: zodResolver(loginSchema),
});
@@ -80,6 +81,7 @@ export default function Home({ IS_CLOUD }: Props) {
}, [form, form.reset, form.formState.isSubmitSuccessful]);
const onSubmit = async (values: Login) => {
+ setIsLoading(true);
const { data, error } = await authClient.signIn.email({
email: values.email,
password: values.password,
@@ -92,15 +94,17 @@ export default function Home({ IS_CLOUD }: Props) {
toast.success("Successfully signed in", {
duration: 2000,
});
- // router.push("/dashboard/projects");
+ router.push("/dashboard/projects");
// }
} else {
+ setIsError(true);
+ setError(error.message ?? "Error to signup");
toast.error("Error to sign up", {
description: error.message,
});
}
- console.log(data, error);
+ setIsLoading(false);
// await mutateAsync({
// email: values.email.toLowerCase(),
// password: values.password,
@@ -136,7 +140,7 @@ export default function Home({ IS_CLOUD }: Props) {