From 0929683c51d66d5e09053b6ca9f70e2154784a1e Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Tue, 16 Apr 2024 21:09:28 -1000 Subject: [PATCH] chore: :package: Update all dependencies to latest version and Bun to 1.1.4 --- Dockerfile | 4 +- Dockerfile.FE | 45 - bun.lockb | Bin 152828 -> 153836 bytes drizzle/meta/0011_snapshot.json | 3320 ++++++++-------- drizzle/meta/0012_snapshot.json | 3450 ++++++++-------- drizzle/meta/0013_snapshot.json | 3484 ++++++++--------- drizzle/meta/_journal.json | 206 +- package.json | 2 +- server/api/api/v1/accounts/[id]/block.test.ts | 2 +- .../api/api/v1/accounts/[id]/follow.test.ts | 2 +- server/api/api/v1/accounts/[id]/mute.test.ts | 2 +- .../api/api/v1/accounts/[id]/statuses.test.ts | 4 +- .../api/api/v1/accounts/[id]/unmute.test.ts | 2 +- server/api/api/v2/search/index.ts | 12 +- 14 files changed, 4968 insertions(+), 5567 deletions(-) delete mode 100644 Dockerfile.FE diff --git a/Dockerfile b/Dockerfile index 3064e763..090867cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Bun doesn't run well on Musl but this seems to work -FROM imbios/bun-node:1.1.3-current-alpine as base +FROM imbios/bun-node:1.1.4-current-alpine as base RUN apk add --no-cache libstdc++ @@ -25,7 +25,7 @@ RUN bun run prod-build WORKDIR /temp/dist # Copy production dependencies and source code into final image -FROM oven/bun:1.1.3-alpine +FROM oven/bun:1.1.4-alpine RUN apk add --no-cache libstdc++ diff --git a/Dockerfile.FE b/Dockerfile.FE deleted file mode 100644 index c1c89bb2..00000000 --- a/Dockerfile.FE +++ /dev/null @@ -1,45 +0,0 @@ -# Bun doesn't run well on Musl but this seems to work -FROM imbios/bun-node:1.1.3-current-alpine as base - -# Install dependencies into temp directory -# This will cache them and speed up future builds -FROM base AS install - -RUN mkdir -p /temp -COPY . /temp -WORKDIR /temp -RUN bun install --frozen-lockfile - -FROM base as build - -# Copy the project -RUN mkdir -p /temp -COPY . /temp -# Copy dependencies -COPY --from=install /temp/node_modules /temp/node_modules -# Build the project -WORKDIR /temp -RUN bun run prod-build -WORKDIR /temp/dist - -# Copy production dependencies and source code into final image -FROM oven/bun:1.1.3-alpine - -# Create app directory -RUN mkdir -p /app -COPY --from=build /temp/dist /app/dist -COPY entrypoint.sh /app - -LABEL org.opencontainers.image.authors "Gaspard Wierzbinski (https://cpluspatch.dev)" -LABEL org.opencontainers.image.source "https://github.com/lysand-org/lysand" -LABEL org.opencontainers.image.vendor "Lysand Org" -LABEL org.opencontainers.image.licenses "AGPL-3.0" -LABEL org.opencontainers.image.title "Lysand Server" -LABEL org.opencontainers.image.description "Lysand Server docker image" - -# CD to app -WORKDIR /app -ENV NODE_ENV=production -ENTRYPOINT [ "/bin/sh", "/app/entrypoint.sh" ] -# Run migrations and start the server -CMD [ "start" ] diff --git a/bun.lockb b/bun.lockb index 56010d07a46b8ca5a0664f613b7b712c3352221c..7d085a708b5bf7688a5cf1aef110c89033110236 100755 GIT binary patch delta 10658 zcmeHNd3;UR+TLqta8BePlZ;0uiKK`OIATbQ8AJ%7Ma|I_XuqidCV2r{{g0~~=p*cf`=S|GX3F)Pl zQV&Re&Ol1f%^a4Wha4eqs=OzV8Zl_d@GL4wZ(QE6+?-K)V@Br<8#p9yP;TLvYjCUy zM>n*#4lrkQ*4Vru*-}6swQse7F5sW1Ns=q@7LfXUMzi+=DSflXuh96Jz`Ec^X?8l$ z9d;*;j|93%h0?Tonu8;d3VzaCt>`L{3Md0o1-pQ5z_nWXLM?r=X6FMb|8MF*Au{~F z9{j!z6jBfWxd)CI3c8VOGd8iC$Gnk{*w8;{S;93wSjD$l1mhWClbj4>mz5zrgx z3iJTJ9If6+*MXj}j{_-OUjQk6wU%CrX+rb$+Bmh+`LJDJCyd|fU}|nKv=-N{pGfel zyS1&`O&i0cJA;nRcK#_~Yl!FMNM1j*>DKb3uWQ*gM+Q4y;%_l-OO~Vo9lt(DUJTUgivo|X~I zEW9`));JCK1p-I8gDiI6!|KS*KCO%)SYcX%m#9X&!LV9zb4)A4hopfQ_X1crPwD5V zv{K^!aTcRf4@nAF@|46|jO}1i2{O-&u&^S2u3xP2tj00!pWK3_@;?1zj6G5%sj1?J z7BJ4w^^au-xaWXaJG-8e^oG)!CeWz;Hv9^rF&I`DEXFe%SnP^nwdE`QS{ctliw2K2 z$65>#Sk0(@Q51-l*6}hJ2ZNzf&?0|}-8xumzW;(o@kB2IEq0M_!i$>&TN#HzquAK; zOmB<)GP{*s0kk+p`wCiuqS>eGshy#z+#+bIUwLJ!PlleF4XulkcXK88 z1X@>xi|ebWE`p|&0!=O1ub*C9HZ+yn2u&^T2{biFOn*u0%*{EiS%2OqC)O6G>f$p% z&z22M=@whhi}PdcF2nA`SLU~}3(AzFctslmEm6_7LsL_qRdOBh$Wi^~LQ_-Aps6`L z-jbwbC2tNimD>cZo5EF8rgp|NQ7xqin(B8Rnp&Q3j?U#mQ_I^9P0jHFT9Q&;{6O7r zAvD$RVkH+mNGs1c7#iIiHoT<1#rTnC8EL$YKWbJDnsBmbF7GokhRxu`BV!F`u=di8 zq1`FCW6fA~6V-zJEv$g2jfyp%2iF>$#502|#=80H-NpEo#unC-dybB^n+L8FH;-;* zcM@8>qInFarW2P5O-)@}$=!vf`ZXV-r%r;V=J*;~vXa+nsLu6))=l9yKvPp6K~qa< zGfelJ2~Dl-+e*%LxSk^unwn!hv?Qgx2hh}dTaVEF=0H<8c8Z@Xh&9&3+D!qL`IROX zV-BqLN|a~?T*r$i#M)gV4}Q_VmC<9ABy~`I{Vj6(DDE{e#wb9x0g3605&9lhJS>b5 zrmr{F@OH2e-~<#7s}(F|u`y^pER2;|AaE^xf=gEtcCPt zTK-}UmuvonHb`Ho@$YLqA*rhvUb5&1MY02~0aAr)DOE#T;K#5DH)%W}`EAy4i-y~P z_>;EdLKW`-8i0E>ejg>`M@Z!zWT>AC`bJBrj?|#V_GQ6&CYkd%k`?^%c_jFkU3E=Xz1rgv<+IQN4=K{Hw&sl9t* z{N-0MyBgGpF1mGW?tsZ_JAL}gmwUJDI=yPN{erosrlAMwxXszzXWqvfMr}*H(d|R= ze7@N6Tb+{$U`4k zc{!~450Y3-eh${`UroHtuSv|r=lp8rEgqWq&#-Fq=!aH*6V}RyNz94gg0<|Ci6=iw zVlKS+k(DPrHt`BrZand^l|O;?>Ek5k&Y!|s|HQ=mK1pJpe8Uqf@BP%oO;3}UH&1(N z<%VY_z6X|>8=qPE4p>8?CL_oa_PZL>@tVv5%mG@T>voC`J-=5=RK)guek0FD4Kq zh?4|~BGd@zEZ!za66XlIhzJKjvY12ARa_zHCZcNsQbZ9!cX5lLhiK;rNEO8dJ;gnO zULw&1cvF-RSjAI<-lBUgK$_S<&_}S^fOL@t5QaL;B=*#1Nvy9h)&a4Dh@o{r^cOpc z$aMl?b^?(p@|-|;ID7cfE;5sVbK2u6u^?tsyvm|%>!M=(|-dH}|W5`yvK zDM5kg?g^M6HV{k{%nL9{q!COOpA$?GMsMn?H}%yU4KEZsiOBV#zWT7Fns=z!xpT^rjJO@<7bS`9Lf<$sjb*yJDXYh0KhKg3KUhh>>QrXr?#<=t>_}`p>rb z=G8dQy`Oy4u;1Ax^Rs$}{-G^8tamAy`HYS)UUtqZns;t+idASJ#+K*tVNsGPPOipmTa9`)Ww)yt-*iNKNyvQ ze`vCP%$i1r$A_O-I5X~c$?$sRw_A7Z6;iM`%guCZWcr&=|I6=DdGlsP2W+RhHJ-Gt z;@VZ8^S4*=npuGxQ{>>p@mhoFLvUX8Nc@m}e!>T{Qm0QFc+t1*%J;I8-|GIA?+0`H z-PyU?v1?)8#baSn?&FuG`JL^0=lA+mDtLbN zf^Ru&w+mn=kLI2H+O+=eOXncBJKZhwj&}N~)=ODt{Z@uFaH~5!v;WCD=f>PkFN_W- z9`W>knz%ju@AxRF$;>BCXKpNCI@+uDC#xR@8UrP7Y!xocU!>SFzW^Y(+{7mhBLfqHd>qbT9p?1#2(ch4jXM5K1$f zurei+m=?R=GKMv(eTExH<==sM9X zMue~|N~^j=kQq^vNn8z>$6~R%oVki07qW(KFJGxY#8XOBgDV+@e-U#jbS4hJJ{nEi z6rlo~ilO0EaC^<(H*#^f^bLz3?xT z-U3OVwY2ery+esIOaMo(M)=Q+^cjSHleEk=p|4RGNtjue(7eb046g3(Us&@%wDTH>lXr&tt83`E$8N;MfD`(A^1AWyiF_guw#jIub zM@W4Pc>;L~c?Nk7c>$?_yoAs$(P79D$hQz$`VK*;m+wJVKxj`4dvek&;lG6a)R?}- zZ6LG@aU4mjAgduIkPjdqLTFozw#te{^isAils?;OZ^91pIp}qe^^gsaU69?7FClw` zQLtFHRU``5!9<_+Bf!$Va#R!v=3-AnKS&bC1#50{f$j=%gVYrl7cqBXyNr3%9HEU+ z$cIdL_murRQRFCs6iJFIMc4sCkF=SP8Ib9acOmaUZlOMU%3?++el>vhrSq4u@pksM z&~2D-cpq} z{t!P1m8n;#`%ptDPY|R&Ylx2#D4~!LNCU_o9z2VgjvGEOTR2(9>HSK9(LP%$k>A6*oc=r4?o$_E%Uu2 zc#K7bMTSLS5{SFsFwbWCIfPnKGq+r8$v%WbcvyH?WVodN19kVMx_>R$wq}f$5*01| zO|&`8JlQj0JpWQ5Jf-(*Ej&&^jHBEuqaAM{cmZ&^3)b;;;7>ZB43v{I6e393|W zSA_WD7;CPzs=0n1^N>eo@C)yVAjl>^rHF&tf<8X}> z5qERw{;HIPVtyGSuAhVOc=jx!$I<3FRSvtvJ~*&45pjySh+oQ>y|;dt!sOoZ*87{r zeN*N9MASaPJe%vMFY-yIkivGn}Ds+7ny(eDKF@YauXd=i(} zcT{YH6;&STq6mfKLxi11OTIdRmgwg~h79=N)!Cw*?W&wth#$#$vuJmgx%jJ5(9dSf zw%wT9->GFmmG>FZ_#~pBA4l1Dy=c9Qd;H@nhvy;_4sz{2V)98eQa{hqyvuiAlq}jd zvC1)Dd$#m!mHP- z1lbdF#``qlq94P_s{6uN+t>9`RbC~&t}T_Gy)L|J-TLt!-s($tMcCxD^USc z!s`;Cdh3UT3{Ei(cd*6ZRe1;W5qC}_{Q4P{u3v459as1=RGCLu#qeGve7{F|2SxPv znEnIBP*~pj(Us}1w!i<}!)+McwdLf5C?WUBVmJA{c4%7A%C}bBB|m*=6iyi$S9?Xj zD%zaEegE3=Q5;@3BO;WPdTCVGq3?&7Fap^1?t{J!#97XBJZQGc_lhZ*BjV?bZe%QZ?TCdvJo4L$5HbdkLn_STBp%K>6MDCwW8KA!uCiM-!daAcmFrd`9EEE)Ip7}%?_}9Q4DTkp{sX(Eo9y=w#Lr!1 zqi{%(U8p_6FGW7>AoW6@@oUjbRHVr1HK%Fzi8p0YQqH_er*xM`GY844y7jh_Tc9wf z$}Wb4c0cb-*s(uCgr~}FYp&K@o>X$8Cpm;`CoMC23$LE?)&BHB$?neMkx{nK&PPD)2AwyUhr-NeNy(M$vHE#v#V3o zC{*PIC&HW(kqvfJ3f0#&eVdO+_4jL#*Md4-8w|A z{W;XWF*0NqjCwL>;uz^#n%deEU^m$JgWbWUnth$7FVfOyYWA_3JrUdt{#`Y_4cG&^ zi)Oz&l;YZ?xm6G-@KG>z?_N#c0;T{(V5-18a8q!emY%Mq_tx}qFy;SK4X`1@f7XKk ztN}J^;lnLBs!gOXG~TE2J7DU<$HuE;z7$MD))7qhU`zn&fwf?o8%x17G5<}E*#3es z{WCoh`|roJ2rZ_$aV}4t_5S(l(~?ur>8bHqQzgEvQE>XP0!i|P(}!Sh@M~aC@Dea} z?~`CJ@CYzpo`(RC}&HXT2@P5Bp0}C^S1>m~1ir1g#4+na2lMSX*A65yuwsnv6Jy&#`Fq=DRau zjJ{}7SNJ&a_%0Tf#>cz&g@} zcZ-cNOd<((k=2?7^Wf$N&eDv z2gS%I2k~7aV~sw^k`#_CXh0ha8_uIL>Ql|Z5nm8c6H z?vfYp77%0XGDPhhdtT^mG0uTTO*8PqAd9ga8bx>D6&8!}S7_=WprOW~R8?cVBEw=B z4UGm*?XtX3qXCA#Fkt-pSmfGNerHUqLmk$rp1gKUj6;ufW!Q4MvUGkYC(a(Kn&6&+ ze2U93NWB$lBP2ETyZfo;VUqN?k~$NTnqx1d0gA2ha6NSxBrOUg)$a#LYCQ7@-8K!9 z8gDNoHHTrOB=u9`4T7ZRT?$d5T1}e4#kknLnyzJB{8IaVxuR&7d zUAb=y&DL|+AgMV%fn-(UxsKKIrbALAzj@#G3nV3;F=CuLIqY~vYm0HRrWt9xjm4Vg zNYh=uIF9eik7WaSO@5qV9TruZ81)a=_pl@=Q>DVs!g}!XDRIWvu*A|VmUv+si}5@( znq7=DvxT+bGYaAyhD@M}%r1y=cnMM;MY;efL6L%<&{OjuskU-Rs-HAbPwfRsOl#$6P&cA|$mgtM1#*LQ-=CP1bWvfn-(U?S`b5+aOQ( zONOM_*vmX>Mx3zmMc2gv& z8;p2pF)m}E^?`;H7d|7n2_<+D-2)PkE@!v8Vb{?dYJh;E}{)V3O}fy8A0 zU15xWt(Nd0H-m#4dHvN)^Y4GNAZm*{Do)%~<7Qez9>q!I=%G10$n^NM)a-wX`8x|e z+E7$~t@r>f%75X~tVIC^A;;y+efnFEjdHI;Yy)x=-<)yf?C6=+q^`roiJBQLs<%Gca5@mgq3JmI%g z-uE{Xf9E$VGw~W|x1kNcX=N_F_+~2KeAC2Dx2(*Sr`<~BLvNY*ZfI`YcsrFFZkza| z+g8?;mqXhL&9}zNJa|q`Dj#2C;$J}X;$C-Bx#t}dpMA&5y!mI)K84olcPsPdGk#Cy z(|?aZvH<=9c7zLR(LQKxcvKzQSBLi1Sy?-N z1zJ^|GaqoT9}DC~_t3t3Xx}|63tE-HQd!4U8}Pr=sv7(^izEi>EQ*PO1(QJ`B8@0i zln{jpqa7$*WD!M(a-vA#Y7erA9HK6wf+$LOIe?-?K2ePLjHs*dYXIsdW)Q`SN}@Os z=m_dA3W?&y38Ee%!~l9syg<}bd`r|zL>WQ7#d4xP;tEk;5#JD$Ac~0kiR(mGk>CV+ zTx=lfFKUPeh@?iKfufiwQ7{uINu&`C5+y{*!srZ25m`ioMLE$B;pzfP6*)vhMFmls z@M;W77x_dP;xmx=v@tV@POi+#hKm`lFidxa;S3o@iohl?v~L2#;wCU;i4$ZvPKIu7 zFpL&2xWTZ%4Tc}dkS(Iz5qqpyPBczjAsR2@n}Tvg5zz#3o#+XX&YKU@0 zk_TwAC??7i%oCI^(uk&r5~2cO^a4#4Swv5Ya-wO%wK?c1kwY|HR1nP&Uf!UYBA@7K z@fp!9;pYRIEoOkkbRTM~4=QdGfxgsMUl=a?!cZteT2Ncbu&M z?K%2pp?&PnHmn+aW^?-9y_KtChfjCxd-R8MX(@T<3zxN%e)_1fXY)Yc&lcW^dSlvi zuaBO(>sY8?P3;@S_J?=;m|1nR-{dI?iMcKhYQ8{Y50#Mze2!}gKg#u=MT{wuET8y9)cZF1PX zy?$$A$}ev_Got&qvFA;%9O`_1^Qn@CZtK$T{Mzun#%qdVo?etT{nJ@D`X{*OKHvS` z1J!%s!Ri%9Y}mOdw)W!B(S7&*_VUO}Kddk=nk3(HYx~XE>^RRJGu9km@_y@0gKZ~s zf3$5XAL3t>c=5)XOVN=HpAW1!@Xe*W>VD8(*!}-oRsM4l=ng1Kk~|byIx){ANr};(GvUPFE*Xqb?GnpsV|?Emn24M z6{fA*LfSLxANyU43+5iWxX04odHKvIOE!K{^>N1zi(l{Ix~%=Z^*y$C^))5C1U-GL z-PZ}%cV0NLIeOgh6(3v*SQsBxa=oX)-p$rQ32cwOxg;%mu)^uD>|fC5xgYAD`EFB7 zbNny1`5o6+UagzmV$L18I@tDNOpV78E^?AWmj0MK*fhc`_RBrK9z!M{F|VzRvHnmy zV&y@t#uRw*gMnY_HtTek^5??m$8Fmbk>&T|Etg})108dg?CUw;AB7VG+&s5;DQF$} z%7p=$0ksLanc@3?YWMvU*PeMR{N~}TE&J|`rML#E&ZQ2*5<1RFWlIGMz%#Ph9}B_m z04!-k1K1cbu{BmTLu)Kwi&il6`)0O{;Z)VW>{?rPxQRF%#m1X{#wmdj#|9S?ar9nR z8O*|DauKt-GJ``k&Jvx-_@$EXA)|Pd=VZlb8kIA75)QVcYdGmJQiPFAEK6n~s6$^_ z|5xz{o07^{8JstEQ?l^)N<;o2jB;WI?Udp6aKVyk(wXv|8d}^d@?m#18B5yB>yZh?GGIR9J$c}#%Sp&7-`2s z+opE``pnQWqmQN66pJLy)NJ@kLwZBAJ+0ZCpqFX3S(>f=3JCc4tPum&GJjFGf;ABR zRre1zG^q1gi2VfSO2qs%L;_0a{II<)cMv0YF_w4=x@u z<$0i~OM9}pz+@mFm;y{?QrT0hSOhcE-jzD=7H|$Y4}1$;04@TTfXl#l!1qkNznVpN zqQjOwz(>GdfKFp}12nMITn^Auf+H}5A4)Os>gsx|iHhahhz!9K{GXfY6 z+(O=AV4CfZ0kqt;0sH}HzzOh#4@hc+efdJM{k^&*L2igH` zflFG8h%W=XfFQAB1Iu6?h3iI^;oB2lS-?mj6UYWe0b>As!`jGFn~a4x8<+#w0CacV zM%LV)o|gFl{_Y=v(%dy{APXkvaS^(SwWak&q;6vGHV83Cn!}~CMz1l?w!-;y);vQ0 z*?m^!#SR~SRTChy5f*c>IT8!R0QGlI=dk(PE=99VNC`$tXs}cyhJVhyy!9VWo!>n8 zdXhLZ3J#&>2y+AuE5-89S(uOhOY2eRsN5z^tqE|5GKZT(BWpu?7}03@IHim`Vao+WXJR66WmrSbqzL$p@|~Ck~I_AhnO!D z;@Ly2KT9mDB#kLaUczvgh0CW?MC@UFAx#uW^YYOz3fR4MU{vV5@e`DIq2^Fr6-W__ z;OH#|sqZxD%u8XD@eloQAs@}szlu*1j!tW>wKTCz{*Bv@E zX&=TGUffXcoG9**^H`B}g1Pyrh3l6lzF$4HdPCgJ59+-aiT+=s;rcBL9&;^V!s4|H z>K#f&AspC#ah=NE`Za6dqhHl9xW)$UWGfHWJ6}r^hrec?5s&KVkSKFVsHERP_|!2` z^sbt;m-4D9>B9FL6r^;to14rzdGx&U>eguo>hmf+?H;3)@TiVf zqv1e%hrMtbb;f*6j}8@Ejx$f6 zM~;T#h|xF?kNcyc7?sh`is~vlo%mNnqBtu<;)Sj5)8zNau2=lliFe^}zv~s7()I3+ zij4lRJAwK9$o^M6^cy3?$`=(J@pNp0e#N3kE4sh1p2T6xwv%|L=vP3toNN|RadSYW zJyYL1Sa|R&Bi{3KD^W3DqCRDWV5gXyjb2ZZq~9&sy`^uQPimKS^=|s@lgl+> zPh1MH!z!eQ*6*jpbt*PYIN9Ro`V{>J%dWNAo_$tM__#hrzvD7^Y4>Ng_PY>ZZ_vYu zFW+R|IA$n2g}un}Y2w-`e2c;`p>nAH3E_Mi$3Kau*|O%Y*t;}>ZC;m%gKWBU-Fqig zr;CYYcTTgQXz@h{*|DsnhrHOW?B@=0ht?vo84T$I<&n$|%`N*dQEtw}CMNrf^@*}k z{4z+k7ePsooCnFi4<~F%lAT2MAi3$o2}+J_gJicqCba#d>LeadmOcJxvllCp(PB4;?Q*K|}^xSVFq%Z3k@3s}Qe$*NmkGPwna u+99ZuXR6%YX{VNANKrG0*{O1v*qJK#b?UC&4#X`%F>o#O6CH=jAN>=$jUx;I diff --git a/drizzle/meta/0011_snapshot.json b/drizzle/meta/0011_snapshot.json index cd0e18b2..36de95d3 100644 --- a/drizzle/meta/0011_snapshot.json +++ b/drizzle/meta/0011_snapshot.json @@ -1,1760 +1,1582 @@ { - "id": "bee93a52-c8c3-4e4e-a342-e350e8357e38", - "prevId": "bed9861c-61a1-4421-a0f3-469977e2c11d", - "version": "5", - "dialect": "pg", - "tables": { - "Applications": { - "name": "Applications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" + "id": "bee93a52-c8c3-4e4e-a342-e350e8357e38", + "prevId": "bed9861c-61a1-4421-a0f3-469977e2c11d", + "version": "5", + "dialect": "pg", + "tables": { + "Applications": { + "name": "Applications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "website": { + "name": "website", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "vapid_key": { + "name": "vapid_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret": { + "name": "secret", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "redirect_uris": { + "name": "redirect_uris", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "Applications_client_id_index": { + "name": "Applications_client_id_index", + "columns": ["client_id"], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true + "Attachments": { + "name": "Attachments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "remote_url": { + "name": "remote_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "thumbnail_url": { + "name": "thumbnail_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "blurhash": { + "name": "blurhash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sha256": { + "name": "sha256", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "fps": { + "name": "fps", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Attachments_noteId_Notes_id_fk": { + "name": "Attachments_noteId_Notes_id_fk", + "tableFrom": "Attachments", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "website": { - "name": "website", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToNote": { + "name": "EmojiToNote", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToNote_emojiId_noteId_index": { + "name": "EmojiToNote_emojiId_noteId_index", + "columns": ["emojiId", "noteId"], + "isUnique": true + }, + "EmojiToNote_noteId_index": { + "name": "EmojiToNote_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToNote_emojiId_Emojis_id_fk": { + "name": "EmojiToNote_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToNote_noteId_Notes_id_fk": { + "name": "EmojiToNote_noteId_Notes_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "vapid_key": { - "name": "vapid_key", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToUser": { + "name": "EmojiToUser", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToUser_emojiId_userId_index": { + "name": "EmojiToUser_emojiId_userId_index", + "columns": ["emojiId", "userId"], + "isUnique": true + }, + "EmojiToUser_userId_index": { + "name": "EmojiToUser_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToUser_emojiId_Emojis_id_fk": { + "name": "EmojiToUser_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToUser_userId_Users_id_fk": { + "name": "EmojiToUser_userId_Users_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true + "Emojis": { + "name": "Emojis", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "shortcode": { + "name": "shortcode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "visible_in_picker": { + "name": "visible_in_picker", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Emojis_instanceId_Instances_id_fk": { + "name": "Emojis_instanceId_Instances_id_fk", + "tableFrom": "Emojis", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "secret": { - "name": "secret", - "type": "text", - "primaryKey": false, - "notNull": true + "Flags": { + "name": "Flags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "flag_type": { + "name": "flag_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'other'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Flags_noteId_Notes_id_fk": { + "name": "Flags_noteId_Notes_id_fk", + "tableFrom": "Flags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Flags_userId_Users_id_fk": { + "name": "Flags_userId_Users_id_fk", + "tableFrom": "Flags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true + "Instances": { + "name": "Instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "logo": { + "name": "logo", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "redirect_uris": { - "name": "redirect_uris", - "type": "text", - "primaryKey": false, - "notNull": true + "Likes": { + "name": "Likes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "likerId": { + "name": "likerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "likedId": { + "name": "likedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Likes_likerId_Users_id_fk": { + "name": "Likes_likerId_Users_id_fk", + "tableFrom": "Likes", + "tableTo": "Users", + "columnsFrom": ["likerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Likes_likedId_Notes_id_fk": { + "name": "Likes_likedId_Notes_id_fk", + "tableFrom": "Likes", + "tableTo": "Notes", + "columnsFrom": ["likedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "LysandObject": { + "name": "LysandObject", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "remote_id": { + "name": "remote_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "extra_data": { + "name": "extra_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "extensions": { + "name": "extensions", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "LysandObject_remote_id_index": { + "name": "LysandObject_remote_id_index", + "columns": ["remote_id"], + "isUnique": true + }, + "LysandObject_uri_index": { + "name": "LysandObject_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "LysandObject_authorId_LysandObject_id_fk": { + "name": "LysandObject_authorId_LysandObject_id_fk", + "tableFrom": "LysandObject", + "tableTo": "LysandObject", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModNotes": { + "name": "ModNotes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModNotes_noteId_Notes_id_fk": { + "name": "ModNotes_noteId_Notes_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_userId_Users_id_fk": { + "name": "ModNotes_userId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_modId_Users_id_fk": { + "name": "ModNotes_modId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModTags": { + "name": "ModTags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModTags_noteId_Notes_id_fk": { + "name": "ModTags_noteId_Notes_id_fk", + "tableFrom": "ModTags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_userId_Users_id_fk": { + "name": "ModTags_userId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_modId_Users_id_fk": { + "name": "ModTags_modId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "NoteToMentions": { + "name": "NoteToMentions", + "schema": "", + "columns": { + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "NoteToMentions_noteId_userId_index": { + "name": "NoteToMentions_noteId_userId_index", + "columns": ["noteId", "userId"], + "isUnique": true + }, + "NoteToMentions_userId_index": { + "name": "NoteToMentions_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "NoteToMentions_noteId_Notes_id_fk": { + "name": "NoteToMentions_noteId_Notes_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "NoteToMentions_userId_Users_id_fk": { + "name": "NoteToMentions_userId_Users_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notes": { + "name": "Notes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reblogId": { + "name": "reblogId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text/plain'" + }, + "visibility": { + "name": "visibility", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "replyId": { + "name": "replyId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "quoteId": { + "name": "quoteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "sensitive": { + "name": "sensitive", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "spoiler_text": { + "name": "spoiler_text", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content_source": { + "name": "content_source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + } + }, + "indexes": { + "Notes_uri_index": { + "name": "Notes_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "Notes_authorId_Users_id_fk": { + "name": "Notes_authorId_Users_id_fk", + "tableFrom": "Notes", + "tableTo": "Users", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_applicationId_Applications_id_fk": { + "name": "Notes_applicationId_Applications_id_fk", + "tableFrom": "Notes", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_reblogId_Notes_id_fk": { + "name": "Notes_reblogId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["reblogId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_replyId_Notes_id_fk": { + "name": "Notes_replyId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["replyId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_quoteId_Notes_id_fk": { + "name": "Notes_quoteId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["quoteId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notifications": { + "name": "Notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "notifiedId": { + "name": "notifiedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "accountId": { + "name": "accountId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "dismissed": { + "name": "dismissed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": { + "Notifications_notifiedId_Users_id_fk": { + "name": "Notifications_notifiedId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["notifiedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_accountId_Users_id_fk": { + "name": "Notifications_accountId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["accountId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_noteId_Notes_id_fk": { + "name": "Notifications_noteId_Notes_id_fk", + "tableFrom": "Notifications", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdAccounts": { + "name": "OpenIdAccounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "server_id": { + "name": "server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdAccounts_userId_Users_id_fk": { + "name": "OpenIdAccounts_userId_Users_id_fk", + "tableFrom": "OpenIdAccounts", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdLoginFlows": { + "name": "OpenIdLoginFlows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "code_verifier": { + "name": "code_verifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdLoginFlows_applicationId_Applications_id_fk": { + "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", + "tableFrom": "OpenIdLoginFlows", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Relationships": { + "name": "Relationships", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "ownerId": { + "name": "ownerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "subjectId": { + "name": "subjectId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "following": { + "name": "following", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "showing_reblogs": { + "name": "showing_reblogs", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "notifying": { + "name": "notifying", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "followed_by": { + "name": "followed_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocking": { + "name": "blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocked_by": { + "name": "blocked_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting": { + "name": "muting", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting_notifications": { + "name": "muting_notifications", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "requested": { + "name": "requested", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "domain_blocking": { + "name": "domain_blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "endorsed": { + "name": "endorsed", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "languages": { + "name": "languages", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Relationships_ownerId_Users_id_fk": { + "name": "Relationships_ownerId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["ownerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Relationships_subjectId_Users_id_fk": { + "name": "Relationships_subjectId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["subjectId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Tokens": { + "name": "Tokens", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "token_type": { + "name": "token_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Tokens_userId_Users_id_fk": { + "name": "Tokens_userId_Users_id_fk", + "tableFrom": "Tokens", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Tokens_applicationId_Applications_id_fk": { + "name": "Tokens_applicationId_Applications_id_fk", + "tableFrom": "Tokens", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "UserToPinnedNotes": { + "name": "UserToPinnedNotes", + "schema": "", + "columns": { + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "UserToPinnedNotes_userId_noteId_index": { + "name": "UserToPinnedNotes_userId_noteId_index", + "columns": ["userId", "noteId"], + "isUnique": true + }, + "UserToPinnedNotes_noteId_index": { + "name": "UserToPinnedNotes_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "UserToPinnedNotes_userId_Users_id_fk": { + "name": "UserToPinnedNotes_userId_Users_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "UserToPinnedNotes_noteId_Notes_id_fk": { + "name": "UserToPinnedNotes_noteId_Notes_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Users": { + "name": "Users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "is_admin": { + "name": "is_admin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "endpoints": { + "name": "endpoints", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "avatar": { + "name": "avatar", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header": { + "name": "header", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "is_bot": { + "name": "is_bot", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_locked": { + "name": "is_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_discoverable": { + "name": "is_discoverable", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sanctions": { + "name": "sanctions", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "Users_uri_index": { + "name": "Users_uri_index", + "columns": ["uri"], + "isUnique": true + }, + "Users_username_index": { + "name": "Users_username_index", + "columns": ["username"], + "isUnique": true + }, + "Users_email_index": { + "name": "Users_email_index", + "columns": ["email"], + "isUnique": true + } + }, + "foreignKeys": { + "Users_instanceId_Instances_id_fk": { + "name": "Users_instanceId_Instances_id_fk", + "tableFrom": "Users", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} } - }, - "indexes": { - "Applications_client_id_index": { - "name": "Applications_client_id_index", - "columns": [ - "client_id" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} }, - "Attachments": { - "name": "Attachments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "remote_url": { - "name": "remote_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "thumbnail_url": { - "name": "thumbnail_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "blurhash": { - "name": "blurhash", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sha256": { - "name": "sha256", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "fps": { - "name": "fps", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "duration": { - "name": "duration", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Attachments_noteId_Notes_id_fk": { - "name": "Attachments_noteId_Notes_id_fk", - "tableFrom": "Attachments", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToNote": { - "name": "EmojiToNote", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToNote_emojiId_noteId_index": { - "name": "EmojiToNote_emojiId_noteId_index", - "columns": [ - "emojiId", - "noteId" - ], - "isUnique": true - }, - "EmojiToNote_noteId_index": { - "name": "EmojiToNote_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToNote_emojiId_Emojis_id_fk": { - "name": "EmojiToNote_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToNote_noteId_Notes_id_fk": { - "name": "EmojiToNote_noteId_Notes_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToUser": { - "name": "EmojiToUser", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToUser_emojiId_userId_index": { - "name": "EmojiToUser_emojiId_userId_index", - "columns": [ - "emojiId", - "userId" - ], - "isUnique": true - }, - "EmojiToUser_userId_index": { - "name": "EmojiToUser_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToUser_emojiId_Emojis_id_fk": { - "name": "EmojiToUser_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToUser_userId_Users_id_fk": { - "name": "EmojiToUser_userId_Users_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Emojis": { - "name": "Emojis", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "shortcode": { - "name": "shortcode", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "visible_in_picker": { - "name": "visible_in_picker", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Emojis_instanceId_Instances_id_fk": { - "name": "Emojis_instanceId_Instances_id_fk", - "tableFrom": "Emojis", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Flags": { - "name": "Flags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "flag_type": { - "name": "flag_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'other'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Flags_noteId_Notes_id_fk": { - "name": "Flags_noteId_Notes_id_fk", - "tableFrom": "Flags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Flags_userId_Users_id_fk": { - "name": "Flags_userId_Users_id_fk", - "tableFrom": "Flags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Instances": { - "name": "Instances", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "base_url": { - "name": "base_url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "version": { - "name": "version", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "logo": { - "name": "logo", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Likes": { - "name": "Likes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "likerId": { - "name": "likerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "likedId": { - "name": "likedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Likes_likerId_Users_id_fk": { - "name": "Likes_likerId_Users_id_fk", - "tableFrom": "Likes", - "tableTo": "Users", - "columnsFrom": [ - "likerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Likes_likedId_Notes_id_fk": { - "name": "Likes_likedId_Notes_id_fk", - "tableFrom": "Likes", - "tableTo": "Notes", - "columnsFrom": [ - "likedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "LysandObject": { - "name": "LysandObject", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "remote_id": { - "name": "remote_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "extra_data": { - "name": "extra_data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "extensions": { - "name": "extensions", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "LysandObject_remote_id_index": { - "name": "LysandObject_remote_id_index", - "columns": [ - "remote_id" - ], - "isUnique": true - }, - "LysandObject_uri_index": { - "name": "LysandObject_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "LysandObject_authorId_LysandObject_id_fk": { - "name": "LysandObject_authorId_LysandObject_id_fk", - "tableFrom": "LysandObject", - "tableTo": "LysandObject", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModNotes": { - "name": "ModNotes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModNotes_noteId_Notes_id_fk": { - "name": "ModNotes_noteId_Notes_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_userId_Users_id_fk": { - "name": "ModNotes_userId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_modId_Users_id_fk": { - "name": "ModNotes_modId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModTags": { - "name": "ModTags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "tag": { - "name": "tag", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModTags_noteId_Notes_id_fk": { - "name": "ModTags_noteId_Notes_id_fk", - "tableFrom": "ModTags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_userId_Users_id_fk": { - "name": "ModTags_userId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_modId_Users_id_fk": { - "name": "ModTags_modId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "NoteToMentions": { - "name": "NoteToMentions", - "schema": "", - "columns": { - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "NoteToMentions_noteId_userId_index": { - "name": "NoteToMentions_noteId_userId_index", - "columns": [ - "noteId", - "userId" - ], - "isUnique": true - }, - "NoteToMentions_userId_index": { - "name": "NoteToMentions_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "NoteToMentions_noteId_Notes_id_fk": { - "name": "NoteToMentions_noteId_Notes_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "NoteToMentions_userId_Users_id_fk": { - "name": "NoteToMentions_userId_Users_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notes": { - "name": "Notes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reblogId": { - "name": "reblogId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'text/plain'" - }, - "visibility": { - "name": "visibility", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "replyId": { - "name": "replyId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "quoteId": { - "name": "quoteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "sensitive": { - "name": "sensitive", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "spoiler_text": { - "name": "spoiler_text", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content_source": { - "name": "content_source", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - } - }, - "indexes": { - "Notes_uri_index": { - "name": "Notes_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Notes_authorId_Users_id_fk": { - "name": "Notes_authorId_Users_id_fk", - "tableFrom": "Notes", - "tableTo": "Users", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_applicationId_Applications_id_fk": { - "name": "Notes_applicationId_Applications_id_fk", - "tableFrom": "Notes", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_reblogId_Notes_id_fk": { - "name": "Notes_reblogId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "reblogId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_replyId_Notes_id_fk": { - "name": "Notes_replyId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "replyId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_quoteId_Notes_id_fk": { - "name": "Notes_quoteId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "quoteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notifications": { - "name": "Notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "notifiedId": { - "name": "notifiedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "accountId": { - "name": "accountId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "dismissed": { - "name": "dismissed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": { - "Notifications_notifiedId_Users_id_fk": { - "name": "Notifications_notifiedId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "notifiedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_accountId_Users_id_fk": { - "name": "Notifications_accountId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "accountId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_noteId_Notes_id_fk": { - "name": "Notifications_noteId_Notes_id_fk", - "tableFrom": "Notifications", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdAccounts": { - "name": "OpenIdAccounts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "server_id": { - "name": "server_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdAccounts_userId_Users_id_fk": { - "name": "OpenIdAccounts_userId_Users_id_fk", - "tableFrom": "OpenIdAccounts", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdLoginFlows": { - "name": "OpenIdLoginFlows", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "code_verifier": { - "name": "code_verifier", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdLoginFlows_applicationId_Applications_id_fk": { - "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", - "tableFrom": "OpenIdLoginFlows", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Relationships": { - "name": "Relationships", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "ownerId": { - "name": "ownerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "subjectId": { - "name": "subjectId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "following": { - "name": "following", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "showing_reblogs": { - "name": "showing_reblogs", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "notifying": { - "name": "notifying", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "followed_by": { - "name": "followed_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocking": { - "name": "blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocked_by": { - "name": "blocked_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting": { - "name": "muting", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting_notifications": { - "name": "muting_notifications", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "requested": { - "name": "requested", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "domain_blocking": { - "name": "domain_blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "endorsed": { - "name": "endorsed", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "languages": { - "name": "languages", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Relationships_ownerId_Users_id_fk": { - "name": "Relationships_ownerId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "ownerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Relationships_subjectId_Users_id_fk": { - "name": "Relationships_subjectId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "subjectId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Tokens": { - "name": "Tokens", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "token_type": { - "name": "token_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "scope": { - "name": "scope", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "code": { - "name": "code", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Tokens_userId_Users_id_fk": { - "name": "Tokens_userId_Users_id_fk", - "tableFrom": "Tokens", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Tokens_applicationId_Applications_id_fk": { - "name": "Tokens_applicationId_Applications_id_fk", - "tableFrom": "Tokens", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "UserToPinnedNotes": { - "name": "UserToPinnedNotes", - "schema": "", - "columns": { - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "UserToPinnedNotes_userId_noteId_index": { - "name": "UserToPinnedNotes_userId_noteId_index", - "columns": [ - "userId", - "noteId" - ], - "isUnique": true - }, - "UserToPinnedNotes_noteId_index": { - "name": "UserToPinnedNotes_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "UserToPinnedNotes_userId_Users_id_fk": { - "name": "UserToPinnedNotes_userId_Users_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "UserToPinnedNotes_noteId_Notes_id_fk": { - "name": "UserToPinnedNotes_noteId_Notes_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Users": { - "name": "Users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "password": { - "name": "password", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "endpoints": { - "name": "endpoints", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "avatar": { - "name": "avatar", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "header": { - "name": "header", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_bot": { - "name": "is_bot", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_discoverable": { - "name": "is_discoverable", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "sanctions": { - "name": "sanctions", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "public_key": { - "name": "public_key", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "private_key": { - "name": "private_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "Users_uri_index": { - "name": "Users_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - }, - "Users_username_index": { - "name": "Users_username_index", - "columns": [ - "username" - ], - "isUnique": true - }, - "Users_email_index": { - "name": "Users_email_index", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Users_instanceId_Instances_id_fk": { - "name": "Users_instanceId_Instances_id_fk", - "tableFrom": "Users", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, + "enums": {}, "schemas": {}, - "tables": {} - } -} \ No newline at end of file + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/drizzle/meta/0012_snapshot.json b/drizzle/meta/0012_snapshot.json index 41b5967e..f93e266d 100644 --- a/drizzle/meta/0012_snapshot.json +++ b/drizzle/meta/0012_snapshot.json @@ -1,1829 +1,1643 @@ { - "id": "8517a395-a39e-4fc2-acde-efa6b64e48e8", - "prevId": "bee93a52-c8c3-4e4e-a342-e350e8357e38", - "version": "5", - "dialect": "pg", - "tables": { - "Applications": { - "name": "Applications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" + "id": "8517a395-a39e-4fc2-acde-efa6b64e48e8", + "prevId": "bee93a52-c8c3-4e4e-a342-e350e8357e38", + "version": "5", + "dialect": "pg", + "tables": { + "Applications": { + "name": "Applications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "website": { + "name": "website", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "vapid_key": { + "name": "vapid_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret": { + "name": "secret", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "redirect_uris": { + "name": "redirect_uris", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "Applications_client_id_index": { + "name": "Applications_client_id_index", + "columns": ["client_id"], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true + "Attachments": { + "name": "Attachments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "remote_url": { + "name": "remote_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "thumbnail_url": { + "name": "thumbnail_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "blurhash": { + "name": "blurhash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sha256": { + "name": "sha256", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "fps": { + "name": "fps", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Attachments_noteId_Notes_id_fk": { + "name": "Attachments_noteId_Notes_id_fk", + "tableFrom": "Attachments", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "website": { - "name": "website", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToNote": { + "name": "EmojiToNote", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToNote_emojiId_noteId_index": { + "name": "EmojiToNote_emojiId_noteId_index", + "columns": ["emojiId", "noteId"], + "isUnique": true + }, + "EmojiToNote_noteId_index": { + "name": "EmojiToNote_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToNote_emojiId_Emojis_id_fk": { + "name": "EmojiToNote_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToNote_noteId_Notes_id_fk": { + "name": "EmojiToNote_noteId_Notes_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "vapid_key": { - "name": "vapid_key", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToUser": { + "name": "EmojiToUser", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToUser_emojiId_userId_index": { + "name": "EmojiToUser_emojiId_userId_index", + "columns": ["emojiId", "userId"], + "isUnique": true + }, + "EmojiToUser_userId_index": { + "name": "EmojiToUser_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToUser_emojiId_Emojis_id_fk": { + "name": "EmojiToUser_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToUser_userId_Users_id_fk": { + "name": "EmojiToUser_userId_Users_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true + "Emojis": { + "name": "Emojis", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "shortcode": { + "name": "shortcode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "visible_in_picker": { + "name": "visible_in_picker", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Emojis_instanceId_Instances_id_fk": { + "name": "Emojis_instanceId_Instances_id_fk", + "tableFrom": "Emojis", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "secret": { - "name": "secret", - "type": "text", - "primaryKey": false, - "notNull": true + "Flags": { + "name": "Flags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "flag_type": { + "name": "flag_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'other'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Flags_noteId_Notes_id_fk": { + "name": "Flags_noteId_Notes_id_fk", + "tableFrom": "Flags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Flags_userId_Users_id_fk": { + "name": "Flags_userId_Users_id_fk", + "tableFrom": "Flags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true + "Instances": { + "name": "Instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "logo": { + "name": "logo", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "redirect_uris": { - "name": "redirect_uris", - "type": "text", - "primaryKey": false, - "notNull": true + "Likes": { + "name": "Likes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "likerId": { + "name": "likerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "likedId": { + "name": "likedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Likes_likerId_Users_id_fk": { + "name": "Likes_likerId_Users_id_fk", + "tableFrom": "Likes", + "tableTo": "Users", + "columnsFrom": ["likerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Likes_likedId_Notes_id_fk": { + "name": "Likes_likedId_Notes_id_fk", + "tableFrom": "Likes", + "tableTo": "Notes", + "columnsFrom": ["likedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "LysandObject": { + "name": "LysandObject", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "remote_id": { + "name": "remote_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "extra_data": { + "name": "extra_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "extensions": { + "name": "extensions", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "LysandObject_remote_id_index": { + "name": "LysandObject_remote_id_index", + "columns": ["remote_id"], + "isUnique": true + }, + "LysandObject_uri_index": { + "name": "LysandObject_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "LysandObject_authorId_LysandObject_id_fk": { + "name": "LysandObject_authorId_LysandObject_id_fk", + "tableFrom": "LysandObject", + "tableTo": "LysandObject", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Markers": { + "name": "Markers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "timeline": { + "name": "timeline", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Markers_noteId_Notes_id_fk": { + "name": "Markers_noteId_Notes_id_fk", + "tableFrom": "Markers", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Markers_userId_Users_id_fk": { + "name": "Markers_userId_Users_id_fk", + "tableFrom": "Markers", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModNotes": { + "name": "ModNotes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModNotes_noteId_Notes_id_fk": { + "name": "ModNotes_noteId_Notes_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_userId_Users_id_fk": { + "name": "ModNotes_userId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_modId_Users_id_fk": { + "name": "ModNotes_modId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModTags": { + "name": "ModTags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModTags_noteId_Notes_id_fk": { + "name": "ModTags_noteId_Notes_id_fk", + "tableFrom": "ModTags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_userId_Users_id_fk": { + "name": "ModTags_userId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_modId_Users_id_fk": { + "name": "ModTags_modId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "NoteToMentions": { + "name": "NoteToMentions", + "schema": "", + "columns": { + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "NoteToMentions_noteId_userId_index": { + "name": "NoteToMentions_noteId_userId_index", + "columns": ["noteId", "userId"], + "isUnique": true + }, + "NoteToMentions_userId_index": { + "name": "NoteToMentions_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "NoteToMentions_noteId_Notes_id_fk": { + "name": "NoteToMentions_noteId_Notes_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "NoteToMentions_userId_Users_id_fk": { + "name": "NoteToMentions_userId_Users_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notes": { + "name": "Notes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reblogId": { + "name": "reblogId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text/plain'" + }, + "visibility": { + "name": "visibility", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "replyId": { + "name": "replyId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "quoteId": { + "name": "quoteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "sensitive": { + "name": "sensitive", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "spoiler_text": { + "name": "spoiler_text", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content_source": { + "name": "content_source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + } + }, + "indexes": { + "Notes_uri_index": { + "name": "Notes_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "Notes_authorId_Users_id_fk": { + "name": "Notes_authorId_Users_id_fk", + "tableFrom": "Notes", + "tableTo": "Users", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_applicationId_Applications_id_fk": { + "name": "Notes_applicationId_Applications_id_fk", + "tableFrom": "Notes", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_reblogId_Notes_id_fk": { + "name": "Notes_reblogId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["reblogId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_replyId_Notes_id_fk": { + "name": "Notes_replyId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["replyId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_quoteId_Notes_id_fk": { + "name": "Notes_quoteId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["quoteId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notifications": { + "name": "Notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "notifiedId": { + "name": "notifiedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "accountId": { + "name": "accountId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "dismissed": { + "name": "dismissed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": { + "Notifications_notifiedId_Users_id_fk": { + "name": "Notifications_notifiedId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["notifiedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_accountId_Users_id_fk": { + "name": "Notifications_accountId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["accountId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_noteId_Notes_id_fk": { + "name": "Notifications_noteId_Notes_id_fk", + "tableFrom": "Notifications", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdAccounts": { + "name": "OpenIdAccounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "server_id": { + "name": "server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdAccounts_userId_Users_id_fk": { + "name": "OpenIdAccounts_userId_Users_id_fk", + "tableFrom": "OpenIdAccounts", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdLoginFlows": { + "name": "OpenIdLoginFlows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "code_verifier": { + "name": "code_verifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdLoginFlows_applicationId_Applications_id_fk": { + "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", + "tableFrom": "OpenIdLoginFlows", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Relationships": { + "name": "Relationships", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "ownerId": { + "name": "ownerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "subjectId": { + "name": "subjectId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "following": { + "name": "following", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "showing_reblogs": { + "name": "showing_reblogs", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "notifying": { + "name": "notifying", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "followed_by": { + "name": "followed_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocking": { + "name": "blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocked_by": { + "name": "blocked_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting": { + "name": "muting", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting_notifications": { + "name": "muting_notifications", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "requested": { + "name": "requested", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "domain_blocking": { + "name": "domain_blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "endorsed": { + "name": "endorsed", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "languages": { + "name": "languages", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Relationships_ownerId_Users_id_fk": { + "name": "Relationships_ownerId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["ownerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Relationships_subjectId_Users_id_fk": { + "name": "Relationships_subjectId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["subjectId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Tokens": { + "name": "Tokens", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "token_type": { + "name": "token_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Tokens_userId_Users_id_fk": { + "name": "Tokens_userId_Users_id_fk", + "tableFrom": "Tokens", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Tokens_applicationId_Applications_id_fk": { + "name": "Tokens_applicationId_Applications_id_fk", + "tableFrom": "Tokens", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "UserToPinnedNotes": { + "name": "UserToPinnedNotes", + "schema": "", + "columns": { + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "UserToPinnedNotes_userId_noteId_index": { + "name": "UserToPinnedNotes_userId_noteId_index", + "columns": ["userId", "noteId"], + "isUnique": true + }, + "UserToPinnedNotes_noteId_index": { + "name": "UserToPinnedNotes_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "UserToPinnedNotes_userId_Users_id_fk": { + "name": "UserToPinnedNotes_userId_Users_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "UserToPinnedNotes_noteId_Notes_id_fk": { + "name": "UserToPinnedNotes_noteId_Notes_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Users": { + "name": "Users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "is_admin": { + "name": "is_admin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "endpoints": { + "name": "endpoints", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "avatar": { + "name": "avatar", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header": { + "name": "header", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "is_bot": { + "name": "is_bot", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_locked": { + "name": "is_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_discoverable": { + "name": "is_discoverable", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sanctions": { + "name": "sanctions", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "Users_uri_index": { + "name": "Users_uri_index", + "columns": ["uri"], + "isUnique": true + }, + "Users_username_index": { + "name": "Users_username_index", + "columns": ["username"], + "isUnique": true + }, + "Users_email_index": { + "name": "Users_email_index", + "columns": ["email"], + "isUnique": true + } + }, + "foreignKeys": { + "Users_instanceId_Instances_id_fk": { + "name": "Users_instanceId_Instances_id_fk", + "tableFrom": "Users", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} } - }, - "indexes": { - "Applications_client_id_index": { - "name": "Applications_client_id_index", - "columns": [ - "client_id" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} }, - "Attachments": { - "name": "Attachments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "remote_url": { - "name": "remote_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "thumbnail_url": { - "name": "thumbnail_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "blurhash": { - "name": "blurhash", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sha256": { - "name": "sha256", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "fps": { - "name": "fps", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "duration": { - "name": "duration", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Attachments_noteId_Notes_id_fk": { - "name": "Attachments_noteId_Notes_id_fk", - "tableFrom": "Attachments", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToNote": { - "name": "EmojiToNote", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToNote_emojiId_noteId_index": { - "name": "EmojiToNote_emojiId_noteId_index", - "columns": [ - "emojiId", - "noteId" - ], - "isUnique": true - }, - "EmojiToNote_noteId_index": { - "name": "EmojiToNote_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToNote_emojiId_Emojis_id_fk": { - "name": "EmojiToNote_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToNote_noteId_Notes_id_fk": { - "name": "EmojiToNote_noteId_Notes_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToUser": { - "name": "EmojiToUser", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToUser_emojiId_userId_index": { - "name": "EmojiToUser_emojiId_userId_index", - "columns": [ - "emojiId", - "userId" - ], - "isUnique": true - }, - "EmojiToUser_userId_index": { - "name": "EmojiToUser_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToUser_emojiId_Emojis_id_fk": { - "name": "EmojiToUser_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToUser_userId_Users_id_fk": { - "name": "EmojiToUser_userId_Users_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Emojis": { - "name": "Emojis", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "shortcode": { - "name": "shortcode", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "visible_in_picker": { - "name": "visible_in_picker", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Emojis_instanceId_Instances_id_fk": { - "name": "Emojis_instanceId_Instances_id_fk", - "tableFrom": "Emojis", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Flags": { - "name": "Flags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "flag_type": { - "name": "flag_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'other'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Flags_noteId_Notes_id_fk": { - "name": "Flags_noteId_Notes_id_fk", - "tableFrom": "Flags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Flags_userId_Users_id_fk": { - "name": "Flags_userId_Users_id_fk", - "tableFrom": "Flags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Instances": { - "name": "Instances", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "base_url": { - "name": "base_url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "version": { - "name": "version", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "logo": { - "name": "logo", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Likes": { - "name": "Likes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "likerId": { - "name": "likerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "likedId": { - "name": "likedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Likes_likerId_Users_id_fk": { - "name": "Likes_likerId_Users_id_fk", - "tableFrom": "Likes", - "tableTo": "Users", - "columnsFrom": [ - "likerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Likes_likedId_Notes_id_fk": { - "name": "Likes_likedId_Notes_id_fk", - "tableFrom": "Likes", - "tableTo": "Notes", - "columnsFrom": [ - "likedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "LysandObject": { - "name": "LysandObject", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "remote_id": { - "name": "remote_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "extra_data": { - "name": "extra_data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "extensions": { - "name": "extensions", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "LysandObject_remote_id_index": { - "name": "LysandObject_remote_id_index", - "columns": [ - "remote_id" - ], - "isUnique": true - }, - "LysandObject_uri_index": { - "name": "LysandObject_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "LysandObject_authorId_LysandObject_id_fk": { - "name": "LysandObject_authorId_LysandObject_id_fk", - "tableFrom": "LysandObject", - "tableTo": "LysandObject", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Markers": { - "name": "Markers", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "timeline": { - "name": "timeline", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Markers_noteId_Notes_id_fk": { - "name": "Markers_noteId_Notes_id_fk", - "tableFrom": "Markers", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Markers_userId_Users_id_fk": { - "name": "Markers_userId_Users_id_fk", - "tableFrom": "Markers", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModNotes": { - "name": "ModNotes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModNotes_noteId_Notes_id_fk": { - "name": "ModNotes_noteId_Notes_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_userId_Users_id_fk": { - "name": "ModNotes_userId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_modId_Users_id_fk": { - "name": "ModNotes_modId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModTags": { - "name": "ModTags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "tag": { - "name": "tag", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModTags_noteId_Notes_id_fk": { - "name": "ModTags_noteId_Notes_id_fk", - "tableFrom": "ModTags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_userId_Users_id_fk": { - "name": "ModTags_userId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_modId_Users_id_fk": { - "name": "ModTags_modId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "NoteToMentions": { - "name": "NoteToMentions", - "schema": "", - "columns": { - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "NoteToMentions_noteId_userId_index": { - "name": "NoteToMentions_noteId_userId_index", - "columns": [ - "noteId", - "userId" - ], - "isUnique": true - }, - "NoteToMentions_userId_index": { - "name": "NoteToMentions_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "NoteToMentions_noteId_Notes_id_fk": { - "name": "NoteToMentions_noteId_Notes_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "NoteToMentions_userId_Users_id_fk": { - "name": "NoteToMentions_userId_Users_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notes": { - "name": "Notes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reblogId": { - "name": "reblogId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'text/plain'" - }, - "visibility": { - "name": "visibility", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "replyId": { - "name": "replyId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "quoteId": { - "name": "quoteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "sensitive": { - "name": "sensitive", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "spoiler_text": { - "name": "spoiler_text", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content_source": { - "name": "content_source", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - } - }, - "indexes": { - "Notes_uri_index": { - "name": "Notes_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Notes_authorId_Users_id_fk": { - "name": "Notes_authorId_Users_id_fk", - "tableFrom": "Notes", - "tableTo": "Users", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_applicationId_Applications_id_fk": { - "name": "Notes_applicationId_Applications_id_fk", - "tableFrom": "Notes", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_reblogId_Notes_id_fk": { - "name": "Notes_reblogId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "reblogId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_replyId_Notes_id_fk": { - "name": "Notes_replyId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "replyId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_quoteId_Notes_id_fk": { - "name": "Notes_quoteId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "quoteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notifications": { - "name": "Notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "notifiedId": { - "name": "notifiedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "accountId": { - "name": "accountId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "dismissed": { - "name": "dismissed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": { - "Notifications_notifiedId_Users_id_fk": { - "name": "Notifications_notifiedId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "notifiedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_accountId_Users_id_fk": { - "name": "Notifications_accountId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "accountId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_noteId_Notes_id_fk": { - "name": "Notifications_noteId_Notes_id_fk", - "tableFrom": "Notifications", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdAccounts": { - "name": "OpenIdAccounts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "server_id": { - "name": "server_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdAccounts_userId_Users_id_fk": { - "name": "OpenIdAccounts_userId_Users_id_fk", - "tableFrom": "OpenIdAccounts", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdLoginFlows": { - "name": "OpenIdLoginFlows", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "code_verifier": { - "name": "code_verifier", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdLoginFlows_applicationId_Applications_id_fk": { - "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", - "tableFrom": "OpenIdLoginFlows", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Relationships": { - "name": "Relationships", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "ownerId": { - "name": "ownerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "subjectId": { - "name": "subjectId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "following": { - "name": "following", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "showing_reblogs": { - "name": "showing_reblogs", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "notifying": { - "name": "notifying", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "followed_by": { - "name": "followed_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocking": { - "name": "blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocked_by": { - "name": "blocked_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting": { - "name": "muting", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting_notifications": { - "name": "muting_notifications", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "requested": { - "name": "requested", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "domain_blocking": { - "name": "domain_blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "endorsed": { - "name": "endorsed", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "languages": { - "name": "languages", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Relationships_ownerId_Users_id_fk": { - "name": "Relationships_ownerId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "ownerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Relationships_subjectId_Users_id_fk": { - "name": "Relationships_subjectId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "subjectId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Tokens": { - "name": "Tokens", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "token_type": { - "name": "token_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "scope": { - "name": "scope", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "code": { - "name": "code", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Tokens_userId_Users_id_fk": { - "name": "Tokens_userId_Users_id_fk", - "tableFrom": "Tokens", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Tokens_applicationId_Applications_id_fk": { - "name": "Tokens_applicationId_Applications_id_fk", - "tableFrom": "Tokens", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "UserToPinnedNotes": { - "name": "UserToPinnedNotes", - "schema": "", - "columns": { - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "UserToPinnedNotes_userId_noteId_index": { - "name": "UserToPinnedNotes_userId_noteId_index", - "columns": [ - "userId", - "noteId" - ], - "isUnique": true - }, - "UserToPinnedNotes_noteId_index": { - "name": "UserToPinnedNotes_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "UserToPinnedNotes_userId_Users_id_fk": { - "name": "UserToPinnedNotes_userId_Users_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "UserToPinnedNotes_noteId_Notes_id_fk": { - "name": "UserToPinnedNotes_noteId_Notes_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Users": { - "name": "Users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "password": { - "name": "password", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "endpoints": { - "name": "endpoints", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "avatar": { - "name": "avatar", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "header": { - "name": "header", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_bot": { - "name": "is_bot", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_discoverable": { - "name": "is_discoverable", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "sanctions": { - "name": "sanctions", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "public_key": { - "name": "public_key", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "private_key": { - "name": "private_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "Users_uri_index": { - "name": "Users_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - }, - "Users_username_index": { - "name": "Users_username_index", - "columns": [ - "username" - ], - "isUnique": true - }, - "Users_email_index": { - "name": "Users_email_index", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Users_instanceId_Instances_id_fk": { - "name": "Users_instanceId_Instances_id_fk", - "tableFrom": "Users", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, + "enums": {}, "schemas": {}, - "tables": {} - } -} \ No newline at end of file + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/drizzle/meta/0013_snapshot.json b/drizzle/meta/0013_snapshot.json index 6584539a..40a690cc 100644 --- a/drizzle/meta/0013_snapshot.json +++ b/drizzle/meta/0013_snapshot.json @@ -1,1848 +1,1658 @@ { - "id": "3a5d3182-563a-4d3f-b3be-70811fae42b2", - "prevId": "8517a395-a39e-4fc2-acde-efa6b64e48e8", - "version": "5", - "dialect": "pg", - "tables": { - "Applications": { - "name": "Applications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" + "id": "3a5d3182-563a-4d3f-b3be-70811fae42b2", + "prevId": "8517a395-a39e-4fc2-acde-efa6b64e48e8", + "version": "5", + "dialect": "pg", + "tables": { + "Applications": { + "name": "Applications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "website": { + "name": "website", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "vapid_key": { + "name": "vapid_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret": { + "name": "secret", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "redirect_uris": { + "name": "redirect_uris", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "Applications_client_id_index": { + "name": "Applications_client_id_index", + "columns": ["client_id"], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true + "Attachments": { + "name": "Attachments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "remote_url": { + "name": "remote_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "thumbnail_url": { + "name": "thumbnail_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "blurhash": { + "name": "blurhash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sha256": { + "name": "sha256", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "fps": { + "name": "fps", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Attachments_noteId_Notes_id_fk": { + "name": "Attachments_noteId_Notes_id_fk", + "tableFrom": "Attachments", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "website": { - "name": "website", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToNote": { + "name": "EmojiToNote", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToNote_emojiId_noteId_index": { + "name": "EmojiToNote_emojiId_noteId_index", + "columns": ["emojiId", "noteId"], + "isUnique": true + }, + "EmojiToNote_noteId_index": { + "name": "EmojiToNote_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToNote_emojiId_Emojis_id_fk": { + "name": "EmojiToNote_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToNote_noteId_Notes_id_fk": { + "name": "EmojiToNote_noteId_Notes_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "vapid_key": { - "name": "vapid_key", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToUser": { + "name": "EmojiToUser", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToUser_emojiId_userId_index": { + "name": "EmojiToUser_emojiId_userId_index", + "columns": ["emojiId", "userId"], + "isUnique": true + }, + "EmojiToUser_userId_index": { + "name": "EmojiToUser_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToUser_emojiId_Emojis_id_fk": { + "name": "EmojiToUser_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToUser_userId_Users_id_fk": { + "name": "EmojiToUser_userId_Users_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true + "Emojis": { + "name": "Emojis", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "shortcode": { + "name": "shortcode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "visible_in_picker": { + "name": "visible_in_picker", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Emojis_instanceId_Instances_id_fk": { + "name": "Emojis_instanceId_Instances_id_fk", + "tableFrom": "Emojis", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "secret": { - "name": "secret", - "type": "text", - "primaryKey": false, - "notNull": true + "Flags": { + "name": "Flags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "flag_type": { + "name": "flag_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'other'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Flags_noteId_Notes_id_fk": { + "name": "Flags_noteId_Notes_id_fk", + "tableFrom": "Flags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Flags_userId_Users_id_fk": { + "name": "Flags_userId_Users_id_fk", + "tableFrom": "Flags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true + "Instances": { + "name": "Instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "logo": { + "name": "logo", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "redirect_uris": { - "name": "redirect_uris", - "type": "text", - "primaryKey": false, - "notNull": true + "Likes": { + "name": "Likes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "likerId": { + "name": "likerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "likedId": { + "name": "likedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Likes_likerId_Users_id_fk": { + "name": "Likes_likerId_Users_id_fk", + "tableFrom": "Likes", + "tableTo": "Users", + "columnsFrom": ["likerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Likes_likedId_Notes_id_fk": { + "name": "Likes_likedId_Notes_id_fk", + "tableFrom": "Likes", + "tableTo": "Notes", + "columnsFrom": ["likedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "LysandObject": { + "name": "LysandObject", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "remote_id": { + "name": "remote_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "extra_data": { + "name": "extra_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "extensions": { + "name": "extensions", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "LysandObject_remote_id_index": { + "name": "LysandObject_remote_id_index", + "columns": ["remote_id"], + "isUnique": true + }, + "LysandObject_uri_index": { + "name": "LysandObject_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "LysandObject_authorId_LysandObject_id_fk": { + "name": "LysandObject_authorId_LysandObject_id_fk", + "tableFrom": "LysandObject", + "tableTo": "LysandObject", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Markers": { + "name": "Markers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notificationId": { + "name": "notificationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "timeline": { + "name": "timeline", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Markers_noteId_Notes_id_fk": { + "name": "Markers_noteId_Notes_id_fk", + "tableFrom": "Markers", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Markers_notificationId_Notifications_id_fk": { + "name": "Markers_notificationId_Notifications_id_fk", + "tableFrom": "Markers", + "tableTo": "Notifications", + "columnsFrom": ["notificationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Markers_userId_Users_id_fk": { + "name": "Markers_userId_Users_id_fk", + "tableFrom": "Markers", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModNotes": { + "name": "ModNotes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModNotes_noteId_Notes_id_fk": { + "name": "ModNotes_noteId_Notes_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_userId_Users_id_fk": { + "name": "ModNotes_userId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_modId_Users_id_fk": { + "name": "ModNotes_modId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModTags": { + "name": "ModTags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModTags_noteId_Notes_id_fk": { + "name": "ModTags_noteId_Notes_id_fk", + "tableFrom": "ModTags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_userId_Users_id_fk": { + "name": "ModTags_userId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_modId_Users_id_fk": { + "name": "ModTags_modId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "NoteToMentions": { + "name": "NoteToMentions", + "schema": "", + "columns": { + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "NoteToMentions_noteId_userId_index": { + "name": "NoteToMentions_noteId_userId_index", + "columns": ["noteId", "userId"], + "isUnique": true + }, + "NoteToMentions_userId_index": { + "name": "NoteToMentions_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "NoteToMentions_noteId_Notes_id_fk": { + "name": "NoteToMentions_noteId_Notes_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "NoteToMentions_userId_Users_id_fk": { + "name": "NoteToMentions_userId_Users_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notes": { + "name": "Notes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reblogId": { + "name": "reblogId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text/plain'" + }, + "visibility": { + "name": "visibility", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "replyId": { + "name": "replyId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "quoteId": { + "name": "quoteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "sensitive": { + "name": "sensitive", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "spoiler_text": { + "name": "spoiler_text", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content_source": { + "name": "content_source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + } + }, + "indexes": { + "Notes_uri_index": { + "name": "Notes_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "Notes_authorId_Users_id_fk": { + "name": "Notes_authorId_Users_id_fk", + "tableFrom": "Notes", + "tableTo": "Users", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_applicationId_Applications_id_fk": { + "name": "Notes_applicationId_Applications_id_fk", + "tableFrom": "Notes", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_reblogId_Notes_id_fk": { + "name": "Notes_reblogId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["reblogId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_replyId_Notes_id_fk": { + "name": "Notes_replyId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["replyId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_quoteId_Notes_id_fk": { + "name": "Notes_quoteId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["quoteId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notifications": { + "name": "Notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "notifiedId": { + "name": "notifiedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "accountId": { + "name": "accountId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "dismissed": { + "name": "dismissed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": { + "Notifications_notifiedId_Users_id_fk": { + "name": "Notifications_notifiedId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["notifiedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_accountId_Users_id_fk": { + "name": "Notifications_accountId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["accountId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_noteId_Notes_id_fk": { + "name": "Notifications_noteId_Notes_id_fk", + "tableFrom": "Notifications", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdAccounts": { + "name": "OpenIdAccounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "server_id": { + "name": "server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdAccounts_userId_Users_id_fk": { + "name": "OpenIdAccounts_userId_Users_id_fk", + "tableFrom": "OpenIdAccounts", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdLoginFlows": { + "name": "OpenIdLoginFlows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "code_verifier": { + "name": "code_verifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdLoginFlows_applicationId_Applications_id_fk": { + "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", + "tableFrom": "OpenIdLoginFlows", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Relationships": { + "name": "Relationships", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "ownerId": { + "name": "ownerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "subjectId": { + "name": "subjectId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "following": { + "name": "following", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "showing_reblogs": { + "name": "showing_reblogs", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "notifying": { + "name": "notifying", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "followed_by": { + "name": "followed_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocking": { + "name": "blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocked_by": { + "name": "blocked_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting": { + "name": "muting", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting_notifications": { + "name": "muting_notifications", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "requested": { + "name": "requested", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "domain_blocking": { + "name": "domain_blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "endorsed": { + "name": "endorsed", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "languages": { + "name": "languages", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Relationships_ownerId_Users_id_fk": { + "name": "Relationships_ownerId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["ownerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Relationships_subjectId_Users_id_fk": { + "name": "Relationships_subjectId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["subjectId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Tokens": { + "name": "Tokens", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "token_type": { + "name": "token_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Tokens_userId_Users_id_fk": { + "name": "Tokens_userId_Users_id_fk", + "tableFrom": "Tokens", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Tokens_applicationId_Applications_id_fk": { + "name": "Tokens_applicationId_Applications_id_fk", + "tableFrom": "Tokens", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "UserToPinnedNotes": { + "name": "UserToPinnedNotes", + "schema": "", + "columns": { + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "UserToPinnedNotes_userId_noteId_index": { + "name": "UserToPinnedNotes_userId_noteId_index", + "columns": ["userId", "noteId"], + "isUnique": true + }, + "UserToPinnedNotes_noteId_index": { + "name": "UserToPinnedNotes_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "UserToPinnedNotes_userId_Users_id_fk": { + "name": "UserToPinnedNotes_userId_Users_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "UserToPinnedNotes_noteId_Notes_id_fk": { + "name": "UserToPinnedNotes_noteId_Notes_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Users": { + "name": "Users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "is_admin": { + "name": "is_admin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "endpoints": { + "name": "endpoints", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "avatar": { + "name": "avatar", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header": { + "name": "header", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "is_bot": { + "name": "is_bot", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_locked": { + "name": "is_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_discoverable": { + "name": "is_discoverable", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sanctions": { + "name": "sanctions", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "Users_uri_index": { + "name": "Users_uri_index", + "columns": ["uri"], + "isUnique": true + }, + "Users_username_index": { + "name": "Users_username_index", + "columns": ["username"], + "isUnique": true + }, + "Users_email_index": { + "name": "Users_email_index", + "columns": ["email"], + "isUnique": true + } + }, + "foreignKeys": { + "Users_instanceId_Instances_id_fk": { + "name": "Users_instanceId_Instances_id_fk", + "tableFrom": "Users", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} } - }, - "indexes": { - "Applications_client_id_index": { - "name": "Applications_client_id_index", - "columns": [ - "client_id" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} }, - "Attachments": { - "name": "Attachments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "remote_url": { - "name": "remote_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "thumbnail_url": { - "name": "thumbnail_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "blurhash": { - "name": "blurhash", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sha256": { - "name": "sha256", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "fps": { - "name": "fps", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "duration": { - "name": "duration", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Attachments_noteId_Notes_id_fk": { - "name": "Attachments_noteId_Notes_id_fk", - "tableFrom": "Attachments", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToNote": { - "name": "EmojiToNote", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToNote_emojiId_noteId_index": { - "name": "EmojiToNote_emojiId_noteId_index", - "columns": [ - "emojiId", - "noteId" - ], - "isUnique": true - }, - "EmojiToNote_noteId_index": { - "name": "EmojiToNote_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToNote_emojiId_Emojis_id_fk": { - "name": "EmojiToNote_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToNote_noteId_Notes_id_fk": { - "name": "EmojiToNote_noteId_Notes_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToUser": { - "name": "EmojiToUser", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToUser_emojiId_userId_index": { - "name": "EmojiToUser_emojiId_userId_index", - "columns": [ - "emojiId", - "userId" - ], - "isUnique": true - }, - "EmojiToUser_userId_index": { - "name": "EmojiToUser_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToUser_emojiId_Emojis_id_fk": { - "name": "EmojiToUser_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToUser_userId_Users_id_fk": { - "name": "EmojiToUser_userId_Users_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Emojis": { - "name": "Emojis", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "shortcode": { - "name": "shortcode", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "visible_in_picker": { - "name": "visible_in_picker", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Emojis_instanceId_Instances_id_fk": { - "name": "Emojis_instanceId_Instances_id_fk", - "tableFrom": "Emojis", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Flags": { - "name": "Flags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "flag_type": { - "name": "flag_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'other'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Flags_noteId_Notes_id_fk": { - "name": "Flags_noteId_Notes_id_fk", - "tableFrom": "Flags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Flags_userId_Users_id_fk": { - "name": "Flags_userId_Users_id_fk", - "tableFrom": "Flags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Instances": { - "name": "Instances", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "base_url": { - "name": "base_url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "version": { - "name": "version", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "logo": { - "name": "logo", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Likes": { - "name": "Likes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "likerId": { - "name": "likerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "likedId": { - "name": "likedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Likes_likerId_Users_id_fk": { - "name": "Likes_likerId_Users_id_fk", - "tableFrom": "Likes", - "tableTo": "Users", - "columnsFrom": [ - "likerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Likes_likedId_Notes_id_fk": { - "name": "Likes_likedId_Notes_id_fk", - "tableFrom": "Likes", - "tableTo": "Notes", - "columnsFrom": [ - "likedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "LysandObject": { - "name": "LysandObject", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "remote_id": { - "name": "remote_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "extra_data": { - "name": "extra_data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "extensions": { - "name": "extensions", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "LysandObject_remote_id_index": { - "name": "LysandObject_remote_id_index", - "columns": [ - "remote_id" - ], - "isUnique": true - }, - "LysandObject_uri_index": { - "name": "LysandObject_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "LysandObject_authorId_LysandObject_id_fk": { - "name": "LysandObject_authorId_LysandObject_id_fk", - "tableFrom": "LysandObject", - "tableTo": "LysandObject", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Markers": { - "name": "Markers", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "notificationId": { - "name": "notificationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "timeline": { - "name": "timeline", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Markers_noteId_Notes_id_fk": { - "name": "Markers_noteId_Notes_id_fk", - "tableFrom": "Markers", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Markers_notificationId_Notifications_id_fk": { - "name": "Markers_notificationId_Notifications_id_fk", - "tableFrom": "Markers", - "tableTo": "Notifications", - "columnsFrom": [ - "notificationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Markers_userId_Users_id_fk": { - "name": "Markers_userId_Users_id_fk", - "tableFrom": "Markers", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModNotes": { - "name": "ModNotes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModNotes_noteId_Notes_id_fk": { - "name": "ModNotes_noteId_Notes_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_userId_Users_id_fk": { - "name": "ModNotes_userId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_modId_Users_id_fk": { - "name": "ModNotes_modId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModTags": { - "name": "ModTags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "tag": { - "name": "tag", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModTags_noteId_Notes_id_fk": { - "name": "ModTags_noteId_Notes_id_fk", - "tableFrom": "ModTags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_userId_Users_id_fk": { - "name": "ModTags_userId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_modId_Users_id_fk": { - "name": "ModTags_modId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "NoteToMentions": { - "name": "NoteToMentions", - "schema": "", - "columns": { - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "NoteToMentions_noteId_userId_index": { - "name": "NoteToMentions_noteId_userId_index", - "columns": [ - "noteId", - "userId" - ], - "isUnique": true - }, - "NoteToMentions_userId_index": { - "name": "NoteToMentions_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "NoteToMentions_noteId_Notes_id_fk": { - "name": "NoteToMentions_noteId_Notes_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "NoteToMentions_userId_Users_id_fk": { - "name": "NoteToMentions_userId_Users_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notes": { - "name": "Notes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reblogId": { - "name": "reblogId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'text/plain'" - }, - "visibility": { - "name": "visibility", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "replyId": { - "name": "replyId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "quoteId": { - "name": "quoteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "sensitive": { - "name": "sensitive", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "spoiler_text": { - "name": "spoiler_text", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content_source": { - "name": "content_source", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - } - }, - "indexes": { - "Notes_uri_index": { - "name": "Notes_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Notes_authorId_Users_id_fk": { - "name": "Notes_authorId_Users_id_fk", - "tableFrom": "Notes", - "tableTo": "Users", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_applicationId_Applications_id_fk": { - "name": "Notes_applicationId_Applications_id_fk", - "tableFrom": "Notes", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_reblogId_Notes_id_fk": { - "name": "Notes_reblogId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "reblogId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_replyId_Notes_id_fk": { - "name": "Notes_replyId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "replyId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_quoteId_Notes_id_fk": { - "name": "Notes_quoteId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "quoteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notifications": { - "name": "Notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "notifiedId": { - "name": "notifiedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "accountId": { - "name": "accountId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "dismissed": { - "name": "dismissed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": { - "Notifications_notifiedId_Users_id_fk": { - "name": "Notifications_notifiedId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "notifiedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_accountId_Users_id_fk": { - "name": "Notifications_accountId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "accountId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_noteId_Notes_id_fk": { - "name": "Notifications_noteId_Notes_id_fk", - "tableFrom": "Notifications", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdAccounts": { - "name": "OpenIdAccounts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "server_id": { - "name": "server_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdAccounts_userId_Users_id_fk": { - "name": "OpenIdAccounts_userId_Users_id_fk", - "tableFrom": "OpenIdAccounts", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdLoginFlows": { - "name": "OpenIdLoginFlows", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "code_verifier": { - "name": "code_verifier", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdLoginFlows_applicationId_Applications_id_fk": { - "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", - "tableFrom": "OpenIdLoginFlows", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Relationships": { - "name": "Relationships", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "ownerId": { - "name": "ownerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "subjectId": { - "name": "subjectId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "following": { - "name": "following", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "showing_reblogs": { - "name": "showing_reblogs", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "notifying": { - "name": "notifying", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "followed_by": { - "name": "followed_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocking": { - "name": "blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocked_by": { - "name": "blocked_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting": { - "name": "muting", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting_notifications": { - "name": "muting_notifications", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "requested": { - "name": "requested", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "domain_blocking": { - "name": "domain_blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "endorsed": { - "name": "endorsed", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "languages": { - "name": "languages", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Relationships_ownerId_Users_id_fk": { - "name": "Relationships_ownerId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "ownerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Relationships_subjectId_Users_id_fk": { - "name": "Relationships_subjectId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "subjectId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Tokens": { - "name": "Tokens", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "token_type": { - "name": "token_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "scope": { - "name": "scope", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "code": { - "name": "code", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Tokens_userId_Users_id_fk": { - "name": "Tokens_userId_Users_id_fk", - "tableFrom": "Tokens", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Tokens_applicationId_Applications_id_fk": { - "name": "Tokens_applicationId_Applications_id_fk", - "tableFrom": "Tokens", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "UserToPinnedNotes": { - "name": "UserToPinnedNotes", - "schema": "", - "columns": { - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "UserToPinnedNotes_userId_noteId_index": { - "name": "UserToPinnedNotes_userId_noteId_index", - "columns": [ - "userId", - "noteId" - ], - "isUnique": true - }, - "UserToPinnedNotes_noteId_index": { - "name": "UserToPinnedNotes_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "UserToPinnedNotes_userId_Users_id_fk": { - "name": "UserToPinnedNotes_userId_Users_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "UserToPinnedNotes_noteId_Notes_id_fk": { - "name": "UserToPinnedNotes_noteId_Notes_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Users": { - "name": "Users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "password": { - "name": "password", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "endpoints": { - "name": "endpoints", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "avatar": { - "name": "avatar", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "header": { - "name": "header", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_bot": { - "name": "is_bot", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_discoverable": { - "name": "is_discoverable", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "sanctions": { - "name": "sanctions", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "public_key": { - "name": "public_key", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "private_key": { - "name": "private_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "Users_uri_index": { - "name": "Users_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - }, - "Users_username_index": { - "name": "Users_username_index", - "columns": [ - "username" - ], - "isUnique": true - }, - "Users_email_index": { - "name": "Users_email_index", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Users_instanceId_Instances_id_fk": { - "name": "Users_instanceId_Instances_id_fk", - "tableFrom": "Users", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, + "enums": {}, "schemas": {}, - "tables": {} - } -} \ No newline at end of file + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index 0d1a6a12..44f81811 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -1,104 +1,104 @@ { - "version": "5", - "dialect": "pg", - "entries": [ - { - "idx": 0, - "version": "5", - "when": 1712805159664, - "tag": "0000_illegal_living_lightning", - "breakpoints": true - }, - { - "idx": 1, - "version": "5", - "when": 1713055774123, - "tag": "0001_salty_night_thrasher", - "breakpoints": true - }, - { - "idx": 2, - "version": "5", - "when": 1713056370431, - "tag": "0002_stiff_ares", - "breakpoints": true - }, - { - "idx": 3, - "version": "5", - "when": 1713056528340, - "tag": "0003_spicy_arachne", - "breakpoints": true - }, - { - "idx": 4, - "version": "5", - "when": 1713056712218, - "tag": "0004_burly_lockjaw", - "breakpoints": true - }, - { - "idx": 5, - "version": "5", - "when": 1713056917973, - "tag": "0005_sleepy_puma", - "breakpoints": true - }, - { - "idx": 6, - "version": "5", - "when": 1713057159867, - "tag": "0006_messy_network", - "breakpoints": true - }, - { - "idx": 7, - "version": "5", - "when": 1713227918208, - "tag": "0007_naive_sleeper", - "breakpoints": true - }, - { - "idx": 8, - "version": "5", - "when": 1713246700119, - "tag": "0008_flawless_brother_voodoo", - "breakpoints": true - }, - { - "idx": 9, - "version": "5", - "when": 1713327832438, - "tag": "0009_easy_slyde", - "breakpoints": true - }, - { - "idx": 10, - "version": "5", - "when": 1713327880929, - "tag": "0010_daffy_frightful_four", - "breakpoints": true - }, - { - "idx": 11, - "version": "5", - "when": 1713333611707, - "tag": "0011_special_the_fury", - "breakpoints": true - }, - { - "idx": 12, - "version": "5", - "when": 1713336108114, - "tag": "0012_certain_thor_girl", - "breakpoints": true - }, - { - "idx": 13, - "version": "5", - "when": 1713336611301, - "tag": "0013_wandering_celestials", - "breakpoints": true - } - ] -} \ No newline at end of file + "version": "5", + "dialect": "pg", + "entries": [ + { + "idx": 0, + "version": "5", + "when": 1712805159664, + "tag": "0000_illegal_living_lightning", + "breakpoints": true + }, + { + "idx": 1, + "version": "5", + "when": 1713055774123, + "tag": "0001_salty_night_thrasher", + "breakpoints": true + }, + { + "idx": 2, + "version": "5", + "when": 1713056370431, + "tag": "0002_stiff_ares", + "breakpoints": true + }, + { + "idx": 3, + "version": "5", + "when": 1713056528340, + "tag": "0003_spicy_arachne", + "breakpoints": true + }, + { + "idx": 4, + "version": "5", + "when": 1713056712218, + "tag": "0004_burly_lockjaw", + "breakpoints": true + }, + { + "idx": 5, + "version": "5", + "when": 1713056917973, + "tag": "0005_sleepy_puma", + "breakpoints": true + }, + { + "idx": 6, + "version": "5", + "when": 1713057159867, + "tag": "0006_messy_network", + "breakpoints": true + }, + { + "idx": 7, + "version": "5", + "when": 1713227918208, + "tag": "0007_naive_sleeper", + "breakpoints": true + }, + { + "idx": 8, + "version": "5", + "when": 1713246700119, + "tag": "0008_flawless_brother_voodoo", + "breakpoints": true + }, + { + "idx": 9, + "version": "5", + "when": 1713327832438, + "tag": "0009_easy_slyde", + "breakpoints": true + }, + { + "idx": 10, + "version": "5", + "when": 1713327880929, + "tag": "0010_daffy_frightful_four", + "breakpoints": true + }, + { + "idx": 11, + "version": "5", + "when": 1713333611707, + "tag": "0011_special_the_fury", + "breakpoints": true + }, + { + "idx": 12, + "version": "5", + "when": 1713336108114, + "tag": "0012_certain_thor_girl", + "breakpoints": true + }, + { + "idx": 13, + "version": "5", + "when": 1713336611301, + "tag": "0013_wandering_celestials", + "breakpoints": true + } + ] +} diff --git a/package.json b/package.json index 86ecb67c..9f81bc42 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "vue-demi" ], "devDependencies": { - "@biomejs/biome": "1.6.4", + "@biomejs/biome": "^1.7.0", "@types/cli-table": "^0.3.4", "@types/html-to-text": "^9.0.4", "@types/ioredis": "^5.0.0", diff --git a/server/api/api/v1/accounts/[id]/block.test.ts b/server/api/api/v1/accounts/[id]/block.test.ts index e78242ae..cc174083 100644 --- a/server/api/api/v1/accounts/[id]/block.test.ts +++ b/server/api/api/v1/accounts/[id]/block.test.ts @@ -5,8 +5,8 @@ import { getTestUsers, sendTestRequest, } from "~tests/utils"; -import { meta } from "./block"; import type { Relationship as APIRelationship } from "~types/mastodon/relationship"; +import { meta } from "./block"; await deleteOldTestUsers(); diff --git a/server/api/api/v1/accounts/[id]/follow.test.ts b/server/api/api/v1/accounts/[id]/follow.test.ts index 3b4ef482..6ac2807a 100644 --- a/server/api/api/v1/accounts/[id]/follow.test.ts +++ b/server/api/api/v1/accounts/[id]/follow.test.ts @@ -5,8 +5,8 @@ import { getTestUsers, sendTestRequest, } from "~tests/utils"; -import { meta } from "./follow"; import type { Relationship as APIRelationship } from "~types/mastodon/relationship"; +import { meta } from "./follow"; await deleteOldTestUsers(); diff --git a/server/api/api/v1/accounts/[id]/mute.test.ts b/server/api/api/v1/accounts/[id]/mute.test.ts index efeb82eb..673cefcb 100644 --- a/server/api/api/v1/accounts/[id]/mute.test.ts +++ b/server/api/api/v1/accounts/[id]/mute.test.ts @@ -5,8 +5,8 @@ import { getTestUsers, sendTestRequest, } from "~tests/utils"; -import { meta } from "./mute"; import type { Relationship as APIRelationship } from "~types/mastodon/relationship"; +import { meta } from "./mute"; await deleteOldTestUsers(); diff --git a/server/api/api/v1/accounts/[id]/statuses.test.ts b/server/api/api/v1/accounts/[id]/statuses.test.ts index d3301b10..6f10dcf8 100644 --- a/server/api/api/v1/accounts/[id]/statuses.test.ts +++ b/server/api/api/v1/accounts/[id]/statuses.test.ts @@ -1,5 +1,6 @@ import { afterAll, beforeAll, describe, expect, test } from "bun:test"; import { config } from "config-manager"; +import { db } from "~drizzle/db"; import { deleteOldTestUsers, getTestStatuses, @@ -7,9 +8,8 @@ import { sendTestRequest, } from "~tests/utils"; import type { Account as APIAccount } from "~types/mastodon/account"; -import { meta } from "./statuses"; import type { Status as APIStatus } from "~types/mastodon/status"; -import { db } from "~drizzle/db"; +import { meta } from "./statuses"; await deleteOldTestUsers(); diff --git a/server/api/api/v1/accounts/[id]/unmute.test.ts b/server/api/api/v1/accounts/[id]/unmute.test.ts index 798be4ad..40bfe2d6 100644 --- a/server/api/api/v1/accounts/[id]/unmute.test.ts +++ b/server/api/api/v1/accounts/[id]/unmute.test.ts @@ -5,8 +5,8 @@ import { getTestUsers, sendTestRequest, } from "~tests/utils"; -import { meta } from "./unmute"; import type { Relationship as APIRelationship } from "~types/mastodon/relationship"; +import { meta } from "./unmute"; await deleteOldTestUsers(); diff --git a/server/api/api/v2/search/index.ts b/server/api/api/v2/search/index.ts index fdaaeb3b..c08e1c4d 100644 --- a/server/api/api/v2/search/index.ts +++ b/server/api/api/v2/search/index.ts @@ -170,9 +170,9 @@ export default apiRoute( self ? sql`EXISTS (SELECT 1 FROM Relationships WHERE Relationships.subjectId = ${ self?.id - } AND Relationships.following = ${ - following ? true : false - } AND Relationships.ownerId = ${user.id})` + } AND Relationships.following = ${!!following} AND Relationships.ownerId = ${ + user.id + })` : undefined, ), orderBy: (user, { desc }) => desc(user.createdAt), @@ -188,9 +188,9 @@ export default apiRoute( self ? sql`EXISTS (SELECT 1 FROM Relationships WHERE Relationships.subjectId = ${ self?.id - } AND Relationships.following = ${ - following ? true : false - } AND Relationships.ownerId = ${Notes.authorId})` + } AND Relationships.following = ${!!following} AND Relationships.ownerId = ${ + Notes.authorId + })` : undefined, ), );