From 65d406c49663e56ed466b89c6437d126a3dc0557 Mon Sep 17 00:00:00 2001 From: Kollan House Date: Wed, 20 Nov 2024 13:17:55 -0500 Subject: [PATCH] Revert "feat: merge staging" --- bun.lockb | Bin 3646 -> 0 bytes package.json | 3 +- packages/database/bun.lockb | Bin 53542 -> 0 bytes packages/database/drizzle.config.ts | 6 - .../database/drizzle/0009_brainy_karma.sql | 59 - .../database/drizzle/0010_crazy_sentinels.sql | 34 - .../database/drizzle/meta/0000_snapshot.json | 734 ++- .../database/drizzle/meta/0001_snapshot.json | 1110 ++--- .../database/drizzle/meta/0002_snapshot.json | 1110 ++--- .../database/drizzle/meta/0003_snapshot.json | 1110 ++--- .../database/drizzle/meta/0004_snapshot.json | 1110 ++--- .../database/drizzle/meta/0005_snapshot.json | 1110 ++--- .../database/drizzle/meta/0006_snapshot.json | 1110 ++--- .../database/drizzle/meta/0007_snapshot.json | 1110 ++--- .../database/drizzle/meta/0008_snapshot.json | 1110 ++--- .../database/drizzle/meta/0009_snapshot.json | 4036 ---------------- .../database/drizzle/meta/0010_snapshot.json | 4206 ----------------- packages/database/drizzle/meta/_journal.json | 14 - packages/database/lib/index.ts | 1 - packages/database/lib/schema.ts | 38 +- packages/database/package.json | 10 +- .../hasura/metadata/databases/databases.yaml | 141 +- .../futarchy/tables/public_takes.yaml | 1 + .../hasura/metadata/query_collections.yaml | 27 - packages/hasura/metadata/rest_endpoints.yaml | 18 - packages/indexer/readme.md | 20 - packages/indexer/src/adapters/telegram-bot.ts | 15 +- .../src/{v3_indexer => }/builders/swaps.ts | 72 +- .../indexer/src/{v3_indexer => }/cli/index.ts | 0 .../cli/txw/common/select-account.ts | 0 .../src/{v3_indexer => }/cli/txw/create.ts | 0 .../src/{v3_indexer => }/cli/txw/index.ts | 0 .../src/{v3_indexer => }/cli/txw/populate.ts | 15 +- .../src/{v3_indexer => }/cli/txw/reset.ts | 0 .../src/{v3_indexer => }/cli/txw/validate.ts | 0 packages/indexer/src/connection.ts | 27 +- .../indexer/src/{v3_indexer => }/constants.ts | 0 packages/indexer/src/endpoints/get-metrics.ts | 21 + packages/indexer/src/index.ts | 58 +- .../indexers/account-info-indexer.ts | 0 .../indexers/account-logs-indexer.ts | 0 .../amm-market/amm-market-account-indexer.ts | 2 +- .../amm-market-account-interval-indexer.ts | 7 +- .../amm-market-instruction-indexer.ts | 2 +- .../amm-market-logs-subscribe-indexer.ts | 2 +- .../indexers/amm-market/utils.ts | 89 +- .../indexers/autocrat/autocrat-dao-indexer.ts | 107 +- .../autocrat/autocrat-proposal-indexer.ts | 212 +- .../indexers/autocrat/autocrat-v0-indexer.ts | 2 +- .../autocrat/autocrat-v0_1-indexer.ts | 2 +- .../autocrat/autocrat-v0_2-indexer.ts | 2 +- .../birdeye/birdeye-prices-indexer.ts | 2 +- .../src/{v3_indexer => }/indexers/common.ts | 0 .../src/{v3_indexer => }/indexers/index.ts | 2 +- .../indexers/instruction-indexer.ts | 0 .../indexers/interval-fetch-indexer.ts | 8 - .../jupiter/jupiter-quotes-indexer.ts | 2 +- .../openbook-twap-instruction-indexer.ts | 0 .../openbook-v2-account-indexer.ts | 2 +- .../openbook-v2/openbook-v2-indexer.ts | 0 .../indexers/start-account-info-indexers.ts | 23 +- .../indexers/start-interval-fetch-indexers.ts | 2 +- .../indexers/start-logs-subscribe-indexer.ts | 2 +- .../start-transaction-history-indexers.ts | 0 .../indexers/token/token-mint-indexer.ts | 2 +- .../{v3_indexer => }/instruction-dispatch.ts | 0 .../src/{v3_indexer => }/local-cache.ts | 0 packages/indexer/src/logger.ts | 29 +- .../indexer/src/{v3_indexer => }/match.ts | 0 .../src/{v3_indexer => }/proposal-indexer.ts | 0 packages/indexer/src/server.ts | 18 + packages/indexer/src/subscriber.ts | 56 - .../transaction/account-resolver.ts | 0 .../{v3_indexer => }/transaction/history.ts | 2 +- .../transaction/serializer.test.ts | 0 .../transaction/serializer.ts | 2 +- .../{v3_indexer => }/transaction/watcher.ts | 2 +- .../src/{v3_indexer => }/types/errors.ts | 0 .../src/{v3_indexer => }/types/index.ts | 0 .../src/{v3_indexer => }/types/swaps.ts | 0 .../{v3_indexer => }/usecases/math.test.ts | 0 .../src/{v3_indexer => }/usecases/math.ts | 2 +- packages/indexer/src/v3_indexer/connection.ts | 30 - packages/indexer/src/v3_indexer/indexer.ts | 43 - packages/indexer/src/v3_indexer/processor.ts | 0 packages/indexer/src/v4_indexer/filler.ts | 207 - packages/indexer/src/v4_indexer/indexer.ts | 155 - packages/indexer/src/v4_indexer/processor.ts | 456 -- pnpm-lock.yaml | 414 +- 89 files changed, 3917 insertions(+), 16407 deletions(-) delete mode 100755 bun.lockb delete mode 100755 packages/database/bun.lockb delete mode 100644 packages/database/drizzle.config.ts delete mode 100644 packages/database/drizzle/0009_brainy_karma.sql delete mode 100644 packages/database/drizzle/0010_crazy_sentinels.sql delete mode 100644 packages/database/drizzle/meta/0009_snapshot.json delete mode 100644 packages/database/drizzle/meta/0010_snapshot.json delete mode 100644 packages/indexer/readme.md rename packages/indexer/src/{v3_indexer => }/builders/swaps.ts (86%) rename packages/indexer/src/{v3_indexer => }/cli/index.ts (100%) rename packages/indexer/src/{v3_indexer => }/cli/txw/common/select-account.ts (100%) rename packages/indexer/src/{v3_indexer => }/cli/txw/create.ts (100%) rename packages/indexer/src/{v3_indexer => }/cli/txw/index.ts (100%) rename packages/indexer/src/{v3_indexer => }/cli/txw/populate.ts (97%) rename packages/indexer/src/{v3_indexer => }/cli/txw/reset.ts (100%) rename packages/indexer/src/{v3_indexer => }/cli/txw/validate.ts (100%) rename packages/indexer/src/{v3_indexer => }/constants.ts (100%) create mode 100644 packages/indexer/src/endpoints/get-metrics.ts rename packages/indexer/src/{v3_indexer => }/indexers/account-info-indexer.ts (100%) rename packages/indexer/src/{v3_indexer => }/indexers/account-logs-indexer.ts (100%) rename packages/indexer/src/{v3_indexer => }/indexers/amm-market/amm-market-account-indexer.ts (95%) rename packages/indexer/src/{v3_indexer => }/indexers/amm-market/amm-market-account-interval-indexer.ts (91%) rename packages/indexer/src/{v3_indexer => }/indexers/amm-market/amm-market-instruction-indexer.ts (98%) rename packages/indexer/src/{v3_indexer => }/indexers/amm-market/amm-market-logs-subscribe-indexer.ts (97%) rename packages/indexer/src/{v3_indexer => }/indexers/amm-market/utils.ts (64%) rename packages/indexer/src/{v3_indexer => }/indexers/autocrat/autocrat-dao-indexer.ts (56%) rename packages/indexer/src/{v3_indexer => }/indexers/autocrat/autocrat-proposal-indexer.ts (80%) rename packages/indexer/src/{v3_indexer => }/indexers/autocrat/autocrat-v0-indexer.ts (94%) rename packages/indexer/src/{v3_indexer => }/indexers/autocrat/autocrat-v0_1-indexer.ts (94%) rename packages/indexer/src/{v3_indexer => }/indexers/autocrat/autocrat-v0_2-indexer.ts (94%) rename packages/indexer/src/{v3_indexer => }/indexers/birdeye/birdeye-prices-indexer.ts (98%) rename packages/indexer/src/{v3_indexer => }/indexers/common.ts (100%) rename packages/indexer/src/{v3_indexer => }/indexers/index.ts (98%) rename packages/indexer/src/{v3_indexer => }/indexers/instruction-indexer.ts (100%) rename packages/indexer/src/{v3_indexer => }/indexers/interval-fetch-indexer.ts (66%) rename packages/indexer/src/{v3_indexer => }/indexers/jupiter/jupiter-quotes-indexer.ts (99%) rename packages/indexer/src/{v3_indexer => }/indexers/openbook-twap/openbook-twap-instruction-indexer.ts (100%) rename packages/indexer/src/{v3_indexer => }/indexers/openbook-v2/openbook-v2-account-indexer.ts (98%) rename packages/indexer/src/{v3_indexer => }/indexers/openbook-v2/openbook-v2-indexer.ts (100%) rename packages/indexer/src/{v3_indexer => }/indexers/start-account-info-indexers.ts (79%) rename packages/indexer/src/{v3_indexer => }/indexers/start-interval-fetch-indexers.ts (99%) rename packages/indexer/src/{v3_indexer => }/indexers/start-logs-subscribe-indexer.ts (97%) rename packages/indexer/src/{v3_indexer => }/indexers/start-transaction-history-indexers.ts (100%) rename packages/indexer/src/{v3_indexer => }/indexers/token/token-mint-indexer.ts (98%) rename packages/indexer/src/{v3_indexer => }/instruction-dispatch.ts (100%) rename packages/indexer/src/{v3_indexer => }/local-cache.ts (100%) rename packages/indexer/src/{v3_indexer => }/match.ts (100%) rename packages/indexer/src/{v3_indexer => }/proposal-indexer.ts (100%) create mode 100644 packages/indexer/src/server.ts delete mode 100644 packages/indexer/src/subscriber.ts rename packages/indexer/src/{v3_indexer => }/transaction/account-resolver.ts (100%) rename packages/indexer/src/{v3_indexer => }/transaction/history.ts (98%) rename packages/indexer/src/{v3_indexer => }/transaction/serializer.test.ts (100%) rename packages/indexer/src/{v3_indexer => }/transaction/serializer.ts (99%) rename packages/indexer/src/{v3_indexer => }/transaction/watcher.ts (99%) rename packages/indexer/src/{v3_indexer => }/types/errors.ts (100%) rename packages/indexer/src/{v3_indexer => }/types/index.ts (100%) rename packages/indexer/src/{v3_indexer => }/types/swaps.ts (100%) rename packages/indexer/src/{v3_indexer => }/usecases/math.test.ts (100%) rename packages/indexer/src/{v3_indexer => }/usecases/math.ts (93%) delete mode 100644 packages/indexer/src/v3_indexer/connection.ts delete mode 100644 packages/indexer/src/v3_indexer/indexer.ts delete mode 100644 packages/indexer/src/v3_indexer/processor.ts delete mode 100644 packages/indexer/src/v4_indexer/filler.ts delete mode 100644 packages/indexer/src/v4_indexer/indexer.ts delete mode 100644 packages/indexer/src/v4_indexer/processor.ts diff --git a/bun.lockb b/bun.lockb deleted file mode 100755 index 0bf1b61af678f71a0dab86dfc7027f2e4b7d616a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3646 zcmY#Z)GsYA(of3F(@)JSQ%EY!;{sycoc!eMw9K4T-L(9o+{6;yG6OCq1_p*>$M0|V zoO3|x@7l+{Qx=OEiC4U?4SXgb`*#w1`jJfg8|!$1ihzIvLSfJiQ1J|y0w|w>0ca_h zy%0#sGB7l>0%;i_oeQKTfOHs;76;N!Kw1Py>jPE|voQ(m;!&DbQaA)E`WN{*yrcffVSM0tSRP1^QEg`aQ|e z4~ia8oPjVK5VHd@2oOty)KaGZAOAm)0n`LQ^B5UeIDq*C>^7LuEI*fQ*812jd?W0D ziu0kL4;LIcJnzB`A-`y?+A4h)Hh%A4_gy;;eng#NHq2B?t6MkMgF9)(uc#fr(q#91 zSdjd9Dlm+JMsu(L4TPmzkl8Goj(Vz{Tg&t{QmbI&)2#<$=UUEHyRTDJvBLhkSZGB4 z+gm%|n*UiZVyO)7O0B9C7$UrDyx#Ds7 z)xAbBZ%wHs7gsh;_2jXv=+xyqwsJXp+wYi#f4S0H<17DtIHlEmEJjD;L-KSX`qH}gsjBpet(?ge2OV0jZEl5X3w*Hs;6OW08OMsxPM z9aoCB98dAE4wMm#|1GhkZG)}n%+2vqYa)WBX%Y_?Pd*gF zx`KD_(w>O^w+(-w;Q(?gC@sPO%f#eeej+SJd3?6NmbOHOtuaYbh>i-1|DP)qzbLs~ zxWR#S@!#AV>^;^}$L?wdW^~!#_?uLGH14v&_lPOEW{0AX!WWjVL1wcEZDfD1kP^{d za&3v9u{O`kDO%@`uS|a1yp?s!+8?KK7eD(jyQOq$Q3YS|f`vkN-*(>L7?SMw-SFCn zazjgvuipxR=3)b|u!hmt)C^WJ99|l%&K)xD+5oNbk3eZIo8qEmz0ADglEj=GJy>%? zFQh0n)lR|4K%qFZDm6b%N5MoPF()%UFF%b7;njctApj%-O3xplX7X@C)Nt998XMUG zwc;=Y6vv?Q3slyC(kLhogYugNRDTE&=77uq*$vVM(ho8RWFE-e4yb-RsGGTLqK(XA zOD%vNGlRRy5Y=O__7AKb!@+2%XP{?f#=rn;>A+enEN~eopk1K05Ufpukb$+9V67g6 z46Ho`YZoD8U@b0K%LyT~5NHpmO$KXQA!ItBK0E>UDRQh9r{J_v2URp z3QPmQ@HWI1+zc5dB?ZM+`uatw>6yhPMU{Ga1-V(pdih1^AZzt?L8LAu3iL|Ss~qyn zQo#<=&B@Fwtut=Anu~lqDt>C1+q!iXjd+RW~WII2FiC#b!KQ5|8Wg z>Vx_V;b6FlNPZ>Ca7+h7&Bl}<)o7^epkajSWT+siMnW8gY9fjlsRklK5Y>IabU~_7 Q@BqUIKt%EbrToDN00OSa#Q*>R diff --git a/package.json b/package.json index bdb6ed5a..d5730b94 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,5 @@ }, "devDependencies": { "bun": "1.0.26" - }, - "packageManager": "pnpm@9.12.0+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca" + } } diff --git a/packages/database/bun.lockb b/packages/database/bun.lockb deleted file mode 100755 index 262f82ffd13ffcc924dc0dfbf85a8a065870bbc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53542 zcmeHw2|QHa`~T1=OR`4Vi0u1LDzZh3&@N$&!7z+whD3`>3knr!qbMmPl{P|~7F*U< zRN5o$tCs(B?#$)(`S!8Y@AZHEzQ0%J`+Yk1+~>UC=Q-y*XSwIz@lhJ18_H(sdeeh- zX~AI%-l4(5AleKjHPDyNplSOuSwR$zc9@kw_At59iQ=eIV}{NTd9D5D$TP4=;xN^k9w|DHZaFV0_vk zOeTXA18HeUyYTM&Fo7tHM4|^T3Z=7Xtfd3F{6P?lK|T*&%n1qs1c|hH5Q!uN_vb?_ z4Do2F;$VoW{uGuEjYD#U{3zW9_hliz2QeyNAMT_4bpS@OJulxpNFY87NTYme5Tmp- zBv5)G{DbP33o*jU^Yk*jm=zuXtwbVm*bKTi#7q_iB}vKvLiLn|7`2NC#KYjlOaa=nZYy;J%~mMq6g8b+P=Yysf+189DkAz z&6g6&;IOF-$N_xb3{*OaGz>ZkwO=H}h$n~_OGtA0=)wLp7M;WP4)yh=v7r5FG@7Zg z5$O`>QT^?K1C^U0#cjtSP#M&o!4N~1sGATYJF6f@`DnmIXZVn;AQQ@`0sqKAEX|9* zLjt9r^5S}kheEm(VxWl1;l(Mucr`C(^5O-&crq_Gk>pX!%fYul&fV<6vFdeUf9%NFn#g>&q{$Z>V;AS0guYvSpBOwb!8p z=HJYrMi|QN`m! zt@gZX8QmEcGWLq$HwIsRh@$Q7T&8{jql22(?&CJQdHh-1QHuAK&I&1>cH`T1$NuB) zka51*>@BJu0p}zw-g{2lT%nn;lXOTi`NHh__OTI6@%c`==QHHWFGzbY8au&CM9i#q zUUrS+yWNjoDLPB7`+VSnOw#

~);VWGyLySiSM7_Pd+2Gh~ZC4OXofws3d4!lM1n zq%c)E|D3q=wW~xw`s|y%FME518pi8txRKj)wNsd>ndId%$uZAYLa1i-D!8`XVap($KD6n1?$G# z(e+UE81qD8$8*_XcN_f59BntKMVw2Bo*nw#Ro?c~T-RNs?=QcUE7j%)#m@2b9+Fj= z>5|gy?NoBqGHk_n^{wJjlMEN;**$D89DY{eTW$1@<7u74h6al(O|V%!=KjuR>z-(jPP=)eQOK9;Dw{?Q5^U_4c{*q>jld&-kr|efgsAT5dwS zGRQf_{%O#8L5Yc)r}&a8*OPPoJtfA4XB=D}&>^T?r)Ryx^W;D=ev@gHC(<_;M4WrH z>422%(3F(@{VUrjQ)KfL_XzJiO5$8RJ!c!%9T`AQ|}<>N8*iR%;(+SWT8 z?9>@GPQFNVr~2G0tu~u<-8QNmpI|P;9DnJ#%Z?&^+#8f;6*yF?bdCRij{6x^C+}U{ zu9b$5|M(gwV{2uftl2kBo-r;RSSacJA!(l1`J;e#T`0JNXv6#k+X=LUllsbw z<4XWz4S0mZ1ulCHI39suj>hl^B+x68n*qlg@$h80jo<4F1)kR*@McgxO5^wXgTD>< zDLngs2R{}-27pKQqtI6lJl`C+u;!JI@Pp7leF!*y8(i2D@O^+{S#W$4509t&i&q#x zBAF1%hvw{4z{{Hh_=!AxU+azv!0}1E@*(PT+Y#~Q0Ca}(5#R5WKO8#V67Yy~EC{lr zF9EmzAPg8|z{8%71XTSVKP`Yq{ttU4tn9wl0WW_eJTF)Q9`CpQ;;R5}4|v3fIB;IL z>@nc^q@X~AN9~5&&?Ati#PL+X>jECfjKME@iE;c+z>g!;AHUxVysMs#fQP+m6v~hK zZy37hL%_??fQj1*@F@K|?H2%eH2zSLU`n3@Uj80l`N(#3ufP7w4~{nn%I_- z9^ldVN9$LA0*>Db`0;=TH^f3;eF(=l@$mS%)nEKDc$lz)@=^PtHo$o?V|w@p&qo2g z1>jLuc=YRc`|kogK7S&Pz6QMf+ki*@kJ=Bv*B1^vuRJ`Iq4M$i_XUgc;P?Q*TLT_X z_qY8|03P)}!XZI+^d;csy#YL`|L^**7CfXQJSw-Zwj=xS@_hlX2Y57g(HQ6}2aewg zc(ngO>EFR$0lW_2k^lFn4tV+Iu<1nWC&2q`JIagWV*qap_`cQ~VNt;GRe-kwJW9h* z?z#_`Jq8>v3J?Fd|MtfQ96uHC`2G*!@%ud%PRJJrcvOGX|9!Sft1CBPF^1hx`ZK!|gzMdI~t+4e+@Cp#1&qzs-P0&(ElQigx-~Zxc2-TyvfY;v=@c8r3NC5TM{?mYWg!&^s%XYe zey9C{{}6xj5Ameoe`deqAL2LvA^y%E;>V8ov-$@Ce)1pqPr)DJJO2=G4U_(#*dGIU zyFaLZ^&jG;;Qi{Klt1qe@u`5fg8HLSr zy6$6{diV#&hXWp!kJeta{`EEB_^W`&*Du%#pm*MV3OHU0-Y4Vh*YDuH0gta=zk@&g zhxo65h<8-@GyAs!9$&wHr~dZ=kM>_A2)~2Z81rX%_8;QU{2^XI@z3mc`a^umAL8%* zAzodnd;b5O{tx*>{K-GWfB!?g-PrE+<9F&G`-k{ze~6b>{xkdM{~%TbOQH4ZuA>cK7MRGIX_#J>B z$Fm=4`fGm!;Ee%~_6~5AjlON_Q^3m?QsvekJvYKpN}tzo9Pb49Nl-po`;q@6JNgoE zd;;Ln`j7e_1^hlY_3!`U`R)SV7VxP5kl;N3j^t`^ypkIC{eNHE9p}aIL4dc0@=+T1 zAv{k{F^)eBcx3E6bpdBF$H!X9`~`(pBVAM zV>T90438{m%whq>XwN%|oBSz8J^{Xgm21b-qZsko^U}l^<#*)WC&noM6yALlqcrUK zut1Cv-U$ThVNZ?4&Jd&Us~F{jxep5{Mt$hUP5v@QedZ2=Vh<36_XI%!#VG9sg7n@X zD4-bKr=kP|6r;2cFQ!3^0*aCS{=7I4ViZt}@-t8Z0x?GA1Y>u9j>&M31%mV(UL3}Y z!y!h27|TF99=rSB6{B`Z;Mq-#QN1^TAfG?L)BiWdsD1}|_M;f3vw3M^jQr*hPoKxr zqZrK#$9d^r#fa|&PyeeJwc{xeln(`Ap8TC}xbqKccP9|kK7Z$%zw^!C`R0FezWFZp z9iMn$eEp9E;Nv54d5P3ybBCM;QO)t!X`VltI;JWXoz%?tovE&rGWL_U$(T!u&c*VM zPM>NDeN4t4QRAZ|yjY{0o;r3?X{GU2)s048QpN;cG-u+0Tt>Ye_2bi^Jzml;qcta7 zHEVp?9Cfe6zA=|!vVEMXSk7!wGNrMj>7dKutE0|IJxPobdEFR3=ldAal!=xblrx(N zylAe$19@m;@!?N3zS3zKBaHnb1#f8CS=BQ2uRdP>^wT^k=^0Wv0~9OirsT#wg9na% z#JJ$*@ygozk$3Ir`->}5MU^@W3A|{pfCsY6m8P+e_N5*3k=W{B5vDK`SI08R=q`Jf(Y z>k+M#3bS!z#HoivhI|}6ra`oA5c~1^n)U646e*qZr5?K;a4dH4@7p|X>lOFsmlgOD zG|r^P@BXq}D9mUWffqfe;eq^q+g!D4Z5NhvOx<)(Q|^qAyR`1zM%8ty7sEHyow22QurFWk*-s%{sm7bWCxmvasfi^YOPE&N}OhRh4d2-dRvIaD(gc#nS|jt_!a& zI4eQm6~v8&n0)l!;|<51SC^{l9ZK?x50B<6F%u{mHQ?6s6(!SZ8a!LyeR-s;tEIYE za>|gn(~a9ps`U2es&h>8V&3UcEbo+mBk-cVDjvv}wV!P(N<1h&Um&DGSEoGaz#;F9 zrk%s~T<{QoeC4av(5VNe$u4W(sgOA*c8{#nT-~q_?>gm%6qww#y0E)-)|MLtUbM#J zfjnnxplhc2fWsa($|u-~QP(Y|E;*ZPO0#54OpbLc6Ad`snJg$VvnVyUu33NNsBi33 zABKD{Ut2u&dYk|FXG3qDBJhgfq!5$mX}SgJ9BRHMxjFHi>zwzS4Rbp@3NM{Y)z~cN zd&TUW{K~s+#m*x8Z?ALB_Y6w=>h;zk+)whlp^mz}VXky+VitiHJ$vARyvCq(+w?DS zmoE$%Hb7>4;l=v3pYjhJmb}zVJ>GFk=Zo5xBQ7`A&8uaQcS%wq`VAI7KZxR_5R-lGIm^U$RK5sD*T6X^+n#XY7Aw=Hs8@GN4{M>TK+GRaKN=r!#R$*ESWY34SP- z5{y1F&@;!|V%GALw^;PK^DMNr*S#n3!sj(zf$Zxy^>$Il=X+sPLB;~JE2;7#$#>?D z^m=NuV2^w?eIF}7b5cde#5Pmg)^{~o!^e(Tvp=-K&873ifyR2q_B$J03B2ez6%S;s z&1*)EO&c@3c+J788>^JZ)z?jb@yN)wXnIt=6k`!*@NsROK<{mC8x94W6nW4bljza; zuy%TKu%Bw&g>T}~G9L-N_;WAfChvUMwx#58R+`-Qydyf+9n@!s1K6*VoJcQ~rW~W3 zi&F`AwPW15p!?|Bvy}mt!((25wq3Vm#dYzo4-N%1sf<-fAn>BIAv};5tzkGBWWFw4 zlNX*EuX4fdDyj6iu=z(l`kaMXpALOk#(4kURMBBTu&jgao~`#1+xcDil{XrkSTkcr zr0{cx)NleX@p}hy^hGnFW%TP>k58R2@Xe^S__Eeilygq=o0VR|3gf$1+^YS@Zcdkd zF6FxWdbQi`yqJeut=p&`XPNso6R2jI&XEM(p}4USlQ)XTY+YZTntD6*&dhP94%yMc zYoX>5{who%EwQ&YDRN%$i@Bz8;awjL+9V>lPQKE3O z#dY>Tv$Bl=LrOG_Z-h{W&aETxqP-Iy$fa!A)Wne`OY=7wlYL{>^HtCy3+66-l4?Hc z{RN@OIqnDCJH+Fz=M<}E84F}Z&T5)0Xszq=N^9eB#+20kmX^5$Ui_Q`ag!-KOf{=E zixqg6Ym*yn#WD=uc1-cu&q-9OGnjDX^6J?)7Pj4aROirfn`P=X;G&;6V^L9Y<)+co zM>2(XS)WQeLEy#DLonX$mWra~_v<58%Srq05l!DF>33;6O<%s?$CS+KaoZ(yHijv$ zUbLOxNXRVr_5Al@=7)nj(i}FLh{=u9l5>}M6++;J*ZEz6d^R`HPME4XRWR#N^dXgn z!>?2-2M*8LAz`96d2Pqq_GG6YH?IuJG>CZf{di=2_UU_XESoOwyMC3XS3I^YR)tNR zci=U7S0GEPrIU%XIo z(cwC|iR$s^^n@7mTTi(>9Vg+DVok6Yodw~6tgm*ns%)c~=;*V2&#u|%XRc(PA96H7 zd-{l_K@qXX+Tw=_C)7?9YP<1z?a8ORS`=qiiIIyq&4wP5fkKV0l<21fUU)6s70A>T zLnn-B%AOP`yvfhzPKV=??83Is>Fn5jep{ZU=NyhOmAht@Jg0E1Y=gtSET+U-AJ5Xd zSi$z}Yo~3G9iKewA%PcO*LDSRcB`|;tU71!4_Yf+T_VQM6&coAK0Ixh+S6mMJFCeJ z`R-B`rWVuG!^X0&%Co<1bu^eMQ@Z@Q+2e1Sbu|4+!b1tX@EWu$kfSmmJmhav_Ypa= zvN(QL?RNRs8Vin$^4$KOPtRyQ|I(@zMFT2@+Z*SEFWE_M{?xXTRw=1)>G{zMbL@j? zQmM{#0RpKunetfx# z-k7O))sZtSm;UNnwS@6x2aCsBl|=oGRZnc8{SC@S;Kh)!{~;|+hE zoPjpgE5_Umne*+7tj|FqiT5Y{5>rX~+k7IYjL!eE-s0IB>D}u&vKBik!W9U-ibUSS z2WNyx9HA|7V5>(L9aX((I3_emSZw&zRV$~mM0Ok#-=X?0e#|aGAUHfhD= z-BT-~(__tZRxWyReZn~MKo63Z6@gcU$opiY%sJ<3L-BE(maUPVwu>wo>~J6VujV_A zrVpzs+f=`zq;`VQf(MUXtj0G<5AmjYsQR{iuNRpsB~=vq!qK;pz^h8+&1l=cIH7r` zPyR!CcE$cnSL&xnx*d8y-1pMQIERjMmWWiUQ|-b|z0MCEnrl$?9FLn67xAGE!SDnbaXH)RUl{L)P9y{*-HQPv6_l%^Eb$o$FrNnWeLF9c@ zvhD588D(1|Z8V)eNgI}zoorzF6a_cg#`rJ+cFB=XGB2Ky@lj)G4X$pn5D-L`4bEeC(HEMLKH zRh5!)!_`gVrdk(i4;-GC-66NXb*JdHuTu~1@fc8MN#NBY^4^TRBEHZ6pw5X^_xZo< zq3(Yd9Mt&jhTSTI)|q~-6Ux8D&Sbv7^)T*9!em1cx1bWW!W8Q53t~?kC%UJc`*Gg3 zjlio-eml-;ZzKr)XaOVaAY2S>i8p?KQ$L zETmG>s`N9O@A$-1o^1MBp5U%R;MF1WzGlDNM;c$G=6SsB%)YpqOPlAvP#G4MtXRCm zz9L5;e?+WZLgyjA9mP*P23?B%yxkxt=b+x~sXuCDp1<8z^^T=O;MFDa?m2iT+I`cQ zh*_uGzpj^3xnh4R_0%VYhX#eRmKSt=sHN9uebiHUIeS3fnTanY5<9-v1b=ZTaEjEL zAe>~>Ht*Cn0x!Iq>I&rS#HeDqWk>JCkNy~Ybou4f^DZUdIoC6Whve2Iz5K2_*!|-R zjXV5rN~7+U+%@`Y_~iDE_<`pa4$)9>_gVI-?bT!guYMOR%LNneOYZzT;-KIxH zDJ)YeD98+^Ioyvbf8Q}>OCeSH>7bWQ){@DOEDk0criYYGj$4-gSvQ5!IPP33*sCX&X8j}JE%+Rt3vGGLxZq*R=L#>3#`{3DATB5X6s z=0fwPvHYrSDz9o@Gv2>h>qdnif!C18o6;t^pJVK z*zp(@kq)xFZk``&m&pC(M2@M4gi}@%C4dvqk6EIR;gXdNQvz z&Fj0|&NEay|CxIpKT6YeD;8Y+ZMw#zP3qqtJlel)3W3)ICxw_iZh!Tb9pp*(B~ipL?;=`clSSu{h%FNK5~^E-}=c17D+eM$4y?k_uLWd;}iE=y9}@x zu3)6F=IWG3mzDB_g9*IwEkRcxHwIaRT=SZ`r%5LzhxXbv;qi5y>j`p7>)fPTM;JdY zc3oh5(*AAWpsxqNN;V#!lbJjqjiml9{jt-eVAhDU3-1%>Gm9=(=(i6q+tU(F!AkXtKmC>Ze(dT`g=Xi7{QDkJ9Do_${weLw!Eyb!o=rI zc-Pz&$a$%Cd!5P`-P*5yvu|hkD zFE&tk<$OcU!Nalc{9;hNZMm>g29IZQ~gZC`OC`ZIJ@0}FDcv2+vUld7RlMi z)`{rue9{`b>RotA(SSD}ULHD?sIt>y>7M${aK5IqH*QLUieAAMldAAHudWS06Q|+- zz%6Yaf!Bt}tD+u1w>|eb=eof_AFZ%KD;TEf+Go}cTh}m)6XqDBU42R3)Lvzkm34#U zLnHeBu$@O_LZoQMvU~C(jVG-N6Pf1(H8ZdK*&=hj<35m^XY1(O{ zzC9`{s-?VAIX7^?XGz~hhu+m*Y1YUL3qRBLe3#R_P+9jpnzYBGi5vp29g#Qxoz-qJ z>rhRJZBzY@F5J4%kCpvgVNT-WtEtVa`8^{m+boRQ=bjWQVQ8w)DXH^4J#hV6)qDQg zHoAcWZ(qsOI!NHfzZXFCZ)TTSNY$e2?NWEX{Z z5bSjz@=86b5gI8Ov_C_51oOGm>hpspGUZnu%jrZiOt$0b_up9*<# z;)9b>?e69}B)u2Ogeq*e>}%_7-`2bd%3(*5g{*-=WF>tAMFtmKUaRau*ezn;s<^j4jp&( zT(oROsizM=4xF^(*bf84NrFNQ!@$$gdbFu*`$b0Tdq&h&?{T-k9ne7ForaS_Oim3w zleTAO?sFThPh!+N$(`S95{8SnkK?;}cXWDX_N#=sg&C0p6$TH!{B5`Ue8Yx&3#^w` z7v_yAJ=;-rPUU-BJjP4Lz5$y~ow3KuLEoxE-N3?46PWc0om4`kDcn#z~Q z470E`UN~AWQ#3H+{hje2D#dRU4*N03EcC5@_MmvaxMO_!$`4jOySmDVBJ3R>&+hO| z8_e7rn_WLho5zdZ;h^`=cpx*SCokAOXyyvTsq`7s-X1L)`}nhNTKchuR6`%mCV9Ra z^P(mzr)=<FG`Q9y`)H-oszq1Oc_XJ~s1 z56_AFq~as)&u@P0^t0+4jrRn{nVj;b2TA0yQx3=}oZI|#*{nx7bKPbeiLR|P&rsb` zVmo8mj+TiSFG)}VxX|}DcpyinoT6yzOnU!`Eo-n^tU>S%*)n&8LTPSfr2d4O4E-Zh z1p*5qRGd_g9}s&UBv|-(W8#!Xx`oo7A4+Vm8`)yW2`R*M(; z#ORp7d9k&J7&Z}OmX)(JB`?2e+x6s4^5FR`@&{g!HkZj|J*(a#VX^0}>K%Fw=%!+;IENT>J1y4a1gVeGy!J)*&LZ;OTH7AtnWS5g$mgn_8hG>U zwUatm4TezfM=qmFmEKM_6i~~(!oD??IVNd8edp`Lq&TU#wguwfDU=p{rBN%H-1(Oz zh~7EPCi0#T*fhQ~@kn#+HkpusBgvzZbWfUIBtLI4X}8r&cVC=%d&sf`#z@bzCzT#N zPD@)K$!cs0S`u#+^L1qWejzP$eO|vI|D8kRedX1h{NU<fol4{}dCL@viK7c#<%q8-! zP%D~dU>R!=Yn;?DmaMTpc;<`sS3QK@Zn6#7=KsD)CsjCWtdC@K%KFG)hsh^9IrDxT zv$*^AeBppI1Kh^#Jv|k(SCAA1ob!mhZr^JLYF`oiQfoe8yaQ?G)RW1rLq9w(TUfZK zdislLXQ)cX%@;Sce`20#iIkLRqij*I&RLpVu3J}DW}>h~HIF;5b3YNCPvl+y!oBm+ zjJBbCuJoW$I|dghkD56Dnp}{+EUCsyKNf@!L0{v(@hdDHJH zY+K+fFZ*Ca0r%Wf5c4zq`!hsOwp@2;fpDSXMUNSijMYNTYL8`Ao_i`^eA{Dpgv>Rm zF%yryi##*paDf9S|AThMk$?-g!(QLcHorP0N_ddxEJh^v{SZkI%?}HR_GVUlU79)I zvia#75eahnJBK_Q5_ay8hU{xG_p9pR=Y`5F;yXAN$42w*9@#pjPWi(6u@sjtxnVby z2G8E0X#I5y_dOX&FbX))_i%V1Z!-0?yO<&RZe-xsVyhU{)zf#J*}YL{pKk8uy<5*N zwj1#|e@3AFx|QRjcld5TGSd3(WEqyu+n{4JKfDNfHTR{$5}uz~0pUWN6k>9sNtvx1 z$2+NJw%c=;7Q5*&TldDZ81}rInoGfcxe?abryRcOQDReY5`32eJjK zFXG-UGX18P%Hu`j4SlzV2eM0S#=&O?qfh;f803a+y^tgjRAFmT5jibl4i}Z zcgrW8nD(GdBP;!?wdc@7EBKqMW*l}(5%nJK_aHKXyMN%v`VIdM5OI@#Y`vUVmX+h8 zpiw;g^V+v9Rh0P=V>`UcoG+S%1abJ@pFCS^GC{@r@g%xe_Ok*D1tu+OY+P-KdC7se z8!J8>EWzyMey8At8;f|i)K`5zH)(su_2cdz-m6PzWSUz{Ro1zG)#L65%eHB=W_{m3 zLQ-zgzN|Zo5Aka(o-n%8DSBjWZp-R%v}KGt`mgN?yc8nuk%uRoCKOH^>LfySU#-)?e>m_;(XfU28*GNCSXD~p_;h4{SU+-}&go6l zzup}5Ce`$w$+P5;I;B%_JBZJ3R3fiDv#$N~nZTO3>rd(L+8&(Gr#$R@U9&=CR{Qj# zvb4q5EwaBy=ye8sqHK6ANzXZ;?6v)yTY2D{c8ip>;Bxh<2!g#nL|%V#z^cQVdz`8D zX~M6WpW;E^SgaZ+|)oeWO&t_iXU$(Jl1ae zK1}dlFkv5szURaPd8y;s!ilrxOtO}yS}gmfU^Zm^#EQ0AtVU+Wo5k}?zCDTPSYsUS zUQt&%NB0E#$l32-TQZs(^R`ipU6;$Z3+?X2?B(vGd~s5U$u}#~2A-Z_rDY!K>XQjrzF)wRp3g_7C2gHmf z@cI#Xb(EXkMYWn@H`$vP9`Z<`dr3K-kMb}uo4o4jkOkE*+Y=AWr5$#5yL>2jve3|C zNzHRhna5WS8W}%oXQ~q45*@To@R7LtD1RdF{e4X7HIL5@8Zb!A>h!&uTQQe*PMrFD zZOdcFgc)TEJAWMcx@D-E+Neb%2R$9o7QAI{{@3rCd5f*Z1`YZmTO1mk$m2!)bRw^% z-B2TM#fb1*rHemT9~xlE4!XJ0vSqtn_2bPSb6VHFdN-Z;V8%yA_%E;+|W=Z)v_qIoia$U7)w^pt^K1=B8xY}}ilu+97B{3h0>OS|P}EY?{2 z*;_n9H|JcPr?2drnf@W>ogYZC%IwYlQ?%ce&D)}LRzolM4UabpIMH{!cp$qB)1Exn zF^zKAv-;HjWs`2L8D?ts*kfvpS?t=Ii)Xb_hfZBND06!8gT33+4OQ(XJxmI8Ec_K*vM@;w%}NWj#PDZo5CTE*{v@&E98Dm zy1Yhi2*%6ZM+FmkQ&(Btc_$X@RWoi>pt@hG(UX&MAIDGF-_Xwa7!!KP*uJ)kQ~c!< zU(LMR*`+_+uQ$J?ue!LjbxXj36RqRlUvA~@`^eb*%OvtjMnAZ^A@20dyPP-ead7boY;~O;zb>rXJ3l1=9H~n+|hd7{Nv+XUE)3} zgvcuqE97^R~SuN+K1h(B=9lkdH%Ow-pgUXf0mj$Md%3QT~?T=aKCIlH+j#{9+ zeL`!_$>Yo9ub%fs@ z;`&W)t<@Uyc4Zhnm1?Zd9-?ez<<2L6iqCGx`wsrLBoEv%R z84Cj11va^QMx014D|mwOa`#beoD^d6=Pl9ClgH|{dhV24>Ek%vV)O^2Y=^+tWoGA& z6VEf><*qL`&v(lK52mR;40!^61m$+-I{^nE%W$Sn(~ zHmBe3<@Xv|w5o09-p)t&PnsXy5tR{L>oucVn%~>+V#?#zOZ+j4^$T~}*4xeT-cm`q zw%yt*qO2fw&L|=7c?owP6^fHWOm-SE{6RpQrDu|Y@78Pa9an4X$WNtQm-3yxefoog zmy(dSW^P1H_~B(mM?NUI)ZRZYZy2}Xn8-345fP0^o02O>^7;+U4`D>!=8XOlYtWecxAgg`K>4J5-s=mdm3<0_2 z@v8Nj1=?!k_R6eyp`VeaAu&TJH|doy&wmkb1d&&D+qE6nerQN_0%(Tkj#k$j;D{g5q!tCYl&z2H-C5yAzuRHCJ$@)lGOR5)6Q{S*<`t~<(&fk)0 zZAj-^CG21Ot}w;+cv{%O^WKVgl}kTSV**mAk>r@W6KN)(Z?fnhQ9QF(OMWnXLsY<2C zBkh`fW+oAMmlJs}b;?L63+=X^{vc>BvtInd9xXkNwX5U#NV~l$BOaW-YqZ^o{9IbT zVaUcR{#{1VTHc-!fQL}ceH)JUCku$t|0PqvX_gjPnnmeJA17!MU|r_@mcm$ z=;*aBM~*JNDKN$M#Wl$UkydBd?{8kMSwO!avW>M$Yj(nM{nigFa*R zj%npoU485<+jRUvm|g1r%K{a7R~;U$P8(fS(J3aYuCkfHyNbv=%i6;HPWhbyo$gE8 zPlugVS)?vGDZ<2P`b-_q%#rZDpn8h8pLtZg6mXm`Z7Wvt-zhiY4Z1{tXLb z%82LStBJhDFJdjTeyD_9BfB49P&y*=i&wkM8@{6K&9bTU$BSMZW4Jg&{@{4&Nf+iu zP4(SAWOefJ^Vf&h<;tD+`7+i%|1$BrwrC>nBFT>`Nhg!`4$R-bHTBM(`NAS*8e*T+ zcD;!kJ^NBy-GLcZQJ+O=<)3AiX(xn~$#&Wa?zpdzZ$0~AUEUhOFO6x0c34B?jr+9V z;>rncr=Q(w`K7$B)0v}h|G`J8{?t_6n5IR$?s=%~{g!4WSnp8B3Hr)9^5TxXW5?_^ z{w*)A*q+!>5OkUN9I%$iE1+bPdS<&2=SY;;@fFF^H|hCnR~gZrSccN}7H3nXCl9+R zE$~sUw7onwHFofImd%!{)kcl0w=||r@k@}A9+g6{cO8*e^Js9MuEGg{#t_q6Cu*n6 z@%P%A*0OK^d(Bv{JnPpH!=7(GCAQ{uq1j83k*DPY4vyGw=#qA#;6~Xi{$iHZ?6n~T z-t|OY!5iW6>czG*ADSPj+vxIW&KdvN0&hEV@{QcsFJz1}Y^HDTnDC{H6=P9vzqVD| zBmC9U6>Ewojd&W}As_xR^q4GxH-^YNVOdC#l?q?|bF*S!x8eJfo-9plm9yd7ej)pQ z$KyBe-!(m+=Vnfs>d6{6d0wFGEz>G{v)Yb~Rp&1y8kc|czG_0?jV1Cv`>=WKWV^xv z&VpxjScXm1M2Yku*W}Y}zUFIFtTpqp^7nsbu2H-k>y=!cmFJwlbHwDD()<@&+*dP# zUY8#C$RO~>5qZhi>eoiRdTf3oG2`OnRv(Y-=(3^1zTXxZb-nOWxWF{&GRm$4nMd~u zyeL-Gt_`00D8F3btmUCm_jd@Jy{zMVR6*d~K;*TV_GaL7r>9N!b~_J!P4PXrDt_19 zC6YsCztU7_dL5hiV@+D8wBIP|0L7ve77oY8FEV(}Hz3_qJ@jyB@?6DT5p@LKjYQtj z=a*mO=tzve)?A@?zUjs7*MjRqe7@D}8tK1aTkzcGC#q+ieICtK|I;v(=ndH4@{=}@`9!p1;QZZGpcn@V5p2 zw!q&O_}c=1Ti|aC{B421E%3Jm{5&695?qG6)3ymKE7{0^}sfA&_j4 zT#$nx==UV(w;$+t8pw9^cVA3F(BC~lf1?EbJrVS`KhWRlKz~yM{rwB{w<@eaP-DP1 z9i$;3Vj#{Sc_4>D@`UV|+FCGQ5 z5@Z#~YLIA7s4QZR8ABKDjRPj zakxhP&If{g0M%nKhycg{5PlFeQpgY^KSBN?1cH1L_fLf74X6Kakp`5h2BHe00-^{q z3S583&>ZVhUma zg7i8d+8|mWnjlDzV#J{bq7PySVhmygVgh0YVh&;jVhMuAC5k72pz%2o#2RE0hz|%A z#2dsG#0v!ZsUwIzhyw`neNPY%kcA-bAPYd;K+rfr<7F-g8b7l^W`UqFg~k>dW6mJR zkI@*I4l)g7D##QN3JCI7WC!xy2oU7U$fwcxK;tA71o=4|gaxt)Bm{&B5)2Xq!T<>b z2>_vk_=BJ^=nFyvSq8EKBpPHD2=c$xAR-`fAh96pLC||U5t7hN{`y4 z>$Xwl_ylv%80hKf>*<)FeiQ;tk?2nKxmQ|kKx2j!=2#CRO}(?hPMuNXx(|6+Wer{Iey-Pe0n+tzz6LVyeO2;qOs~@BbN`G zUx6$z*D=u1HzN5kIkaGC`p6^hn^#0OcJTA*o9GznfRmyAL{=xLq%Vz0b1CEpHbWB~ zaKRAN+z=kww3f_XCn?E~S*;H$)Q-}Cq3+0iYQ^-q2O0w%Qyp;M5I^k@CX+!Lp|yUE zpjCVlXbicURKQ^67{8Qx!+x^?H2Pf_&XN!sTO~FBVAgYu0E`Xlir7LZY;ckXx^a5a zmWJQKY8~W9+!ZY+E*<2klmns4F+L##>JAq+YP zhT%mM9sc)mS-DV-5n#Ah(}Ou?q=AzygM6#K4xw_eP9W{!!)Casi|ZSz-QLy6@$)T5 z{R5ahp2o3eq>y{$_2r;JAkdrv4YKW#Q^&!&wEHBU2Alx>{$Bz#EbEFW65AsZYXi)J zaOfU1VvKGkw0x+ySH^6^*#6lI;!qzmRLp<$52`7eDPY_L)39b5CF)Lkq`uu=nh(u< zD6nW0DjIo-Pj0rzC0irpG-&>*kU5qq)j`oo7Qm<2|tAA&#wb3)Yc zp~?~~m1b6A8my*EK!f@xl%7{V+0On=H``j!zr^*Ti$n zLA`nnG?JiMkS{ooMvrDlBfkbOC6VrfMhY}4QskRyIez)ww!H%l8jW^#4jYzAll{3G za8r_?0Je5TMR~d>4BA_xj5I(6VH8gzKHW3rwQHJ1w`~SIO~$8SJ@S>|LEW0kpcw|` z2>4A2yep!4AF*+J&XcEc6eDeRRyneWXB(8W7&LN#i7h=Xey8cdnr=)YPor*o!Ahd+ z0M>3?uVS(&n2m!~D~2uHovr|5!I;|ytZ?oJ%*k3(06q zXN43`V;XEiumBD6H_e2dq(h3yz{VT&Bzw>xe;enU&EBHwfo3ry9YY?(-@!`)&n%iL&T)4Sc6NY96)2posoignn^2T!rq0%A**2?M{G+$gXWL`=hkau z8`_OQgG>N6sy~J0L*tNIMt6pVjJ;wA8d#T5edZ71*5~TsiG@D1#-kS1gBCR~B5{I3 zu(sB;kq#TVeCHBO18jz*&45Ak=q>7y+|||I1-w}dEEp}wt?6e`#p6S*_PpZfljPm` z_jbDnIZ(T``?$?+9)H#r$^myrwzYvq7Bsm`{Q^b@H4QYp{;7lFQ7^dh?Yd+Cad!x4 zi~$1Zt0J{*5i`8*{NIjVpYXi#rM z8+-s~Ll%%$l^nQY&$+na2o`_Wx5A7~T1T@Hd_s!myy}iPX3K|0) zXl>{l(4aXnCoX;MD$$QVJPSah3>q}=EZW~p3R9Ky2Mt(;F#lekf5-f?=PFJaf#ve|l~dYByf%FoS6v zdJv5?cU+F=MhU(Y&=_;sk^zHSr^J8W~U$^r>tnCx|w_<{M7~Y~G>1zBCs2furpP zwTN>GpfTpQH9gp$#-elB5<8yD4!hgnhm`{(73N(S@@S^0cp)%vl1ixwXbfQlg9ZPB z0SkfvgW8~|?y>g)b^-D?-X1BEr^zt9?zB7evni&*yh=in+XiFq=z6GnjClfnZOok$ zFM$S)xw)>pNZ((6L2V5K4tXM-Mx&V;8D*k!bl6iFEqg(pi$UFx0U9(@49Tj@bV+IU z1`YC2*jDfZ0D14wA&zcT{~O~#W5k{LhJXfPoJx*bhOPLnj+KMW%J}b7x@}tywwdV| z=mi4?DjT&`JZh5R!aO_70%!$&QWa>BheZE4p4K^RXfS9{Z$mHK1PvOE58DfepH=u) zi(yQVX7^Ao8~yb714aXb9+P2zjTJ*W!qYt2%6XG+`Jt#=bAhKh_h{1rDcQ*%yETnG zjmfmi6X}}^BDytCKm!dFrDwgv^W;D={%*||o+jhq@_-IO<+^T-s0$YyET(}nqgnQ=)0Di(7H7Xc$)L1j>#&| z_^rA%OrGY>YF~T(t+&s0YgY3#8j@;;d~pxbyEQ31jknBKAu)OB58av^o@R?hyHdc$ z9qYR_r991*4^i?<_s!nYt*HkMG*DF92))AkXH>Ut%~R08|D#+d)@Y6#C6U#w`Oedb z%Gy3l%L}{Qt&s+2LzoaK2$22aEA%J^}8)9Fdw8Y|EsAFWLnA9Ydf*^F*Y z^C<2p8Et4!c^Z+d*zIpVH1AOKcox5!WORRcIhy^^Zo{bicUQPyi}Rg@V+u5K`Q*8t z*wRv(nqyFGj+JAsqi^tQAH_7k^ifRnOCQBFzw}W|^GhGaG{5vwO!G@0#WcV4QB3no zAH_7k^ifRnOCQBFzw}W|^GhGaG{5vwO!G@0#WcV4QB3noAH_7k^ifRnOCQBFzw}W| z^GhGaG{5vwOcTTgH-xaS;9}$P8wqF+i`GU%IKfik&J>Tw&?l}_Jc#yuXtp#mK&J%% zeBwvzHmoJ;z=UR4{0xPkPXlA;o(UsOLf82LuCZ3-&i+Eo@t2;v>?ndY%LJ`5SULal zTz?rbXugiGaWb}6_Q~Sz;|-v!Up(=1j}LzJ#LwHQ{^E(Bw?FvB6F(1A3l^Z&*`PG5 zz@btFJumQ9XC`bAP^D*7oxFE(yB6$-mm>`r_si!W?1`ln8V<2ZdVffo=QSBlF!0v- z_ZBtU&uv;f{`s8A^mWeqq8}zB|5<&K>=(XCd*GZ#7|cn{?Ue~ zMYIv*_(ed1$_x$$8|chnZO9JwL&sMvCWi@SAT@&->I3^r77Y@?6b?O%)?*0-0JpGi z0&T2sQL#NTpyMtKiY@>H=Y73kxQAMR;a+INQyrjsD~CJ$xJF{Fu5Ezh@bejM3X4Tq z(v|XF!l6;RQa%(8tt$aTjK&J1FnX#P@6bmZ&x?xw=RK%z@3vzHWq`(Fs4Z*^d#f#8 z4l=pvx6wSlsAn74$WgQvgK{}yyZ%p=0oQ&SxcByY%*s;ZQ+j}Sm6ch`qKSE;SjoqI{rsqu$zbK)1>i_ zq5=JnJK*?e!s~ge{zrX)p|=`zn+4GB1eA{sAW``fCn#V|p)g*-kWGQ35pC`XNe|`_vjHtJ z*{5dZ9hCxI1A7O@KVP_yn# zz|x)2#!hs583e?^j-z>FAKD#Ga}XX)X4<|qc2CXQl?Pb5uA%GE(Qz*}5au2L6H?e9 z=xr74n#=&(bqy`Z+wWi%WOJ6lY~NcGa&zIWz)fL|fSG{pjnTFimX4kp;-`E-_EQ?$ zi(tD7?(JYoP)}1zccv~Pgn)KIZ?2$cdZ<#@Y!A?`>puB(*Mflx#TO4~2;OAaQ!;;n0tU<_yTBI9;jo99vqIfS}0Li<8(b4+`2!HhgF#Hl*;d`BNxi8KD#(RZ^ zIc;wv7k`}tF#Hn3^)`>e<~kTXTVipa5Z>sK%A3*c%&@EVLEroEHn=_Z>Q6a==O0+; z4z#qu_~LF+Jbh?rDq)3k=nQQiS_q3qg-72WO87Y=6!7y6tb)Cb-=B*Hj-PJ;2im$I z8)3`Ww;dlZ7vk#1fES_NW6zTb{*nx!_$9W=_13T4jVPeF7f=>@^9W_3hcy!;?SP)v zYu8kacux=h@-GOmq8kqFZNfdx@}qII;klO?43ASkA*pCm zL$20StNsfD%Ib#00O0Kk+00OQT-OeQXGz`+-a|G1Gc&OM=S^r%^fnN41MF35QIs3%ndaf_F6UjU=iO-n_aD zdT?ks90J1O1(%U`C)~uS>kd0K7#;?RcNWuw4Gn&}<3nM=&7W>@sp%9$gDxgG3Grt8 z{FIAJ^;0fNun&t#_xZ^x{2tK?U-*pwpLAXIA=uBo7ZO7Kk9%xGbG`5`>(Cj`Kl!-k zLHiJ}yt@8;6F2bZySRxz-{l&_U^0XK2(;Y0a70B7`;WUp^bod*5v`}g*RE=Cd2j^u z|Iatj))2k_?q!E;e5J_sDoP?;_)+`%Csy;{w@F>Hd=a)PF$sQ@X!oL=OQj zVzR$f1P25rLaM(+1n&kSLaM(+TzA5T4iFJizej|P%Pt};^?O9v80#X!QvD^uJqTtQ zAR?stON4t5mxz%1T_UIsScDTns=q|t^DOXmC;Cg%J%a;HccQ;ET(3d1KG1Y0`b*Qj z>Htl5qQ5lU=HT{K*L8nMx>iXrrR%!CB;2OpTGDm>dn8Rls0c9$4>7#$ zB|Kj;8DVhF8R&=hTs`gM{+Sgx|9J~GHoZSB|7r&dT->cJYM|cV5aQb)d{YeYf8N3# zsj!t1`y$*xVZ441+dO>7)Xf8Spsyu<+F?=X;o8`&)&tW&7TX@zZoGiL)Ag`+_n)kX zwYxuL_}mJf`O{pBrBQ$Ohm0^SVq`z1`%6Y#tieTy$^KGt=Mub%gj9ct2&*-iL`e0Q zh&vtp%i7(aCg&3U%i7(4BD{^drYm^r?xz#r9`(z$yFV7;-t)_~`*(<-a?ooyEu{Ke zHLmCIR?F^0e`&gxYcQuf(O(*FAN_Le?oaD;95(+l6aM*Y)p_a6P7LF!YzCYso=whc7>UB*8v8MLmK(J%uHo_vXHb)g}nNX9;3s z=e51PU&DXyhz#TX@)2A9jj<1);QNeV?AMUm=zT4`g@89EJrw+_>_Ggh+gKq+y&Yzv z7j)Pw17se4jh!I&RQ64fdf^ z>D;e3dT0b!C^xX>W@WQ5xF9T$rd?AOz& z^3NGjd*I(hVMy#4tG5H$E(rEI3O+g`(%|>7*Acz7aTgQ%42;Nv(wNKknc-hP3+v0P zdGxI(6pkXS{=GS3m(~CB85t_GSB|c(L)Gp|U?ZV7EYF?0zN10s>D statement-breakpoint -ALTER TABLE "v0_4_merges" DROP COLUMN IF EXISTS "id";--> statement-breakpoint -ALTER TABLE "v0_4_splits" DROP COLUMN IF EXISTS "id";--> statement-breakpoint --- CREATE VIEW "public"."prices_chart_data" AS ( --- SELECT --- TIME_BUCKET('30 SECONDS'::INTERVAL, prices.created_at) AS interv, --- last(price, prices.created_at) FILTER(WHERE prices.created_at IS NOT NULL AND CASE WHEN prices_type = 'spot' THEN TRUE ELSE prices.created_at <= markets.created_at + '5 DAYS'::INTERVAL END) AS price, --- last(base_amount, prices.created_at) FILTER(WHERE prices.created_at IS NOT NULL AND CASE WHEN prices_type = 'spot' THEN TRUE ELSE prices.created_at <= markets.created_at + '5 DAYS'::INTERVAL END) AS base_amount, --- last(quote_amount, prices.created_at) FILTER(WHERE prices.created_at IS NOT NULL AND CASE WHEN prices_type = 'spot' THEN TRUE ELSE prices.created_at <= markets.created_at + '5 DAYS'::INTERVAL END) AS quote_amount, --- prices_type, --- prices.market_acct AS market_acct --- FROM prices --- JOIN markets ON markets.market_acct = prices.market_acct --- WHERE CASE WHEN prices_type = 'spot' THEN TRUE ELSE prices.created_at <= markets.created_at + '5 DAYS'::INTERVAL END --- GROUP BY interv, prices.market_acct, prices_type --- );--> statement-breakpoint --- CREATE VIEW "public"."proposal_total_trade_volume" AS ( --- WITH pass_market AS ( --- SELECT --- proposal_acct, --- orders.market_acct AS pass_market_acct, --- TIME_BUCKET('1 DAYS'::INTERVAL, orders.order_time) AS interv, --- SUM(filled_base_amount * quote_price) FILTER(WHERE orders.order_time IS NOT NULL) AS pass_volume --- FROM proposals --- JOIN orders --- ON proposals.pass_market_acct = orders.market_acct --- GROUP BY proposal_acct, interv, orders.market_acct --- ), --- fail_market AS ( --- SELECT --- proposal_acct, --- orders.market_acct AS fail_market_acct, --- TIME_BUCKET('1 DAYS'::INTERVAL, orders.order_time) AS interv, --- SUM(filled_base_amount * quote_price) FILTER(WHERE orders.order_time IS NOT NULL) AS fail_volume --- FROM proposals --- JOIN orders --- ON proposals.fail_market_acct = orders.market_acct --- GROUP BY proposal_acct, interv, orders.market_acct --- ) --- SELECT --- pass_market.proposal_acct AS proposal_acct, --- pass_market_acct, --- fail_market_acct, --- SUM(pass_volume) AS pass_volume, --- SUM(fail_volume) AS fail_volume --- FROM pass_market --- JOIN fail_market ON fail_market.proposal_acct = pass_market.proposal_acct --- GROUP BY pass_market.proposal_acct, pass_market_acct, fail_market_acct --- );--> statement-breakpoint --- CREATE VIEW "public"."twap_chart_data" AS ( --- SELECT --- TIME_BUCKET('30 SECONDS'::INTERVAL, "twaps"."created_at") AS interv, --- last(token_amount, "twaps"."created_at") FILTER(WHERE "twaps"."created_at" IS NOT NULL AND "twaps"."created_at" <= "markets"."created_at" + '5 DAYS'::INTERVAL) AS token_amount, --- "twaps"."market_acct" AS market_acct --- FROM "twaps" --- JOIN "markets" ON "markets"."market_acct" = "twaps"."market_acct" --- WHERE "twaps"."created_at" <= "markets"."created_at" + '5 DAYS'::INTERVAL --- GROUP BY interv, "twaps"."market_acct" --- ); \ No newline at end of file diff --git a/packages/database/drizzle/0010_crazy_sentinels.sql b/packages/database/drizzle/0010_crazy_sentinels.sql deleted file mode 100644 index a34d696c..00000000 --- a/packages/database/drizzle/0010_crazy_sentinels.sql +++ /dev/null @@ -1,34 +0,0 @@ -CREATE TABLE IF NOT EXISTS "organizations" ( - "organization_id" bigserial PRIMARY KEY NOT NULL, - "name" text NOT NULL, - "slug" varchar, - "url" varchar, - "description" text, - "image_url" varchar, - "creator_acct" varchar(44), - "admin_accts" jsonb, - "is_hide" boolean, - "socials" jsonb, - "created_at" timestamp with time zone DEFAULT now() NOT NULL, - CONSTRAINT "organizations_name_unique" UNIQUE("name"), - CONSTRAINT "organizations_slug_unique" UNIQUE("slug"), - CONSTRAINT "organizations_url_unique" UNIQUE("url") - -- CONSTRAINT "id_name_url" UNIQUE("organization_id","url","name") -); ---> statement-breakpoint -ALTER TABLE "dao_details" ADD COLUMN "organization_id" bigint;--> statement-breakpoint -ALTER TABLE "daos" ADD COLUMN "is_active" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "daos" ADD COLUMN "is_primary" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "daos" ADD COLUMN "organization_id" bigint;--> statement-breakpoint -ALTER TABLE "daos" ADD COLUMN "colors" jsonb;--> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "dao_details" ADD CONSTRAINT "dao_details_organization_id_organizations_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organizations"("organization_id") ON DELETE no action ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "daos" ADD CONSTRAINT "daos_organization_id_organizations_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organizations"("organization_id") ON DELETE no action ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; diff --git a/packages/database/drizzle/meta/0000_snapshot.json b/packages/database/drizzle/meta/0000_snapshot.json index 3e9ee4a0..97307556 100644 --- a/packages/database/drizzle/meta/0000_snapshot.json +++ b/packages/database/drizzle/meta/0000_snapshot.json @@ -1,8 +1,10 @@ { - "version": "7", - "dialect": "postgresql", + "id": "12ff8f1b-1044-4827-b918-9b5b421d14df", + "prevId": "00000000-0000-0000-0000-000000000000", + "version": "5", + "dialect": "pg", "tables": { - "public.candles": { + "candles": { "name": "candles", "schema": "", "columns": { @@ -72,15 +74,15 @@ "candles_market_acct_markets_market_acct_fk": { "name": "candles_market_acct_markets_market_acct_fk", "tableFrom": "candles", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -93,12 +95,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.comments": { + "comments": { "name": "comments", "schema": "", "columns": { @@ -145,45 +144,42 @@ "comments_proposal_acct_proposals_proposal_acct_fk": { "name": "comments_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "comments", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "comments_responding_comment_id_comments_comment_id_fk": { "name": "comments_responding_comment_id_comments_comment_id_fk", "tableFrom": "comments", + "tableTo": "comments", "columnsFrom": [ "responding_comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", + "nullsNotDistinct": false, "columns": [ "comment_id" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.conditional_vaults": { + "conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -241,24 +237,21 @@ "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.dao_details": { + "dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -365,54 +358,51 @@ "uniqueConstraints": { "dao_details_name_unique": { "name": "dao_details_name_unique", + "nullsNotDistinct": false, "columns": [ "name" - ], - "nullsNotDistinct": false + ] }, "dao_details_slug_unique": { "name": "dao_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] }, "dao_details_url_unique": { "name": "dao_details_url_unique", + "nullsNotDistinct": false, "columns": [ "url" - ], - "nullsNotDistinct": false + ] }, "dao_details_x_account_unique": { "name": "dao_details_x_account_unique", + "nullsNotDistinct": false, "columns": [ "x_account" - ], - "nullsNotDistinct": false + ] }, "dao_details_github_unique": { "name": "dao_details_github_unique", + "nullsNotDistinct": false, "columns": [ "github" - ], - "nullsNotDistinct": false + ] }, "id_name_url": { "name": "id_name_url", + "nullsNotDistinct": false, "columns": [ "dao_id", "url", "name" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.daos": { + "daos": { "name": "daos", "schema": "", "columns": { @@ -508,79 +498,76 @@ "daos_program_acct_programs_program_acct_fk": { "name": "daos_program_acct_programs_program_acct_fk", "tableFrom": "daos", + "tableTo": "programs", "columnsFrom": [ "program_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_dao_id_dao_details_dao_id_fk": { "name": "daos_dao_id_dao_details_dao_id_fk", "tableFrom": "daos", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_base_acct_tokens_mint_acct_fk": { "name": "daos_base_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "base_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_quote_acct_tokens_mint_acct_fk": { "name": "daos_quote_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "quote_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "daos_treasury_acct_unique": { "name": "daos_treasury_acct_unique", + "nullsNotDistinct": false, "columns": [ "treasury_acct" - ], - "nullsNotDistinct": false + ] }, "dao_acct_program": { "name": "dao_acct_program", + "nullsNotDistinct": false, "columns": [ "dao_acct", "program_acct" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.indexer_account_dependencies": { + "indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -621,28 +608,28 @@ "indexer_account_dependencies_name_indexers_name_fk": { "name": "indexer_account_dependencies_name_indexers_name_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "indexers", "columnsFrom": [ "name" ], - "tableTo": "indexers", "columnsTo": [ "name" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk": { "name": "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig_processed" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -654,12 +641,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.indexers": { + "indexers": { "name": "indexers", "schema": "", "columns": { @@ -691,12 +675,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.makes": { + "makes": { "name": "makes", "schema": "", "columns": { @@ -745,56 +726,45 @@ }, "indexes": { "market_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "market_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct" + ], + "isUnique": false } }, "foreignKeys": { "makes_order_tx_sig_orders_order_tx_sig_fk": { "name": "makes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "makes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "makes_market_acct_markets_market_acct_fk": { "name": "makes_market_acct_markets_market_acct_fk", "tableFrom": "makes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.markets": { + "markets": { "name": "markets", "schema": "", "columns": { @@ -913,76 +883,73 @@ "markets_proposal_acct_proposals_proposal_acct_fk": { "name": "markets_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "markets", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_base_mint_acct_tokens_mint_acct_fk": { "name": "markets_base_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "base_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_quote_mint_acct_tokens_mint_acct_fk": { "name": "markets_quote_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_bids_token_acct_token_accts_token_acct_fk": { "name": "markets_bids_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "bids_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_asks_token_acct_token_accts_token_acct_fk": { "name": "markets_asks_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "asks_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.orders": { + "orders": { "name": "orders", "schema": "", "columns": { @@ -1073,75 +1040,59 @@ }, "indexes": { "actor_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "actor_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "actor_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "actor_acct" + ], + "isUnique": false } }, "foreignKeys": { "orders_order_tx_sig_transactions_tx_sig_fk": { "name": "orders_order_tx_sig_transactions_tx_sig_fk", "tableFrom": "orders", + "tableTo": "transactions", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_market_acct_markets_market_acct_fk": { "name": "orders_market_acct_markets_market_acct_fk", "tableFrom": "orders", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_actor_acct_users_user_acct_fk": { "name": "orders_actor_acct_users_user_acct_fk", "tableFrom": "orders", + "tableTo": "users", "columnsFrom": [ "actor_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.prices": { + "prices": { "name": "prices", "schema": "", "columns": { @@ -1200,15 +1151,15 @@ "prices_market_acct_markets_market_acct_fk": { "name": "prices_market_acct_markets_market_acct_fk", "tableFrom": "prices", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -1220,12 +1171,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.program_system": { + "program_system": { "name": "program_system", "schema": "", "columns": { @@ -1265,63 +1213,60 @@ "program_system_autocrat_acct_programs_program_acct_fk": { "name": "program_system_autocrat_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "autocrat_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_conditional_vault_acct_programs_program_acct_fk": { "name": "program_system_conditional_vault_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "conditional_vault_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_pricing_model_acct_programs_program_acct_fk": { "name": "program_system_pricing_model_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "pricing_model_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_migrator_acct_programs_program_acct_fk": { "name": "program_system_migrator_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "migrator_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.programs": { + "programs": { "name": "programs", "schema": "", "columns": { @@ -1363,18 +1308,15 @@ "uniqueConstraints": { "program_version": { "name": "program_version", + "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposal_details": { + "proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1456,32 +1398,29 @@ "proposal_details_proposal_acct_proposals_proposal_acct_fk": { "name": "proposal_details_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "proposal_details", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposals": { + "proposals": { "name": "proposals", "schema": "", "columns": { @@ -1643,50 +1582,47 @@ "proposals_dao_acct_daos_dao_acct_fk": { "name": "proposals_dao_acct_daos_dao_acct_fk", "tableFrom": "proposals", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_base_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_base_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "base_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "quote_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.reactions": { + "reactions": { "name": "reactions", "schema": "", "columns": { @@ -1733,37 +1669,34 @@ "reactions_comment_id_comments_comment_id_fk": { "name": "reactions_comment_id_comments_comment_id_fk", "tableFrom": "reactions", + "tableTo": "comments", "columnsFrom": [ "comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "reactions_proposal_acct_proposals_proposal_acct_fk": { "name": "reactions_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "reactions", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.sessions": { + "sessions": { "name": "sessions", "schema": "", "columns": { @@ -1799,24 +1732,21 @@ "sessions_user_acct_users_user_acct_fk": { "name": "sessions_user_acct_users_user_acct_fk", "tableFrom": "sessions", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "restrict", - "onDelete": "restrict" + "onDelete": "restrict", + "onUpdate": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.takes": { + "takes": { "name": "takes", "schema": "", "columns": { @@ -1890,111 +1820,74 @@ }, "indexes": { "block_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_block", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "block_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_block" + ], + "isUnique": false }, "time_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_time", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "time_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_time" + ], + "isUnique": false }, "maker_index": { - "columns": [ - { - "expression": "maker_order_tx_sig", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "maker_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "maker_order_tx_sig" + ], + "isUnique": false } }, "foreignKeys": { "takes_order_tx_sig_orders_order_tx_sig_fk": { "name": "takes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_maker_order_tx_sig_makes_order_tx_sig_fk": { "name": "takes_maker_order_tx_sig_makes_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "makes", "columnsFrom": [ "maker_order_tx_sig" ], - "tableTo": "makes", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_market_acct_markets_market_acct_fk": { "name": "takes_market_acct_markets_market_acct_fk", "tableFrom": "takes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_acct_balances": { + "token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2051,72 +1944,54 @@ }, "indexes": { "acct_amount_created": { - "columns": [ - { - "expression": "token_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amount", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "acct_amount_created", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "token_acct", + "created_at", + "amount" + ], + "isUnique": false } }, "foreignKeys": { "token_acct_balances_token_acct_token_accts_token_acct_fk": { "name": "token_acct_balances_token_acct_token_accts_token_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "token_accts", "columnsFrom": [ "token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_mint_acct_tokens_mint_acct_fk": { "name": "token_acct_balances_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_tx_sig_transactions_tx_sig_fk": { "name": "token_acct_balances_tx_sig_transactions_tx_sig_fk", "tableFrom": "token_acct_balances", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2130,12 +2005,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_accts": { + "token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2182,24 +2054,21 @@ "token_accts_mint_acct_tokens_mint_acct_fk": { "name": "token_accts_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_accts", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.tokens": { + "tokens": { "name": "tokens", "schema": "", "columns": { @@ -2249,12 +2118,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watcher_transactions": { + "transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2279,53 +2145,40 @@ }, "indexes": { "watcher_slot_index": { - "columns": [ - { - "expression": "watcher_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "watcher_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "watcher_acct", + "slot" + ], + "isUnique": false } }, "foreignKeys": { "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk": { "name": "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transaction_watchers", "columnsFrom": [ "watcher_acct" ], - "tableTo": "transaction_watchers", "columnsTo": [ "acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2337,12 +2190,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watchers": { + "transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2407,37 +2257,34 @@ "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watchers_first_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_first_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "first_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transactions": { + "transactions": { "name": "transactions", "schema": "", "columns": { @@ -2486,29 +2333,18 @@ }, "indexes": { "txn_slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "txn_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.twaps": { + "twaps": { "name": "twaps", "schema": "", "columns": { @@ -2567,28 +2403,28 @@ "twaps_market_acct_markets_market_acct_fk": { "name": "twaps_market_acct_markets_market_acct_fk", "tableFrom": "twaps", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "twaps_proposal_acct_proposals_proposal_acct_fk": { "name": "twaps_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "twaps", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2600,12 +2436,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_deposits": { + "user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2646,50 +2479,47 @@ "user_deposits_tx_sig_transactions_tx_sig_fk": { "name": "user_deposits_tx_sig_transactions_tx_sig_fk", "tableFrom": "user_deposits", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_user_acct_users_user_acct_fk": { "name": "user_deposits_user_acct_users_user_acct_fk", "tableFrom": "user_deposits", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_mint_acct_tokens_mint_acct_fk": { "name": "user_deposits_mint_acct_tokens_mint_acct_fk", "tableFrom": "user_deposits", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_performance": { + "user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2804,41 +2634,41 @@ "user_performance_proposal_acct_proposals_proposal_acct_fk": { "name": "user_performance_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "user_performance", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_user_acct_users_user_acct_fk": { "name": "user_performance_user_acct_users_user_acct_fk", "tableFrom": "user_performance", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_dao_acct_daos_dao_acct_fk": { "name": "user_performance_dao_acct_daos_dao_acct_fk", "tableFrom": "user_performance", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2850,12 +2680,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.users": { + "users": { "name": "users", "schema": "", "columns": { @@ -2876,23 +2703,14 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { + "columns": {}, "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "12ff8f1b-1044-4827-b918-9b5b421d14df", - "prevId": "00000000-0000-0000-0000-000000000000", - "sequences": {}, - "policies": {}, - "views": {}, - "roles": {} + "tables": {} + } } \ No newline at end of file diff --git a/packages/database/drizzle/meta/0001_snapshot.json b/packages/database/drizzle/meta/0001_snapshot.json index 744ecfc9..a7a0ad5b 100644 --- a/packages/database/drizzle/meta/0001_snapshot.json +++ b/packages/database/drizzle/meta/0001_snapshot.json @@ -1,8 +1,10 @@ { - "version": "7", - "dialect": "postgresql", + "id": "01dc3a22-8fb9-4ce8-b122-6b26fb0a83e2", + "prevId": "12ff8f1b-1044-4827-b918-9b5b421d14df", + "version": "5", + "dialect": "pg", "tables": { - "public.candles": { + "candles": { "name": "candles", "schema": "", "columns": { @@ -72,15 +74,15 @@ "candles_market_acct_markets_market_acct_fk": { "name": "candles_market_acct_markets_market_acct_fk", "tableFrom": "candles", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -93,12 +95,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.comments": { + "comments": { "name": "comments", "schema": "", "columns": { @@ -145,45 +144,42 @@ "comments_proposal_acct_proposals_proposal_acct_fk": { "name": "comments_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "comments", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "comments_responding_comment_id_comments_comment_id_fk": { "name": "comments_responding_comment_id_comments_comment_id_fk", "tableFrom": "comments", + "tableTo": "comments", "columnsFrom": [ "responding_comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", + "nullsNotDistinct": false, "columns": [ "comment_id" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.conditional_vaults": { + "conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -241,24 +237,21 @@ "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.dao_details": { + "dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -365,54 +358,51 @@ "uniqueConstraints": { "dao_details_name_unique": { "name": "dao_details_name_unique", + "nullsNotDistinct": false, "columns": [ "name" - ], - "nullsNotDistinct": false + ] }, "dao_details_slug_unique": { "name": "dao_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] }, "dao_details_url_unique": { "name": "dao_details_url_unique", + "nullsNotDistinct": false, "columns": [ "url" - ], - "nullsNotDistinct": false + ] }, "dao_details_x_account_unique": { "name": "dao_details_x_account_unique", + "nullsNotDistinct": false, "columns": [ "x_account" - ], - "nullsNotDistinct": false + ] }, "dao_details_github_unique": { "name": "dao_details_github_unique", + "nullsNotDistinct": false, "columns": [ "github" - ], - "nullsNotDistinct": false + ] }, "id_name_url": { "name": "id_name_url", + "nullsNotDistinct": false, "columns": [ "dao_id", "url", "name" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.daos": { + "daos": { "name": "daos", "schema": "", "columns": { @@ -508,79 +498,76 @@ "daos_program_acct_programs_program_acct_fk": { "name": "daos_program_acct_programs_program_acct_fk", "tableFrom": "daos", + "tableTo": "programs", "columnsFrom": [ "program_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_dao_id_dao_details_dao_id_fk": { "name": "daos_dao_id_dao_details_dao_id_fk", "tableFrom": "daos", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_base_acct_tokens_mint_acct_fk": { "name": "daos_base_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "base_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_quote_acct_tokens_mint_acct_fk": { "name": "daos_quote_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "quote_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "daos_treasury_acct_unique": { "name": "daos_treasury_acct_unique", + "nullsNotDistinct": false, "columns": [ "treasury_acct" - ], - "nullsNotDistinct": false + ] }, "dao_acct_program": { "name": "dao_acct_program", + "nullsNotDistinct": false, "columns": [ "dao_acct", "program_acct" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.indexer_account_dependencies": { + "indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -621,28 +608,28 @@ "indexer_account_dependencies_name_indexers_name_fk": { "name": "indexer_account_dependencies_name_indexers_name_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "indexers", "columnsFrom": [ "name" ], - "tableTo": "indexers", "columnsTo": [ "name" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk": { "name": "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig_processed" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -654,12 +641,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.indexers": { + "indexers": { "name": "indexers", "schema": "", "columns": { @@ -691,12 +675,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.makes": { + "makes": { "name": "makes", "schema": "", "columns": { @@ -745,56 +726,45 @@ }, "indexes": { "market_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "market_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct" + ], + "isUnique": false } }, "foreignKeys": { "makes_order_tx_sig_orders_order_tx_sig_fk": { "name": "makes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "makes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "makes_market_acct_markets_market_acct_fk": { "name": "makes_market_acct_markets_market_acct_fk", "tableFrom": "makes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.markets": { + "markets": { "name": "markets", "schema": "", "columns": { @@ -913,76 +883,73 @@ "markets_proposal_acct_proposals_proposal_acct_fk": { "name": "markets_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "markets", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_base_mint_acct_tokens_mint_acct_fk": { "name": "markets_base_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "base_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_quote_mint_acct_tokens_mint_acct_fk": { "name": "markets_quote_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_bids_token_acct_token_accts_token_acct_fk": { "name": "markets_bids_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "bids_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_asks_token_acct_token_accts_token_acct_fk": { "name": "markets_asks_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "asks_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.orders": { + "orders": { "name": "orders", "schema": "", "columns": { @@ -1073,75 +1040,59 @@ }, "indexes": { "actor_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "actor_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "actor_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "actor_acct" + ], + "isUnique": false } }, "foreignKeys": { "orders_order_tx_sig_transactions_tx_sig_fk": { "name": "orders_order_tx_sig_transactions_tx_sig_fk", "tableFrom": "orders", + "tableTo": "transactions", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_market_acct_markets_market_acct_fk": { "name": "orders_market_acct_markets_market_acct_fk", "tableFrom": "orders", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_actor_acct_users_user_acct_fk": { "name": "orders_actor_acct_users_user_acct_fk", "tableFrom": "orders", + "tableTo": "users", "columnsFrom": [ "actor_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.prices": { + "prices": { "name": "prices", "schema": "", "columns": { @@ -1200,15 +1151,15 @@ "prices_market_acct_markets_market_acct_fk": { "name": "prices_market_acct_markets_market_acct_fk", "tableFrom": "prices", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -1220,12 +1171,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.program_system": { + "program_system": { "name": "program_system", "schema": "", "columns": { @@ -1265,63 +1213,60 @@ "program_system_autocrat_acct_programs_program_acct_fk": { "name": "program_system_autocrat_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "autocrat_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_conditional_vault_acct_programs_program_acct_fk": { "name": "program_system_conditional_vault_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "conditional_vault_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_pricing_model_acct_programs_program_acct_fk": { "name": "program_system_pricing_model_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "pricing_model_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_migrator_acct_programs_program_acct_fk": { "name": "program_system_migrator_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "migrator_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.programs": { + "programs": { "name": "programs", "schema": "", "columns": { @@ -1363,18 +1308,15 @@ "uniqueConstraints": { "program_version": { "name": "program_version", + "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposal_details": { + "proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1456,32 +1398,29 @@ "proposal_details_proposal_acct_proposals_proposal_acct_fk": { "name": "proposal_details_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "proposal_details", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposals": { + "proposals": { "name": "proposals", "schema": "", "columns": { @@ -1643,50 +1582,47 @@ "proposals_dao_acct_daos_dao_acct_fk": { "name": "proposals_dao_acct_daos_dao_acct_fk", "tableFrom": "proposals", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_base_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_base_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "base_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "quote_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.reactions": { + "reactions": { "name": "reactions", "schema": "", "columns": { @@ -1733,37 +1669,34 @@ "reactions_comment_id_comments_comment_id_fk": { "name": "reactions_comment_id_comments_comment_id_fk", "tableFrom": "reactions", + "tableTo": "comments", "columnsFrom": [ "comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "reactions_proposal_acct_proposals_proposal_acct_fk": { "name": "reactions_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "reactions", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.sessions": { + "sessions": { "name": "sessions", "schema": "", "columns": { @@ -1799,24 +1732,21 @@ "sessions_user_acct_users_user_acct_fk": { "name": "sessions_user_acct_users_user_acct_fk", "tableFrom": "sessions", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "restrict", - "onDelete": "restrict" + "onDelete": "restrict", + "onUpdate": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signature_accounts": { + "signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1842,19 +1772,11 @@ }, "indexes": { "account_index": { - "columns": [ - { - "expression": "account", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "account_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "account" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1867,12 +1789,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signatures": { + "signatures": { "name": "signatures", "schema": "", "columns": { @@ -1922,34 +1841,18 @@ }, "indexes": { "slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false }, "sequence_num_index": { - "columns": [ - { - "expression": "seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "sequence_num_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "seq_num" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1957,17 +1860,14 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", + "nullsNotDistinct": false, "columns": [ "seq_num" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.takes": { + "takes": { "name": "takes", "schema": "", "columns": { @@ -2041,111 +1941,74 @@ }, "indexes": { "block_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_block", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "block_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_block" + ], + "isUnique": false }, "time_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_time", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "time_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_time" + ], + "isUnique": false }, "maker_index": { - "columns": [ - { - "expression": "maker_order_tx_sig", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "maker_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "maker_order_tx_sig" + ], + "isUnique": false } }, "foreignKeys": { "takes_order_tx_sig_orders_order_tx_sig_fk": { "name": "takes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_maker_order_tx_sig_makes_order_tx_sig_fk": { "name": "takes_maker_order_tx_sig_makes_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "makes", "columnsFrom": [ "maker_order_tx_sig" ], - "tableTo": "makes", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_market_acct_markets_market_acct_fk": { "name": "takes_market_acct_markets_market_acct_fk", "tableFrom": "takes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_acct_balances": { + "token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2202,72 +2065,54 @@ }, "indexes": { "acct_amount_created": { - "columns": [ - { - "expression": "token_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amount", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "acct_amount_created", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "token_acct", + "created_at", + "amount" + ], + "isUnique": false } }, "foreignKeys": { "token_acct_balances_token_acct_token_accts_token_acct_fk": { "name": "token_acct_balances_token_acct_token_accts_token_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "token_accts", "columnsFrom": [ "token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_mint_acct_tokens_mint_acct_fk": { "name": "token_acct_balances_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_tx_sig_transactions_tx_sig_fk": { "name": "token_acct_balances_tx_sig_transactions_tx_sig_fk", "tableFrom": "token_acct_balances", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2281,12 +2126,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_accts": { + "token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2333,24 +2175,21 @@ "token_accts_mint_acct_tokens_mint_acct_fk": { "name": "token_accts_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_accts", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.tokens": { + "tokens": { "name": "tokens", "schema": "", "columns": { @@ -2400,12 +2239,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watcher_transactions": { + "transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2430,53 +2266,40 @@ }, "indexes": { "watcher_slot_index": { - "columns": [ - { - "expression": "watcher_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "watcher_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "watcher_acct", + "slot" + ], + "isUnique": false } }, "foreignKeys": { "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk": { "name": "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transaction_watchers", "columnsFrom": [ "watcher_acct" ], - "tableTo": "transaction_watchers", "columnsTo": [ "acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2488,12 +2311,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watchers": { + "transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2558,37 +2378,34 @@ "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watchers_first_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_first_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "first_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transactions": { + "transactions": { "name": "transactions", "schema": "", "columns": { @@ -2637,29 +2454,18 @@ }, "indexes": { "txn_slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "txn_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.twaps": { + "twaps": { "name": "twaps", "schema": "", "columns": { @@ -2718,28 +2524,28 @@ "twaps_market_acct_markets_market_acct_fk": { "name": "twaps_market_acct_markets_market_acct_fk", "tableFrom": "twaps", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "twaps_proposal_acct_proposals_proposal_acct_fk": { "name": "twaps_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "twaps", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2751,12 +2557,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_deposits": { + "user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2797,50 +2600,47 @@ "user_deposits_tx_sig_transactions_tx_sig_fk": { "name": "user_deposits_tx_sig_transactions_tx_sig_fk", "tableFrom": "user_deposits", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_user_acct_users_user_acct_fk": { "name": "user_deposits_user_acct_users_user_acct_fk", "tableFrom": "user_deposits", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_mint_acct_tokens_mint_acct_fk": { "name": "user_deposits_mint_acct_tokens_mint_acct_fk", "tableFrom": "user_deposits", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_performance": { + "user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2955,41 +2755,41 @@ "user_performance_proposal_acct_proposals_proposal_acct_fk": { "name": "user_performance_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "user_performance", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_user_acct_users_user_acct_fk": { "name": "user_performance_user_acct_users_user_acct_fk", "tableFrom": "user_performance", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_dao_acct_daos_dao_acct_fk": { "name": "user_performance_dao_acct_daos_dao_acct_fk", "tableFrom": "user_performance", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -3001,12 +2801,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.users": { + "users": { "name": "users", "schema": "", "columns": { @@ -3027,12 +2824,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_amms": { + "v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -3097,50 +2891,47 @@ "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "lp_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_base_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_base_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "base_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_conditional_vaults": { + "v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -3193,50 +2984,47 @@ "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "v0_4_questions", "columnsFrom": [ "question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk": { "name": "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "token_accts", "columnsFrom": [ "underlying_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_merges": { + "v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3286,92 +3074,60 @@ }, "indexes": { "merge_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "merge_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "merge_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_merges", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_merges_signature_signatures_signature_fk": { "name": "v0_4_merges_signature_signatures_signature_fk", "tableFrom": "v0_4_merges", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_metric_decisions": { + "v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3470,89 +3226,86 @@ "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk": { "name": "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "outcome_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "metric_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "outcome_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "metric_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk": { "name": "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_amms", "columnsFrom": [ "amm_addr" ], - "tableTo": "v0_4_amms", "columnsTo": [ "amm_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_questions": { + "v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3609,12 +3362,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_splits": { + "v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3664,92 +3414,60 @@ }, "indexes": { "split_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "split_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "split_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_splits", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_splits_signature_signatures_signature_fk": { "name": "v0_4_splits_signature_signatures_signature_fk", "tableFrom": "v0_4_splits", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_swaps": { + "v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3823,76 +3541,38 @@ }, "indexes": { "amm_index": { - "columns": [ - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_addr" + ], + "isUnique": false }, "signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "seq_num_amm_index": { - "columns": [ - { - "expression": "amm_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "seq_num_amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_seq_num", + "amm_addr" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { + "columns": {}, "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "01dc3a22-8fb9-4ce8-b122-6b26fb0a83e2", - "prevId": "12ff8f1b-1044-4827-b918-9b5b421d14df", - "sequences": {}, - "policies": {}, - "views": {}, - "roles": {} + "tables": {} + } } \ No newline at end of file diff --git a/packages/database/drizzle/meta/0002_snapshot.json b/packages/database/drizzle/meta/0002_snapshot.json index 547159df..5a8abdd7 100644 --- a/packages/database/drizzle/meta/0002_snapshot.json +++ b/packages/database/drizzle/meta/0002_snapshot.json @@ -1,8 +1,10 @@ { - "version": "7", - "dialect": "postgresql", + "id": "aa6c6b32-77eb-4d74-ada7-30fe06b4c0cc", + "prevId": "01dc3a22-8fb9-4ce8-b122-6b26fb0a83e2", + "version": "5", + "dialect": "pg", "tables": { - "public.candles": { + "candles": { "name": "candles", "schema": "", "columns": { @@ -72,15 +74,15 @@ "candles_market_acct_markets_market_acct_fk": { "name": "candles_market_acct_markets_market_acct_fk", "tableFrom": "candles", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -93,12 +95,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.comments": { + "comments": { "name": "comments", "schema": "", "columns": { @@ -145,45 +144,42 @@ "comments_proposal_acct_proposals_proposal_acct_fk": { "name": "comments_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "comments", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "comments_responding_comment_id_comments_comment_id_fk": { "name": "comments_responding_comment_id_comments_comment_id_fk", "tableFrom": "comments", + "tableTo": "comments", "columnsFrom": [ "responding_comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", + "nullsNotDistinct": false, "columns": [ "comment_id" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.conditional_vaults": { + "conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -241,24 +237,21 @@ "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.dao_details": { + "dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -365,54 +358,51 @@ "uniqueConstraints": { "dao_details_name_unique": { "name": "dao_details_name_unique", + "nullsNotDistinct": false, "columns": [ "name" - ], - "nullsNotDistinct": false + ] }, "dao_details_slug_unique": { "name": "dao_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] }, "dao_details_url_unique": { "name": "dao_details_url_unique", + "nullsNotDistinct": false, "columns": [ "url" - ], - "nullsNotDistinct": false + ] }, "dao_details_x_account_unique": { "name": "dao_details_x_account_unique", + "nullsNotDistinct": false, "columns": [ "x_account" - ], - "nullsNotDistinct": false + ] }, "dao_details_github_unique": { "name": "dao_details_github_unique", + "nullsNotDistinct": false, "columns": [ "github" - ], - "nullsNotDistinct": false + ] }, "id_name_url": { "name": "id_name_url", + "nullsNotDistinct": false, "columns": [ "dao_id", "url", "name" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.daos": { + "daos": { "name": "daos", "schema": "", "columns": { @@ -508,79 +498,76 @@ "daos_program_acct_programs_program_acct_fk": { "name": "daos_program_acct_programs_program_acct_fk", "tableFrom": "daos", + "tableTo": "programs", "columnsFrom": [ "program_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_dao_id_dao_details_dao_id_fk": { "name": "daos_dao_id_dao_details_dao_id_fk", "tableFrom": "daos", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_base_acct_tokens_mint_acct_fk": { "name": "daos_base_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "base_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_quote_acct_tokens_mint_acct_fk": { "name": "daos_quote_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "quote_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "daos_treasury_acct_unique": { "name": "daos_treasury_acct_unique", + "nullsNotDistinct": false, "columns": [ "treasury_acct" - ], - "nullsNotDistinct": false + ] }, "dao_acct_program": { "name": "dao_acct_program", + "nullsNotDistinct": false, "columns": [ "dao_acct", "program_acct" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.indexer_account_dependencies": { + "indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -621,28 +608,28 @@ "indexer_account_dependencies_name_indexers_name_fk": { "name": "indexer_account_dependencies_name_indexers_name_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "indexers", "columnsFrom": [ "name" ], - "tableTo": "indexers", "columnsTo": [ "name" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk": { "name": "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig_processed" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -654,12 +641,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.indexers": { + "indexers": { "name": "indexers", "schema": "", "columns": { @@ -691,12 +675,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.makes": { + "makes": { "name": "makes", "schema": "", "columns": { @@ -745,56 +726,45 @@ }, "indexes": { "market_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "market_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct" + ], + "isUnique": false } }, "foreignKeys": { "makes_order_tx_sig_orders_order_tx_sig_fk": { "name": "makes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "makes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "makes_market_acct_markets_market_acct_fk": { "name": "makes_market_acct_markets_market_acct_fk", "tableFrom": "makes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.markets": { + "markets": { "name": "markets", "schema": "", "columns": { @@ -913,76 +883,73 @@ "markets_proposal_acct_proposals_proposal_acct_fk": { "name": "markets_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "markets", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_base_mint_acct_tokens_mint_acct_fk": { "name": "markets_base_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "base_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_quote_mint_acct_tokens_mint_acct_fk": { "name": "markets_quote_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_bids_token_acct_token_accts_token_acct_fk": { "name": "markets_bids_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "bids_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_asks_token_acct_token_accts_token_acct_fk": { "name": "markets_asks_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "asks_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.orders": { + "orders": { "name": "orders", "schema": "", "columns": { @@ -1073,75 +1040,59 @@ }, "indexes": { "actor_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "actor_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "actor_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "actor_acct" + ], + "isUnique": false } }, "foreignKeys": { "orders_order_tx_sig_transactions_tx_sig_fk": { "name": "orders_order_tx_sig_transactions_tx_sig_fk", "tableFrom": "orders", + "tableTo": "transactions", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_market_acct_markets_market_acct_fk": { "name": "orders_market_acct_markets_market_acct_fk", "tableFrom": "orders", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_actor_acct_users_user_acct_fk": { "name": "orders_actor_acct_users_user_acct_fk", "tableFrom": "orders", + "tableTo": "users", "columnsFrom": [ "actor_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.prices": { + "prices": { "name": "prices", "schema": "", "columns": { @@ -1200,15 +1151,15 @@ "prices_market_acct_markets_market_acct_fk": { "name": "prices_market_acct_markets_market_acct_fk", "tableFrom": "prices", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -1220,12 +1171,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.program_system": { + "program_system": { "name": "program_system", "schema": "", "columns": { @@ -1265,63 +1213,60 @@ "program_system_autocrat_acct_programs_program_acct_fk": { "name": "program_system_autocrat_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "autocrat_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_conditional_vault_acct_programs_program_acct_fk": { "name": "program_system_conditional_vault_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "conditional_vault_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_pricing_model_acct_programs_program_acct_fk": { "name": "program_system_pricing_model_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "pricing_model_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_migrator_acct_programs_program_acct_fk": { "name": "program_system_migrator_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "migrator_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.programs": { + "programs": { "name": "programs", "schema": "", "columns": { @@ -1363,18 +1308,15 @@ "uniqueConstraints": { "program_version": { "name": "program_version", + "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposal_details": { + "proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1456,32 +1398,29 @@ "proposal_details_proposal_acct_proposals_proposal_acct_fk": { "name": "proposal_details_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "proposal_details", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposals": { + "proposals": { "name": "proposals", "schema": "", "columns": { @@ -1643,50 +1582,47 @@ "proposals_dao_acct_daos_dao_acct_fk": { "name": "proposals_dao_acct_daos_dao_acct_fk", "tableFrom": "proposals", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_base_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_base_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "base_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "quote_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.reactions": { + "reactions": { "name": "reactions", "schema": "", "columns": { @@ -1733,37 +1669,34 @@ "reactions_comment_id_comments_comment_id_fk": { "name": "reactions_comment_id_comments_comment_id_fk", "tableFrom": "reactions", + "tableTo": "comments", "columnsFrom": [ "comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "reactions_proposal_acct_proposals_proposal_acct_fk": { "name": "reactions_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "reactions", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.sessions": { + "sessions": { "name": "sessions", "schema": "", "columns": { @@ -1799,24 +1732,21 @@ "sessions_user_acct_users_user_acct_fk": { "name": "sessions_user_acct_users_user_acct_fk", "tableFrom": "sessions", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "restrict", - "onDelete": "restrict" + "onDelete": "restrict", + "onUpdate": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signature_accounts": { + "signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1842,19 +1772,11 @@ }, "indexes": { "account_index": { - "columns": [ - { - "expression": "account", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "account_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "account" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1867,12 +1789,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signatures": { + "signatures": { "name": "signatures", "schema": "", "columns": { @@ -1922,34 +1841,18 @@ }, "indexes": { "slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false }, "sequence_num_index": { - "columns": [ - { - "expression": "seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "sequence_num_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "seq_num" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1957,17 +1860,14 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", + "nullsNotDistinct": false, "columns": [ "seq_num" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.takes": { + "takes": { "name": "takes", "schema": "", "columns": { @@ -2041,111 +1941,74 @@ }, "indexes": { "block_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_block", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "block_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_block" + ], + "isUnique": false }, "time_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_time", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "time_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_time" + ], + "isUnique": false }, "maker_index": { - "columns": [ - { - "expression": "maker_order_tx_sig", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "maker_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "maker_order_tx_sig" + ], + "isUnique": false } }, "foreignKeys": { "takes_order_tx_sig_orders_order_tx_sig_fk": { "name": "takes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_maker_order_tx_sig_makes_order_tx_sig_fk": { "name": "takes_maker_order_tx_sig_makes_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "makes", "columnsFrom": [ "maker_order_tx_sig" ], - "tableTo": "makes", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_market_acct_markets_market_acct_fk": { "name": "takes_market_acct_markets_market_acct_fk", "tableFrom": "takes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_acct_balances": { + "token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2202,72 +2065,54 @@ }, "indexes": { "acct_amount_created": { - "columns": [ - { - "expression": "token_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amount", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "acct_amount_created", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "token_acct", + "created_at", + "amount" + ], + "isUnique": false } }, "foreignKeys": { "token_acct_balances_token_acct_token_accts_token_acct_fk": { "name": "token_acct_balances_token_acct_token_accts_token_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "token_accts", "columnsFrom": [ "token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_mint_acct_tokens_mint_acct_fk": { "name": "token_acct_balances_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_tx_sig_transactions_tx_sig_fk": { "name": "token_acct_balances_tx_sig_transactions_tx_sig_fk", "tableFrom": "token_acct_balances", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2281,12 +2126,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_accts": { + "token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2333,24 +2175,21 @@ "token_accts_mint_acct_tokens_mint_acct_fk": { "name": "token_accts_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_accts", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.tokens": { + "tokens": { "name": "tokens", "schema": "", "columns": { @@ -2400,12 +2239,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watcher_transactions": { + "transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2430,53 +2266,40 @@ }, "indexes": { "watcher_slot_index": { - "columns": [ - { - "expression": "watcher_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "watcher_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "watcher_acct", + "slot" + ], + "isUnique": false } }, "foreignKeys": { "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk": { "name": "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transaction_watchers", "columnsFrom": [ "watcher_acct" ], - "tableTo": "transaction_watchers", "columnsTo": [ "acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2488,12 +2311,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watchers": { + "transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2558,37 +2378,34 @@ "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watchers_first_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_first_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "first_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transactions": { + "transactions": { "name": "transactions", "schema": "", "columns": { @@ -2637,29 +2454,18 @@ }, "indexes": { "txn_slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "txn_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.twaps": { + "twaps": { "name": "twaps", "schema": "", "columns": { @@ -2718,28 +2524,28 @@ "twaps_market_acct_markets_market_acct_fk": { "name": "twaps_market_acct_markets_market_acct_fk", "tableFrom": "twaps", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "twaps_proposal_acct_proposals_proposal_acct_fk": { "name": "twaps_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "twaps", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2751,12 +2557,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_deposits": { + "user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2797,50 +2600,47 @@ "user_deposits_tx_sig_transactions_tx_sig_fk": { "name": "user_deposits_tx_sig_transactions_tx_sig_fk", "tableFrom": "user_deposits", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_user_acct_users_user_acct_fk": { "name": "user_deposits_user_acct_users_user_acct_fk", "tableFrom": "user_deposits", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_mint_acct_tokens_mint_acct_fk": { "name": "user_deposits_mint_acct_tokens_mint_acct_fk", "tableFrom": "user_deposits", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_performance": { + "user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2955,41 +2755,41 @@ "user_performance_proposal_acct_proposals_proposal_acct_fk": { "name": "user_performance_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "user_performance", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_user_acct_users_user_acct_fk": { "name": "user_performance_user_acct_users_user_acct_fk", "tableFrom": "user_performance", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_dao_acct_daos_dao_acct_fk": { "name": "user_performance_dao_acct_daos_dao_acct_fk", "tableFrom": "user_performance", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -3001,12 +2801,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.users": { + "users": { "name": "users", "schema": "", "columns": { @@ -3027,12 +2824,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_amms": { + "v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -3097,50 +2891,47 @@ "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "lp_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_base_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_base_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "base_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_conditional_vaults": { + "v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -3193,50 +2984,47 @@ "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "v0_4_questions", "columnsFrom": [ "question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk": { "name": "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "token_accts", "columnsFrom": [ "underlying_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_merges": { + "v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3286,92 +3074,60 @@ }, "indexes": { "merge_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "merge_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "merge_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_merges", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_merges_signature_signatures_signature_fk": { "name": "v0_4_merges_signature_signatures_signature_fk", "tableFrom": "v0_4_merges", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_metric_decisions": { + "v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3477,89 +3233,86 @@ "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk": { "name": "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "outcome_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "metric_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "outcome_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "metric_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk": { "name": "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_amms", "columnsFrom": [ "amm_addr" ], - "tableTo": "v0_4_amms", "columnsTo": [ "amm_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_questions": { + "v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3616,12 +3369,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_splits": { + "v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3671,92 +3421,60 @@ }, "indexes": { "split_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "split_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "split_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_splits", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_splits_signature_signatures_signature_fk": { "name": "v0_4_splits_signature_signatures_signature_fk", "tableFrom": "v0_4_splits", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_swaps": { + "v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3830,76 +3548,38 @@ }, "indexes": { "amm_index": { - "columns": [ - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_addr" + ], + "isUnique": false }, "signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "seq_num_amm_index": { - "columns": [ - { - "expression": "amm_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "seq_num_amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_seq_num", + "amm_addr" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { + "columns": {}, "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "aa6c6b32-77eb-4d74-ada7-30fe06b4c0cc", - "prevId": "01dc3a22-8fb9-4ce8-b122-6b26fb0a83e2", - "sequences": {}, - "policies": {}, - "views": {}, - "roles": {} + "tables": {} + } } \ No newline at end of file diff --git a/packages/database/drizzle/meta/0003_snapshot.json b/packages/database/drizzle/meta/0003_snapshot.json index 1a37268f..b22d00f2 100644 --- a/packages/database/drizzle/meta/0003_snapshot.json +++ b/packages/database/drizzle/meta/0003_snapshot.json @@ -1,8 +1,10 @@ { - "version": "7", - "dialect": "postgresql", + "id": "8610ddf3-59d1-4ad0-8634-0478d37c5dc9", + "prevId": "aa6c6b32-77eb-4d74-ada7-30fe06b4c0cc", + "version": "5", + "dialect": "pg", "tables": { - "public.candles": { + "candles": { "name": "candles", "schema": "", "columns": { @@ -72,15 +74,15 @@ "candles_market_acct_markets_market_acct_fk": { "name": "candles_market_acct_markets_market_acct_fk", "tableFrom": "candles", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -93,12 +95,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.comments": { + "comments": { "name": "comments", "schema": "", "columns": { @@ -145,45 +144,42 @@ "comments_proposal_acct_proposals_proposal_acct_fk": { "name": "comments_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "comments", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "comments_responding_comment_id_comments_comment_id_fk": { "name": "comments_responding_comment_id_comments_comment_id_fk", "tableFrom": "comments", + "tableTo": "comments", "columnsFrom": [ "responding_comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", + "nullsNotDistinct": false, "columns": [ "comment_id" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.conditional_vaults": { + "conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -241,24 +237,21 @@ "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.dao_details": { + "dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -365,54 +358,51 @@ "uniqueConstraints": { "dao_details_name_unique": { "name": "dao_details_name_unique", + "nullsNotDistinct": false, "columns": [ "name" - ], - "nullsNotDistinct": false + ] }, "dao_details_slug_unique": { "name": "dao_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] }, "dao_details_url_unique": { "name": "dao_details_url_unique", + "nullsNotDistinct": false, "columns": [ "url" - ], - "nullsNotDistinct": false + ] }, "dao_details_x_account_unique": { "name": "dao_details_x_account_unique", + "nullsNotDistinct": false, "columns": [ "x_account" - ], - "nullsNotDistinct": false + ] }, "dao_details_github_unique": { "name": "dao_details_github_unique", + "nullsNotDistinct": false, "columns": [ "github" - ], - "nullsNotDistinct": false + ] }, "id_name_url": { "name": "id_name_url", + "nullsNotDistinct": false, "columns": [ "dao_id", "url", "name" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.daos": { + "daos": { "name": "daos", "schema": "", "columns": { @@ -508,79 +498,76 @@ "daos_program_acct_programs_program_acct_fk": { "name": "daos_program_acct_programs_program_acct_fk", "tableFrom": "daos", + "tableTo": "programs", "columnsFrom": [ "program_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_dao_id_dao_details_dao_id_fk": { "name": "daos_dao_id_dao_details_dao_id_fk", "tableFrom": "daos", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_base_acct_tokens_mint_acct_fk": { "name": "daos_base_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "base_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_quote_acct_tokens_mint_acct_fk": { "name": "daos_quote_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "quote_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "daos_treasury_acct_unique": { "name": "daos_treasury_acct_unique", + "nullsNotDistinct": false, "columns": [ "treasury_acct" - ], - "nullsNotDistinct": false + ] }, "dao_acct_program": { "name": "dao_acct_program", + "nullsNotDistinct": false, "columns": [ "dao_acct", "program_acct" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.indexer_account_dependencies": { + "indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -621,28 +608,28 @@ "indexer_account_dependencies_name_indexers_name_fk": { "name": "indexer_account_dependencies_name_indexers_name_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "indexers", "columnsFrom": [ "name" ], - "tableTo": "indexers", "columnsTo": [ "name" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk": { "name": "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig_processed" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -654,12 +641,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.indexers": { + "indexers": { "name": "indexers", "schema": "", "columns": { @@ -691,12 +675,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.makes": { + "makes": { "name": "makes", "schema": "", "columns": { @@ -745,56 +726,45 @@ }, "indexes": { "market_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "market_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct" + ], + "isUnique": false } }, "foreignKeys": { "makes_order_tx_sig_orders_order_tx_sig_fk": { "name": "makes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "makes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "makes_market_acct_markets_market_acct_fk": { "name": "makes_market_acct_markets_market_acct_fk", "tableFrom": "makes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.markets": { + "markets": { "name": "markets", "schema": "", "columns": { @@ -913,76 +883,73 @@ "markets_proposal_acct_proposals_proposal_acct_fk": { "name": "markets_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "markets", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_base_mint_acct_tokens_mint_acct_fk": { "name": "markets_base_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "base_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_quote_mint_acct_tokens_mint_acct_fk": { "name": "markets_quote_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_bids_token_acct_token_accts_token_acct_fk": { "name": "markets_bids_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "bids_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_asks_token_acct_token_accts_token_acct_fk": { "name": "markets_asks_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "asks_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.orders": { + "orders": { "name": "orders", "schema": "", "columns": { @@ -1073,75 +1040,59 @@ }, "indexes": { "actor_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "actor_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "actor_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "actor_acct" + ], + "isUnique": false } }, "foreignKeys": { "orders_order_tx_sig_transactions_tx_sig_fk": { "name": "orders_order_tx_sig_transactions_tx_sig_fk", "tableFrom": "orders", + "tableTo": "transactions", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_market_acct_markets_market_acct_fk": { "name": "orders_market_acct_markets_market_acct_fk", "tableFrom": "orders", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_actor_acct_users_user_acct_fk": { "name": "orders_actor_acct_users_user_acct_fk", "tableFrom": "orders", + "tableTo": "users", "columnsFrom": [ "actor_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.prices": { + "prices": { "name": "prices", "schema": "", "columns": { @@ -1200,15 +1151,15 @@ "prices_market_acct_markets_market_acct_fk": { "name": "prices_market_acct_markets_market_acct_fk", "tableFrom": "prices", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -1220,12 +1171,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.program_system": { + "program_system": { "name": "program_system", "schema": "", "columns": { @@ -1265,63 +1213,60 @@ "program_system_autocrat_acct_programs_program_acct_fk": { "name": "program_system_autocrat_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "autocrat_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_conditional_vault_acct_programs_program_acct_fk": { "name": "program_system_conditional_vault_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "conditional_vault_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_pricing_model_acct_programs_program_acct_fk": { "name": "program_system_pricing_model_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "pricing_model_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_migrator_acct_programs_program_acct_fk": { "name": "program_system_migrator_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "migrator_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.programs": { + "programs": { "name": "programs", "schema": "", "columns": { @@ -1363,18 +1308,15 @@ "uniqueConstraints": { "program_version": { "name": "program_version", + "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposal_details": { + "proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1456,32 +1398,29 @@ "proposal_details_proposal_acct_proposals_proposal_acct_fk": { "name": "proposal_details_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "proposal_details", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposals": { + "proposals": { "name": "proposals", "schema": "", "columns": { @@ -1643,50 +1582,47 @@ "proposals_dao_acct_daos_dao_acct_fk": { "name": "proposals_dao_acct_daos_dao_acct_fk", "tableFrom": "proposals", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_base_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_base_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "base_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "quote_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.reactions": { + "reactions": { "name": "reactions", "schema": "", "columns": { @@ -1733,37 +1669,34 @@ "reactions_comment_id_comments_comment_id_fk": { "name": "reactions_comment_id_comments_comment_id_fk", "tableFrom": "reactions", + "tableTo": "comments", "columnsFrom": [ "comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "reactions_proposal_acct_proposals_proposal_acct_fk": { "name": "reactions_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "reactions", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.sessions": { + "sessions": { "name": "sessions", "schema": "", "columns": { @@ -1799,24 +1732,21 @@ "sessions_user_acct_users_user_acct_fk": { "name": "sessions_user_acct_users_user_acct_fk", "tableFrom": "sessions", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "restrict", - "onDelete": "restrict" + "onDelete": "restrict", + "onUpdate": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signature_accounts": { + "signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1842,19 +1772,11 @@ }, "indexes": { "account_index": { - "columns": [ - { - "expression": "account", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "account_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "account" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1867,12 +1789,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signatures": { + "signatures": { "name": "signatures", "schema": "", "columns": { @@ -1922,34 +1841,18 @@ }, "indexes": { "slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false }, "sequence_num_index": { - "columns": [ - { - "expression": "seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "sequence_num_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "seq_num" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1957,17 +1860,14 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", + "nullsNotDistinct": false, "columns": [ "seq_num" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.takes": { + "takes": { "name": "takes", "schema": "", "columns": { @@ -2041,111 +1941,74 @@ }, "indexes": { "block_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_block", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "block_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_block" + ], + "isUnique": false }, "time_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_time", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "time_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_time" + ], + "isUnique": false }, "maker_index": { - "columns": [ - { - "expression": "maker_order_tx_sig", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "maker_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "maker_order_tx_sig" + ], + "isUnique": false } }, "foreignKeys": { "takes_order_tx_sig_orders_order_tx_sig_fk": { "name": "takes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_maker_order_tx_sig_makes_order_tx_sig_fk": { "name": "takes_maker_order_tx_sig_makes_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "makes", "columnsFrom": [ "maker_order_tx_sig" ], - "tableTo": "makes", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_market_acct_markets_market_acct_fk": { "name": "takes_market_acct_markets_market_acct_fk", "tableFrom": "takes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_acct_balances": { + "token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2202,72 +2065,54 @@ }, "indexes": { "acct_amount_created": { - "columns": [ - { - "expression": "token_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amount", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "acct_amount_created", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "token_acct", + "created_at", + "amount" + ], + "isUnique": false } }, "foreignKeys": { "token_acct_balances_token_acct_token_accts_token_acct_fk": { "name": "token_acct_balances_token_acct_token_accts_token_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "token_accts", "columnsFrom": [ "token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_mint_acct_tokens_mint_acct_fk": { "name": "token_acct_balances_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_tx_sig_transactions_tx_sig_fk": { "name": "token_acct_balances_tx_sig_transactions_tx_sig_fk", "tableFrom": "token_acct_balances", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2281,12 +2126,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_accts": { + "token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2333,24 +2175,21 @@ "token_accts_mint_acct_tokens_mint_acct_fk": { "name": "token_accts_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_accts", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.tokens": { + "tokens": { "name": "tokens", "schema": "", "columns": { @@ -2400,12 +2239,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watcher_transactions": { + "transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2430,53 +2266,40 @@ }, "indexes": { "watcher_slot_index": { - "columns": [ - { - "expression": "watcher_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "watcher_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "watcher_acct", + "slot" + ], + "isUnique": false } }, "foreignKeys": { "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk": { "name": "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transaction_watchers", "columnsFrom": [ "watcher_acct" ], - "tableTo": "transaction_watchers", "columnsTo": [ "acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2488,12 +2311,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watchers": { + "transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2558,37 +2378,34 @@ "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watchers_first_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_first_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "first_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transactions": { + "transactions": { "name": "transactions", "schema": "", "columns": { @@ -2637,29 +2454,18 @@ }, "indexes": { "txn_slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "txn_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.twaps": { + "twaps": { "name": "twaps", "schema": "", "columns": { @@ -2718,28 +2524,28 @@ "twaps_market_acct_markets_market_acct_fk": { "name": "twaps_market_acct_markets_market_acct_fk", "tableFrom": "twaps", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "twaps_proposal_acct_proposals_proposal_acct_fk": { "name": "twaps_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "twaps", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2751,12 +2557,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_deposits": { + "user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2797,50 +2600,47 @@ "user_deposits_tx_sig_transactions_tx_sig_fk": { "name": "user_deposits_tx_sig_transactions_tx_sig_fk", "tableFrom": "user_deposits", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_user_acct_users_user_acct_fk": { "name": "user_deposits_user_acct_users_user_acct_fk", "tableFrom": "user_deposits", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_mint_acct_tokens_mint_acct_fk": { "name": "user_deposits_mint_acct_tokens_mint_acct_fk", "tableFrom": "user_deposits", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_performance": { + "user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2955,41 +2755,41 @@ "user_performance_proposal_acct_proposals_proposal_acct_fk": { "name": "user_performance_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "user_performance", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_user_acct_users_user_acct_fk": { "name": "user_performance_user_acct_users_user_acct_fk", "tableFrom": "user_performance", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_dao_acct_daos_dao_acct_fk": { "name": "user_performance_dao_acct_daos_dao_acct_fk", "tableFrom": "user_performance", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -3001,12 +2801,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.users": { + "users": { "name": "users", "schema": "", "columns": { @@ -3027,12 +2824,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_amms": { + "v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -3097,50 +2891,47 @@ "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "lp_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_base_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_base_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "base_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_conditional_vaults": { + "v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -3193,50 +2984,47 @@ "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "v0_4_questions", "columnsFrom": [ "question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk": { "name": "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "token_accts", "columnsFrom": [ "underlying_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_merges": { + "v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3286,92 +3074,60 @@ }, "indexes": { "merge_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "merge_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "merge_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_merges", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_merges_signature_signatures_signature_fk": { "name": "v0_4_merges_signature_signatures_signature_fk", "tableFrom": "v0_4_merges", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_metric_decisions": { + "v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3483,89 +3239,86 @@ "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk": { "name": "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "outcome_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "metric_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "outcome_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "metric_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk": { "name": "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_amms", "columnsFrom": [ "amm_addr" ], - "tableTo": "v0_4_amms", "columnsTo": [ "amm_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_questions": { + "v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3622,12 +3375,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_splits": { + "v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3677,92 +3427,60 @@ }, "indexes": { "split_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "split_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "split_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_splits", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_splits_signature_signatures_signature_fk": { "name": "v0_4_splits_signature_signatures_signature_fk", "tableFrom": "v0_4_splits", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_swaps": { + "v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3836,76 +3554,38 @@ }, "indexes": { "amm_index": { - "columns": [ - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_addr" + ], + "isUnique": false }, "signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "seq_num_amm_index": { - "columns": [ - { - "expression": "amm_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "seq_num_amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_seq_num", + "amm_addr" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { + "columns": {}, "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "8610ddf3-59d1-4ad0-8634-0478d37c5dc9", - "prevId": "aa6c6b32-77eb-4d74-ada7-30fe06b4c0cc", - "sequences": {}, - "policies": {}, - "views": {}, - "roles": {} + "tables": {} + } } \ No newline at end of file diff --git a/packages/database/drizzle/meta/0004_snapshot.json b/packages/database/drizzle/meta/0004_snapshot.json index c43b1b2e..fb919e3c 100644 --- a/packages/database/drizzle/meta/0004_snapshot.json +++ b/packages/database/drizzle/meta/0004_snapshot.json @@ -1,8 +1,10 @@ { - "version": "7", - "dialect": "postgresql", + "id": "53364bb0-feb1-4180-8d4b-dc53682e0a67", + "prevId": "8610ddf3-59d1-4ad0-8634-0478d37c5dc9", + "version": "5", + "dialect": "pg", "tables": { - "public.candles": { + "candles": { "name": "candles", "schema": "", "columns": { @@ -72,15 +74,15 @@ "candles_market_acct_markets_market_acct_fk": { "name": "candles_market_acct_markets_market_acct_fk", "tableFrom": "candles", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -93,12 +95,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.comments": { + "comments": { "name": "comments", "schema": "", "columns": { @@ -145,45 +144,42 @@ "comments_proposal_acct_proposals_proposal_acct_fk": { "name": "comments_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "comments", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "comments_responding_comment_id_comments_comment_id_fk": { "name": "comments_responding_comment_id_comments_comment_id_fk", "tableFrom": "comments", + "tableTo": "comments", "columnsFrom": [ "responding_comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", + "nullsNotDistinct": false, "columns": [ "comment_id" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.conditional_vaults": { + "conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -241,24 +237,21 @@ "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.dao_details": { + "dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -365,54 +358,51 @@ "uniqueConstraints": { "dao_details_name_unique": { "name": "dao_details_name_unique", + "nullsNotDistinct": false, "columns": [ "name" - ], - "nullsNotDistinct": false + ] }, "dao_details_slug_unique": { "name": "dao_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] }, "dao_details_url_unique": { "name": "dao_details_url_unique", + "nullsNotDistinct": false, "columns": [ "url" - ], - "nullsNotDistinct": false + ] }, "dao_details_x_account_unique": { "name": "dao_details_x_account_unique", + "nullsNotDistinct": false, "columns": [ "x_account" - ], - "nullsNotDistinct": false + ] }, "dao_details_github_unique": { "name": "dao_details_github_unique", + "nullsNotDistinct": false, "columns": [ "github" - ], - "nullsNotDistinct": false + ] }, "id_name_url": { "name": "id_name_url", + "nullsNotDistinct": false, "columns": [ "dao_id", "url", "name" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.daos": { + "daos": { "name": "daos", "schema": "", "columns": { @@ -508,79 +498,76 @@ "daos_program_acct_programs_program_acct_fk": { "name": "daos_program_acct_programs_program_acct_fk", "tableFrom": "daos", + "tableTo": "programs", "columnsFrom": [ "program_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_dao_id_dao_details_dao_id_fk": { "name": "daos_dao_id_dao_details_dao_id_fk", "tableFrom": "daos", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_base_acct_tokens_mint_acct_fk": { "name": "daos_base_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "base_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_quote_acct_tokens_mint_acct_fk": { "name": "daos_quote_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "quote_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "daos_treasury_acct_unique": { "name": "daos_treasury_acct_unique", + "nullsNotDistinct": false, "columns": [ "treasury_acct" - ], - "nullsNotDistinct": false + ] }, "dao_acct_program": { "name": "dao_acct_program", + "nullsNotDistinct": false, "columns": [ "dao_acct", "program_acct" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.indexer_account_dependencies": { + "indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -621,28 +608,28 @@ "indexer_account_dependencies_name_indexers_name_fk": { "name": "indexer_account_dependencies_name_indexers_name_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "indexers", "columnsFrom": [ "name" ], - "tableTo": "indexers", "columnsTo": [ "name" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk": { "name": "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig_processed" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -654,12 +641,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.indexers": { + "indexers": { "name": "indexers", "schema": "", "columns": { @@ -691,12 +675,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.makes": { + "makes": { "name": "makes", "schema": "", "columns": { @@ -745,56 +726,45 @@ }, "indexes": { "market_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "market_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct" + ], + "isUnique": false } }, "foreignKeys": { "makes_order_tx_sig_orders_order_tx_sig_fk": { "name": "makes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "makes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "makes_market_acct_markets_market_acct_fk": { "name": "makes_market_acct_markets_market_acct_fk", "tableFrom": "makes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.markets": { + "markets": { "name": "markets", "schema": "", "columns": { @@ -913,76 +883,73 @@ "markets_proposal_acct_proposals_proposal_acct_fk": { "name": "markets_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "markets", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_base_mint_acct_tokens_mint_acct_fk": { "name": "markets_base_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "base_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_quote_mint_acct_tokens_mint_acct_fk": { "name": "markets_quote_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_bids_token_acct_token_accts_token_acct_fk": { "name": "markets_bids_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "bids_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_asks_token_acct_token_accts_token_acct_fk": { "name": "markets_asks_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "asks_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.orders": { + "orders": { "name": "orders", "schema": "", "columns": { @@ -1073,75 +1040,59 @@ }, "indexes": { "actor_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "actor_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "actor_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "actor_acct" + ], + "isUnique": false } }, "foreignKeys": { "orders_order_tx_sig_transactions_tx_sig_fk": { "name": "orders_order_tx_sig_transactions_tx_sig_fk", "tableFrom": "orders", + "tableTo": "transactions", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_market_acct_markets_market_acct_fk": { "name": "orders_market_acct_markets_market_acct_fk", "tableFrom": "orders", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_actor_acct_users_user_acct_fk": { "name": "orders_actor_acct_users_user_acct_fk", "tableFrom": "orders", + "tableTo": "users", "columnsFrom": [ "actor_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.prices": { + "prices": { "name": "prices", "schema": "", "columns": { @@ -1200,15 +1151,15 @@ "prices_market_acct_markets_market_acct_fk": { "name": "prices_market_acct_markets_market_acct_fk", "tableFrom": "prices", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -1220,12 +1171,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.program_system": { + "program_system": { "name": "program_system", "schema": "", "columns": { @@ -1265,63 +1213,60 @@ "program_system_autocrat_acct_programs_program_acct_fk": { "name": "program_system_autocrat_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "autocrat_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_conditional_vault_acct_programs_program_acct_fk": { "name": "program_system_conditional_vault_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "conditional_vault_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_pricing_model_acct_programs_program_acct_fk": { "name": "program_system_pricing_model_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "pricing_model_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_migrator_acct_programs_program_acct_fk": { "name": "program_system_migrator_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "migrator_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.programs": { + "programs": { "name": "programs", "schema": "", "columns": { @@ -1363,18 +1308,15 @@ "uniqueConstraints": { "program_version": { "name": "program_version", + "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposal_details": { + "proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1456,32 +1398,29 @@ "proposal_details_proposal_acct_proposals_proposal_acct_fk": { "name": "proposal_details_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "proposal_details", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposals": { + "proposals": { "name": "proposals", "schema": "", "columns": { @@ -1643,50 +1582,47 @@ "proposals_dao_acct_daos_dao_acct_fk": { "name": "proposals_dao_acct_daos_dao_acct_fk", "tableFrom": "proposals", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_base_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_base_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "base_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "quote_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.reactions": { + "reactions": { "name": "reactions", "schema": "", "columns": { @@ -1733,37 +1669,34 @@ "reactions_comment_id_comments_comment_id_fk": { "name": "reactions_comment_id_comments_comment_id_fk", "tableFrom": "reactions", + "tableTo": "comments", "columnsFrom": [ "comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "reactions_proposal_acct_proposals_proposal_acct_fk": { "name": "reactions_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "reactions", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.sessions": { + "sessions": { "name": "sessions", "schema": "", "columns": { @@ -1799,24 +1732,21 @@ "sessions_user_acct_users_user_acct_fk": { "name": "sessions_user_acct_users_user_acct_fk", "tableFrom": "sessions", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "restrict", - "onDelete": "restrict" + "onDelete": "restrict", + "onUpdate": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signature_accounts": { + "signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1842,19 +1772,11 @@ }, "indexes": { "account_index": { - "columns": [ - { - "expression": "account", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "account_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "account" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1867,12 +1789,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signatures": { + "signatures": { "name": "signatures", "schema": "", "columns": { @@ -1922,34 +1841,18 @@ }, "indexes": { "slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false }, "sequence_num_index": { - "columns": [ - { - "expression": "seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "sequence_num_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "seq_num" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1957,17 +1860,14 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", + "nullsNotDistinct": false, "columns": [ "seq_num" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.takes": { + "takes": { "name": "takes", "schema": "", "columns": { @@ -2041,111 +1941,74 @@ }, "indexes": { "block_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_block", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "block_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_block" + ], + "isUnique": false }, "time_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_time", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "time_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_time" + ], + "isUnique": false }, "maker_index": { - "columns": [ - { - "expression": "maker_order_tx_sig", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "maker_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "maker_order_tx_sig" + ], + "isUnique": false } }, "foreignKeys": { "takes_order_tx_sig_orders_order_tx_sig_fk": { "name": "takes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_maker_order_tx_sig_makes_order_tx_sig_fk": { "name": "takes_maker_order_tx_sig_makes_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "makes", "columnsFrom": [ "maker_order_tx_sig" ], - "tableTo": "makes", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_market_acct_markets_market_acct_fk": { "name": "takes_market_acct_markets_market_acct_fk", "tableFrom": "takes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_acct_balances": { + "token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2202,72 +2065,54 @@ }, "indexes": { "acct_amount_created": { - "columns": [ - { - "expression": "token_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amount", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "acct_amount_created", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "token_acct", + "created_at", + "amount" + ], + "isUnique": false } }, "foreignKeys": { "token_acct_balances_token_acct_token_accts_token_acct_fk": { "name": "token_acct_balances_token_acct_token_accts_token_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "token_accts", "columnsFrom": [ "token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_mint_acct_tokens_mint_acct_fk": { "name": "token_acct_balances_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_tx_sig_transactions_tx_sig_fk": { "name": "token_acct_balances_tx_sig_transactions_tx_sig_fk", "tableFrom": "token_acct_balances", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2281,12 +2126,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_accts": { + "token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2333,24 +2175,21 @@ "token_accts_mint_acct_tokens_mint_acct_fk": { "name": "token_accts_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_accts", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.tokens": { + "tokens": { "name": "tokens", "schema": "", "columns": { @@ -2400,12 +2239,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watcher_transactions": { + "transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2430,53 +2266,40 @@ }, "indexes": { "watcher_slot_index": { - "columns": [ - { - "expression": "watcher_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "watcher_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "watcher_acct", + "slot" + ], + "isUnique": false } }, "foreignKeys": { "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk": { "name": "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transaction_watchers", "columnsFrom": [ "watcher_acct" ], - "tableTo": "transaction_watchers", "columnsTo": [ "acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2488,12 +2311,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watchers": { + "transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2558,37 +2378,34 @@ "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watchers_first_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_first_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "first_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transactions": { + "transactions": { "name": "transactions", "schema": "", "columns": { @@ -2637,29 +2454,18 @@ }, "indexes": { "txn_slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "txn_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.twaps": { + "twaps": { "name": "twaps", "schema": "", "columns": { @@ -2718,28 +2524,28 @@ "twaps_market_acct_markets_market_acct_fk": { "name": "twaps_market_acct_markets_market_acct_fk", "tableFrom": "twaps", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "twaps_proposal_acct_proposals_proposal_acct_fk": { "name": "twaps_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "twaps", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2751,12 +2557,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_deposits": { + "user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2797,50 +2600,47 @@ "user_deposits_tx_sig_transactions_tx_sig_fk": { "name": "user_deposits_tx_sig_transactions_tx_sig_fk", "tableFrom": "user_deposits", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_user_acct_users_user_acct_fk": { "name": "user_deposits_user_acct_users_user_acct_fk", "tableFrom": "user_deposits", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_mint_acct_tokens_mint_acct_fk": { "name": "user_deposits_mint_acct_tokens_mint_acct_fk", "tableFrom": "user_deposits", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_performance": { + "user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2955,41 +2755,41 @@ "user_performance_proposal_acct_proposals_proposal_acct_fk": { "name": "user_performance_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "user_performance", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_user_acct_users_user_acct_fk": { "name": "user_performance_user_acct_users_user_acct_fk", "tableFrom": "user_performance", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_dao_acct_daos_dao_acct_fk": { "name": "user_performance_dao_acct_daos_dao_acct_fk", "tableFrom": "user_performance", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -3001,12 +2801,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.users": { + "users": { "name": "users", "schema": "", "columns": { @@ -3027,12 +2824,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_amms": { + "v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -3097,50 +2891,47 @@ "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "lp_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_base_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_base_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "base_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_conditional_vaults": { + "v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -3193,50 +2984,47 @@ "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "v0_4_questions", "columnsFrom": [ "question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk": { "name": "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "token_accts", "columnsFrom": [ "underlying_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_merges": { + "v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3286,92 +3074,60 @@ }, "indexes": { "merge_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "merge_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "merge_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_merges", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_merges_signature_signatures_signature_fk": { "name": "v0_4_merges_signature_signatures_signature_fk", "tableFrom": "v0_4_merges", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_metric_decisions": { + "v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3495,89 +3251,86 @@ "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk": { "name": "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "outcome_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "metric_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "outcome_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "metric_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk": { "name": "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_amms", "columnsFrom": [ "amm_addr" ], - "tableTo": "v0_4_amms", "columnsTo": [ "amm_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_questions": { + "v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3634,12 +3387,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_splits": { + "v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3689,92 +3439,60 @@ }, "indexes": { "split_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "split_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "split_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_splits", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_splits_signature_signatures_signature_fk": { "name": "v0_4_splits_signature_signatures_signature_fk", "tableFrom": "v0_4_splits", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_swaps": { + "v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3848,76 +3566,38 @@ }, "indexes": { "amm_index": { - "columns": [ - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_addr" + ], + "isUnique": false }, "signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "seq_num_amm_index": { - "columns": [ - { - "expression": "amm_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "seq_num_amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_seq_num", + "amm_addr" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { + "columns": {}, "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "53364bb0-feb1-4180-8d4b-dc53682e0a67", - "prevId": "8610ddf3-59d1-4ad0-8634-0478d37c5dc9", - "sequences": {}, - "policies": {}, - "views": {}, - "roles": {} + "tables": {} + } } \ No newline at end of file diff --git a/packages/database/drizzle/meta/0005_snapshot.json b/packages/database/drizzle/meta/0005_snapshot.json index 6ab142ec..38d45e46 100644 --- a/packages/database/drizzle/meta/0005_snapshot.json +++ b/packages/database/drizzle/meta/0005_snapshot.json @@ -1,8 +1,10 @@ { - "version": "7", - "dialect": "postgresql", + "id": "8b95ac6a-476f-4c4c-ab15-2a329671556f", + "prevId": "53364bb0-feb1-4180-8d4b-dc53682e0a67", + "version": "5", + "dialect": "pg", "tables": { - "public.candles": { + "candles": { "name": "candles", "schema": "", "columns": { @@ -72,15 +74,15 @@ "candles_market_acct_markets_market_acct_fk": { "name": "candles_market_acct_markets_market_acct_fk", "tableFrom": "candles", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -93,12 +95,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.comments": { + "comments": { "name": "comments", "schema": "", "columns": { @@ -145,45 +144,42 @@ "comments_proposal_acct_proposals_proposal_acct_fk": { "name": "comments_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "comments", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "comments_responding_comment_id_comments_comment_id_fk": { "name": "comments_responding_comment_id_comments_comment_id_fk", "tableFrom": "comments", + "tableTo": "comments", "columnsFrom": [ "responding_comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", + "nullsNotDistinct": false, "columns": [ "comment_id" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.conditional_vaults": { + "conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -241,24 +237,21 @@ "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.dao_details": { + "dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -365,54 +358,51 @@ "uniqueConstraints": { "dao_details_name_unique": { "name": "dao_details_name_unique", + "nullsNotDistinct": false, "columns": [ "name" - ], - "nullsNotDistinct": false + ] }, "dao_details_slug_unique": { "name": "dao_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] }, "dao_details_url_unique": { "name": "dao_details_url_unique", + "nullsNotDistinct": false, "columns": [ "url" - ], - "nullsNotDistinct": false + ] }, "dao_details_x_account_unique": { "name": "dao_details_x_account_unique", + "nullsNotDistinct": false, "columns": [ "x_account" - ], - "nullsNotDistinct": false + ] }, "dao_details_github_unique": { "name": "dao_details_github_unique", + "nullsNotDistinct": false, "columns": [ "github" - ], - "nullsNotDistinct": false + ] }, "id_name_url": { "name": "id_name_url", + "nullsNotDistinct": false, "columns": [ "dao_id", "url", "name" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.daos": { + "daos": { "name": "daos", "schema": "", "columns": { @@ -508,79 +498,76 @@ "daos_program_acct_programs_program_acct_fk": { "name": "daos_program_acct_programs_program_acct_fk", "tableFrom": "daos", + "tableTo": "programs", "columnsFrom": [ "program_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_dao_id_dao_details_dao_id_fk": { "name": "daos_dao_id_dao_details_dao_id_fk", "tableFrom": "daos", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_base_acct_tokens_mint_acct_fk": { "name": "daos_base_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "base_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_quote_acct_tokens_mint_acct_fk": { "name": "daos_quote_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "quote_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "daos_treasury_acct_unique": { "name": "daos_treasury_acct_unique", + "nullsNotDistinct": false, "columns": [ "treasury_acct" - ], - "nullsNotDistinct": false + ] }, "dao_acct_program": { "name": "dao_acct_program", + "nullsNotDistinct": false, "columns": [ "dao_acct", "program_acct" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.indexer_account_dependencies": { + "indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -621,28 +608,28 @@ "indexer_account_dependencies_name_indexers_name_fk": { "name": "indexer_account_dependencies_name_indexers_name_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "indexers", "columnsFrom": [ "name" ], - "tableTo": "indexers", "columnsTo": [ "name" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk": { "name": "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig_processed" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -654,12 +641,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.indexers": { + "indexers": { "name": "indexers", "schema": "", "columns": { @@ -691,12 +675,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.makes": { + "makes": { "name": "makes", "schema": "", "columns": { @@ -745,56 +726,45 @@ }, "indexes": { "market_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "market_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct" + ], + "isUnique": false } }, "foreignKeys": { "makes_order_tx_sig_orders_order_tx_sig_fk": { "name": "makes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "makes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "makes_market_acct_markets_market_acct_fk": { "name": "makes_market_acct_markets_market_acct_fk", "tableFrom": "makes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.markets": { + "markets": { "name": "markets", "schema": "", "columns": { @@ -913,76 +883,73 @@ "markets_proposal_acct_proposals_proposal_acct_fk": { "name": "markets_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "markets", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_base_mint_acct_tokens_mint_acct_fk": { "name": "markets_base_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "base_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_quote_mint_acct_tokens_mint_acct_fk": { "name": "markets_quote_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_bids_token_acct_token_accts_token_acct_fk": { "name": "markets_bids_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "bids_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_asks_token_acct_token_accts_token_acct_fk": { "name": "markets_asks_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "asks_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.orders": { + "orders": { "name": "orders", "schema": "", "columns": { @@ -1073,75 +1040,59 @@ }, "indexes": { "actor_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "actor_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "actor_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "actor_acct" + ], + "isUnique": false } }, "foreignKeys": { "orders_order_tx_sig_transactions_tx_sig_fk": { "name": "orders_order_tx_sig_transactions_tx_sig_fk", "tableFrom": "orders", + "tableTo": "transactions", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_market_acct_markets_market_acct_fk": { "name": "orders_market_acct_markets_market_acct_fk", "tableFrom": "orders", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_actor_acct_users_user_acct_fk": { "name": "orders_actor_acct_users_user_acct_fk", "tableFrom": "orders", + "tableTo": "users", "columnsFrom": [ "actor_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.prices": { + "prices": { "name": "prices", "schema": "", "columns": { @@ -1200,15 +1151,15 @@ "prices_market_acct_markets_market_acct_fk": { "name": "prices_market_acct_markets_market_acct_fk", "tableFrom": "prices", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -1220,12 +1171,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.program_system": { + "program_system": { "name": "program_system", "schema": "", "columns": { @@ -1265,63 +1213,60 @@ "program_system_autocrat_acct_programs_program_acct_fk": { "name": "program_system_autocrat_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "autocrat_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_conditional_vault_acct_programs_program_acct_fk": { "name": "program_system_conditional_vault_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "conditional_vault_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_pricing_model_acct_programs_program_acct_fk": { "name": "program_system_pricing_model_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "pricing_model_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_migrator_acct_programs_program_acct_fk": { "name": "program_system_migrator_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "migrator_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.programs": { + "programs": { "name": "programs", "schema": "", "columns": { @@ -1363,18 +1308,15 @@ "uniqueConstraints": { "program_version": { "name": "program_version", + "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposal_details": { + "proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1456,32 +1398,29 @@ "proposal_details_proposal_acct_proposals_proposal_acct_fk": { "name": "proposal_details_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "proposal_details", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposals": { + "proposals": { "name": "proposals", "schema": "", "columns": { @@ -1643,50 +1582,47 @@ "proposals_dao_acct_daos_dao_acct_fk": { "name": "proposals_dao_acct_daos_dao_acct_fk", "tableFrom": "proposals", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_base_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_base_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "base_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "quote_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.reactions": { + "reactions": { "name": "reactions", "schema": "", "columns": { @@ -1733,37 +1669,34 @@ "reactions_comment_id_comments_comment_id_fk": { "name": "reactions_comment_id_comments_comment_id_fk", "tableFrom": "reactions", + "tableTo": "comments", "columnsFrom": [ "comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "reactions_proposal_acct_proposals_proposal_acct_fk": { "name": "reactions_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "reactions", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.sessions": { + "sessions": { "name": "sessions", "schema": "", "columns": { @@ -1799,24 +1732,21 @@ "sessions_user_acct_users_user_acct_fk": { "name": "sessions_user_acct_users_user_acct_fk", "tableFrom": "sessions", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "restrict", - "onDelete": "restrict" + "onDelete": "restrict", + "onUpdate": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signature_accounts": { + "signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1842,19 +1772,11 @@ }, "indexes": { "account_index": { - "columns": [ - { - "expression": "account", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "account_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "account" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1867,12 +1789,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signatures": { + "signatures": { "name": "signatures", "schema": "", "columns": { @@ -1922,34 +1841,18 @@ }, "indexes": { "slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false }, "sequence_num_index": { - "columns": [ - { - "expression": "seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "sequence_num_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "seq_num" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1957,17 +1860,14 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", + "nullsNotDistinct": false, "columns": [ "seq_num" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.takes": { + "takes": { "name": "takes", "schema": "", "columns": { @@ -2041,111 +1941,74 @@ }, "indexes": { "block_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_block", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "block_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_block" + ], + "isUnique": false }, "time_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_time", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "time_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_time" + ], + "isUnique": false }, "maker_index": { - "columns": [ - { - "expression": "maker_order_tx_sig", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "maker_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "maker_order_tx_sig" + ], + "isUnique": false } }, "foreignKeys": { "takes_order_tx_sig_orders_order_tx_sig_fk": { "name": "takes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_maker_order_tx_sig_makes_order_tx_sig_fk": { "name": "takes_maker_order_tx_sig_makes_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "makes", "columnsFrom": [ "maker_order_tx_sig" ], - "tableTo": "makes", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_market_acct_markets_market_acct_fk": { "name": "takes_market_acct_markets_market_acct_fk", "tableFrom": "takes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_acct_balances": { + "token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2202,72 +2065,54 @@ }, "indexes": { "acct_amount_created": { - "columns": [ - { - "expression": "token_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amount", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "acct_amount_created", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "token_acct", + "created_at", + "amount" + ], + "isUnique": false } }, "foreignKeys": { "token_acct_balances_token_acct_token_accts_token_acct_fk": { "name": "token_acct_balances_token_acct_token_accts_token_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "token_accts", "columnsFrom": [ "token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_mint_acct_tokens_mint_acct_fk": { "name": "token_acct_balances_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_tx_sig_transactions_tx_sig_fk": { "name": "token_acct_balances_tx_sig_transactions_tx_sig_fk", "tableFrom": "token_acct_balances", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2281,12 +2126,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_accts": { + "token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2333,24 +2175,21 @@ "token_accts_mint_acct_tokens_mint_acct_fk": { "name": "token_accts_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_accts", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.tokens": { + "tokens": { "name": "tokens", "schema": "", "columns": { @@ -2400,12 +2239,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watcher_transactions": { + "transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2430,53 +2266,40 @@ }, "indexes": { "watcher_slot_index": { - "columns": [ - { - "expression": "watcher_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "watcher_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "watcher_acct", + "slot" + ], + "isUnique": false } }, "foreignKeys": { "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk": { "name": "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transaction_watchers", "columnsFrom": [ "watcher_acct" ], - "tableTo": "transaction_watchers", "columnsTo": [ "acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2488,12 +2311,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watchers": { + "transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2558,37 +2378,34 @@ "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watchers_first_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_first_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "first_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transactions": { + "transactions": { "name": "transactions", "schema": "", "columns": { @@ -2637,29 +2454,18 @@ }, "indexes": { "txn_slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "txn_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.twaps": { + "twaps": { "name": "twaps", "schema": "", "columns": { @@ -2718,28 +2524,28 @@ "twaps_market_acct_markets_market_acct_fk": { "name": "twaps_market_acct_markets_market_acct_fk", "tableFrom": "twaps", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "twaps_proposal_acct_proposals_proposal_acct_fk": { "name": "twaps_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "twaps", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2751,12 +2557,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_deposits": { + "user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2797,50 +2600,47 @@ "user_deposits_tx_sig_transactions_tx_sig_fk": { "name": "user_deposits_tx_sig_transactions_tx_sig_fk", "tableFrom": "user_deposits", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_user_acct_users_user_acct_fk": { "name": "user_deposits_user_acct_users_user_acct_fk", "tableFrom": "user_deposits", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_mint_acct_tokens_mint_acct_fk": { "name": "user_deposits_mint_acct_tokens_mint_acct_fk", "tableFrom": "user_deposits", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_performance": { + "user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2955,41 +2755,41 @@ "user_performance_proposal_acct_proposals_proposal_acct_fk": { "name": "user_performance_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "user_performance", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_user_acct_users_user_acct_fk": { "name": "user_performance_user_acct_users_user_acct_fk", "tableFrom": "user_performance", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_dao_acct_daos_dao_acct_fk": { "name": "user_performance_dao_acct_daos_dao_acct_fk", "tableFrom": "user_performance", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -3001,12 +2801,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.users": { + "users": { "name": "users", "schema": "", "columns": { @@ -3027,12 +2824,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_amms": { + "v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -3097,50 +2891,47 @@ "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "lp_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_base_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_base_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "base_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_conditional_vaults": { + "v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -3193,50 +2984,47 @@ "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "v0_4_questions", "columnsFrom": [ "question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk": { "name": "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "token_accts", "columnsFrom": [ "underlying_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_merges": { + "v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3286,92 +3074,60 @@ }, "indexes": { "merge_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "merge_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "merge_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_merges", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_merges_signature_signatures_signature_fk": { "name": "v0_4_merges_signature_signatures_signature_fk", "tableFrom": "v0_4_merges", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_metric_decisions": { + "v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3495,89 +3251,86 @@ "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk": { "name": "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "outcome_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "metric_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "outcome_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "metric_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk": { "name": "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_amms", "columnsFrom": [ "amm_addr" ], - "tableTo": "v0_4_amms", "columnsTo": [ "amm_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_questions": { + "v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3634,12 +3387,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_splits": { + "v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3689,92 +3439,60 @@ }, "indexes": { "split_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "split_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "split_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_splits", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_splits_signature_signatures_signature_fk": { "name": "v0_4_splits_signature_signatures_signature_fk", "tableFrom": "v0_4_splits", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_swaps": { + "v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3848,76 +3566,38 @@ }, "indexes": { "amm_index": { - "columns": [ - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_addr" + ], + "isUnique": false }, "signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "seq_num_amm_index": { - "columns": [ - { - "expression": "amm_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "seq_num_amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_seq_num", + "amm_addr" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { + "columns": {}, "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "8b95ac6a-476f-4c4c-ab15-2a329671556f", - "prevId": "53364bb0-feb1-4180-8d4b-dc53682e0a67", - "sequences": {}, - "policies": {}, - "views": {}, - "roles": {} + "tables": {} + } } \ No newline at end of file diff --git a/packages/database/drizzle/meta/0006_snapshot.json b/packages/database/drizzle/meta/0006_snapshot.json index 1bc8195b..1e0111cb 100644 --- a/packages/database/drizzle/meta/0006_snapshot.json +++ b/packages/database/drizzle/meta/0006_snapshot.json @@ -1,8 +1,10 @@ { - "version": "7", - "dialect": "postgresql", + "id": "cb8d59ae-d3f5-443e-bcb7-3c992a223857", + "prevId": "8b95ac6a-476f-4c4c-ab15-2a329671556f", + "version": "5", + "dialect": "pg", "tables": { - "public.candles": { + "candles": { "name": "candles", "schema": "", "columns": { @@ -72,15 +74,15 @@ "candles_market_acct_markets_market_acct_fk": { "name": "candles_market_acct_markets_market_acct_fk", "tableFrom": "candles", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -93,12 +95,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.comments": { + "comments": { "name": "comments", "schema": "", "columns": { @@ -145,45 +144,42 @@ "comments_proposal_acct_proposals_proposal_acct_fk": { "name": "comments_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "comments", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "comments_responding_comment_id_comments_comment_id_fk": { "name": "comments_responding_comment_id_comments_comment_id_fk", "tableFrom": "comments", + "tableTo": "comments", "columnsFrom": [ "responding_comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", + "nullsNotDistinct": false, "columns": [ "comment_id" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.conditional_vaults": { + "conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -241,24 +237,21 @@ "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.dao_details": { + "dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -365,54 +358,51 @@ "uniqueConstraints": { "dao_details_name_unique": { "name": "dao_details_name_unique", + "nullsNotDistinct": false, "columns": [ "name" - ], - "nullsNotDistinct": false + ] }, "dao_details_slug_unique": { "name": "dao_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] }, "dao_details_url_unique": { "name": "dao_details_url_unique", + "nullsNotDistinct": false, "columns": [ "url" - ], - "nullsNotDistinct": false + ] }, "dao_details_x_account_unique": { "name": "dao_details_x_account_unique", + "nullsNotDistinct": false, "columns": [ "x_account" - ], - "nullsNotDistinct": false + ] }, "dao_details_github_unique": { "name": "dao_details_github_unique", + "nullsNotDistinct": false, "columns": [ "github" - ], - "nullsNotDistinct": false + ] }, "id_name_url": { "name": "id_name_url", + "nullsNotDistinct": false, "columns": [ "dao_id", "url", "name" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.daos": { + "daos": { "name": "daos", "schema": "", "columns": { @@ -508,79 +498,76 @@ "daos_program_acct_programs_program_acct_fk": { "name": "daos_program_acct_programs_program_acct_fk", "tableFrom": "daos", + "tableTo": "programs", "columnsFrom": [ "program_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_dao_id_dao_details_dao_id_fk": { "name": "daos_dao_id_dao_details_dao_id_fk", "tableFrom": "daos", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_base_acct_tokens_mint_acct_fk": { "name": "daos_base_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "base_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_quote_acct_tokens_mint_acct_fk": { "name": "daos_quote_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "quote_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "daos_treasury_acct_unique": { "name": "daos_treasury_acct_unique", + "nullsNotDistinct": false, "columns": [ "treasury_acct" - ], - "nullsNotDistinct": false + ] }, "dao_acct_program": { "name": "dao_acct_program", + "nullsNotDistinct": false, "columns": [ "dao_acct", "program_acct" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.indexer_account_dependencies": { + "indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -621,28 +608,28 @@ "indexer_account_dependencies_name_indexers_name_fk": { "name": "indexer_account_dependencies_name_indexers_name_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "indexers", "columnsFrom": [ "name" ], - "tableTo": "indexers", "columnsTo": [ "name" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk": { "name": "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig_processed" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -654,12 +641,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.indexers": { + "indexers": { "name": "indexers", "schema": "", "columns": { @@ -691,12 +675,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.makes": { + "makes": { "name": "makes", "schema": "", "columns": { @@ -745,56 +726,45 @@ }, "indexes": { "market_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "market_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct" + ], + "isUnique": false } }, "foreignKeys": { "makes_order_tx_sig_orders_order_tx_sig_fk": { "name": "makes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "makes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "makes_market_acct_markets_market_acct_fk": { "name": "makes_market_acct_markets_market_acct_fk", "tableFrom": "makes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.markets": { + "markets": { "name": "markets", "schema": "", "columns": { @@ -913,76 +883,73 @@ "markets_proposal_acct_proposals_proposal_acct_fk": { "name": "markets_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "markets", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_base_mint_acct_tokens_mint_acct_fk": { "name": "markets_base_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "base_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_quote_mint_acct_tokens_mint_acct_fk": { "name": "markets_quote_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_bids_token_acct_token_accts_token_acct_fk": { "name": "markets_bids_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "bids_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_asks_token_acct_token_accts_token_acct_fk": { "name": "markets_asks_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "asks_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.orders": { + "orders": { "name": "orders", "schema": "", "columns": { @@ -1073,75 +1040,59 @@ }, "indexes": { "actor_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "actor_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "actor_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "actor_acct" + ], + "isUnique": false } }, "foreignKeys": { "orders_order_tx_sig_transactions_tx_sig_fk": { "name": "orders_order_tx_sig_transactions_tx_sig_fk", "tableFrom": "orders", + "tableTo": "transactions", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_market_acct_markets_market_acct_fk": { "name": "orders_market_acct_markets_market_acct_fk", "tableFrom": "orders", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_actor_acct_users_user_acct_fk": { "name": "orders_actor_acct_users_user_acct_fk", "tableFrom": "orders", + "tableTo": "users", "columnsFrom": [ "actor_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.prices": { + "prices": { "name": "prices", "schema": "", "columns": { @@ -1200,15 +1151,15 @@ "prices_market_acct_markets_market_acct_fk": { "name": "prices_market_acct_markets_market_acct_fk", "tableFrom": "prices", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -1220,12 +1171,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.program_system": { + "program_system": { "name": "program_system", "schema": "", "columns": { @@ -1265,63 +1213,60 @@ "program_system_autocrat_acct_programs_program_acct_fk": { "name": "program_system_autocrat_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "autocrat_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_conditional_vault_acct_programs_program_acct_fk": { "name": "program_system_conditional_vault_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "conditional_vault_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_pricing_model_acct_programs_program_acct_fk": { "name": "program_system_pricing_model_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "pricing_model_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_migrator_acct_programs_program_acct_fk": { "name": "program_system_migrator_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "migrator_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.programs": { + "programs": { "name": "programs", "schema": "", "columns": { @@ -1363,18 +1308,15 @@ "uniqueConstraints": { "program_version": { "name": "program_version", + "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposal_details": { + "proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1456,32 +1398,29 @@ "proposal_details_proposal_acct_proposals_proposal_acct_fk": { "name": "proposal_details_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "proposal_details", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposals": { + "proposals": { "name": "proposals", "schema": "", "columns": { @@ -1643,50 +1582,47 @@ "proposals_dao_acct_daos_dao_acct_fk": { "name": "proposals_dao_acct_daos_dao_acct_fk", "tableFrom": "proposals", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_base_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_base_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "base_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "quote_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.reactions": { + "reactions": { "name": "reactions", "schema": "", "columns": { @@ -1733,37 +1669,34 @@ "reactions_comment_id_comments_comment_id_fk": { "name": "reactions_comment_id_comments_comment_id_fk", "tableFrom": "reactions", + "tableTo": "comments", "columnsFrom": [ "comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "reactions_proposal_acct_proposals_proposal_acct_fk": { "name": "reactions_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "reactions", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.sessions": { + "sessions": { "name": "sessions", "schema": "", "columns": { @@ -1799,24 +1732,21 @@ "sessions_user_acct_users_user_acct_fk": { "name": "sessions_user_acct_users_user_acct_fk", "tableFrom": "sessions", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "restrict", - "onDelete": "restrict" + "onDelete": "restrict", + "onUpdate": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signature_accounts": { + "signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1842,19 +1772,11 @@ }, "indexes": { "account_index": { - "columns": [ - { - "expression": "account", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "account_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "account" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1867,12 +1789,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signatures": { + "signatures": { "name": "signatures", "schema": "", "columns": { @@ -1922,34 +1841,18 @@ }, "indexes": { "slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false }, "sequence_num_index": { - "columns": [ - { - "expression": "seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "sequence_num_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "seq_num" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1957,17 +1860,14 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", + "nullsNotDistinct": false, "columns": [ "seq_num" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.takes": { + "takes": { "name": "takes", "schema": "", "columns": { @@ -2041,111 +1941,74 @@ }, "indexes": { "block_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_block", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "block_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_block" + ], + "isUnique": false }, "time_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_time", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "time_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_time" + ], + "isUnique": false }, "maker_index": { - "columns": [ - { - "expression": "maker_order_tx_sig", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "maker_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "maker_order_tx_sig" + ], + "isUnique": false } }, "foreignKeys": { "takes_order_tx_sig_orders_order_tx_sig_fk": { "name": "takes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_maker_order_tx_sig_makes_order_tx_sig_fk": { "name": "takes_maker_order_tx_sig_makes_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "makes", "columnsFrom": [ "maker_order_tx_sig" ], - "tableTo": "makes", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_market_acct_markets_market_acct_fk": { "name": "takes_market_acct_markets_market_acct_fk", "tableFrom": "takes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_acct_balances": { + "token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2202,72 +2065,54 @@ }, "indexes": { "acct_amount_created": { - "columns": [ - { - "expression": "token_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amount", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "acct_amount_created", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "token_acct", + "created_at", + "amount" + ], + "isUnique": false } }, "foreignKeys": { "token_acct_balances_token_acct_token_accts_token_acct_fk": { "name": "token_acct_balances_token_acct_token_accts_token_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "token_accts", "columnsFrom": [ "token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_mint_acct_tokens_mint_acct_fk": { "name": "token_acct_balances_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_tx_sig_transactions_tx_sig_fk": { "name": "token_acct_balances_tx_sig_transactions_tx_sig_fk", "tableFrom": "token_acct_balances", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2281,12 +2126,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_accts": { + "token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2333,24 +2175,21 @@ "token_accts_mint_acct_tokens_mint_acct_fk": { "name": "token_accts_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_accts", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.tokens": { + "tokens": { "name": "tokens", "schema": "", "columns": { @@ -2400,12 +2239,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watcher_transactions": { + "transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2430,53 +2266,40 @@ }, "indexes": { "watcher_slot_index": { - "columns": [ - { - "expression": "watcher_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "watcher_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "watcher_acct", + "slot" + ], + "isUnique": false } }, "foreignKeys": { "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk": { "name": "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transaction_watchers", "columnsFrom": [ "watcher_acct" ], - "tableTo": "transaction_watchers", "columnsTo": [ "acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2488,12 +2311,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watchers": { + "transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2558,37 +2378,34 @@ "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watchers_first_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_first_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "first_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transactions": { + "transactions": { "name": "transactions", "schema": "", "columns": { @@ -2637,29 +2454,18 @@ }, "indexes": { "txn_slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "txn_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.twaps": { + "twaps": { "name": "twaps", "schema": "", "columns": { @@ -2718,28 +2524,28 @@ "twaps_market_acct_markets_market_acct_fk": { "name": "twaps_market_acct_markets_market_acct_fk", "tableFrom": "twaps", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "twaps_proposal_acct_proposals_proposal_acct_fk": { "name": "twaps_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "twaps", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2751,12 +2557,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_deposits": { + "user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2797,50 +2600,47 @@ "user_deposits_tx_sig_transactions_tx_sig_fk": { "name": "user_deposits_tx_sig_transactions_tx_sig_fk", "tableFrom": "user_deposits", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_user_acct_users_user_acct_fk": { "name": "user_deposits_user_acct_users_user_acct_fk", "tableFrom": "user_deposits", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_mint_acct_tokens_mint_acct_fk": { "name": "user_deposits_mint_acct_tokens_mint_acct_fk", "tableFrom": "user_deposits", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_performance": { + "user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2955,41 +2755,41 @@ "user_performance_proposal_acct_proposals_proposal_acct_fk": { "name": "user_performance_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "user_performance", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_user_acct_users_user_acct_fk": { "name": "user_performance_user_acct_users_user_acct_fk", "tableFrom": "user_performance", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_dao_acct_daos_dao_acct_fk": { "name": "user_performance_dao_acct_daos_dao_acct_fk", "tableFrom": "user_performance", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -3001,12 +2801,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.users": { + "users": { "name": "users", "schema": "", "columns": { @@ -3027,12 +2824,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_amms": { + "v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -3097,50 +2891,47 @@ "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "lp_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_base_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_base_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "base_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_conditional_vaults": { + "v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -3193,50 +2984,47 @@ "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "v0_4_questions", "columnsFrom": [ "question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk": { "name": "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "token_accts", "columnsFrom": [ "underlying_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_merges": { + "v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3286,92 +3074,60 @@ }, "indexes": { "merge_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "merge_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "merge_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_merges", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_merges_signature_signatures_signature_fk": { "name": "v0_4_merges_signature_signatures_signature_fk", "tableFrom": "v0_4_merges", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_metric_decisions": { + "v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3495,89 +3251,86 @@ "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk": { "name": "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "outcome_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "metric_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "outcome_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "metric_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk": { "name": "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_amms", "columnsFrom": [ "amm_addr" ], - "tableTo": "v0_4_amms", "columnsTo": [ "amm_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_questions": { + "v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3634,12 +3387,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_splits": { + "v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3689,92 +3439,60 @@ }, "indexes": { "split_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "split_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "split_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_splits", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_splits_signature_signatures_signature_fk": { "name": "v0_4_splits_signature_signatures_signature_fk", "tableFrom": "v0_4_splits", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_swaps": { + "v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3848,76 +3566,38 @@ }, "indexes": { "amm_index": { - "columns": [ - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_addr" + ], + "isUnique": false }, "signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "seq_num_amm_index": { - "columns": [ - { - "expression": "amm_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "seq_num_amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_seq_num", + "amm_addr" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { + "columns": {}, "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "cb8d59ae-d3f5-443e-bcb7-3c992a223857", - "prevId": "8b95ac6a-476f-4c4c-ab15-2a329671556f", - "sequences": {}, - "policies": {}, - "views": {}, - "roles": {} + "tables": {} + } } \ No newline at end of file diff --git a/packages/database/drizzle/meta/0007_snapshot.json b/packages/database/drizzle/meta/0007_snapshot.json index 07545325..0cb71d1a 100644 --- a/packages/database/drizzle/meta/0007_snapshot.json +++ b/packages/database/drizzle/meta/0007_snapshot.json @@ -1,8 +1,10 @@ { - "version": "7", - "dialect": "postgresql", + "id": "2f29ee7d-b2cb-458c-9e8f-5e1278f5a691", + "prevId": "cb8d59ae-d3f5-443e-bcb7-3c992a223857", + "version": "5", + "dialect": "pg", "tables": { - "public.candles": { + "candles": { "name": "candles", "schema": "", "columns": { @@ -72,15 +74,15 @@ "candles_market_acct_markets_market_acct_fk": { "name": "candles_market_acct_markets_market_acct_fk", "tableFrom": "candles", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -93,12 +95,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.comments": { + "comments": { "name": "comments", "schema": "", "columns": { @@ -145,45 +144,42 @@ "comments_proposal_acct_proposals_proposal_acct_fk": { "name": "comments_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "comments", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "comments_responding_comment_id_comments_comment_id_fk": { "name": "comments_responding_comment_id_comments_comment_id_fk", "tableFrom": "comments", + "tableTo": "comments", "columnsFrom": [ "responding_comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", + "nullsNotDistinct": false, "columns": [ "comment_id" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.conditional_vaults": { + "conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -241,24 +237,21 @@ "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.dao_details": { + "dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -365,54 +358,51 @@ "uniqueConstraints": { "dao_details_name_unique": { "name": "dao_details_name_unique", + "nullsNotDistinct": false, "columns": [ "name" - ], - "nullsNotDistinct": false + ] }, "dao_details_slug_unique": { "name": "dao_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] }, "dao_details_url_unique": { "name": "dao_details_url_unique", + "nullsNotDistinct": false, "columns": [ "url" - ], - "nullsNotDistinct": false + ] }, "dao_details_x_account_unique": { "name": "dao_details_x_account_unique", + "nullsNotDistinct": false, "columns": [ "x_account" - ], - "nullsNotDistinct": false + ] }, "dao_details_github_unique": { "name": "dao_details_github_unique", + "nullsNotDistinct": false, "columns": [ "github" - ], - "nullsNotDistinct": false + ] }, "id_name_url": { "name": "id_name_url", + "nullsNotDistinct": false, "columns": [ "dao_id", "url", "name" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.daos": { + "daos": { "name": "daos", "schema": "", "columns": { @@ -508,79 +498,76 @@ "daos_program_acct_programs_program_acct_fk": { "name": "daos_program_acct_programs_program_acct_fk", "tableFrom": "daos", + "tableTo": "programs", "columnsFrom": [ "program_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_dao_id_dao_details_dao_id_fk": { "name": "daos_dao_id_dao_details_dao_id_fk", "tableFrom": "daos", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_base_acct_tokens_mint_acct_fk": { "name": "daos_base_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "base_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_quote_acct_tokens_mint_acct_fk": { "name": "daos_quote_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "quote_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "daos_treasury_acct_unique": { "name": "daos_treasury_acct_unique", + "nullsNotDistinct": false, "columns": [ "treasury_acct" - ], - "nullsNotDistinct": false + ] }, "dao_acct_program": { "name": "dao_acct_program", + "nullsNotDistinct": false, "columns": [ "dao_acct", "program_acct" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.indexer_account_dependencies": { + "indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -621,28 +608,28 @@ "indexer_account_dependencies_name_indexers_name_fk": { "name": "indexer_account_dependencies_name_indexers_name_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "indexers", "columnsFrom": [ "name" ], - "tableTo": "indexers", "columnsTo": [ "name" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk": { "name": "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig_processed" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -654,12 +641,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.indexers": { + "indexers": { "name": "indexers", "schema": "", "columns": { @@ -691,12 +675,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.makes": { + "makes": { "name": "makes", "schema": "", "columns": { @@ -745,56 +726,45 @@ }, "indexes": { "market_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "market_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct" + ], + "isUnique": false } }, "foreignKeys": { "makes_order_tx_sig_orders_order_tx_sig_fk": { "name": "makes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "makes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "makes_market_acct_markets_market_acct_fk": { "name": "makes_market_acct_markets_market_acct_fk", "tableFrom": "makes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.markets": { + "markets": { "name": "markets", "schema": "", "columns": { @@ -913,76 +883,73 @@ "markets_proposal_acct_proposals_proposal_acct_fk": { "name": "markets_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "markets", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_base_mint_acct_tokens_mint_acct_fk": { "name": "markets_base_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "base_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_quote_mint_acct_tokens_mint_acct_fk": { "name": "markets_quote_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_bids_token_acct_token_accts_token_acct_fk": { "name": "markets_bids_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "bids_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_asks_token_acct_token_accts_token_acct_fk": { "name": "markets_asks_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "asks_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.orders": { + "orders": { "name": "orders", "schema": "", "columns": { @@ -1073,75 +1040,59 @@ }, "indexes": { "actor_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "actor_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "actor_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "actor_acct" + ], + "isUnique": false } }, "foreignKeys": { "orders_order_tx_sig_transactions_tx_sig_fk": { "name": "orders_order_tx_sig_transactions_tx_sig_fk", "tableFrom": "orders", + "tableTo": "transactions", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_market_acct_markets_market_acct_fk": { "name": "orders_market_acct_markets_market_acct_fk", "tableFrom": "orders", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_actor_acct_users_user_acct_fk": { "name": "orders_actor_acct_users_user_acct_fk", "tableFrom": "orders", + "tableTo": "users", "columnsFrom": [ "actor_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.prices": { + "prices": { "name": "prices", "schema": "", "columns": { @@ -1200,15 +1151,15 @@ "prices_market_acct_markets_market_acct_fk": { "name": "prices_market_acct_markets_market_acct_fk", "tableFrom": "prices", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -1220,12 +1171,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.program_system": { + "program_system": { "name": "program_system", "schema": "", "columns": { @@ -1265,63 +1213,60 @@ "program_system_autocrat_acct_programs_program_acct_fk": { "name": "program_system_autocrat_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "autocrat_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_conditional_vault_acct_programs_program_acct_fk": { "name": "program_system_conditional_vault_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "conditional_vault_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_pricing_model_acct_programs_program_acct_fk": { "name": "program_system_pricing_model_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "pricing_model_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_migrator_acct_programs_program_acct_fk": { "name": "program_system_migrator_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "migrator_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.programs": { + "programs": { "name": "programs", "schema": "", "columns": { @@ -1363,18 +1308,15 @@ "uniqueConstraints": { "program_version": { "name": "program_version", + "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposal_details": { + "proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1456,32 +1398,29 @@ "proposal_details_proposal_acct_proposals_proposal_acct_fk": { "name": "proposal_details_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "proposal_details", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposals": { + "proposals": { "name": "proposals", "schema": "", "columns": { @@ -1643,50 +1582,47 @@ "proposals_dao_acct_daos_dao_acct_fk": { "name": "proposals_dao_acct_daos_dao_acct_fk", "tableFrom": "proposals", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_base_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_base_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "base_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "quote_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.reactions": { + "reactions": { "name": "reactions", "schema": "", "columns": { @@ -1733,37 +1669,34 @@ "reactions_comment_id_comments_comment_id_fk": { "name": "reactions_comment_id_comments_comment_id_fk", "tableFrom": "reactions", + "tableTo": "comments", "columnsFrom": [ "comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "reactions_proposal_acct_proposals_proposal_acct_fk": { "name": "reactions_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "reactions", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.sessions": { + "sessions": { "name": "sessions", "schema": "", "columns": { @@ -1799,24 +1732,21 @@ "sessions_user_acct_users_user_acct_fk": { "name": "sessions_user_acct_users_user_acct_fk", "tableFrom": "sessions", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "restrict", - "onDelete": "restrict" + "onDelete": "restrict", + "onUpdate": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signature_accounts": { + "signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1842,19 +1772,11 @@ }, "indexes": { "account_index": { - "columns": [ - { - "expression": "account", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "account_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "account" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1867,12 +1789,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signatures": { + "signatures": { "name": "signatures", "schema": "", "columns": { @@ -1922,34 +1841,18 @@ }, "indexes": { "slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false }, "sequence_num_index": { - "columns": [ - { - "expression": "seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "sequence_num_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "seq_num" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1957,17 +1860,14 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", + "nullsNotDistinct": false, "columns": [ "seq_num" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.takes": { + "takes": { "name": "takes", "schema": "", "columns": { @@ -2041,111 +1941,74 @@ }, "indexes": { "block_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_block", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "block_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_block" + ], + "isUnique": false }, "time_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_time", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "time_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_time" + ], + "isUnique": false }, "maker_index": { - "columns": [ - { - "expression": "maker_order_tx_sig", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "maker_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "maker_order_tx_sig" + ], + "isUnique": false } }, "foreignKeys": { "takes_order_tx_sig_orders_order_tx_sig_fk": { "name": "takes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_maker_order_tx_sig_makes_order_tx_sig_fk": { "name": "takes_maker_order_tx_sig_makes_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "makes", "columnsFrom": [ "maker_order_tx_sig" ], - "tableTo": "makes", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_market_acct_markets_market_acct_fk": { "name": "takes_market_acct_markets_market_acct_fk", "tableFrom": "takes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_acct_balances": { + "token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2202,72 +2065,54 @@ }, "indexes": { "acct_amount_created": { - "columns": [ - { - "expression": "token_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amount", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "acct_amount_created", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "token_acct", + "created_at", + "amount" + ], + "isUnique": false } }, "foreignKeys": { "token_acct_balances_token_acct_token_accts_token_acct_fk": { "name": "token_acct_balances_token_acct_token_accts_token_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "token_accts", "columnsFrom": [ "token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_mint_acct_tokens_mint_acct_fk": { "name": "token_acct_balances_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_tx_sig_transactions_tx_sig_fk": { "name": "token_acct_balances_tx_sig_transactions_tx_sig_fk", "tableFrom": "token_acct_balances", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2281,12 +2126,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_accts": { + "token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2333,24 +2175,21 @@ "token_accts_mint_acct_tokens_mint_acct_fk": { "name": "token_accts_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_accts", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.tokens": { + "tokens": { "name": "tokens", "schema": "", "columns": { @@ -2400,12 +2239,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watcher_transactions": { + "transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2430,53 +2266,40 @@ }, "indexes": { "watcher_slot_index": { - "columns": [ - { - "expression": "watcher_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "watcher_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "watcher_acct", + "slot" + ], + "isUnique": false } }, "foreignKeys": { "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk": { "name": "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transaction_watchers", "columnsFrom": [ "watcher_acct" ], - "tableTo": "transaction_watchers", "columnsTo": [ "acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2488,12 +2311,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watchers": { + "transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2558,37 +2378,34 @@ "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watchers_first_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_first_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "first_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transactions": { + "transactions": { "name": "transactions", "schema": "", "columns": { @@ -2637,29 +2454,18 @@ }, "indexes": { "txn_slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "txn_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.twaps": { + "twaps": { "name": "twaps", "schema": "", "columns": { @@ -2718,28 +2524,28 @@ "twaps_market_acct_markets_market_acct_fk": { "name": "twaps_market_acct_markets_market_acct_fk", "tableFrom": "twaps", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "twaps_proposal_acct_proposals_proposal_acct_fk": { "name": "twaps_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "twaps", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2751,12 +2557,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_deposits": { + "user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2797,50 +2600,47 @@ "user_deposits_tx_sig_transactions_tx_sig_fk": { "name": "user_deposits_tx_sig_transactions_tx_sig_fk", "tableFrom": "user_deposits", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_user_acct_users_user_acct_fk": { "name": "user_deposits_user_acct_users_user_acct_fk", "tableFrom": "user_deposits", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_mint_acct_tokens_mint_acct_fk": { "name": "user_deposits_mint_acct_tokens_mint_acct_fk", "tableFrom": "user_deposits", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_performance": { + "user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2955,41 +2755,41 @@ "user_performance_proposal_acct_proposals_proposal_acct_fk": { "name": "user_performance_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "user_performance", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_user_acct_users_user_acct_fk": { "name": "user_performance_user_acct_users_user_acct_fk", "tableFrom": "user_performance", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_dao_acct_daos_dao_acct_fk": { "name": "user_performance_dao_acct_daos_dao_acct_fk", "tableFrom": "user_performance", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -3001,12 +2801,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.users": { + "users": { "name": "users", "schema": "", "columns": { @@ -3027,12 +2824,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_amms": { + "v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -3097,50 +2891,47 @@ "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "lp_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_base_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_base_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "base_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_conditional_vaults": { + "v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -3193,50 +2984,47 @@ "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "v0_4_questions", "columnsFrom": [ "question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk": { "name": "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "token_accts", "columnsFrom": [ "underlying_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_merges": { + "v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3286,92 +3074,60 @@ }, "indexes": { "merge_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "merge_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "merge_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_merges", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_merges_signature_signatures_signature_fk": { "name": "v0_4_merges_signature_signatures_signature_fk", "tableFrom": "v0_4_merges", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_metric_decisions": { + "v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3495,89 +3251,86 @@ "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk": { "name": "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "outcome_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "metric_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "outcome_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "metric_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk": { "name": "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_amms", "columnsFrom": [ "amm_addr" ], - "tableTo": "v0_4_amms", "columnsTo": [ "amm_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_questions": { + "v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3634,12 +3387,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_splits": { + "v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3689,92 +3439,60 @@ }, "indexes": { "split_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "split_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "split_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_splits", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_splits_signature_signatures_signature_fk": { "name": "v0_4_splits_signature_signatures_signature_fk", "tableFrom": "v0_4_splits", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_swaps": { + "v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3848,76 +3566,38 @@ }, "indexes": { "amm_index": { - "columns": [ - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_addr" + ], + "isUnique": false }, "signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "seq_num_amm_index": { - "columns": [ - { - "expression": "amm_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "seq_num_amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_seq_num", + "amm_addr" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { + "columns": {}, "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "2f29ee7d-b2cb-458c-9e8f-5e1278f5a691", - "prevId": "cb8d59ae-d3f5-443e-bcb7-3c992a223857", - "sequences": {}, - "policies": {}, - "views": {}, - "roles": {} + "tables": {} + } } \ No newline at end of file diff --git a/packages/database/drizzle/meta/0008_snapshot.json b/packages/database/drizzle/meta/0008_snapshot.json index 731d8504..91550c92 100644 --- a/packages/database/drizzle/meta/0008_snapshot.json +++ b/packages/database/drizzle/meta/0008_snapshot.json @@ -1,8 +1,10 @@ { - "version": "7", - "dialect": "postgresql", + "id": "46750075-91a4-4e4d-b00a-3f3ab69abf22", + "prevId": "2f29ee7d-b2cb-458c-9e8f-5e1278f5a691", + "version": "5", + "dialect": "pg", "tables": { - "public.candles": { + "candles": { "name": "candles", "schema": "", "columns": { @@ -72,15 +74,15 @@ "candles_market_acct_markets_market_acct_fk": { "name": "candles_market_acct_markets_market_acct_fk", "tableFrom": "candles", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -93,12 +95,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.comments": { + "comments": { "name": "comments", "schema": "", "columns": { @@ -145,45 +144,42 @@ "comments_proposal_acct_proposals_proposal_acct_fk": { "name": "comments_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "comments", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "comments_responding_comment_id_comments_comment_id_fk": { "name": "comments_responding_comment_id_comments_comment_id_fk", "tableFrom": "comments", + "tableTo": "comments", "columnsFrom": [ "responding_comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", + "nullsNotDistinct": false, "columns": [ "comment_id" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.conditional_vaults": { + "conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -241,24 +237,21 @@ "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.dao_details": { + "dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -365,54 +358,51 @@ "uniqueConstraints": { "dao_details_name_unique": { "name": "dao_details_name_unique", + "nullsNotDistinct": false, "columns": [ "name" - ], - "nullsNotDistinct": false + ] }, "dao_details_slug_unique": { "name": "dao_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] }, "dao_details_url_unique": { "name": "dao_details_url_unique", + "nullsNotDistinct": false, "columns": [ "url" - ], - "nullsNotDistinct": false + ] }, "dao_details_x_account_unique": { "name": "dao_details_x_account_unique", + "nullsNotDistinct": false, "columns": [ "x_account" - ], - "nullsNotDistinct": false + ] }, "dao_details_github_unique": { "name": "dao_details_github_unique", + "nullsNotDistinct": false, "columns": [ "github" - ], - "nullsNotDistinct": false + ] }, "id_name_url": { "name": "id_name_url", + "nullsNotDistinct": false, "columns": [ "dao_id", "url", "name" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.daos": { + "daos": { "name": "daos", "schema": "", "columns": { @@ -508,79 +498,76 @@ "daos_program_acct_programs_program_acct_fk": { "name": "daos_program_acct_programs_program_acct_fk", "tableFrom": "daos", + "tableTo": "programs", "columnsFrom": [ "program_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_dao_id_dao_details_dao_id_fk": { "name": "daos_dao_id_dao_details_dao_id_fk", "tableFrom": "daos", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_base_acct_tokens_mint_acct_fk": { "name": "daos_base_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "base_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "daos_quote_acct_tokens_mint_acct_fk": { "name": "daos_quote_acct_tokens_mint_acct_fk", "tableFrom": "daos", + "tableTo": "tokens", "columnsFrom": [ "quote_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "daos_treasury_acct_unique": { "name": "daos_treasury_acct_unique", + "nullsNotDistinct": false, "columns": [ "treasury_acct" - ], - "nullsNotDistinct": false + ] }, "dao_acct_program": { "name": "dao_acct_program", + "nullsNotDistinct": false, "columns": [ "dao_acct", "program_acct" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.indexer_account_dependencies": { + "indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -621,28 +608,28 @@ "indexer_account_dependencies_name_indexers_name_fk": { "name": "indexer_account_dependencies_name_indexers_name_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "indexers", "columnsFrom": [ "name" ], - "tableTo": "indexers", "columnsTo": [ "name" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk": { "name": "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk", "tableFrom": "indexer_account_dependencies", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig_processed" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -654,12 +641,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.indexers": { + "indexers": { "name": "indexers", "schema": "", "columns": { @@ -691,12 +675,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.makes": { + "makes": { "name": "makes", "schema": "", "columns": { @@ -745,56 +726,45 @@ }, "indexes": { "market_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "market_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct" + ], + "isUnique": false } }, "foreignKeys": { "makes_order_tx_sig_orders_order_tx_sig_fk": { "name": "makes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "makes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "makes_market_acct_markets_market_acct_fk": { "name": "makes_market_acct_markets_market_acct_fk", "tableFrom": "makes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.markets": { + "markets": { "name": "markets", "schema": "", "columns": { @@ -913,76 +883,73 @@ "markets_proposal_acct_proposals_proposal_acct_fk": { "name": "markets_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "markets", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_base_mint_acct_tokens_mint_acct_fk": { "name": "markets_base_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "base_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_quote_mint_acct_tokens_mint_acct_fk": { "name": "markets_quote_mint_acct_tokens_mint_acct_fk", "tableFrom": "markets", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_bids_token_acct_token_accts_token_acct_fk": { "name": "markets_bids_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "bids_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "markets_asks_token_acct_token_accts_token_acct_fk": { "name": "markets_asks_token_acct_token_accts_token_acct_fk", "tableFrom": "markets", + "tableTo": "token_accts", "columnsFrom": [ "asks_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.orders": { + "orders": { "name": "orders", "schema": "", "columns": { @@ -1073,75 +1040,59 @@ }, "indexes": { "actor_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "actor_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "actor_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "actor_acct" + ], + "isUnique": false } }, "foreignKeys": { "orders_order_tx_sig_transactions_tx_sig_fk": { "name": "orders_order_tx_sig_transactions_tx_sig_fk", "tableFrom": "orders", + "tableTo": "transactions", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_market_acct_markets_market_acct_fk": { "name": "orders_market_acct_markets_market_acct_fk", "tableFrom": "orders", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "orders_actor_acct_users_user_acct_fk": { "name": "orders_actor_acct_users_user_acct_fk", "tableFrom": "orders", + "tableTo": "users", "columnsFrom": [ "actor_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.prices": { + "prices": { "name": "prices", "schema": "", "columns": { @@ -1200,15 +1151,15 @@ "prices_market_acct_markets_market_acct_fk": { "name": "prices_market_acct_markets_market_acct_fk", "tableFrom": "prices", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -1220,12 +1171,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.program_system": { + "program_system": { "name": "program_system", "schema": "", "columns": { @@ -1265,63 +1213,60 @@ "program_system_autocrat_acct_programs_program_acct_fk": { "name": "program_system_autocrat_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "autocrat_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_conditional_vault_acct_programs_program_acct_fk": { "name": "program_system_conditional_vault_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "conditional_vault_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_pricing_model_acct_programs_program_acct_fk": { "name": "program_system_pricing_model_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "pricing_model_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "program_system_migrator_acct_programs_program_acct_fk": { "name": "program_system_migrator_acct_programs_program_acct_fk", "tableFrom": "program_system", + "tableTo": "programs", "columnsFrom": [ "migrator_acct" ], - "tableTo": "programs", "columnsTo": [ "program_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.programs": { + "programs": { "name": "programs", "schema": "", "columns": { @@ -1363,18 +1308,15 @@ "uniqueConstraints": { "program_version": { "name": "program_version", + "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposal_details": { + "proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1456,32 +1398,29 @@ "proposal_details_proposal_acct_proposals_proposal_acct_fk": { "name": "proposal_details_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "proposal_details", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", + "nullsNotDistinct": false, "columns": [ "slug" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.proposals": { + "proposals": { "name": "proposals", "schema": "", "columns": { @@ -1643,50 +1582,47 @@ "proposals_dao_acct_daos_dao_acct_fk": { "name": "proposals_dao_acct_daos_dao_acct_fk", "tableFrom": "proposals", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_base_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_base_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "base_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk": { "name": "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk", "tableFrom": "proposals", + "tableTo": "conditional_vaults", "columnsFrom": [ "quote_vault" ], - "tableTo": "conditional_vaults", "columnsTo": [ "cond_vault_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.reactions": { + "reactions": { "name": "reactions", "schema": "", "columns": { @@ -1733,37 +1669,34 @@ "reactions_comment_id_comments_comment_id_fk": { "name": "reactions_comment_id_comments_comment_id_fk", "tableFrom": "reactions", + "tableTo": "comments", "columnsFrom": [ "comment_id" ], - "tableTo": "comments", "columnsTo": [ "comment_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "reactions_proposal_acct_proposals_proposal_acct_fk": { "name": "reactions_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "reactions", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.sessions": { + "sessions": { "name": "sessions", "schema": "", "columns": { @@ -1799,24 +1732,21 @@ "sessions_user_acct_users_user_acct_fk": { "name": "sessions_user_acct_users_user_acct_fk", "tableFrom": "sessions", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "restrict", - "onDelete": "restrict" + "onDelete": "restrict", + "onUpdate": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signature_accounts": { + "signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1842,19 +1772,11 @@ }, "indexes": { "account_index": { - "columns": [ - { - "expression": "account", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "account_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "account" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1867,12 +1789,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.signatures": { + "signatures": { "name": "signatures", "schema": "", "columns": { @@ -1922,34 +1841,18 @@ }, "indexes": { "slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false }, "sequence_num_index": { - "columns": [ - { - "expression": "seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "sequence_num_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "seq_num" + ], + "isUnique": false } }, "foreignKeys": {}, @@ -1957,17 +1860,14 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", + "nullsNotDistinct": false, "columns": [ "seq_num" - ], - "nullsNotDistinct": false + ] } - }, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + } }, - "public.takes": { + "takes": { "name": "takes", "schema": "", "columns": { @@ -2048,111 +1948,74 @@ }, "indexes": { "block_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_block", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "block_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_block" + ], + "isUnique": false }, "time_index": { - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_time", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "time_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "market_acct", + "order_time" + ], + "isUnique": false }, "maker_index": { - "columns": [ - { - "expression": "maker_order_tx_sig", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "maker_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "maker_order_tx_sig" + ], + "isUnique": false } }, "foreignKeys": { "takes_order_tx_sig_orders_order_tx_sig_fk": { "name": "takes_order_tx_sig_orders_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "orders", "columnsFrom": [ "order_tx_sig" ], - "tableTo": "orders", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_maker_order_tx_sig_makes_order_tx_sig_fk": { "name": "takes_maker_order_tx_sig_makes_order_tx_sig_fk", "tableFrom": "takes", + "tableTo": "makes", "columnsFrom": [ "maker_order_tx_sig" ], - "tableTo": "makes", "columnsTo": [ "order_tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "takes_market_acct_markets_market_acct_fk": { "name": "takes_market_acct_markets_market_acct_fk", "tableFrom": "takes", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_acct_balances": { + "token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2209,72 +2072,54 @@ }, "indexes": { "acct_amount_created": { - "columns": [ - { - "expression": "token_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amount", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "acct_amount_created", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "token_acct", + "created_at", + "amount" + ], + "isUnique": false } }, "foreignKeys": { "token_acct_balances_token_acct_token_accts_token_acct_fk": { "name": "token_acct_balances_token_acct_token_accts_token_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "token_accts", "columnsFrom": [ "token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_mint_acct_tokens_mint_acct_fk": { "name": "token_acct_balances_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_acct_balances", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "token_acct_balances_tx_sig_transactions_tx_sig_fk": { "name": "token_acct_balances_tx_sig_transactions_tx_sig_fk", "tableFrom": "token_acct_balances", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2288,12 +2133,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.token_accts": { + "token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2340,24 +2182,21 @@ "token_accts_mint_acct_tokens_mint_acct_fk": { "name": "token_accts_mint_acct_tokens_mint_acct_fk", "tableFrom": "token_accts", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.tokens": { + "tokens": { "name": "tokens", "schema": "", "columns": { @@ -2407,12 +2246,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watcher_transactions": { + "transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2437,53 +2273,40 @@ }, "indexes": { "watcher_slot_index": { - "columns": [ - { - "expression": "watcher_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "watcher_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "watcher_acct", + "slot" + ], + "isUnique": false } }, "foreignKeys": { "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk": { "name": "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transaction_watchers", "columnsFrom": [ "watcher_acct" ], - "tableTo": "transaction_watchers", "columnsTo": [ "acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watcher_transactions", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2495,12 +2318,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transaction_watchers": { + "transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2565,37 +2385,34 @@ "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "latest_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "transaction_watchers_first_tx_sig_transactions_tx_sig_fk": { "name": "transaction_watchers_first_tx_sig_transactions_tx_sig_fk", "tableFrom": "transaction_watchers", + "tableTo": "transactions", "columnsFrom": [ "first_tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.transactions": { + "transactions": { "name": "transactions", "schema": "", "columns": { @@ -2644,29 +2461,18 @@ }, "indexes": { "txn_slot_index": { - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "txn_slot_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "slot" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.twaps": { + "twaps": { "name": "twaps", "schema": "", "columns": { @@ -2725,28 +2531,28 @@ "twaps_market_acct_markets_market_acct_fk": { "name": "twaps_market_acct_markets_market_acct_fk", "tableFrom": "twaps", + "tableTo": "markets", "columnsFrom": [ "market_acct" ], - "tableTo": "markets", "columnsTo": [ "market_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "twaps_proposal_acct_proposals_proposal_acct_fk": { "name": "twaps_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "twaps", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -2758,12 +2564,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_deposits": { + "user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2804,50 +2607,47 @@ "user_deposits_tx_sig_transactions_tx_sig_fk": { "name": "user_deposits_tx_sig_transactions_tx_sig_fk", "tableFrom": "user_deposits", + "tableTo": "transactions", "columnsFrom": [ "tx_sig" ], - "tableTo": "transactions", "columnsTo": [ "tx_sig" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_user_acct_users_user_acct_fk": { "name": "user_deposits_user_acct_users_user_acct_fk", "tableFrom": "user_deposits", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_deposits_mint_acct_tokens_mint_acct_fk": { "name": "user_deposits_mint_acct_tokens_mint_acct_fk", "tableFrom": "user_deposits", + "tableTo": "tokens", "columnsFrom": [ "mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.user_performance": { + "user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2962,41 +2762,41 @@ "user_performance_proposal_acct_proposals_proposal_acct_fk": { "name": "user_performance_proposal_acct_proposals_proposal_acct_fk", "tableFrom": "user_performance", + "tableTo": "proposals", "columnsFrom": [ "proposal_acct" ], - "tableTo": "proposals", "columnsTo": [ "proposal_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_user_acct_users_user_acct_fk": { "name": "user_performance_user_acct_users_user_acct_fk", "tableFrom": "user_performance", + "tableTo": "users", "columnsFrom": [ "user_acct" ], - "tableTo": "users", "columnsTo": [ "user_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "user_performance_dao_acct_daos_dao_acct_fk": { "name": "user_performance_dao_acct_daos_dao_acct_fk", "tableFrom": "user_performance", + "tableTo": "daos", "columnsFrom": [ "dao_acct" ], - "tableTo": "daos", "columnsTo": [ "dao_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": { @@ -3008,12 +2808,9 @@ ] } }, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.users": { + "users": { "name": "users", "schema": "", "columns": { @@ -3034,12 +2831,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_amms": { + "v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -3104,50 +2898,47 @@ "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "lp_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_base_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_base_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "base_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk": { "name": "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk", "tableFrom": "v0_4_amms", + "tableTo": "tokens", "columnsFrom": [ "quote_mint_addr" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_conditional_vaults": { + "v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -3200,50 +2991,47 @@ "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "v0_4_questions", "columnsFrom": [ "question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { "name": "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "tokens", "columnsFrom": [ "underlying_mint_acct" ], - "tableTo": "tokens", "columnsTo": [ "mint_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk": { "name": "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk", "tableFrom": "v0_4_conditional_vaults", + "tableTo": "token_accts", "columnsFrom": [ "underlying_token_acct" ], - "tableTo": "token_accts", "columnsTo": [ "token_acct" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_merges": { + "v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3293,92 +3081,60 @@ }, "indexes": { "merge_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "merge_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "merge_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "merge_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_merges", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_merges_signature_signatures_signature_fk": { "name": "v0_4_merges_signature_signatures_signature_fk", "tableFrom": "v0_4_merges", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_metric_decisions": { + "v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3502,89 +3258,86 @@ "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk": { "name": "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "dao_details", "columnsFrom": [ "dao_id" ], - "tableTo": "dao_details", "columnsTo": [ "dao_id" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "outcome_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk": { "name": "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_questions", "columnsFrom": [ "metric_question_addr" ], - "tableTo": "v0_4_questions", "columnsTo": [ "question_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "outcome_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "metric_vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk": { "name": "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk", "tableFrom": "v0_4_metric_decisions", + "tableTo": "v0_4_amms", "columnsFrom": [ "amm_addr" ], - "tableTo": "v0_4_amms", "columnsTo": [ "amm_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_questions": { + "v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3641,12 +3394,9 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_splits": { + "v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3696,92 +3446,60 @@ }, "indexes": { "split_vault_index": { - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_addr" + ], + "isUnique": false }, "split_signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "split_seq_num_vault_index": { - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "split_seq_num_vault_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "vault_seq_num", + "vault_addr" + ], + "isUnique": false } }, "foreignKeys": { "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { "name": "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", "tableFrom": "v0_4_splits", + "tableTo": "v0_4_conditional_vaults", "columnsFrom": [ "vault_addr" ], - "tableTo": "v0_4_conditional_vaults", "columnsTo": [ "conditional_vault_addr" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" }, "v0_4_splits_signature_signatures_signature_fk": { "name": "v0_4_splits_signature_signatures_signature_fk", "tableFrom": "v0_4_splits", + "tableTo": "signatures", "columnsFrom": [ "signature" ], - "tableTo": "signatures", "columnsTo": [ "signature" ], - "onUpdate": "no action", - "onDelete": "no action" + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} }, - "public.v0_4_swaps": { + "v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3855,76 +3573,38 @@ }, "indexes": { "amm_index": { - "columns": [ - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_addr" + ], + "isUnique": false }, "signature_index": { - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "signature_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "signature" + ], + "isUnique": false }, "seq_num_amm_index": { - "columns": [ - { - "expression": "amm_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "with": {}, "name": "seq_num_amm_index", - "isUnique": false, - "method": "btree", - "concurrently": false + "columns": [ + "amm_seq_num", + "amm_addr" + ], + "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "isRLSEnabled": false, - "checkConstraints": {} + "uniqueConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { + "columns": {}, "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "46750075-91a4-4e4d-b00a-3f3ab69abf22", - "prevId": "2f29ee7d-b2cb-458c-9e8f-5e1278f5a691", - "sequences": {}, - "policies": {}, - "views": {}, - "roles": {} + "tables": {} + } } \ No newline at end of file diff --git a/packages/database/drizzle/meta/0009_snapshot.json b/packages/database/drizzle/meta/0009_snapshot.json deleted file mode 100644 index b0540cb5..00000000 --- a/packages/database/drizzle/meta/0009_snapshot.json +++ /dev/null @@ -1,4036 +0,0 @@ -{ - "id": "65af4022-ecf9-46c1-9bae-811755bf4197", - "prevId": "46750075-91a4-4e4d-b00a-3f3ab69abf22", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.candles": { - "name": "candles", - "schema": "", - "columns": { - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "candle_duration": { - "name": "candle_duration", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "timestamp": { - "name": "timestamp", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "volume": { - "name": "volume", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "open": { - "name": "open", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "high": { - "name": "high", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "low": { - "name": "low", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "close": { - "name": "close", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "candle_average": { - "name": "candle_average", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "cond_market_twap": { - "name": "cond_market_twap", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "candles_market_acct_markets_market_acct_fk": { - "name": "candles_market_acct_markets_market_acct_fk", - "tableFrom": "candles", - "tableTo": "markets", - "columnsFrom": [ - "market_acct" - ], - "columnsTo": [ - "market_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "candles_market_acct_candle_duration_timestamp_pk": { - "name": "candles_market_acct_candle_duration_timestamp_pk", - "columns": [ - "market_acct", - "candle_duration", - "timestamp" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "comment_id": { - "name": "comment_id", - "type": "bigint", - "primaryKey": true, - "notNull": true - }, - "commentor_acct": { - "name": "commentor_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "responding_comment_id": { - "name": "responding_comment_id", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "comments_proposal_acct_proposals_proposal_acct_fk": { - "name": "comments_proposal_acct_proposals_proposal_acct_fk", - "tableFrom": "comments", - "tableTo": "proposals", - "columnsFrom": [ - "proposal_acct" - ], - "columnsTo": [ - "proposal_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "comments_responding_comment_id_comments_comment_id_fk": { - "name": "comments_responding_comment_id_comments_comment_id_fk", - "tableFrom": "comments", - "tableTo": "comments", - "columnsFrom": [ - "responding_comment_id" - ], - "columnsTo": [ - "comment_id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comments_comment_id_unique": { - "name": "comments_comment_id_unique", - "nullsNotDistinct": false, - "columns": [ - "comment_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.conditional_vaults": { - "name": "conditional_vaults", - "schema": "", - "columns": { - "cond_vault_acct": { - "name": "cond_vault_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "settlement_authority": { - "name": "settlement_authority", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "underlying_mint_acct": { - "name": "underlying_mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "underlying_token_acct": { - "name": "underlying_token_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "nonce": { - "name": "nonce", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "cond_finalize_token_mint_acct": { - "name": "cond_finalize_token_mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "cond_revert_token_mint_acct": { - "name": "cond_revert_token_mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { - "name": "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", - "tableFrom": "conditional_vaults", - "tableTo": "tokens", - "columnsFrom": [ - "underlying_mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.dao_details": { - "name": "dao_details", - "schema": "", - "columns": { - "dao_id": { - "name": "dao_id", - "type": "bigint", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "slug": { - "name": "slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "x_account": { - "name": "x_account", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "github": { - "name": "github", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "creator_acct": { - "name": "creator_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "admin_accts": { - "name": "admin_accts", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "token_image_url": { - "name": "token_image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "pass_token_image_url": { - "name": "pass_token_image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "fail_token_image_url": { - "name": "fail_token_image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "lp_token_image_url": { - "name": "lp_token_image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "is_hide": { - "name": "is_hide", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "socials": { - "name": "socials", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "dao_details_name_unique": { - "name": "dao_details_name_unique", - "nullsNotDistinct": false, - "columns": [ - "name" - ] - }, - "dao_details_slug_unique": { - "name": "dao_details_slug_unique", - "nullsNotDistinct": false, - "columns": [ - "slug" - ] - }, - "dao_details_url_unique": { - "name": "dao_details_url_unique", - "nullsNotDistinct": false, - "columns": [ - "url" - ] - }, - "dao_details_x_account_unique": { - "name": "dao_details_x_account_unique", - "nullsNotDistinct": false, - "columns": [ - "x_account" - ] - }, - "dao_details_github_unique": { - "name": "dao_details_github_unique", - "nullsNotDistinct": false, - "columns": [ - "github" - ] - }, - "id_name_url": { - "name": "id_name_url", - "nullsNotDistinct": false, - "columns": [ - "dao_id", - "url", - "name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.daos": { - "name": "daos", - "schema": "", - "columns": { - "dao_acct": { - "name": "dao_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "program_acct": { - "name": "program_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "dao_id": { - "name": "dao_id", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "base_acct": { - "name": "base_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "quote_acct": { - "name": "quote_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "treasury_acct": { - "name": "treasury_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "slots_per_proposal": { - "name": "slots_per_proposal", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "pass_threshold_bps": { - "name": "pass_threshold_bps", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "twap_initial_observation": { - "name": "twap_initial_observation", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "twap_max_observation_change_per_update": { - "name": "twap_max_observation_change_per_update", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_quote_futarchic_liquidity": { - "name": "min_quote_futarchic_liquidity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_base_futarchic_liquidity": { - "name": "min_base_futarchic_liquidity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "daos_program_acct_programs_program_acct_fk": { - "name": "daos_program_acct_programs_program_acct_fk", - "tableFrom": "daos", - "tableTo": "programs", - "columnsFrom": [ - "program_acct" - ], - "columnsTo": [ - "program_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "daos_dao_id_dao_details_dao_id_fk": { - "name": "daos_dao_id_dao_details_dao_id_fk", - "tableFrom": "daos", - "tableTo": "dao_details", - "columnsFrom": [ - "dao_id" - ], - "columnsTo": [ - "dao_id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "daos_base_acct_tokens_mint_acct_fk": { - "name": "daos_base_acct_tokens_mint_acct_fk", - "tableFrom": "daos", - "tableTo": "tokens", - "columnsFrom": [ - "base_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "daos_quote_acct_tokens_mint_acct_fk": { - "name": "daos_quote_acct_tokens_mint_acct_fk", - "tableFrom": "daos", - "tableTo": "tokens", - "columnsFrom": [ - "quote_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "daos_treasury_acct_unique": { - "name": "daos_treasury_acct_unique", - "nullsNotDistinct": false, - "columns": [ - "treasury_acct" - ] - }, - "dao_acct_program": { - "name": "dao_acct_program", - "nullsNotDistinct": false, - "columns": [ - "dao_acct", - "program_acct" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.indexer_account_dependencies": { - "name": "indexer_account_dependencies", - "schema": "", - "columns": { - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "acct": { - "name": "acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "latest_tx_sig_processed": { - "name": "latest_tx_sig_processed", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "varchar", - "primaryKey": false, - "notNull": false, - "default": "'active'" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "indexer_account_dependencies_name_indexers_name_fk": { - "name": "indexer_account_dependencies_name_indexers_name_fk", - "tableFrom": "indexer_account_dependencies", - "tableTo": "indexers", - "columnsFrom": [ - "name" - ], - "columnsTo": [ - "name" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk": { - "name": "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk", - "tableFrom": "indexer_account_dependencies", - "tableTo": "transactions", - "columnsFrom": [ - "latest_tx_sig_processed" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "indexer_account_dependencies_name_acct_pk": { - "name": "indexer_account_dependencies_name_acct_pk", - "columns": [ - "name", - "acct" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.indexers": { - "name": "indexers", - "schema": "", - "columns": { - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": true, - "notNull": true - }, - "implementation": { - "name": "implementation", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "latest_slot_processed": { - "name": "latest_slot_processed", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "latest_tx_sig_processed": { - "name": "latest_tx_sig_processed", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "indexer_type": { - "name": "indexer_type", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.makes": { - "name": "makes", - "schema": "", - "columns": { - "order_tx_sig": { - "name": "order_tx_sig", - "type": "varchar(88)", - "primaryKey": true, - "notNull": true - }, - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "unfilled_base_amount": { - "name": "unfilled_base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "filled_base_amount": { - "name": "filled_base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "quote_price": { - "name": "quote_price", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "market_index": { - "name": "market_index", - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "makes_order_tx_sig_orders_order_tx_sig_fk": { - "name": "makes_order_tx_sig_orders_order_tx_sig_fk", - "tableFrom": "makes", - "tableTo": "orders", - "columnsFrom": [ - "order_tx_sig" - ], - "columnsTo": [ - "order_tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "makes_market_acct_markets_market_acct_fk": { - "name": "makes_market_acct_markets_market_acct_fk", - "tableFrom": "makes", - "tableTo": "markets", - "columnsFrom": [ - "market_acct" - ], - "columnsTo": [ - "market_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.markets": { - "name": "markets", - "schema": "", - "columns": { - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "market_type": { - "name": "market_type", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "create_tx_sig": { - "name": "create_tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "base_mint_acct": { - "name": "base_mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "quote_mint_acct": { - "name": "quote_mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "base_lot_size": { - "name": "base_lot_size", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "quote_lot_size": { - "name": "quote_lot_size", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "quote_tick_size": { - "name": "quote_tick_size", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "bids_token_acct": { - "name": "bids_token_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "asks_token_acct": { - "name": "asks_token_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "base_maker_fee": { - "name": "base_maker_fee", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "base_taker_fee": { - "name": "base_taker_fee", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "quote_maker_fee": { - "name": "quote_maker_fee", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "quote_taker_fee": { - "name": "quote_taker_fee", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "active_slot": { - "name": "active_slot", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "inactive_slot": { - "name": "inactive_slot", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "markets_proposal_acct_proposals_proposal_acct_fk": { - "name": "markets_proposal_acct_proposals_proposal_acct_fk", - "tableFrom": "markets", - "tableTo": "proposals", - "columnsFrom": [ - "proposal_acct" - ], - "columnsTo": [ - "proposal_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "markets_base_mint_acct_tokens_mint_acct_fk": { - "name": "markets_base_mint_acct_tokens_mint_acct_fk", - "tableFrom": "markets", - "tableTo": "tokens", - "columnsFrom": [ - "base_mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "markets_quote_mint_acct_tokens_mint_acct_fk": { - "name": "markets_quote_mint_acct_tokens_mint_acct_fk", - "tableFrom": "markets", - "tableTo": "tokens", - "columnsFrom": [ - "quote_mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "markets_bids_token_acct_token_accts_token_acct_fk": { - "name": "markets_bids_token_acct_token_accts_token_acct_fk", - "tableFrom": "markets", - "tableTo": "token_accts", - "columnsFrom": [ - "bids_token_acct" - ], - "columnsTo": [ - "token_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "markets_asks_token_acct_token_accts_token_acct_fk": { - "name": "markets_asks_token_acct_token_accts_token_acct_fk", - "tableFrom": "markets", - "tableTo": "token_accts", - "columnsFrom": [ - "asks_token_acct" - ], - "columnsTo": [ - "token_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.orders": { - "name": "orders", - "schema": "", - "columns": { - "order_tx_sig": { - "name": "order_tx_sig", - "type": "varchar(88)", - "primaryKey": true, - "notNull": true - }, - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "actor_acct": { - "name": "actor_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "side": { - "name": "side", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "unfilled_base_amount": { - "name": "unfilled_base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "filled_base_amount": { - "name": "filled_base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "quote_price": { - "name": "quote_price", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "order_block": { - "name": "order_block", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "order_time": { - "name": "order_time", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "cancel_tx_sig": { - "name": "cancel_tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "cancel_block": { - "name": "cancel_block", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cancel_time": { - "name": "cancel_time", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "actor_index": { - "name": "actor_index", - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "actor_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "orders_order_tx_sig_transactions_tx_sig_fk": { - "name": "orders_order_tx_sig_transactions_tx_sig_fk", - "tableFrom": "orders", - "tableTo": "transactions", - "columnsFrom": [ - "order_tx_sig" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "orders_market_acct_markets_market_acct_fk": { - "name": "orders_market_acct_markets_market_acct_fk", - "tableFrom": "orders", - "tableTo": "markets", - "columnsFrom": [ - "market_acct" - ], - "columnsTo": [ - "market_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "orders_actor_acct_users_user_acct_fk": { - "name": "orders_actor_acct_users_user_acct_fk", - "tableFrom": "orders", - "tableTo": "users", - "columnsFrom": [ - "actor_acct" - ], - "columnsTo": [ - "user_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.prices": { - "name": "prices", - "schema": "", - "columns": { - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "updated_slot": { - "name": "updated_slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "base_amount": { - "name": "base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "quote_amount": { - "name": "quote_amount", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "price": { - "name": "price", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_by": { - "name": "created_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "prices_type": { - "name": "prices_type", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "prices_market_acct_markets_market_acct_fk": { - "name": "prices_market_acct_markets_market_acct_fk", - "tableFrom": "prices", - "tableTo": "markets", - "columnsFrom": [ - "market_acct" - ], - "columnsTo": [ - "market_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "prices_created_at_market_acct_pk": { - "name": "prices_created_at_market_acct_pk", - "columns": [ - "created_at", - "market_acct" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.program_system": { - "name": "program_system", - "schema": "", - "columns": { - "system_version": { - "name": "system_version", - "type": "double precision", - "primaryKey": true, - "notNull": true - }, - "autocrat_acct": { - "name": "autocrat_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "conditional_vault_acct": { - "name": "conditional_vault_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "pricing_model_acct": { - "name": "pricing_model_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "migrator_acct": { - "name": "migrator_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "program_system_autocrat_acct_programs_program_acct_fk": { - "name": "program_system_autocrat_acct_programs_program_acct_fk", - "tableFrom": "program_system", - "tableTo": "programs", - "columnsFrom": [ - "autocrat_acct" - ], - "columnsTo": [ - "program_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "program_system_conditional_vault_acct_programs_program_acct_fk": { - "name": "program_system_conditional_vault_acct_programs_program_acct_fk", - "tableFrom": "program_system", - "tableTo": "programs", - "columnsFrom": [ - "conditional_vault_acct" - ], - "columnsTo": [ - "program_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "program_system_pricing_model_acct_programs_program_acct_fk": { - "name": "program_system_pricing_model_acct_programs_program_acct_fk", - "tableFrom": "program_system", - "tableTo": "programs", - "columnsFrom": [ - "pricing_model_acct" - ], - "columnsTo": [ - "program_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "program_system_migrator_acct_programs_program_acct_fk": { - "name": "program_system_migrator_acct_programs_program_acct_fk", - "tableFrom": "program_system", - "tableTo": "programs", - "columnsFrom": [ - "migrator_acct" - ], - "columnsTo": [ - "program_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.programs": { - "name": "programs", - "schema": "", - "columns": { - "program_acct": { - "name": "program_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "version": { - "name": "version", - "type": "double precision", - "primaryKey": false, - "notNull": true - }, - "program_name": { - "name": "program_name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "deployed_at": { - "name": "deployed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "program_version": { - "name": "program_version", - "nullsNotDistinct": false, - "columns": [ - "program_acct", - "version" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.proposal_details": { - "name": "proposal_details", - "schema": "", - "columns": { - "proposal_id": { - "name": "proposal_id", - "type": "bigint", - "primaryKey": true, - "notNull": true - }, - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "slug": { - "name": "slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "categories": { - "name": "categories", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "proposer_acct": { - "name": "proposer_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "base_cond_vault_acct": { - "name": "base_cond_vault_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "quote_cond_vault_acct": { - "name": "quote_cond_vault_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "pass_market_acct": { - "name": "pass_market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "fail_market_acct": { - "name": "fail_market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "proposal_details_proposal_acct_proposals_proposal_acct_fk": { - "name": "proposal_details_proposal_acct_proposals_proposal_acct_fk", - "tableFrom": "proposal_details", - "tableTo": "proposals", - "columnsFrom": [ - "proposal_acct" - ], - "columnsTo": [ - "proposal_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "proposal_details_slug_unique": { - "name": "proposal_details_slug_unique", - "nullsNotDistinct": false, - "columns": [ - "slug" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.proposals": { - "name": "proposals", - "schema": "", - "columns": { - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "dao_acct": { - "name": "dao_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "proposal_num": { - "name": "proposal_num", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "autocrat_version": { - "name": "autocrat_version", - "type": "double precision", - "primaryKey": false, - "notNull": true - }, - "proposer_acct": { - "name": "proposer_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "initial_slot": { - "name": "initial_slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "end_slot": { - "name": "end_slot", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description_url": { - "name": "description_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "pricing_model_pass_acct": { - "name": "pricing_model_pass_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "pricing_model_fail_acct": { - "name": "pricing_model_fail_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "pass_market_acct": { - "name": "pass_market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "fail_market_acct": { - "name": "fail_market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "base_vault": { - "name": "base_vault", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "quote_vault": { - "name": "quote_vault", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "duration_in_slots": { - "name": "duration_in_slots", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "pass_threshold_bps": { - "name": "pass_threshold_bps", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "twap_initial_observation": { - "name": "twap_initial_observation", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "twap_max_observation_change_per_update": { - "name": "twap_max_observation_change_per_update", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_quote_futarchic_liquidity": { - "name": "min_quote_futarchic_liquidity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_base_futarchic_liquidity": { - "name": "min_base_futarchic_liquidity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ended_at": { - "name": "ended_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "proposals_dao_acct_daos_dao_acct_fk": { - "name": "proposals_dao_acct_daos_dao_acct_fk", - "tableFrom": "proposals", - "tableTo": "daos", - "columnsFrom": [ - "dao_acct" - ], - "columnsTo": [ - "dao_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "proposals_base_vault_conditional_vaults_cond_vault_acct_fk": { - "name": "proposals_base_vault_conditional_vaults_cond_vault_acct_fk", - "tableFrom": "proposals", - "tableTo": "conditional_vaults", - "columnsFrom": [ - "base_vault" - ], - "columnsTo": [ - "cond_vault_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk": { - "name": "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk", - "tableFrom": "proposals", - "tableTo": "conditional_vaults", - "columnsFrom": [ - "quote_vault" - ], - "columnsTo": [ - "cond_vault_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "reaction_id": { - "name": "reaction_id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "reactor_acct": { - "name": "reactor_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "reaction": { - "name": "reaction", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "reactions_comment_id_comments_comment_id_fk": { - "name": "reactions_comment_id_comments_comment_id_fk", - "tableFrom": "reactions", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "comment_id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reactions_proposal_acct_proposals_proposal_acct_fk": { - "name": "reactions_proposal_acct_proposals_proposal_acct_fk", - "tableFrom": "reactions", - "tableTo": "proposals", - "columnsFrom": [ - "proposal_acct" - ], - "columnsTo": [ - "proposal_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_acct": { - "name": "user_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_acct_users_user_acct_fk": { - "name": "sessions_user_acct_users_user_acct_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_acct" - ], - "columnsTo": [ - "user_acct" - ], - "onDelete": "restrict", - "onUpdate": "restrict" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.signature_accounts": { - "name": "signature_accounts", - "schema": "", - "columns": { - "signature": { - "name": "signature", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "account": { - "name": "account", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "inserted_at": { - "name": "inserted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "account_index": { - "name": "account_index", - "columns": [ - { - "expression": "account", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "signature_accounts_signature_account_pk": { - "name": "signature_accounts_signature_account_pk", - "columns": [ - "signature", - "account" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.signatures": { - "name": "signatures", - "schema": "", - "columns": { - "signature": { - "name": "signature", - "type": "varchar(88)", - "primaryKey": true, - "notNull": true - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "did_err": { - "name": "did_err", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "err": { - "name": "err", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "block_time": { - "name": "block_time", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "inserted_at": { - "name": "inserted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "seq_num": { - "name": "seq_num", - "type": "bigserial", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "slot_index": { - "name": "slot_index", - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "sequence_num_index": { - "name": "sequence_num_index", - "columns": [ - { - "expression": "seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "signatures_seq_num_unique": { - "name": "signatures_seq_num_unique", - "nullsNotDistinct": false, - "columns": [ - "seq_num" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.takes": { - "name": "takes", - "schema": "", - "columns": { - "take_id": { - "name": "take_id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "order_tx_sig": { - "name": "order_tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "base_amount": { - "name": "base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "quote_price": { - "name": "quote_price", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "taker_base_fee": { - "name": "taker_base_fee", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "taker_quote_fee": { - "name": "taker_quote_fee", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "maker_order_tx_sig": { - "name": "maker_order_tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "maker_base_fee": { - "name": "maker_base_fee", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "maker_quote_fee": { - "name": "maker_quote_fee", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "order_block": { - "name": "order_block", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "order_time": { - "name": "order_time", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "block_index": { - "name": "block_index", - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_block", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "time_index": { - "name": "time_index", - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_time", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "maker_index": { - "name": "maker_index", - "columns": [ - { - "expression": "maker_order_tx_sig", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "takes_order_tx_sig_orders_order_tx_sig_fk": { - "name": "takes_order_tx_sig_orders_order_tx_sig_fk", - "tableFrom": "takes", - "tableTo": "orders", - "columnsFrom": [ - "order_tx_sig" - ], - "columnsTo": [ - "order_tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "takes_maker_order_tx_sig_makes_order_tx_sig_fk": { - "name": "takes_maker_order_tx_sig_makes_order_tx_sig_fk", - "tableFrom": "takes", - "tableTo": "makes", - "columnsFrom": [ - "maker_order_tx_sig" - ], - "columnsTo": [ - "order_tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "takes_market_acct_markets_market_acct_fk": { - "name": "takes_market_acct_markets_market_acct_fk", - "tableFrom": "takes", - "tableTo": "markets", - "columnsFrom": [ - "market_acct" - ], - "columnsTo": [ - "market_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.token_acct_balances": { - "name": "token_acct_balances", - "schema": "", - "columns": { - "token_acct": { - "name": "token_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "mint_acct": { - "name": "mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "owner_acct": { - "name": "owner_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "amount": { - "name": "amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "delta": { - "name": "delta", - "type": "numeric", - "primaryKey": false, - "notNull": true, - "default": "0" - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "tx_sig": { - "name": "tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "acct_amount_created": { - "name": "acct_amount_created", - "columns": [ - { - "expression": "token_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amount", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "token_acct_balances_token_acct_token_accts_token_acct_fk": { - "name": "token_acct_balances_token_acct_token_accts_token_acct_fk", - "tableFrom": "token_acct_balances", - "tableTo": "token_accts", - "columnsFrom": [ - "token_acct" - ], - "columnsTo": [ - "token_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "token_acct_balances_mint_acct_tokens_mint_acct_fk": { - "name": "token_acct_balances_mint_acct_tokens_mint_acct_fk", - "tableFrom": "token_acct_balances", - "tableTo": "tokens", - "columnsFrom": [ - "mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "token_acct_balances_tx_sig_transactions_tx_sig_fk": { - "name": "token_acct_balances_tx_sig_transactions_tx_sig_fk", - "tableFrom": "token_acct_balances", - "tableTo": "transactions", - "columnsFrom": [ - "tx_sig" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "token_acct_balances_token_acct_mint_acct_amount_created_at_pk": { - "name": "token_acct_balances_token_acct_mint_acct_amount_created_at_pk", - "columns": [ - "token_acct", - "mint_acct", - "amount", - "created_at" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.token_accts": { - "name": "token_accts", - "schema": "", - "columns": { - "amount": { - "name": "amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "mint_acct": { - "name": "mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "owner_acct": { - "name": "owner_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar", - "primaryKey": false, - "notNull": false, - "default": "'enabled'" - }, - "token_acct": { - "name": "token_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "token_accts_mint_acct_tokens_mint_acct_fk": { - "name": "token_accts_mint_acct_tokens_mint_acct_fk", - "tableFrom": "token_accts", - "tableTo": "tokens", - "columnsFrom": [ - "mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tokens": { - "name": "tokens", - "schema": "", - "columns": { - "mint_acct": { - "name": "mint_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(30)", - "primaryKey": false, - "notNull": true - }, - "symbol": { - "name": "symbol", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true - }, - "supply": { - "name": "supply", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "decimals": { - "name": "decimals", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "image_url": { - "name": "image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.transaction_watcher_transactions": { - "name": "transaction_watcher_transactions", - "schema": "", - "columns": { - "watcher_acct": { - "name": "watcher_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "tx_sig": { - "name": "tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "watcher_slot_index": { - "name": "watcher_slot_index", - "columns": [ - { - "expression": "watcher_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk": { - "name": "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk", - "tableFrom": "transaction_watcher_transactions", - "tableTo": "transaction_watchers", - "columnsFrom": [ - "watcher_acct" - ], - "columnsTo": [ - "acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk": { - "name": "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk", - "tableFrom": "transaction_watcher_transactions", - "tableTo": "transactions", - "columnsFrom": [ - "tx_sig" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "transaction_watcher_transactions_watcher_acct_tx_sig_pk": { - "name": "transaction_watcher_transactions_watcher_acct_tx_sig_pk", - "columns": [ - "watcher_acct", - "tx_sig" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.transaction_watchers": { - "name": "transaction_watchers", - "schema": "", - "columns": { - "acct": { - "name": "acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "latest_tx_sig": { - "name": "latest_tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "first_tx_sig": { - "name": "first_tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "checked_up_to_slot": { - "name": "checked_up_to_slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "serializer_logic_version": { - "name": "serializer_logic_version", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar", - "primaryKey": false, - "notNull": true, - "default": "'disabled'" - }, - "failure_log": { - "name": "failure_log", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk": { - "name": "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk", - "tableFrom": "transaction_watchers", - "tableTo": "transactions", - "columnsFrom": [ - "latest_tx_sig" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "transaction_watchers_first_tx_sig_transactions_tx_sig_fk": { - "name": "transaction_watchers_first_tx_sig_transactions_tx_sig_fk", - "tableFrom": "transaction_watchers", - "tableTo": "transactions", - "columnsFrom": [ - "first_tx_sig" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.transactions": { - "name": "transactions", - "schema": "", - "columns": { - "tx_sig": { - "name": "tx_sig", - "type": "varchar(88)", - "primaryKey": true, - "notNull": true - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "block_time": { - "name": "block_time", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "failed": { - "name": "failed", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "payload": { - "name": "payload", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "serializer_logic_version": { - "name": "serializer_logic_version", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "main_ix_type": { - "name": "main_ix_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "txn_slot_index": { - "name": "txn_slot_index", - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.twaps": { - "name": "twaps", - "schema": "", - "columns": { - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "updated_slot": { - "name": "updated_slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "observation_agg": { - "name": "observation_agg", - "type": "numeric(40, 0)", - "primaryKey": false, - "notNull": true - }, - "last_observation": { - "name": "last_observation", - "type": "numeric(40, 0)", - "primaryKey": false, - "notNull": false - }, - "last_price": { - "name": "last_price", - "type": "numeric(40, 0)", - "primaryKey": false, - "notNull": false - }, - "token_amount": { - "name": "token_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "twaps_market_acct_markets_market_acct_fk": { - "name": "twaps_market_acct_markets_market_acct_fk", - "tableFrom": "twaps", - "tableTo": "markets", - "columnsFrom": [ - "market_acct" - ], - "columnsTo": [ - "market_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "twaps_proposal_acct_proposals_proposal_acct_fk": { - "name": "twaps_proposal_acct_proposals_proposal_acct_fk", - "tableFrom": "twaps", - "tableTo": "proposals", - "columnsFrom": [ - "proposal_acct" - ], - "columnsTo": [ - "proposal_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "twaps_updated_slot_market_acct_pk": { - "name": "twaps_updated_slot_market_acct_pk", - "columns": [ - "updated_slot", - "market_acct" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_deposits": { - "name": "user_deposits", - "schema": "", - "columns": { - "tx_sig": { - "name": "tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "user_acct": { - "name": "user_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "token_amount": { - "name": "token_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "mint_acct": { - "name": "mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "user_deposits_tx_sig_transactions_tx_sig_fk": { - "name": "user_deposits_tx_sig_transactions_tx_sig_fk", - "tableFrom": "user_deposits", - "tableTo": "transactions", - "columnsFrom": [ - "tx_sig" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "user_deposits_user_acct_users_user_acct_fk": { - "name": "user_deposits_user_acct_users_user_acct_fk", - "tableFrom": "user_deposits", - "tableTo": "users", - "columnsFrom": [ - "user_acct" - ], - "columnsTo": [ - "user_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "user_deposits_mint_acct_tokens_mint_acct_fk": { - "name": "user_deposits_mint_acct_tokens_mint_acct_fk", - "tableFrom": "user_deposits", - "tableTo": "tokens", - "columnsFrom": [ - "mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_performance": { - "name": "user_performance", - "schema": "", - "columns": { - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "user_acct": { - "name": "user_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "dao_acct": { - "name": "dao_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "tokens_bought": { - "name": "tokens_bought", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "tokens_sold": { - "name": "tokens_sold", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "volume_bought": { - "name": "volume_bought", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "volume_sold": { - "name": "volume_sold", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "total_volume": { - "name": "total_volume", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true, - "default": "'0.0'" - }, - "tokens_bought_resolving_market": { - "name": "tokens_bought_resolving_market", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true, - "default": "'0.0'" - }, - "tokens_sold_resolving_market": { - "name": "tokens_sold_resolving_market", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true, - "default": "'0.0'" - }, - "volume_bought_resolving_market": { - "name": "volume_bought_resolving_market", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true, - "default": "'0.0'" - }, - "volume_sold_resolving_market": { - "name": "volume_sold_resolving_market", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true, - "default": "'0.0'" - }, - "buy_orders_count": { - "name": "buy_orders_count", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sell_orders_count": { - "name": "sell_orders_count", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "user_performance_proposal_acct_proposals_proposal_acct_fk": { - "name": "user_performance_proposal_acct_proposals_proposal_acct_fk", - "tableFrom": "user_performance", - "tableTo": "proposals", - "columnsFrom": [ - "proposal_acct" - ], - "columnsTo": [ - "proposal_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "user_performance_user_acct_users_user_acct_fk": { - "name": "user_performance_user_acct_users_user_acct_fk", - "tableFrom": "user_performance", - "tableTo": "users", - "columnsFrom": [ - "user_acct" - ], - "columnsTo": [ - "user_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "user_performance_dao_acct_daos_dao_acct_fk": { - "name": "user_performance_dao_acct_daos_dao_acct_fk", - "tableFrom": "user_performance", - "tableTo": "daos", - "columnsFrom": [ - "dao_acct" - ], - "columnsTo": [ - "dao_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "user_performance_proposal_acct_user_acct_pk": { - "name": "user_performance_proposal_acct_user_acct_pk", - "columns": [ - "proposal_acct", - "user_acct" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "user_acct": { - "name": "user_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_amms": { - "name": "v0_4_amms", - "schema": "", - "columns": { - "amm_addr": { - "name": "amm_addr", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "created_at_slot": { - "name": "created_at_slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "lp_mint_addr": { - "name": "lp_mint_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "base_mint_addr": { - "name": "base_mint_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "quote_mint_addr": { - "name": "quote_mint_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "base_reserves": { - "name": "base_reserves", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "quote_reserves": { - "name": "quote_reserves", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "latest_amm_seq_num_applied": { - "name": "latest_amm_seq_num_applied", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "inserted_at": { - "name": "inserted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk": { - "name": "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk", - "tableFrom": "v0_4_amms", - "tableTo": "tokens", - "columnsFrom": [ - "lp_mint_addr" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_amms_base_mint_addr_tokens_mint_acct_fk": { - "name": "v0_4_amms_base_mint_addr_tokens_mint_acct_fk", - "tableFrom": "v0_4_amms", - "tableTo": "tokens", - "columnsFrom": [ - "base_mint_addr" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk": { - "name": "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk", - "tableFrom": "v0_4_amms", - "tableTo": "tokens", - "columnsFrom": [ - "quote_mint_addr" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_conditional_vaults": { - "name": "v0_4_conditional_vaults", - "schema": "", - "columns": { - "conditional_vault_addr": { - "name": "conditional_vault_addr", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "question_addr": { - "name": "question_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "underlying_mint_acct": { - "name": "underlying_mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "underlying_token_acct": { - "name": "underlying_token_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "pda_bump": { - "name": "pda_bump", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "latest_vault_seq_num_applied": { - "name": "latest_vault_seq_num_applied", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk": { - "name": "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk", - "tableFrom": "v0_4_conditional_vaults", - "tableTo": "v0_4_questions", - "columnsFrom": [ - "question_addr" - ], - "columnsTo": [ - "question_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { - "name": "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", - "tableFrom": "v0_4_conditional_vaults", - "tableTo": "tokens", - "columnsFrom": [ - "underlying_mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk": { - "name": "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk", - "tableFrom": "v0_4_conditional_vaults", - "tableTo": "token_accts", - "columnsFrom": [ - "underlying_token_acct" - ], - "columnsTo": [ - "token_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_merges": { - "name": "v0_4_merges", - "schema": "", - "columns": { - "vault_addr": { - "name": "vault_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "vault_seq_num": { - "name": "vault_seq_num", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "signature": { - "name": "signature", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "amount": { - "name": "amount", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "merge_vault_index": { - "name": "merge_vault_index", - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "merge_signature_index": { - "name": "merge_signature_index", - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "merge_seq_num_vault_index": { - "name": "merge_seq_num_vault_index", - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { - "name": "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", - "tableFrom": "v0_4_merges", - "tableTo": "v0_4_conditional_vaults", - "columnsFrom": [ - "vault_addr" - ], - "columnsTo": [ - "conditional_vault_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_merges_signature_signatures_signature_fk": { - "name": "v0_4_merges_signature_signatures_signature_fk", - "tableFrom": "v0_4_merges", - "tableTo": "signatures", - "columnsFrom": [ - "signature" - ], - "columnsTo": [ - "signature" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_metric_decisions": { - "name": "v0_4_metric_decisions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "bigserial", - "primaryKey": true, - "notNull": true - }, - "dao_id": { - "name": "dao_id", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "recipient": { - "name": "recipient", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "outcome_question_addr": { - "name": "outcome_question_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "metric_question_addr": { - "name": "metric_question_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "outcome_vault_addr": { - "name": "outcome_vault_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "metric_vault_addr": { - "name": "metric_vault_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "amm_addr": { - "name": "amm_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "market_opened": { - "name": "market_opened", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "grant_awarded": { - "name": "grant_awarded", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "committee_evaluation": { - "name": "committee_evaluation", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "score_term": { - "name": "score_term", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'effective'" - }, - "score_unit": { - "name": "score_unit", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "score_max_value": { - "name": "score_max_value", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": false - }, - "score_min_value": { - "name": "score_min_value", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk": { - "name": "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk", - "tableFrom": "v0_4_metric_decisions", - "tableTo": "dao_details", - "columnsFrom": [ - "dao_id" - ], - "columnsTo": [ - "dao_id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk": { - "name": "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk", - "tableFrom": "v0_4_metric_decisions", - "tableTo": "v0_4_questions", - "columnsFrom": [ - "outcome_question_addr" - ], - "columnsTo": [ - "question_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk": { - "name": "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk", - "tableFrom": "v0_4_metric_decisions", - "tableTo": "v0_4_questions", - "columnsFrom": [ - "metric_question_addr" - ], - "columnsTo": [ - "question_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { - "name": "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", - "tableFrom": "v0_4_metric_decisions", - "tableTo": "v0_4_conditional_vaults", - "columnsFrom": [ - "outcome_vault_addr" - ], - "columnsTo": [ - "conditional_vault_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { - "name": "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", - "tableFrom": "v0_4_metric_decisions", - "tableTo": "v0_4_conditional_vaults", - "columnsFrom": [ - "metric_vault_addr" - ], - "columnsTo": [ - "conditional_vault_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk": { - "name": "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk", - "tableFrom": "v0_4_metric_decisions", - "tableTo": "v0_4_amms", - "columnsFrom": [ - "amm_addr" - ], - "columnsTo": [ - "amm_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_questions": { - "name": "v0_4_questions", - "schema": "", - "columns": { - "question_addr": { - "name": "question_addr", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "is_resolved": { - "name": "is_resolved", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "oracle_addr": { - "name": "oracle_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "num_outcomes": { - "name": "num_outcomes", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "payout_numerators": { - "name": "payout_numerators", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "payout_denominator": { - "name": "payout_denominator", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "question_id": { - "name": "question_id", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_splits": { - "name": "v0_4_splits", - "schema": "", - "columns": { - "vault_addr": { - "name": "vault_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "vault_seq_num": { - "name": "vault_seq_num", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "signature": { - "name": "signature", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "amount": { - "name": "amount", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "split_vault_index": { - "name": "split_vault_index", - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "split_signature_index": { - "name": "split_signature_index", - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "split_seq_num_vault_index": { - "name": "split_seq_num_vault_index", - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { - "name": "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", - "tableFrom": "v0_4_splits", - "tableTo": "v0_4_conditional_vaults", - "columnsFrom": [ - "vault_addr" - ], - "columnsTo": [ - "conditional_vault_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_splits_signature_signatures_signature_fk": { - "name": "v0_4_splits_signature_signatures_signature_fk", - "tableFrom": "v0_4_splits", - "tableTo": "signatures", - "columnsFrom": [ - "signature" - ], - "columnsTo": [ - "signature" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_swaps": { - "name": "v0_4_swaps", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "bigserial", - "primaryKey": true, - "notNull": true - }, - "signature": { - "name": "signature", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "block_time": { - "name": "block_time", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "swap_type": { - "name": "swap_type", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "amm_addr": { - "name": "amm_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "user_addr": { - "name": "user_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "amm_seq_num": { - "name": "amm_seq_num", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "input_amount": { - "name": "input_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "output_amount": { - "name": "output_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "amm_index": { - "name": "amm_index", - "columns": [ - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "signature_index": { - "name": "signature_index", - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "seq_num_amm_index": { - "name": "seq_num_amm_index", - "columns": [ - { - "expression": "amm_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": { - "public.prices_chart_data": { - "columns": { - "interv": { - "name": "interv", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "price": { - "name": "price", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "base_amount": { - "name": "base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "quote_amount": { - "name": "quote_amount", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "prices_type": { - "name": "prices_type", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - } - }, - "definition": "\n SELECT\n TIME_BUCKET('30 SECONDS'::INTERVAL, prices.created_at) AS interv,\n last(price, prices.created_at) FILTER(WHERE prices.created_at IS NOT NULL AND CASE WHEN prices_type = 'spot' THEN TRUE ELSE prices.created_at <= markets.created_at + '5 DAYS'::INTERVAL END) AS price,\n last(base_amount, prices.created_at) FILTER(WHERE prices.created_at IS NOT NULL AND CASE WHEN prices_type = 'spot' THEN TRUE ELSE prices.created_at <= markets.created_at + '5 DAYS'::INTERVAL END) AS base_amount,\n last(quote_amount, prices.created_at) FILTER(WHERE prices.created_at IS NOT NULL AND CASE WHEN prices_type = 'spot' THEN TRUE ELSE prices.created_at <= markets.created_at + '5 DAYS'::INTERVAL END) AS quote_amount,\n prices_type,\n prices.market_acct AS market_acct\n FROM prices\n JOIN markets ON markets.market_acct = prices.market_acct\n WHERE CASE WHEN prices_type = 'spot' THEN TRUE ELSE prices.created_at <= markets.created_at + '5 DAYS'::INTERVAL END\n GROUP BY interv, prices.market_acct, prices_type\n ", - "name": "prices_chart_data", - "schema": "public", - "isExisting": false, - "materialized": false - }, - "public.proposal_total_trade_volume": { - "columns": { - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "pass_volume": { - "name": "pass_volume", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "fail_volume": { - "name": "fail_volume", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "pass_market_acct": { - "name": "pass_market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "fail_market_acct": { - "name": "fail_market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - } - }, - "definition": "\n WITH pass_market AS (\n SELECT\n \t proposal_acct,\n \t orders.market_acct AS pass_market_acct,\n TIME_BUCKET('1 DAYS'::INTERVAL, orders.order_time) AS interv,\n SUM(filled_base_amount * quote_price) FILTER(WHERE orders.order_time IS NOT NULL) AS pass_volume\n FROM proposals\n JOIN orders\n ON proposals.pass_market_acct = orders.market_acct\n GROUP BY proposal_acct, interv, orders.market_acct\n ),\n fail_market AS (\n SELECT\n \t proposal_acct,\n \t orders.market_acct AS fail_market_acct,\n TIME_BUCKET('1 DAYS'::INTERVAL, orders.order_time) AS interv,\n SUM(filled_base_amount * quote_price) FILTER(WHERE orders.order_time IS NOT NULL) AS fail_volume\n FROM proposals\n JOIN orders\n ON proposals.fail_market_acct = orders.market_acct\n GROUP BY proposal_acct, interv, orders.market_acct\n )\n SELECT\n pass_market.proposal_acct AS proposal_acct,\n pass_market_acct,\n fail_market_acct,\n SUM(pass_volume) AS pass_volume,\n SUM(fail_volume) AS fail_volume\n FROM pass_market\n JOIN fail_market ON fail_market.proposal_acct = pass_market.proposal_acct\n GROUP BY pass_market.proposal_acct, pass_market_acct, fail_market_acct\n ", - "name": "proposal_total_trade_volume", - "schema": "public", - "isExisting": false, - "materialized": false - }, - "public.twap_chart_data": { - "columns": { - "interv": { - "name": "interv", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "token_amount": { - "name": "token_amount", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - } - }, - "definition": "\n SELECT\n TIME_BUCKET('30 SECONDS'::INTERVAL, \"twaps\".\"created_at\") AS interv,\n last(token_amount, \"twaps\".\"created_at\") FILTER(WHERE \"twaps\".\"created_at\" IS NOT NULL AND \"twaps\".\"created_at\" <= \"markets\".\"created_at\" + '5 DAYS'::INTERVAL) AS token_amount,\n \"twaps\".\"market_acct\" AS market_acct\n FROM \"twaps\"\n JOIN \"markets\" ON \"markets\".\"market_acct\" = \"twaps\".\"market_acct\"\n WHERE \"twaps\".\"created_at\" <= \"markets\".\"created_at\" + '5 DAYS'::INTERVAL\n GROUP BY interv, \"twaps\".\"market_acct\"\n ", - "name": "twap_chart_data", - "schema": "public", - "isExisting": false, - "materialized": false - } - }, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/database/drizzle/meta/0010_snapshot.json b/packages/database/drizzle/meta/0010_snapshot.json deleted file mode 100644 index 2101caa4..00000000 --- a/packages/database/drizzle/meta/0010_snapshot.json +++ /dev/null @@ -1,4206 +0,0 @@ -{ - "id": "6ddffb31-c14b-4465-8421-203b9da81ed5", - "prevId": "65af4022-ecf9-46c1-9bae-811755bf4197", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.candles": { - "name": "candles", - "schema": "", - "columns": { - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "candle_duration": { - "name": "candle_duration", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "timestamp": { - "name": "timestamp", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "volume": { - "name": "volume", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "open": { - "name": "open", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "high": { - "name": "high", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "low": { - "name": "low", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "close": { - "name": "close", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "candle_average": { - "name": "candle_average", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "cond_market_twap": { - "name": "cond_market_twap", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "candles_market_acct_markets_market_acct_fk": { - "name": "candles_market_acct_markets_market_acct_fk", - "tableFrom": "candles", - "tableTo": "markets", - "columnsFrom": [ - "market_acct" - ], - "columnsTo": [ - "market_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "candles_market_acct_candle_duration_timestamp_pk": { - "name": "candles_market_acct_candle_duration_timestamp_pk", - "columns": [ - "market_acct", - "candle_duration", - "timestamp" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "comment_id": { - "name": "comment_id", - "type": "bigint", - "primaryKey": true, - "notNull": true - }, - "commentor_acct": { - "name": "commentor_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "responding_comment_id": { - "name": "responding_comment_id", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "comments_proposal_acct_proposals_proposal_acct_fk": { - "name": "comments_proposal_acct_proposals_proposal_acct_fk", - "tableFrom": "comments", - "tableTo": "proposals", - "columnsFrom": [ - "proposal_acct" - ], - "columnsTo": [ - "proposal_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "comments_responding_comment_id_comments_comment_id_fk": { - "name": "comments_responding_comment_id_comments_comment_id_fk", - "tableFrom": "comments", - "tableTo": "comments", - "columnsFrom": [ - "responding_comment_id" - ], - "columnsTo": [ - "comment_id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comments_comment_id_unique": { - "name": "comments_comment_id_unique", - "nullsNotDistinct": false, - "columns": [ - "comment_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.conditional_vaults": { - "name": "conditional_vaults", - "schema": "", - "columns": { - "cond_vault_acct": { - "name": "cond_vault_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "settlement_authority": { - "name": "settlement_authority", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "underlying_mint_acct": { - "name": "underlying_mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "underlying_token_acct": { - "name": "underlying_token_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "nonce": { - "name": "nonce", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "cond_finalize_token_mint_acct": { - "name": "cond_finalize_token_mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "cond_revert_token_mint_acct": { - "name": "cond_revert_token_mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { - "name": "conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", - "tableFrom": "conditional_vaults", - "tableTo": "tokens", - "columnsFrom": [ - "underlying_mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.dao_details": { - "name": "dao_details", - "schema": "", - "columns": { - "dao_id": { - "name": "dao_id", - "type": "bigint", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "slug": { - "name": "slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "x_account": { - "name": "x_account", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "github": { - "name": "github", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "creator_acct": { - "name": "creator_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "admin_accts": { - "name": "admin_accts", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "token_image_url": { - "name": "token_image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "pass_token_image_url": { - "name": "pass_token_image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "fail_token_image_url": { - "name": "fail_token_image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "lp_token_image_url": { - "name": "lp_token_image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "is_hide": { - "name": "is_hide", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "socials": { - "name": "socials", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "organization_id": { - "name": "organization_id", - "type": "bigint", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "dao_details_organization_id_organizations_organization_id_fk": { - "name": "dao_details_organization_id_organizations_organization_id_fk", - "tableFrom": "dao_details", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "organization_id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "dao_details_name_unique": { - "name": "dao_details_name_unique", - "nullsNotDistinct": false, - "columns": [ - "name" - ] - }, - "dao_details_slug_unique": { - "name": "dao_details_slug_unique", - "nullsNotDistinct": false, - "columns": [ - "slug" - ] - }, - "dao_details_url_unique": { - "name": "dao_details_url_unique", - "nullsNotDistinct": false, - "columns": [ - "url" - ] - }, - "dao_details_x_account_unique": { - "name": "dao_details_x_account_unique", - "nullsNotDistinct": false, - "columns": [ - "x_account" - ] - }, - "dao_details_github_unique": { - "name": "dao_details_github_unique", - "nullsNotDistinct": false, - "columns": [ - "github" - ] - }, - "id_name_url": { - "name": "id_name_url", - "nullsNotDistinct": false, - "columns": [ - "dao_id", - "url", - "name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.daos": { - "name": "daos", - "schema": "", - "columns": { - "dao_acct": { - "name": "dao_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "program_acct": { - "name": "program_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "dao_id": { - "name": "dao_id", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "base_acct": { - "name": "base_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "quote_acct": { - "name": "quote_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "treasury_acct": { - "name": "treasury_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "slots_per_proposal": { - "name": "slots_per_proposal", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "pass_threshold_bps": { - "name": "pass_threshold_bps", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "twap_initial_observation": { - "name": "twap_initial_observation", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "twap_max_observation_change_per_update": { - "name": "twap_max_observation_change_per_update", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_quote_futarchic_liquidity": { - "name": "min_quote_futarchic_liquidity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_base_futarchic_liquidity": { - "name": "min_base_futarchic_liquidity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_primary": { - "name": "is_primary", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "organization_id": { - "name": "organization_id", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "colors": { - "name": "colors", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "daos_program_acct_programs_program_acct_fk": { - "name": "daos_program_acct_programs_program_acct_fk", - "tableFrom": "daos", - "tableTo": "programs", - "columnsFrom": [ - "program_acct" - ], - "columnsTo": [ - "program_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "daos_dao_id_dao_details_dao_id_fk": { - "name": "daos_dao_id_dao_details_dao_id_fk", - "tableFrom": "daos", - "tableTo": "dao_details", - "columnsFrom": [ - "dao_id" - ], - "columnsTo": [ - "dao_id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "daos_base_acct_tokens_mint_acct_fk": { - "name": "daos_base_acct_tokens_mint_acct_fk", - "tableFrom": "daos", - "tableTo": "tokens", - "columnsFrom": [ - "base_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "daos_quote_acct_tokens_mint_acct_fk": { - "name": "daos_quote_acct_tokens_mint_acct_fk", - "tableFrom": "daos", - "tableTo": "tokens", - "columnsFrom": [ - "quote_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "daos_organization_id_organizations_organization_id_fk": { - "name": "daos_organization_id_organizations_organization_id_fk", - "tableFrom": "daos", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "organization_id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "daos_treasury_acct_unique": { - "name": "daos_treasury_acct_unique", - "nullsNotDistinct": false, - "columns": [ - "treasury_acct" - ] - }, - "dao_acct_program": { - "name": "dao_acct_program", - "nullsNotDistinct": false, - "columns": [ - "dao_acct", - "program_acct" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.indexer_account_dependencies": { - "name": "indexer_account_dependencies", - "schema": "", - "columns": { - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "acct": { - "name": "acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "latest_tx_sig_processed": { - "name": "latest_tx_sig_processed", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "varchar", - "primaryKey": false, - "notNull": false, - "default": "'active'" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "indexer_account_dependencies_name_indexers_name_fk": { - "name": "indexer_account_dependencies_name_indexers_name_fk", - "tableFrom": "indexer_account_dependencies", - "tableTo": "indexers", - "columnsFrom": [ - "name" - ], - "columnsTo": [ - "name" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk": { - "name": "indexer_account_dependencies_latest_tx_sig_processed_transactions_tx_sig_fk", - "tableFrom": "indexer_account_dependencies", - "tableTo": "transactions", - "columnsFrom": [ - "latest_tx_sig_processed" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "indexer_account_dependencies_name_acct_pk": { - "name": "indexer_account_dependencies_name_acct_pk", - "columns": [ - "name", - "acct" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.indexers": { - "name": "indexers", - "schema": "", - "columns": { - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": true, - "notNull": true - }, - "implementation": { - "name": "implementation", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "latest_slot_processed": { - "name": "latest_slot_processed", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "latest_tx_sig_processed": { - "name": "latest_tx_sig_processed", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "indexer_type": { - "name": "indexer_type", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.makes": { - "name": "makes", - "schema": "", - "columns": { - "order_tx_sig": { - "name": "order_tx_sig", - "type": "varchar(88)", - "primaryKey": true, - "notNull": true - }, - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "unfilled_base_amount": { - "name": "unfilled_base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "filled_base_amount": { - "name": "filled_base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "quote_price": { - "name": "quote_price", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "market_index": { - "name": "market_index", - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "makes_order_tx_sig_orders_order_tx_sig_fk": { - "name": "makes_order_tx_sig_orders_order_tx_sig_fk", - "tableFrom": "makes", - "tableTo": "orders", - "columnsFrom": [ - "order_tx_sig" - ], - "columnsTo": [ - "order_tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "makes_market_acct_markets_market_acct_fk": { - "name": "makes_market_acct_markets_market_acct_fk", - "tableFrom": "makes", - "tableTo": "markets", - "columnsFrom": [ - "market_acct" - ], - "columnsTo": [ - "market_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.markets": { - "name": "markets", - "schema": "", - "columns": { - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "market_type": { - "name": "market_type", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "create_tx_sig": { - "name": "create_tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "base_mint_acct": { - "name": "base_mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "quote_mint_acct": { - "name": "quote_mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "base_lot_size": { - "name": "base_lot_size", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "quote_lot_size": { - "name": "quote_lot_size", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "quote_tick_size": { - "name": "quote_tick_size", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "bids_token_acct": { - "name": "bids_token_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "asks_token_acct": { - "name": "asks_token_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "base_maker_fee": { - "name": "base_maker_fee", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "base_taker_fee": { - "name": "base_taker_fee", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "quote_maker_fee": { - "name": "quote_maker_fee", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "quote_taker_fee": { - "name": "quote_taker_fee", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "active_slot": { - "name": "active_slot", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "inactive_slot": { - "name": "inactive_slot", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "markets_proposal_acct_proposals_proposal_acct_fk": { - "name": "markets_proposal_acct_proposals_proposal_acct_fk", - "tableFrom": "markets", - "tableTo": "proposals", - "columnsFrom": [ - "proposal_acct" - ], - "columnsTo": [ - "proposal_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "markets_base_mint_acct_tokens_mint_acct_fk": { - "name": "markets_base_mint_acct_tokens_mint_acct_fk", - "tableFrom": "markets", - "tableTo": "tokens", - "columnsFrom": [ - "base_mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "markets_quote_mint_acct_tokens_mint_acct_fk": { - "name": "markets_quote_mint_acct_tokens_mint_acct_fk", - "tableFrom": "markets", - "tableTo": "tokens", - "columnsFrom": [ - "quote_mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "markets_bids_token_acct_token_accts_token_acct_fk": { - "name": "markets_bids_token_acct_token_accts_token_acct_fk", - "tableFrom": "markets", - "tableTo": "token_accts", - "columnsFrom": [ - "bids_token_acct" - ], - "columnsTo": [ - "token_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "markets_asks_token_acct_token_accts_token_acct_fk": { - "name": "markets_asks_token_acct_token_accts_token_acct_fk", - "tableFrom": "markets", - "tableTo": "token_accts", - "columnsFrom": [ - "asks_token_acct" - ], - "columnsTo": [ - "token_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.orders": { - "name": "orders", - "schema": "", - "columns": { - "order_tx_sig": { - "name": "order_tx_sig", - "type": "varchar(88)", - "primaryKey": true, - "notNull": true - }, - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "actor_acct": { - "name": "actor_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "side": { - "name": "side", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "unfilled_base_amount": { - "name": "unfilled_base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "filled_base_amount": { - "name": "filled_base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "quote_price": { - "name": "quote_price", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "order_block": { - "name": "order_block", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "order_time": { - "name": "order_time", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "cancel_tx_sig": { - "name": "cancel_tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "cancel_block": { - "name": "cancel_block", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cancel_time": { - "name": "cancel_time", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "actor_index": { - "name": "actor_index", - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "actor_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "orders_order_tx_sig_transactions_tx_sig_fk": { - "name": "orders_order_tx_sig_transactions_tx_sig_fk", - "tableFrom": "orders", - "tableTo": "transactions", - "columnsFrom": [ - "order_tx_sig" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "orders_market_acct_markets_market_acct_fk": { - "name": "orders_market_acct_markets_market_acct_fk", - "tableFrom": "orders", - "tableTo": "markets", - "columnsFrom": [ - "market_acct" - ], - "columnsTo": [ - "market_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "orders_actor_acct_users_user_acct_fk": { - "name": "orders_actor_acct_users_user_acct_fk", - "tableFrom": "orders", - "tableTo": "users", - "columnsFrom": [ - "actor_acct" - ], - "columnsTo": [ - "user_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.organizations": { - "name": "organizations", - "schema": "", - "columns": { - "organization_id": { - "name": "organization_id", - "type": "bigserial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "creator_acct": { - "name": "creator_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "admin_accts": { - "name": "admin_accts", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "is_hide": { - "name": "is_hide", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "socials": { - "name": "socials", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "organizations_name_unique": { - "name": "organizations_name_unique", - "nullsNotDistinct": false, - "columns": [ - "name" - ] - }, - "organizations_slug_unique": { - "name": "organizations_slug_unique", - "nullsNotDistinct": false, - "columns": [ - "slug" - ] - }, - "organizations_url_unique": { - "name": "organizations_url_unique", - "nullsNotDistinct": false, - "columns": [ - "url" - ] - }, - "id_name_url": { - "name": "id_name_url", - "nullsNotDistinct": false, - "columns": [ - "organization_id", - "url", - "name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.prices": { - "name": "prices", - "schema": "", - "columns": { - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "updated_slot": { - "name": "updated_slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "base_amount": { - "name": "base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "quote_amount": { - "name": "quote_amount", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "price": { - "name": "price", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_by": { - "name": "created_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "prices_type": { - "name": "prices_type", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "prices_market_acct_markets_market_acct_fk": { - "name": "prices_market_acct_markets_market_acct_fk", - "tableFrom": "prices", - "tableTo": "markets", - "columnsFrom": [ - "market_acct" - ], - "columnsTo": [ - "market_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "prices_created_at_market_acct_pk": { - "name": "prices_created_at_market_acct_pk", - "columns": [ - "created_at", - "market_acct" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.program_system": { - "name": "program_system", - "schema": "", - "columns": { - "system_version": { - "name": "system_version", - "type": "double precision", - "primaryKey": true, - "notNull": true - }, - "autocrat_acct": { - "name": "autocrat_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "conditional_vault_acct": { - "name": "conditional_vault_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "pricing_model_acct": { - "name": "pricing_model_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "migrator_acct": { - "name": "migrator_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "program_system_autocrat_acct_programs_program_acct_fk": { - "name": "program_system_autocrat_acct_programs_program_acct_fk", - "tableFrom": "program_system", - "tableTo": "programs", - "columnsFrom": [ - "autocrat_acct" - ], - "columnsTo": [ - "program_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "program_system_conditional_vault_acct_programs_program_acct_fk": { - "name": "program_system_conditional_vault_acct_programs_program_acct_fk", - "tableFrom": "program_system", - "tableTo": "programs", - "columnsFrom": [ - "conditional_vault_acct" - ], - "columnsTo": [ - "program_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "program_system_pricing_model_acct_programs_program_acct_fk": { - "name": "program_system_pricing_model_acct_programs_program_acct_fk", - "tableFrom": "program_system", - "tableTo": "programs", - "columnsFrom": [ - "pricing_model_acct" - ], - "columnsTo": [ - "program_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "program_system_migrator_acct_programs_program_acct_fk": { - "name": "program_system_migrator_acct_programs_program_acct_fk", - "tableFrom": "program_system", - "tableTo": "programs", - "columnsFrom": [ - "migrator_acct" - ], - "columnsTo": [ - "program_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.programs": { - "name": "programs", - "schema": "", - "columns": { - "program_acct": { - "name": "program_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "version": { - "name": "version", - "type": "double precision", - "primaryKey": false, - "notNull": true - }, - "program_name": { - "name": "program_name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "deployed_at": { - "name": "deployed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "program_version": { - "name": "program_version", - "nullsNotDistinct": false, - "columns": [ - "program_acct", - "version" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.proposal_details": { - "name": "proposal_details", - "schema": "", - "columns": { - "proposal_id": { - "name": "proposal_id", - "type": "bigint", - "primaryKey": true, - "notNull": true - }, - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "slug": { - "name": "slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "categories": { - "name": "categories", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "proposer_acct": { - "name": "proposer_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "base_cond_vault_acct": { - "name": "base_cond_vault_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "quote_cond_vault_acct": { - "name": "quote_cond_vault_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "pass_market_acct": { - "name": "pass_market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "fail_market_acct": { - "name": "fail_market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "proposal_details_proposal_acct_proposals_proposal_acct_fk": { - "name": "proposal_details_proposal_acct_proposals_proposal_acct_fk", - "tableFrom": "proposal_details", - "tableTo": "proposals", - "columnsFrom": [ - "proposal_acct" - ], - "columnsTo": [ - "proposal_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "proposal_details_slug_unique": { - "name": "proposal_details_slug_unique", - "nullsNotDistinct": false, - "columns": [ - "slug" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.proposals": { - "name": "proposals", - "schema": "", - "columns": { - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "dao_acct": { - "name": "dao_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "proposal_num": { - "name": "proposal_num", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "autocrat_version": { - "name": "autocrat_version", - "type": "double precision", - "primaryKey": false, - "notNull": true - }, - "proposer_acct": { - "name": "proposer_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "initial_slot": { - "name": "initial_slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "end_slot": { - "name": "end_slot", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description_url": { - "name": "description_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "pricing_model_pass_acct": { - "name": "pricing_model_pass_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "pricing_model_fail_acct": { - "name": "pricing_model_fail_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "pass_market_acct": { - "name": "pass_market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "fail_market_acct": { - "name": "fail_market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "base_vault": { - "name": "base_vault", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "quote_vault": { - "name": "quote_vault", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "duration_in_slots": { - "name": "duration_in_slots", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "pass_threshold_bps": { - "name": "pass_threshold_bps", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "twap_initial_observation": { - "name": "twap_initial_observation", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "twap_max_observation_change_per_update": { - "name": "twap_max_observation_change_per_update", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_quote_futarchic_liquidity": { - "name": "min_quote_futarchic_liquidity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_base_futarchic_liquidity": { - "name": "min_base_futarchic_liquidity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ended_at": { - "name": "ended_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "proposals_dao_acct_daos_dao_acct_fk": { - "name": "proposals_dao_acct_daos_dao_acct_fk", - "tableFrom": "proposals", - "tableTo": "daos", - "columnsFrom": [ - "dao_acct" - ], - "columnsTo": [ - "dao_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "proposals_base_vault_conditional_vaults_cond_vault_acct_fk": { - "name": "proposals_base_vault_conditional_vaults_cond_vault_acct_fk", - "tableFrom": "proposals", - "tableTo": "conditional_vaults", - "columnsFrom": [ - "base_vault" - ], - "columnsTo": [ - "cond_vault_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk": { - "name": "proposals_quote_vault_conditional_vaults_cond_vault_acct_fk", - "tableFrom": "proposals", - "tableTo": "conditional_vaults", - "columnsFrom": [ - "quote_vault" - ], - "columnsTo": [ - "cond_vault_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "reaction_id": { - "name": "reaction_id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "reactor_acct": { - "name": "reactor_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "reaction": { - "name": "reaction", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "reactions_comment_id_comments_comment_id_fk": { - "name": "reactions_comment_id_comments_comment_id_fk", - "tableFrom": "reactions", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "comment_id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reactions_proposal_acct_proposals_proposal_acct_fk": { - "name": "reactions_proposal_acct_proposals_proposal_acct_fk", - "tableFrom": "reactions", - "tableTo": "proposals", - "columnsFrom": [ - "proposal_acct" - ], - "columnsTo": [ - "proposal_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_acct": { - "name": "user_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_acct_users_user_acct_fk": { - "name": "sessions_user_acct_users_user_acct_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_acct" - ], - "columnsTo": [ - "user_acct" - ], - "onDelete": "restrict", - "onUpdate": "restrict" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.signature_accounts": { - "name": "signature_accounts", - "schema": "", - "columns": { - "signature": { - "name": "signature", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "account": { - "name": "account", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "inserted_at": { - "name": "inserted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "account_index": { - "name": "account_index", - "columns": [ - { - "expression": "account", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "signature_accounts_signature_account_pk": { - "name": "signature_accounts_signature_account_pk", - "columns": [ - "signature", - "account" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.signatures": { - "name": "signatures", - "schema": "", - "columns": { - "signature": { - "name": "signature", - "type": "varchar(88)", - "primaryKey": true, - "notNull": true - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "did_err": { - "name": "did_err", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "err": { - "name": "err", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "block_time": { - "name": "block_time", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "inserted_at": { - "name": "inserted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "seq_num": { - "name": "seq_num", - "type": "bigserial", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "slot_index": { - "name": "slot_index", - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "sequence_num_index": { - "name": "sequence_num_index", - "columns": [ - { - "expression": "seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "signatures_seq_num_unique": { - "name": "signatures_seq_num_unique", - "nullsNotDistinct": false, - "columns": [ - "seq_num" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.takes": { - "name": "takes", - "schema": "", - "columns": { - "take_id": { - "name": "take_id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "order_tx_sig": { - "name": "order_tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "base_amount": { - "name": "base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "quote_price": { - "name": "quote_price", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "taker_base_fee": { - "name": "taker_base_fee", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "taker_quote_fee": { - "name": "taker_quote_fee", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "maker_order_tx_sig": { - "name": "maker_order_tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "maker_base_fee": { - "name": "maker_base_fee", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "maker_quote_fee": { - "name": "maker_quote_fee", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "order_block": { - "name": "order_block", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "order_time": { - "name": "order_time", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "block_index": { - "name": "block_index", - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_block", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "time_index": { - "name": "time_index", - "columns": [ - { - "expression": "market_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "order_time", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "maker_index": { - "name": "maker_index", - "columns": [ - { - "expression": "maker_order_tx_sig", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "takes_order_tx_sig_orders_order_tx_sig_fk": { - "name": "takes_order_tx_sig_orders_order_tx_sig_fk", - "tableFrom": "takes", - "tableTo": "orders", - "columnsFrom": [ - "order_tx_sig" - ], - "columnsTo": [ - "order_tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "takes_maker_order_tx_sig_makes_order_tx_sig_fk": { - "name": "takes_maker_order_tx_sig_makes_order_tx_sig_fk", - "tableFrom": "takes", - "tableTo": "makes", - "columnsFrom": [ - "maker_order_tx_sig" - ], - "columnsTo": [ - "order_tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "takes_market_acct_markets_market_acct_fk": { - "name": "takes_market_acct_markets_market_acct_fk", - "tableFrom": "takes", - "tableTo": "markets", - "columnsFrom": [ - "market_acct" - ], - "columnsTo": [ - "market_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.token_acct_balances": { - "name": "token_acct_balances", - "schema": "", - "columns": { - "token_acct": { - "name": "token_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "mint_acct": { - "name": "mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "owner_acct": { - "name": "owner_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "amount": { - "name": "amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "delta": { - "name": "delta", - "type": "numeric", - "primaryKey": false, - "notNull": true, - "default": "0" - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "tx_sig": { - "name": "tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "acct_amount_created": { - "name": "acct_amount_created", - "columns": [ - { - "expression": "token_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amount", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "token_acct_balances_token_acct_token_accts_token_acct_fk": { - "name": "token_acct_balances_token_acct_token_accts_token_acct_fk", - "tableFrom": "token_acct_balances", - "tableTo": "token_accts", - "columnsFrom": [ - "token_acct" - ], - "columnsTo": [ - "token_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "token_acct_balances_mint_acct_tokens_mint_acct_fk": { - "name": "token_acct_balances_mint_acct_tokens_mint_acct_fk", - "tableFrom": "token_acct_balances", - "tableTo": "tokens", - "columnsFrom": [ - "mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "token_acct_balances_tx_sig_transactions_tx_sig_fk": { - "name": "token_acct_balances_tx_sig_transactions_tx_sig_fk", - "tableFrom": "token_acct_balances", - "tableTo": "transactions", - "columnsFrom": [ - "tx_sig" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "token_acct_balances_token_acct_mint_acct_amount_created_at_pk": { - "name": "token_acct_balances_token_acct_mint_acct_amount_created_at_pk", - "columns": [ - "token_acct", - "mint_acct", - "amount", - "created_at" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.token_accts": { - "name": "token_accts", - "schema": "", - "columns": { - "amount": { - "name": "amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "mint_acct": { - "name": "mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "owner_acct": { - "name": "owner_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar", - "primaryKey": false, - "notNull": false, - "default": "'enabled'" - }, - "token_acct": { - "name": "token_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "token_accts_mint_acct_tokens_mint_acct_fk": { - "name": "token_accts_mint_acct_tokens_mint_acct_fk", - "tableFrom": "token_accts", - "tableTo": "tokens", - "columnsFrom": [ - "mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tokens": { - "name": "tokens", - "schema": "", - "columns": { - "mint_acct": { - "name": "mint_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(30)", - "primaryKey": false, - "notNull": true - }, - "symbol": { - "name": "symbol", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true - }, - "supply": { - "name": "supply", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "decimals": { - "name": "decimals", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "image_url": { - "name": "image_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.transaction_watcher_transactions": { - "name": "transaction_watcher_transactions", - "schema": "", - "columns": { - "watcher_acct": { - "name": "watcher_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "tx_sig": { - "name": "tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "watcher_slot_index": { - "name": "watcher_slot_index", - "columns": [ - { - "expression": "watcher_acct", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk": { - "name": "transaction_watcher_transactions_watcher_acct_transaction_watchers_acct_fk", - "tableFrom": "transaction_watcher_transactions", - "tableTo": "transaction_watchers", - "columnsFrom": [ - "watcher_acct" - ], - "columnsTo": [ - "acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk": { - "name": "transaction_watcher_transactions_tx_sig_transactions_tx_sig_fk", - "tableFrom": "transaction_watcher_transactions", - "tableTo": "transactions", - "columnsFrom": [ - "tx_sig" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "transaction_watcher_transactions_watcher_acct_tx_sig_pk": { - "name": "transaction_watcher_transactions_watcher_acct_tx_sig_pk", - "columns": [ - "watcher_acct", - "tx_sig" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.transaction_watchers": { - "name": "transaction_watchers", - "schema": "", - "columns": { - "acct": { - "name": "acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "latest_tx_sig": { - "name": "latest_tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "first_tx_sig": { - "name": "first_tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": false - }, - "checked_up_to_slot": { - "name": "checked_up_to_slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "serializer_logic_version": { - "name": "serializer_logic_version", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar", - "primaryKey": false, - "notNull": true, - "default": "'disabled'" - }, - "failure_log": { - "name": "failure_log", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk": { - "name": "transaction_watchers_latest_tx_sig_transactions_tx_sig_fk", - "tableFrom": "transaction_watchers", - "tableTo": "transactions", - "columnsFrom": [ - "latest_tx_sig" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "transaction_watchers_first_tx_sig_transactions_tx_sig_fk": { - "name": "transaction_watchers_first_tx_sig_transactions_tx_sig_fk", - "tableFrom": "transaction_watchers", - "tableTo": "transactions", - "columnsFrom": [ - "first_tx_sig" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.transactions": { - "name": "transactions", - "schema": "", - "columns": { - "tx_sig": { - "name": "tx_sig", - "type": "varchar(88)", - "primaryKey": true, - "notNull": true - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "block_time": { - "name": "block_time", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "failed": { - "name": "failed", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "payload": { - "name": "payload", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "serializer_logic_version": { - "name": "serializer_logic_version", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "main_ix_type": { - "name": "main_ix_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "txn_slot_index": { - "name": "txn_slot_index", - "columns": [ - { - "expression": "slot", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.twaps": { - "name": "twaps", - "schema": "", - "columns": { - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": false - }, - "updated_slot": { - "name": "updated_slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "observation_agg": { - "name": "observation_agg", - "type": "numeric(40, 0)", - "primaryKey": false, - "notNull": true - }, - "last_observation": { - "name": "last_observation", - "type": "numeric(40, 0)", - "primaryKey": false, - "notNull": false - }, - "last_price": { - "name": "last_price", - "type": "numeric(40, 0)", - "primaryKey": false, - "notNull": false - }, - "token_amount": { - "name": "token_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "twaps_market_acct_markets_market_acct_fk": { - "name": "twaps_market_acct_markets_market_acct_fk", - "tableFrom": "twaps", - "tableTo": "markets", - "columnsFrom": [ - "market_acct" - ], - "columnsTo": [ - "market_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "twaps_proposal_acct_proposals_proposal_acct_fk": { - "name": "twaps_proposal_acct_proposals_proposal_acct_fk", - "tableFrom": "twaps", - "tableTo": "proposals", - "columnsFrom": [ - "proposal_acct" - ], - "columnsTo": [ - "proposal_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "twaps_updated_slot_market_acct_pk": { - "name": "twaps_updated_slot_market_acct_pk", - "columns": [ - "updated_slot", - "market_acct" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_deposits": { - "name": "user_deposits", - "schema": "", - "columns": { - "tx_sig": { - "name": "tx_sig", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "user_acct": { - "name": "user_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "token_amount": { - "name": "token_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "mint_acct": { - "name": "mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "user_deposits_tx_sig_transactions_tx_sig_fk": { - "name": "user_deposits_tx_sig_transactions_tx_sig_fk", - "tableFrom": "user_deposits", - "tableTo": "transactions", - "columnsFrom": [ - "tx_sig" - ], - "columnsTo": [ - "tx_sig" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "user_deposits_user_acct_users_user_acct_fk": { - "name": "user_deposits_user_acct_users_user_acct_fk", - "tableFrom": "user_deposits", - "tableTo": "users", - "columnsFrom": [ - "user_acct" - ], - "columnsTo": [ - "user_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "user_deposits_mint_acct_tokens_mint_acct_fk": { - "name": "user_deposits_mint_acct_tokens_mint_acct_fk", - "tableFrom": "user_deposits", - "tableTo": "tokens", - "columnsFrom": [ - "mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_performance": { - "name": "user_performance", - "schema": "", - "columns": { - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "user_acct": { - "name": "user_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "dao_acct": { - "name": "dao_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "tokens_bought": { - "name": "tokens_bought", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "tokens_sold": { - "name": "tokens_sold", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "volume_bought": { - "name": "volume_bought", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "volume_sold": { - "name": "volume_sold", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "total_volume": { - "name": "total_volume", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true, - "default": "'0.0'" - }, - "tokens_bought_resolving_market": { - "name": "tokens_bought_resolving_market", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true, - "default": "'0.0'" - }, - "tokens_sold_resolving_market": { - "name": "tokens_sold_resolving_market", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true, - "default": "'0.0'" - }, - "volume_bought_resolving_market": { - "name": "volume_bought_resolving_market", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true, - "default": "'0.0'" - }, - "volume_sold_resolving_market": { - "name": "volume_sold_resolving_market", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true, - "default": "'0.0'" - }, - "buy_orders_count": { - "name": "buy_orders_count", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sell_orders_count": { - "name": "sell_orders_count", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "user_performance_proposal_acct_proposals_proposal_acct_fk": { - "name": "user_performance_proposal_acct_proposals_proposal_acct_fk", - "tableFrom": "user_performance", - "tableTo": "proposals", - "columnsFrom": [ - "proposal_acct" - ], - "columnsTo": [ - "proposal_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "user_performance_user_acct_users_user_acct_fk": { - "name": "user_performance_user_acct_users_user_acct_fk", - "tableFrom": "user_performance", - "tableTo": "users", - "columnsFrom": [ - "user_acct" - ], - "columnsTo": [ - "user_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "user_performance_dao_acct_daos_dao_acct_fk": { - "name": "user_performance_dao_acct_daos_dao_acct_fk", - "tableFrom": "user_performance", - "tableTo": "daos", - "columnsFrom": [ - "dao_acct" - ], - "columnsTo": [ - "dao_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "user_performance_proposal_acct_user_acct_pk": { - "name": "user_performance_proposal_acct_user_acct_pk", - "columns": [ - "proposal_acct", - "user_acct" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "user_acct": { - "name": "user_acct", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_amms": { - "name": "v0_4_amms", - "schema": "", - "columns": { - "amm_addr": { - "name": "amm_addr", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "created_at_slot": { - "name": "created_at_slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "lp_mint_addr": { - "name": "lp_mint_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "base_mint_addr": { - "name": "base_mint_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "quote_mint_addr": { - "name": "quote_mint_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "base_reserves": { - "name": "base_reserves", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "quote_reserves": { - "name": "quote_reserves", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "latest_amm_seq_num_applied": { - "name": "latest_amm_seq_num_applied", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "inserted_at": { - "name": "inserted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk": { - "name": "v0_4_amms_lp_mint_addr_tokens_mint_acct_fk", - "tableFrom": "v0_4_amms", - "tableTo": "tokens", - "columnsFrom": [ - "lp_mint_addr" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_amms_base_mint_addr_tokens_mint_acct_fk": { - "name": "v0_4_amms_base_mint_addr_tokens_mint_acct_fk", - "tableFrom": "v0_4_amms", - "tableTo": "tokens", - "columnsFrom": [ - "base_mint_addr" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk": { - "name": "v0_4_amms_quote_mint_addr_tokens_mint_acct_fk", - "tableFrom": "v0_4_amms", - "tableTo": "tokens", - "columnsFrom": [ - "quote_mint_addr" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_conditional_vaults": { - "name": "v0_4_conditional_vaults", - "schema": "", - "columns": { - "conditional_vault_addr": { - "name": "conditional_vault_addr", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "question_addr": { - "name": "question_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "underlying_mint_acct": { - "name": "underlying_mint_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "underlying_token_acct": { - "name": "underlying_token_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "pda_bump": { - "name": "pda_bump", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "latest_vault_seq_num_applied": { - "name": "latest_vault_seq_num_applied", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk": { - "name": "v0_4_conditional_vaults_question_addr_v0_4_questions_question_addr_fk", - "tableFrom": "v0_4_conditional_vaults", - "tableTo": "v0_4_questions", - "columnsFrom": [ - "question_addr" - ], - "columnsTo": [ - "question_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk": { - "name": "v0_4_conditional_vaults_underlying_mint_acct_tokens_mint_acct_fk", - "tableFrom": "v0_4_conditional_vaults", - "tableTo": "tokens", - "columnsFrom": [ - "underlying_mint_acct" - ], - "columnsTo": [ - "mint_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk": { - "name": "v0_4_conditional_vaults_underlying_token_acct_token_accts_token_acct_fk", - "tableFrom": "v0_4_conditional_vaults", - "tableTo": "token_accts", - "columnsFrom": [ - "underlying_token_acct" - ], - "columnsTo": [ - "token_acct" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_merges": { - "name": "v0_4_merges", - "schema": "", - "columns": { - "vault_addr": { - "name": "vault_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "vault_seq_num": { - "name": "vault_seq_num", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "signature": { - "name": "signature", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "amount": { - "name": "amount", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "merge_vault_index": { - "name": "merge_vault_index", - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "merge_signature_index": { - "name": "merge_signature_index", - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "merge_seq_num_vault_index": { - "name": "merge_seq_num_vault_index", - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { - "name": "v0_4_merges_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", - "tableFrom": "v0_4_merges", - "tableTo": "v0_4_conditional_vaults", - "columnsFrom": [ - "vault_addr" - ], - "columnsTo": [ - "conditional_vault_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_merges_signature_signatures_signature_fk": { - "name": "v0_4_merges_signature_signatures_signature_fk", - "tableFrom": "v0_4_merges", - "tableTo": "signatures", - "columnsFrom": [ - "signature" - ], - "columnsTo": [ - "signature" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_metric_decisions": { - "name": "v0_4_metric_decisions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "bigserial", - "primaryKey": true, - "notNull": true - }, - "dao_id": { - "name": "dao_id", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "recipient": { - "name": "recipient", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "outcome_question_addr": { - "name": "outcome_question_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "metric_question_addr": { - "name": "metric_question_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "outcome_vault_addr": { - "name": "outcome_vault_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "metric_vault_addr": { - "name": "metric_vault_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "amm_addr": { - "name": "amm_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "market_opened": { - "name": "market_opened", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "grant_awarded": { - "name": "grant_awarded", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "committee_evaluation": { - "name": "committee_evaluation", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "score_term": { - "name": "score_term", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'effective'" - }, - "score_unit": { - "name": "score_unit", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "score_max_value": { - "name": "score_max_value", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": false - }, - "score_min_value": { - "name": "score_min_value", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk": { - "name": "v0_4_metric_decisions_dao_id_dao_details_dao_id_fk", - "tableFrom": "v0_4_metric_decisions", - "tableTo": "dao_details", - "columnsFrom": [ - "dao_id" - ], - "columnsTo": [ - "dao_id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk": { - "name": "v0_4_metric_decisions_outcome_question_addr_v0_4_questions_question_addr_fk", - "tableFrom": "v0_4_metric_decisions", - "tableTo": "v0_4_questions", - "columnsFrom": [ - "outcome_question_addr" - ], - "columnsTo": [ - "question_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk": { - "name": "v0_4_metric_decisions_metric_question_addr_v0_4_questions_question_addr_fk", - "tableFrom": "v0_4_metric_decisions", - "tableTo": "v0_4_questions", - "columnsFrom": [ - "metric_question_addr" - ], - "columnsTo": [ - "question_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { - "name": "v0_4_metric_decisions_outcome_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", - "tableFrom": "v0_4_metric_decisions", - "tableTo": "v0_4_conditional_vaults", - "columnsFrom": [ - "outcome_vault_addr" - ], - "columnsTo": [ - "conditional_vault_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { - "name": "v0_4_metric_decisions_metric_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", - "tableFrom": "v0_4_metric_decisions", - "tableTo": "v0_4_conditional_vaults", - "columnsFrom": [ - "metric_vault_addr" - ], - "columnsTo": [ - "conditional_vault_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk": { - "name": "v0_4_metric_decisions_amm_addr_v0_4_amms_amm_addr_fk", - "tableFrom": "v0_4_metric_decisions", - "tableTo": "v0_4_amms", - "columnsFrom": [ - "amm_addr" - ], - "columnsTo": [ - "amm_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_questions": { - "name": "v0_4_questions", - "schema": "", - "columns": { - "question_addr": { - "name": "question_addr", - "type": "varchar(44)", - "primaryKey": true, - "notNull": true - }, - "is_resolved": { - "name": "is_resolved", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "oracle_addr": { - "name": "oracle_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "num_outcomes": { - "name": "num_outcomes", - "type": "smallint", - "primaryKey": false, - "notNull": true - }, - "payout_numerators": { - "name": "payout_numerators", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "payout_denominator": { - "name": "payout_denominator", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "question_id": { - "name": "question_id", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_splits": { - "name": "v0_4_splits", - "schema": "", - "columns": { - "vault_addr": { - "name": "vault_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "vault_seq_num": { - "name": "vault_seq_num", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "signature": { - "name": "signature", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "amount": { - "name": "amount", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "split_vault_index": { - "name": "split_vault_index", - "columns": [ - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "split_signature_index": { - "name": "split_signature_index", - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "split_seq_num_vault_index": { - "name": "split_seq_num_vault_index", - "columns": [ - { - "expression": "vault_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vault_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk": { - "name": "v0_4_splits_vault_addr_v0_4_conditional_vaults_conditional_vault_addr_fk", - "tableFrom": "v0_4_splits", - "tableTo": "v0_4_conditional_vaults", - "columnsFrom": [ - "vault_addr" - ], - "columnsTo": [ - "conditional_vault_addr" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "v0_4_splits_signature_signatures_signature_fk": { - "name": "v0_4_splits_signature_signatures_signature_fk", - "tableFrom": "v0_4_splits", - "tableTo": "signatures", - "columnsFrom": [ - "signature" - ], - "columnsTo": [ - "signature" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.v0_4_swaps": { - "name": "v0_4_swaps", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "bigserial", - "primaryKey": true, - "notNull": true - }, - "signature": { - "name": "signature", - "type": "varchar(88)", - "primaryKey": false, - "notNull": true - }, - "slot": { - "name": "slot", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "block_time": { - "name": "block_time", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "swap_type": { - "name": "swap_type", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "amm_addr": { - "name": "amm_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "user_addr": { - "name": "user_addr", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "amm_seq_num": { - "name": "amm_seq_num", - "type": "bigint", - "primaryKey": false, - "notNull": true - }, - "input_amount": { - "name": "input_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "output_amount": { - "name": "output_amount", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "amm_index": { - "name": "amm_index", - "columns": [ - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "signature_index": { - "name": "signature_index", - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "seq_num_amm_index": { - "name": "seq_num_amm_index", - "columns": [ - { - "expression": "amm_seq_num", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "amm_addr", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": { - "public.prices_chart_data": { - "columns": { - "interv": { - "name": "interv", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "price": { - "name": "price", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "base_amount": { - "name": "base_amount", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "quote_amount": { - "name": "quote_amount", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "prices_type": { - "name": "prices_type", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - } - }, - "definition": "\n SELECT\n TIME_BUCKET('30 SECONDS'::INTERVAL, prices.created_at) AS interv,\n last(price, prices.created_at) FILTER(WHERE prices.created_at IS NOT NULL AND CASE WHEN prices_type = 'spot' THEN TRUE ELSE prices.created_at <= markets.created_at + '5 DAYS'::INTERVAL END) AS price,\n last(base_amount, prices.created_at) FILTER(WHERE prices.created_at IS NOT NULL AND CASE WHEN prices_type = 'spot' THEN TRUE ELSE prices.created_at <= markets.created_at + '5 DAYS'::INTERVAL END) AS base_amount,\n last(quote_amount, prices.created_at) FILTER(WHERE prices.created_at IS NOT NULL AND CASE WHEN prices_type = 'spot' THEN TRUE ELSE prices.created_at <= markets.created_at + '5 DAYS'::INTERVAL END) AS quote_amount,\n prices_type,\n prices.market_acct AS market_acct\n FROM prices\n JOIN markets ON markets.market_acct = prices.market_acct\n WHERE CASE WHEN prices_type = 'spot' THEN TRUE ELSE prices.created_at <= markets.created_at + '5 DAYS'::INTERVAL END\n GROUP BY interv, prices.market_acct, prices_type\n ", - "name": "prices_chart_data", - "schema": "public", - "isExisting": false, - "materialized": false - }, - "public.proposal_total_trade_volume": { - "columns": { - "proposal_acct": { - "name": "proposal_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "pass_volume": { - "name": "pass_volume", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "fail_volume": { - "name": "fail_volume", - "type": "numeric(40, 20)", - "primaryKey": false, - "notNull": true - }, - "pass_market_acct": { - "name": "pass_market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - }, - "fail_market_acct": { - "name": "fail_market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - } - }, - "definition": "\n WITH pass_market AS (\n SELECT\n \t proposal_acct,\n \t orders.market_acct AS pass_market_acct,\n TIME_BUCKET('1 DAYS'::INTERVAL, orders.order_time) AS interv,\n SUM(filled_base_amount * quote_price) FILTER(WHERE orders.order_time IS NOT NULL) AS pass_volume\n FROM proposals\n JOIN orders\n ON proposals.pass_market_acct = orders.market_acct\n GROUP BY proposal_acct, interv, orders.market_acct\n ),\n fail_market AS (\n SELECT\n \t proposal_acct,\n \t orders.market_acct AS fail_market_acct,\n TIME_BUCKET('1 DAYS'::INTERVAL, orders.order_time) AS interv,\n SUM(filled_base_amount * quote_price) FILTER(WHERE orders.order_time IS NOT NULL) AS fail_volume\n FROM proposals\n JOIN orders\n ON proposals.fail_market_acct = orders.market_acct\n GROUP BY proposal_acct, interv, orders.market_acct\n )\n SELECT\n pass_market.proposal_acct AS proposal_acct,\n pass_market_acct,\n fail_market_acct,\n SUM(pass_volume) AS pass_volume,\n SUM(fail_volume) AS fail_volume\n FROM pass_market\n JOIN fail_market ON fail_market.proposal_acct = pass_market.proposal_acct\n GROUP BY pass_market.proposal_acct, pass_market_acct, fail_market_acct\n ", - "name": "proposal_total_trade_volume", - "schema": "public", - "isExisting": false, - "materialized": false - }, - "public.twap_chart_data": { - "columns": { - "interv": { - "name": "interv", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "token_amount": { - "name": "token_amount", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "market_acct": { - "name": "market_acct", - "type": "varchar(44)", - "primaryKey": false, - "notNull": true - } - }, - "definition": "\n SELECT\n TIME_BUCKET('30 SECONDS'::INTERVAL, \"twaps\".\"created_at\") AS interv,\n last(token_amount, \"twaps\".\"created_at\") FILTER(WHERE \"twaps\".\"created_at\" IS NOT NULL AND \"twaps\".\"created_at\" <= \"markets\".\"created_at\" + '5 DAYS'::INTERVAL) AS token_amount,\n \"twaps\".\"market_acct\" AS market_acct\n FROM \"twaps\"\n JOIN \"markets\" ON \"markets\".\"market_acct\" = \"twaps\".\"market_acct\"\n WHERE \"twaps\".\"created_at\" <= \"markets\".\"created_at\" + '5 DAYS'::INTERVAL\n GROUP BY interv, \"twaps\".\"market_acct\"\n ", - "name": "twap_chart_data", - "schema": "public", - "isExisting": false, - "materialized": false - } - }, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/database/drizzle/meta/_journal.json b/packages/database/drizzle/meta/_journal.json index 8414ed7b..76675b2d 100644 --- a/packages/database/drizzle/meta/_journal.json +++ b/packages/database/drizzle/meta/_journal.json @@ -64,20 +64,6 @@ "when": 1729791097640, "tag": "0008_stormy_spirit", "breakpoints": true - }, - { - "idx": 9, - "version": "7", - "when": 1731430722593, - "tag": "0009_brainy_karma", - "breakpoints": true - }, - { - "idx": 10, - "version": "7", - "when": 1732042186508, - "tag": "0010_crazy_sentinels", - "breakpoints": true } ] } \ No newline at end of file diff --git a/packages/database/lib/index.ts b/packages/database/lib/index.ts index e68c5abf..441e011b 100644 --- a/packages/database/lib/index.ts +++ b/packages/database/lib/index.ts @@ -91,7 +91,6 @@ export const schema = schemaDefs; export { eq, sql, - asc, desc, count, lte, diff --git a/packages/database/lib/schema.ts b/packages/database/lib/schema.ts index a4a5bb32..c05b7999 100644 --- a/packages/database/lib/schema.ts +++ b/packages/database/lib/schema.ts @@ -119,11 +119,6 @@ export const daos = pgTable( updatedAt: timestamp("updated_at", { withTimezone: true }) .notNull() .default(sql`now()`), - isActive: boolean("is_active").notNull().default(false), - isPrimary: boolean("is_primary").notNull().default(false), - organizationId: bigint("organization_id", { mode: "bigint" }) - .references(() => organizations.organizationId), - colors: jsonb("colors"), }, (table) => ({ daoProgram: unique("dao_acct_program").on(table.daoAcct, table.programAcct), @@ -391,7 +386,6 @@ export const indexers = pgTable("indexers", { name: varchar("name", { length: 100 }).primaryKey(), implementation: pgEnum("implementation", IndexerImplementation).notNull(), latestSlotProcessed: biggerSlot("latest_slot_processed").notNull(), - latestTxSigProcessed: transaction("latest_tx_sig_processed"), //TODO: unify transactions and signatures table and add reference here indexerType: pgEnum("indexer_type", IndexerType).notNull(), }); @@ -736,8 +730,6 @@ export const daoDetails = pgTable( lp_token_image_url: varchar("lp_token_image_url"), isHide: boolean("is_hide"), socials: jsonb("socials"), - organizationId: bigint("organization_id", { mode: "bigint" }) - .references(() => organizations.organizationId), }, (table) => ({ uniqueId: unique("id_name_url").on(table.daoId, table.url, table.name), @@ -1008,6 +1000,7 @@ export const v0_4_swaps = pgTable("v0_4_swaps", { export const v0_4_splits = pgTable( "v0_4_splits", { + id: bigserial("id", { mode: "bigint" }).primaryKey(), vaultAddr: pubkey("vault_addr").notNull().references(() => v0_4_conditional_vaults.conditionalVaultAddr), vaultSeqNum: bigint("vault_seq_num", { mode: "bigint" }), signature: transaction("signature").notNull().references(() => signatures.signature), @@ -1025,6 +1018,7 @@ export const v0_4_splits = pgTable( ); export const v0_4_merges = pgTable("v0_4_merges", { + id: bigserial("id", { mode: "bigint" }).primaryKey(), vaultAddr: pubkey("vault_addr").notNull().references(() => v0_4_conditional_vaults.conditionalVaultAddr), vaultSeqNum: bigint("vault_seq_num", { mode: "bigint" }), signature: transaction("signature").notNull().references(() => signatures.signature), @@ -1034,7 +1028,6 @@ export const v0_4_merges = pgTable("v0_4_merges", { .notNull() .default(sql`now()`), }, (table) => ({ - // pk: primaryKey({ columns: [table.vaultAddr, table.vaultSeqNum]}), vaultIdx: index("merge_vault_index").on(table.vaultAddr), signatureIdx: index("merge_signature_index").on(table.signature), seqNumVaultIdx: index("merge_seq_num_vault_index").on(table.vaultSeqNum, table.vaultAddr), @@ -1191,31 +1184,6 @@ export const userDeposits = pgTable("user_deposits", { .default(sql`now()`), }); -export const organizations = pgTable("organizations", { - organizationId: bigserial("organization_id", { mode: "bigint" }).primaryKey(), - name: text("name").notNull().unique(), - // Useful for fetching from a URL - slug: varchar("slug").unique(), - url: varchar("url").unique(), - description: text("description"), - imageUrl: varchar("image_url"), - // Added this in anticipation for web3 auth. - creator_acct: pubkey("creator_acct"), - // A way for other people to have permissions to make changes. - admin_accts: jsonb("admin_accts"), - isHide: boolean("is_hide"), - // Key off of this type and then we can do flexible design. - socials: jsonb("socials"), - createdAt: timestamp("created_at", { withTimezone: true }) - .notNull() - .default(sql`now()`), -}, -(table) => ({ - uniqueId: unique("id_name_url").on(table.organizationId, table.url, table.name), -}) -); - - export type IndexerRecord = typeof indexers._.inferInsert; export type IndexerAccountDependencyReadRecord = typeof indexerAccountDependencies._.inferSelect; @@ -1232,4 +1200,4 @@ export type DaoRecord = typeof daos._.inferInsert; export type ProposalRecord = typeof proposals._.inferInsert; export type ConditionalVaultRecord = typeof conditionalVaults._.inferInsert; export type TokenAcctRecord = typeof tokenAccts._.inferInsert; -export type UserPerformanceRecord = typeof userPerformance._.inferInsert; \ No newline at end of file +export type UserPerformanceRecord = typeof userPerformance._.inferInsert; diff --git a/packages/database/package.json b/packages/database/package.json index d2f34481..90c608d8 100644 --- a/packages/database/package.json +++ b/packages/database/package.json @@ -4,15 +4,15 @@ "private": "true", "main": "lib", "scripts": { - "migrate:create": "drizzle-kit generate --dialect=postgresql --schema=./lib/schema.ts", + "migrate:create": "drizzle-kit generate:pg --schema=./lib/schema.ts", "migrate": "pnpm migrate:create && bun src/index.ts", "sync": "pnpm bun src/index.ts", "sql": "bun src/run-sql.ts" }, "dependencies": { - "dotenv": "16.4.5", - "drizzle-orm": "0.36.3", - "pg": "^8.11.3" + "drizzle-orm": "0.30.6", + "pg": "^8.11.3", + "dotenv": "16.4.5" }, "devDependencies": { "@types/inquirer": "^9.0.7", @@ -20,7 +20,7 @@ "@types/pg": "^8.10.9", "ansicolor": "^2.0.1", "as-table": "^1.0.55", - "drizzle-kit": "0.28.1", + "drizzle-kit": "0.20.18", "inquirer": "^9.2.14" } } diff --git a/packages/hasura/metadata/databases/databases.yaml b/packages/hasura/metadata/databases/databases.yaml index 09133119..e717ecdf 100644 --- a/packages/hasura/metadata/databases/databases.yaml +++ b/packages/hasura/metadata/databases/databases.yaml @@ -24,48 +24,6 @@ - total_volume filter: {} role: anonymous - - fields: - - name: dao_image - type: - nullable: true - scalar: text - - name: proposal_title - type: - nullable: true - scalar: text - - name: proposal_account - type: - nullable: true - scalar: text - - name: trade_count - type: - nullable: true - scalar: numeric - - name: volume_traded - type: - nullable: true - scalar: numeric - - name: proposal_status - type: - nullable: true - scalar: text - - name: chart_data - type: - nullable: true - scalar: jsonb - name: linked_recent_proposals - select_permissions: - - permission: - columns: - - dao_image - - proposal_title - - proposal_account - - trade_count - - volume_traded - - proposal_status - - chart_data - filter: {} - role: anonymous - fields: - name: total_volume type: @@ -204,100 +162,7 @@ - trade_count filter: {} role: anonymous - - fields: - - name: dao_image - type: - nullable: true - scalar: text - - name: proposal_title - type: - nullable: true - scalar: text - - name: trade_count - type: - nullable: true - scalar: numeric - - name: volume_traded - type: - nullable: true - scalar: numeric - - name: proposal_status - type: - nullable: true - scalar: text - - name: chart_data - type: - nullable: true - scalar: jsonb - - name: proposal_account - type: - nullable: true - scalar: text - - name: dao_slug - type: - nullable: true - scalar: text - name: website_latest_four_proposals - select_permissions: - - permission: - columns: - - dao_image - - proposal_title - - trade_count - - volume_traded - - proposal_status - - chart_data - - proposal_account - - dao_slug - filter: {} - role: anonymous - - fields: - - name: volume_traded - type: - nullable: true - scalar: numeric - - name: profits_earned - type: - nullable: true - scalar: numeric - - name: unique_traders - type: - nullable: true - scalar: numeric - - name: number_of_daos - type: - nullable: true - scalar: numeric - - name: total_proposals - type: - nullable: true - scalar: numeric - - name: total_markets - type: - nullable: true - scalar: numeric - - name: total_trades - type: - nullable: true - scalar: numeric - name: website_stats - select_permissions: - - permission: - columns: - - volume_traded - - profits_earned - - unique_traders - - number_of_daos - - total_proposals - - total_markets - - total_trades - filter: {} - role: anonymous native_queries: - - arguments: {} - code: "WITH recent_proposals AS (\n SELECT DISTINCT ON (p.proposal_acct)\n p.proposal_acct,\n p.created_at,\n p.completed_at,\n p.status as proposal_status,\n pd.title as proposal_title,\n d.dao_acct,\n dd.slug,\n d.base_acct as spot_market_acct,\n dd.image_url as dao_image,\n string_agg(m.market_acct::text, ',') as market_accts\n FROM \n proposals p\n INNER JOIN proposal_details pd ON pd.proposal_acct = p.proposal_acct\n INNER JOIN daos d ON d.dao_acct = p.dao_acct\n INNER JOIN dao_details dd ON dd.dao_id = d.dao_id\n INNER JOIN markets m ON m.proposal_acct = p.proposal_acct\n WHERE \n \tp.status != 'Pending'\n GROUP BY \n p.proposal_acct,\n p.created_at,\n p.completed_at,\n p.status,\n pd.title,\n d.dao_acct,\n dd.slug,\n d.base_acct,\n dd.image_url\n ORDER BY p.proposal_acct, p.created_at DESC\n LIMIT 4\n),\nproposal_trades AS (\n SELECT \n rp.proposal_acct,\n COUNT(*) as trade_count,\n SUM((t.base_amount / POW(10, tokens.decimals)) * t.quote_price) AS volume_traded\n FROM \n recent_proposals rp\n CROSS JOIN LATERAL unnest(string_to_array(rp.market_accts, ',')) as m(market_acct)\n INNER JOIN takes t ON t.market_acct = m.market_acct::text\n INNER JOIN orders o ON o.order_tx_sig = t.order_tx_sig\n AND o.market_acct IS NOT NULL \n AND o.quote_price > 0\n INNER JOIN transactions tx ON tx.tx_sig = o.order_tx_sig\n AND tx.failed IS FALSE\n INNER JOIN daos d ON d.dao_acct = rp.dao_acct\n INNER JOIN tokens ON tokens.mint_acct = d.base_acct\n GROUP BY rp.proposal_acct\n),\nprice_data AS (\n SELECT DISTINCT ON (rp.proposal_acct, c.market_acct)\n c.market_acct,\n rp.proposal_acct,\n jsonb_build_object(\n 'intervals', jsonb_agg(\n jsonb_build_object(\n 'interv', c.interv,\n 'price', c.price,\n 'type', c.prices_type::text\n ) ORDER BY c.interv\n )\n ) as chart_data\n FROM recent_proposals rp\n CROSS JOIN LATERAL unnest(array[rp.spot_market_acct] || string_to_array(rp.market_accts, ',')) as m(market_acct)\n INNER JOIN (\n SELECT \n pcd.*\n FROM \n prices_chart_data pcd\n INNER JOIN (\n SELECT \n pcd2.market_acct,\n pcd2.interv,\n pcd2.price,\n pcd2.prices_type,\n LAG(pcd2.price) OVER w AS prev_price,\n LAG(pcd2.prices_type) OVER w AS prev_prices_type\n FROM prices_chart_data pcd2\n WINDOW w AS (PARTITION BY market_acct ORDER BY interv)\n ) changes ON changes.market_acct = pcd.market_acct \n AND changes.interv = pcd.interv\n WHERE \n (prev_price IS NULL\n OR changes.price != changes.prev_price\n OR changes.prices_type != changes.prev_prices_type)\n ) c ON c.market_acct = m.market_acct::text\n WHERE \n c.interv >= rp.created_at\n AND c.interv <= COALESCE(rp.completed_at, NOW())\n GROUP BY rp.proposal_acct, c.market_acct\n)\nSELECT DISTINCT ON (rp.proposal_acct)\n rp.dao_image::text,\n rp.proposal_title::text,\n rp.proposal_acct::text AS proposal_account,\n rp.slug::text AS dao_slug,\n COALESCE(pt.trade_count, 0)::numeric as trade_count,\n COALESCE(pt.volume_traded, 0)::numeric as volume_traded,\n rp.proposal_status::text,\n jsonb_build_object(\n 'spot', COALESCE(\n (SELECT chart_data\n FROM price_data pd2\n WHERE pd2.market_acct = rp.spot_market_acct\n AND pd2.proposal_acct = rp.proposal_acct\n LIMIT 1),\n jsonb_build_object('intervals', '[]'::jsonb)\n ),\n 'pass', COALESCE(\n (SELECT chart_data\n FROM price_data pd2\n WHERE pd2.market_acct = (string_to_array(rp.market_accts, ','))[1]\n AND pd2.proposal_acct = rp.proposal_acct\n LIMIT 1),\n jsonb_build_object('intervals', '[]'::jsonb)\n ),\n 'fail', COALESCE(\n (SELECT chart_data\n FROM price_data pd2\n WHERE pd2.market_acct = (string_to_array(rp.market_accts, ','))[2]\n AND pd2.proposal_acct = rp.proposal_acct\n LIMIT 1),\n jsonb_build_object('intervals', '[]'::jsonb)\n )\n ) as chart_data\nFROM \n recent_proposals rp\n LEFT JOIN proposal_trades pt ON pt.proposal_acct = rp.proposal_acct\nORDER BY rp.proposal_acct, rp.created_at DESC;" - returns: website_latest_four_proposals - root_field_name: latest_finished_proposals - arguments: dao_slug: description: "" @@ -358,8 +223,4 @@ code: "WITH market_actors AS (\n SELECT \n t.market_acct,\n actor_acct,\n COUNT(*) AS countOrders\n FROM \n takes t\n JOIN orders o ON o.order_tx_sig = t.order_tx_sig\n JOIN transactions tx ON tx.tx_sig = o.order_tx_sig\n WHERE tx.failed IS FALSE\n AND o.quote_price > 0\n GROUP BY \n t.market_acct, actor_acct\n), distinct_users_by_proposal AS (\n SELECT\n proposal_acct,\n COUNT(DISTINCT actor_acct) AS uniqueUsersCount,\n SUM(countOrders) AS totalTrades\n FROM market_actors\n JOIN markets ON markets.market_acct = market_actors.market_acct\n GROUP BY proposal_acct\n)\nSELECT\n\tproposal_acct,\n\tuniqueUsersCount AS user_count,\n\ttotalTrades AS trade_count\nFROM distinct_users_by_proposal\nWHERE \n CASE \n WHEN {{proposal_acct}} IS NOT NULL \n THEN proposal_acct = {{proposal_acct}} \n ELSE 1 = 1 \n END;" returns: proposal_statistics root_field_name: user_count_and_trade_count_per_proposal - - arguments: {} - code: "WITH base_trades AS (\n SELECT \n t.market_acct,\n o.actor_acct,\n (t.base_amount / POW(10, tokens.decimals)) * t.quote_price AS trade_volume,\n dd.slug,\n m.proposal_acct,\n COUNT(*) OVER () as total_takes -- Count all takes that match our filters\n FROM \n takes t\n INNER JOIN orders o \n ON o.order_tx_sig = t.order_tx_sig\n AND o.market_acct IS NOT NULL \n AND o.quote_price > 0\n INNER JOIN transactions tx \n ON tx.tx_sig = o.order_tx_sig\n AND tx.failed IS FALSE\n INNER JOIN markets m \n ON m.market_acct = o.market_acct\n INNER JOIN proposals p \n ON p.proposal_acct = m.proposal_acct\n INNER JOIN daos d \n ON d.dao_acct = p.dao_acct\n INNER JOIN tokens \n ON tokens.mint_acct = d.base_acct\n INNER JOIN dao_details dd \n ON dd.dao_id = d.dao_id\n),\naggregated_stats AS (\n SELECT \n COUNT(DISTINCT actor_acct) AS unique_trader_count,\n COUNT(DISTINCT proposal_acct) AS proposal_count,\n COUNT(DISTINCT market_acct) AS market_count,\n SUM(trade_volume) AS total_volume,\n MAX(total_takes) AS total_trades, -- Use MAX since the value is the same for all rows\n COUNT(DISTINCT slug) AS dao_count\n FROM base_trades\n)\nSELECT \n total_volume::numeric AS volume_traded,\n NULL::numeric AS profits_earned,\n unique_trader_count::numeric AS unique_traders,\n dao_count::numeric AS number_of_daos,\n proposal_count::numeric AS total_proposals,\n market_count::numeric AS total_markets,\n total_trades::numeric\nFROM aggregated_stats;" - returns: website_stats - root_field_name: website_stats - tables: "!include futarchy/tables/tables.yaml" + tables: "!include futarchy/tables/tables.yaml" \ No newline at end of file diff --git a/packages/hasura/metadata/databases/futarchy/tables/public_takes.yaml b/packages/hasura/metadata/databases/futarchy/tables/public_takes.yaml index 74a1515d..27736448 100644 --- a/packages/hasura/metadata/databases/futarchy/tables/public_takes.yaml +++ b/packages/hasura/metadata/databases/futarchy/tables/public_takes.yaml @@ -29,3 +29,4 @@ select_permissions: filter: {} allow_aggregations: true comment: "" + diff --git a/packages/hasura/metadata/query_collections.yaml b/packages/hasura/metadata/query_collections.yaml index 707a289b..fe360a07 100644 --- a/packages/hasura/metadata/query_collections.yaml +++ b/packages/hasura/metadata/query_collections.yaml @@ -23,30 +23,3 @@ name } } - - name: fetchAggregateStats - query: | - query fetchAggregateStats { - website_stats { - total_trades - total_markets - total_proposals - unique_traders - profits_earned - number_of_daos - volume_traded - } - } - - name: fetchLatestFourProposals - query: | - query fetchLatestFourProposals { - latest_finished_proposals { - dao_image - proposal_title - trade_count - volume_traded - proposal_status - chart_data - proposal_account - dao_slug - } - } diff --git a/packages/hasura/metadata/rest_endpoints.yaml b/packages/hasura/metadata/rest_endpoints.yaml index 935c3306..95bcda36 100644 --- a/packages/hasura/metadata/rest_endpoints.yaml +++ b/packages/hasura/metadata/rest_endpoints.yaml @@ -7,24 +7,6 @@ - GET name: getDaoNameFromSlug url: dao-name/:slug -- comment: just for use with website data - definition: - query: - collection_name: allowed-queries - query_name: fetchAggregateStats - methods: - - GET - name: fetchAggregateStats - url: fetchaggregatestats -- comment: "" - definition: - query: - collection_name: allowed-queries - query_name: fetchLatestFourProposals - methods: - - GET - name: fetchLatestFourProposals - url: fetchlatestfourproposals - comment: "" definition: query: diff --git a/packages/indexer/readme.md b/packages/indexer/readme.md deleted file mode 100644 index c1cc4cbb..00000000 --- a/packages/indexer/readme.md +++ /dev/null @@ -1,20 +0,0 @@ -New Indexer Architecture - -Indexers - -Logs Subscribe Indexer - subscribes to new txns on a given program, when a txn is received, we index it - -Account Info Update Indexer - subscribes to account info updates on programs, such as amms to update reserves - -Fetch Interval Indexer - polls getSignaturesForAddress on an interval, populating/indexing txs in case -its missed by Logs Subscribe Indexer. - -History Indexer - gets full tx history for a program (or at least as much as the RPC can provide). -runs on startup and on long intervals - - -processTransaction(txn, programId) - -if the programId is V4, we process the events emitted in the txn. -if v3, we use the swapBuilder to decode the transaction and check token balance changes to -figure out if the txn is a buy or sell diff --git a/packages/indexer/src/adapters/telegram-bot.ts b/packages/indexer/src/adapters/telegram-bot.ts index 07a4ea08..af64e82b 100644 --- a/packages/indexer/src/adapters/telegram-bot.ts +++ b/packages/indexer/src/adapters/telegram-bot.ts @@ -22,7 +22,7 @@ export class TelegramBotAPI implements AlertChatBotInterface { method: "GET" | "POST", endpoint: string, params?: object - ): Promise> { + ): Promise | null> { let response: AxiosResponse>; try { if (method === "GET") { @@ -32,11 +32,14 @@ export class TelegramBotAPI implements AlertChatBotInterface { } return response.data; } catch (error) { - throw new Error(`Failed to make request: ${error}`); + console.error( + `Failed to make request: ${error}. Method: ${method}. Endpoint: ${endpoint}` + ); + return null; } } - public async getMe(): Promise> { + public async getMe(): Promise | null> { return this.request("GET", "getMe"); } @@ -58,7 +61,7 @@ export class TelegramBotAPI implements AlertChatBotInterface { limit?: number, timeout?: number, allowed_updates?: string[] - ): Promise> { + ): Promise | null> { const params = { offset, limit, timeout, allowed_updates }; return this.request("GET", "getUpdates", params); } @@ -74,7 +77,7 @@ type ChatbotApiResponse = { }; export interface AlertChatBotInterface { - getMe(): Promise>; + getMe(): Promise | null>; sendMessage( chatId: number | string, text: string @@ -84,5 +87,5 @@ export interface AlertChatBotInterface { limit?: number, timeout?: number, allowed_updates?: string[] - ): Promise>; + ): Promise | null>; } diff --git a/packages/indexer/src/v3_indexer/builders/swaps.ts b/packages/indexer/src/builders/swaps.ts similarity index 86% rename from packages/indexer/src/v3_indexer/builders/swaps.ts rename to packages/indexer/src/builders/swaps.ts index 905da4ab..8981a0bd 100644 --- a/packages/indexer/src/v3_indexer/builders/swaps.ts +++ b/packages/indexer/src/builders/swaps.ts @@ -22,13 +22,9 @@ import { parseFormattedInstructionArgsData, serialize, } from "../transaction/serializer"; -import { logger } from "../../logger"; +import { logger } from "../logger"; import { getMainIxTypeFromTransaction } from "../transaction/watcher"; import { getHumanPrice } from "../usecases/math"; -import { connection } from "../connection"; -import { AmmMarketAccountUpdateIndexer } from '../indexers/amm-market/amm-market-account-indexer'; -import { PublicKey } from "@solana/web3.js"; - export class SwapPersistable { private ordersRecord: OrdersRecord; @@ -49,8 +45,7 @@ export class SwapPersistable { async persist() { try { - // First insert the transaction record - const upsertResult = + const upsertResult = (await usingDb((db) => db .insert(schema.transactions) @@ -71,7 +66,6 @@ export class SwapPersistable { )}` ); } - // Insert user if they aren't already in the database const insertUsersResult = (await usingDb((db) => db @@ -200,40 +194,36 @@ export class SwapBuilder { return Err({ type: SwapPersistableError.ArbTransactionError }); } - // now we are upserting price/twap in the buildOrderFromSwapIx function const result = await this.buildOrderFromSwapIx(swapIx, tx, mintIx); if (!result.success) { return Err(result.error); } const { swapOrder, swapTake } = result.ok; + // TODO: consider co-locating this logic so it can be shared + // TODO doing this twice... also doing this above + const transactionRecord: TransactionRecord = { txSig: signature, slot: ctx.slot.toString(), - blockTime: new Date(tx.blockTime * 1000), + blockTime: new Date(tx.blockTime * 1000), // TODO need to verify if this is correct failed: tx.err !== undefined, payload: serialize(tx), serializerLogicVersion: SERIALIZED_TRANSACTION_LOGIC_VERSION, mainIxType: getMainIxTypeFromTransaction(tx), }; - return Ok(new SwapPersistable(swapOrder, swapTake, transactionRecord)); - } else { - // handle non-swap transactions (add/remove liquidity, crank, etc) - // find market account from instructions - console.log("builder::buildOrderFromSwapIx::looking for market account in non swap txn"); - let marketAcct: PublicKey | undefined; - for (const ix of tx.instructions) { - const candidate = ix.accountsWithData.find((a) => a.name === "amm"); - if (candidate) { - marketAcct = new PublicKey(candidate.pubkey); - break; - } - } - if (marketAcct) { - console.log("builder::buildOrderFromSwapIx::market found for non swap txn, indexing price and twap", marketAcct); - this.indexPriceAndTWAPForAccount(marketAcct); - } + // TODO: This needs smore work before it's ready + // const priceRecord: PricesRecord = { + // marketAcct: swapOrder.marketAcct, + // updatedSlot: ctx.slot.toString(), + // createdAt: transactionRecord.blockTime, + // // TODO: This doesn't have base and quote... So could be an issue.. + // price: swapTake.quotePrice, + // pricesType: PricesType.Conditional, + // } + + return Ok(new SwapPersistable(swapOrder, swapTake, transactionRecord)); // priceRecord } return Err({ type: SwapPersistableError.NonSwapTransaction }); } catch (e: any) { @@ -254,28 +244,6 @@ export class SwapBuilder { } } - async indexPriceAndTWAPForAccount(account: PublicKey) { - console.log("indexing price and twap for account", account.toBase58()); - const accountInfo = await connection.getAccountInfoAndContext( - account - ); - - //index refresh on startup - if (accountInfo.value) { - const res = await AmmMarketAccountUpdateIndexer.index( - accountInfo.value, - account, - accountInfo.context - ); - if (!res.success) { - logger.error( - "error indexing account initial fetch", - account.toString() - ); - } - } - } - async buildOrderFromSwapIx( swapIx: Instruction, tx: Transaction, @@ -287,12 +255,6 @@ export class SwapBuilder { const marketAcct = swapIx.accountsWithData.find((a) => a.name === "amm"); if (!marketAcct) return Err({ type: "missing data" }); - - //get market account and index price and twap async - console.log("builder::buildOrderFromSwapIx::indexing price and twap for market", marketAcct.pubkey); - const marketAcctPubKey = new PublicKey(marketAcct.pubkey); - this.indexPriceAndTWAPForAccount(marketAcctPubKey); - const userAcct = swapIx.accountsWithData.find((a) => a.name === "user"); if (!userAcct) return Err({ type: "missing data" }); // TODO fix diff --git a/packages/indexer/src/v3_indexer/cli/index.ts b/packages/indexer/src/cli/index.ts similarity index 100% rename from packages/indexer/src/v3_indexer/cli/index.ts rename to packages/indexer/src/cli/index.ts diff --git a/packages/indexer/src/v3_indexer/cli/txw/common/select-account.ts b/packages/indexer/src/cli/txw/common/select-account.ts similarity index 100% rename from packages/indexer/src/v3_indexer/cli/txw/common/select-account.ts rename to packages/indexer/src/cli/txw/common/select-account.ts diff --git a/packages/indexer/src/v3_indexer/cli/txw/create.ts b/packages/indexer/src/cli/txw/create.ts similarity index 100% rename from packages/indexer/src/v3_indexer/cli/txw/create.ts rename to packages/indexer/src/cli/txw/create.ts diff --git a/packages/indexer/src/v3_indexer/cli/txw/index.ts b/packages/indexer/src/cli/txw/index.ts similarity index 100% rename from packages/indexer/src/v3_indexer/cli/txw/index.ts rename to packages/indexer/src/cli/txw/index.ts diff --git a/packages/indexer/src/v3_indexer/cli/txw/populate.ts b/packages/indexer/src/cli/txw/populate.ts similarity index 97% rename from packages/indexer/src/v3_indexer/cli/txw/populate.ts rename to packages/indexer/src/cli/txw/populate.ts index fa2f3607..1458c3df 100644 --- a/packages/indexer/src/v3_indexer/cli/txw/populate.ts +++ b/packages/indexer/src/cli/txw/populate.ts @@ -27,7 +27,7 @@ import { } from "../../indexers/jupiter/jupiter-quotes-indexer"; import Cron from "croner"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; type IndexerAccountDependency = typeof schema.indexerAccountDependencies._.inferInsert; @@ -90,12 +90,11 @@ async function populateAmmMarketIndexerAccountDependencies() { )) ?? []; for (const ammMarket of ammMarkets) { - // TODO: we no longer need an account info indexer market accounts.. leaving this here for now - // const newAmmIndexerDep: IndexerAccountDependency = { - // acct: ammMarket.marketAcct.toString(), - // name: "amm-market-accounts", - // latestTxSigProcessed: null, - // }; + const newAmmIndexerDep: IndexerAccountDependency = { + acct: ammMarket.marketAcct.toString(), + name: "amm-market-accounts", + latestTxSigProcessed: null, + }; const newAmmIntervalIndexerDep: IndexerAccountDependency = { acct: ammMarket.marketAcct.toString(), name: "amm-market-accounts-fetch", @@ -112,7 +111,7 @@ async function populateAmmMarketIndexerAccountDependencies() { db .insert(schema.indexerAccountDependencies) .values([ - // newAmmIndexerDep, //TODO: leaving this here for now + newAmmIndexerDep, newAmmIntervalIndexerDep, newAmmLogsSubscribeIndexerDep, ]) diff --git a/packages/indexer/src/v3_indexer/cli/txw/reset.ts b/packages/indexer/src/cli/txw/reset.ts similarity index 100% rename from packages/indexer/src/v3_indexer/cli/txw/reset.ts rename to packages/indexer/src/cli/txw/reset.ts diff --git a/packages/indexer/src/v3_indexer/cli/txw/validate.ts b/packages/indexer/src/cli/txw/validate.ts similarity index 100% rename from packages/indexer/src/v3_indexer/cli/txw/validate.ts rename to packages/indexer/src/cli/txw/validate.ts diff --git a/packages/indexer/src/connection.ts b/packages/indexer/src/connection.ts index eafd196f..47e2bd76 100644 --- a/packages/indexer/src/connection.ts +++ b/packages/indexer/src/connection.ts @@ -1,13 +1,14 @@ import { Connection } from "@solana/web3.js"; import { AnchorProvider, Wallet } from "@coral-xyz/anchor"; -import { ConditionalVaultClient, AmmClient } from "@metadaoproject/futarchy/v0.4"; +import { + FutarchyRPCClient, + FutarchyIndexerClient, +} from "@metadaoproject/futarchy-sdk"; +import { ConditionalVaultClient } from "@metadaoproject/futarchy/v0.3"; export const RPC_ENDPOINT = process.env.RPC_ENDPOINT ?? ""; - -if (!RPC_ENDPOINT) { - throw new Error("RPC_ENDPOINT is not set"); -} - +export const INDEXER_URL = process.env.INDEXER_URL ?? ""; +export const INDEXER_WSS_URL = process.env.INDEXER_WSS_URL ?? ""; export const connection: Connection = new Connection(RPC_ENDPOINT, "confirmed"); // the indexer will only be reading, not writing export const readonlyWallet: Wallet = undefined as unknown as Wallet; @@ -15,5 +16,15 @@ export const provider = new AnchorProvider(connection, readonlyWallet, { commitment: "confirmed", }); -export const ammClient = AmmClient.createClient({ provider }); -export const conditionalVaultClient = ConditionalVaultClient.createClient({ provider }); +export const rpcReadClient = FutarchyRPCClient.make(provider, undefined); + +export const indexerReadClient = FutarchyIndexerClient.make( + rpcReadClient, + INDEXER_URL, + INDEXER_WSS_URL, + "" +); + +export const conditionalVaultClient = ConditionalVaultClient.createClient({ + provider, +}); diff --git a/packages/indexer/src/v3_indexer/constants.ts b/packages/indexer/src/constants.ts similarity index 100% rename from packages/indexer/src/v3_indexer/constants.ts rename to packages/indexer/src/constants.ts diff --git a/packages/indexer/src/endpoints/get-metrics.ts b/packages/indexer/src/endpoints/get-metrics.ts new file mode 100644 index 00000000..112b3867 --- /dev/null +++ b/packages/indexer/src/endpoints/get-metrics.ts @@ -0,0 +1,21 @@ +import { Request, Response } from "express"; +import { Registry, collectDefaultMetrics } from "@lukasdeco/prom-client"; + +const register = new Registry(); +register.setDefaultLabels({ + app: "futarchy-indexer", +}); +collectDefaultMetrics({ + register, + excludedMetrics: [ + "nodejs_eventloop_lag_seconds", + "nodejs_heap_space_size_total_bytes", + ], +}); + +export async function getMetrics(_: Request, res: Response) { + res.setHeader("Content-Type", register.contentType); + + const data = await register.metrics(); + res.status(200).send(data); +} diff --git a/packages/indexer/src/index.ts b/packages/indexer/src/index.ts index 5eda9554..ca80a5f0 100644 --- a/packages/indexer/src/index.ts +++ b/packages/indexer/src/index.ts @@ -1,52 +1,10 @@ -import { startIndexers } from "./v3_indexer/indexers"; -import { startIndexerAccountDependencyPopulation } from "./v3_indexer/cli/txw/populate"; -import { startTransactionWatchers } from "./v3_indexer/transaction/watcher"; -import { subscribeAll } from "./subscriber"; -import { frontfill as v4_frontfill, backfill as v4_backfill } from "./v4_indexer/filler"; -import { logger } from "./logger"; +import { startIndexers } from "./indexers"; +import { startIndexerAccountDependencyPopulation } from "./cli/txw/populate"; +import { startTransactionWatchers } from "./transaction/watcher"; +import { startServer } from "./server"; -async function main() { - try { - // Start all indexing processes - await Promise.all([ - startIndexerAccountDependencyPopulation(), +startServer(); +startIndexerAccountDependencyPopulation(); - subscribeAll().catch(err => { - logger.errorWithChatBotAlert("Error in subscribeAll:", err); - }), - - v4_backfill().catch(err => { - logger.errorWithChatBotAlert("Error in v4_backfill:", err); - }), - - v4_frontfill().catch(err => { - logger.errorWithChatBotAlert("Error in v4_frontfill:", err); - }), - - startTransactionWatchers().catch(err => { - logger.errorWithChatBotAlert("Error in startTransactionWatchers:", err); - }), - - startIndexers().catch(err => { - logger.errorWithChatBotAlert("Error in startIndexers:", err); - }) - ]); - - // Keep process running - process.on('uncaughtException', (err) => { - logger.errorWithChatBotAlert("Uncaught exception:", err); - }); - - process.on('unhandledRejection', (err) => { - logger.errorWithChatBotAlert("Unhandled rejection:", err); - }); - - } catch (error) { - logger.errorWithChatBotAlert("Critical error in indexer:", error); - } -} - -main().catch(err => { - logger.errorWithChatBotAlert("Fatal error starting indexer:", err); - process.exit(1); -}); +await startTransactionWatchers(); +await startIndexers(); diff --git a/packages/indexer/src/v3_indexer/indexers/account-info-indexer.ts b/packages/indexer/src/indexers/account-info-indexer.ts similarity index 100% rename from packages/indexer/src/v3_indexer/indexers/account-info-indexer.ts rename to packages/indexer/src/indexers/account-info-indexer.ts diff --git a/packages/indexer/src/v3_indexer/indexers/account-logs-indexer.ts b/packages/indexer/src/indexers/account-logs-indexer.ts similarity index 100% rename from packages/indexer/src/v3_indexer/indexers/account-logs-indexer.ts rename to packages/indexer/src/indexers/account-logs-indexer.ts diff --git a/packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-account-indexer.ts b/packages/indexer/src/indexers/amm-market/amm-market-account-indexer.ts similarity index 95% rename from packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-account-indexer.ts rename to packages/indexer/src/indexers/amm-market/amm-market-account-indexer.ts index 36b323c5..d54a4c28 100644 --- a/packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-account-indexer.ts +++ b/packages/indexer/src/indexers/amm-market/amm-market-account-indexer.ts @@ -2,7 +2,7 @@ import { AccountInfoIndexer } from "../account-info-indexer"; import { AccountInfo, Context, PublicKey } from "@solana/web3.js"; import { Err, Ok } from "../../match"; import { indexAmmMarketAccountWithContext } from "./utils"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; export enum AmmAccountIndexerError { GeneralError = "GeneralError", diff --git a/packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-account-interval-indexer.ts b/packages/indexer/src/indexers/amm-market/amm-market-account-interval-indexer.ts similarity index 91% rename from packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-account-interval-indexer.ts rename to packages/indexer/src/indexers/amm-market/amm-market-account-interval-indexer.ts index 89724448..ad3b511b 100644 --- a/packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-account-interval-indexer.ts +++ b/packages/indexer/src/indexers/amm-market/amm-market-account-interval-indexer.ts @@ -3,7 +3,7 @@ import { Err, Ok, Result } from "../../match"; import { indexAmmMarketAccountWithContext } from "./utils"; import { IntervalFetchIndexer } from "../interval-fetch-indexer"; import { connection } from "../../connection"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; import { AmmMarketAccountIndexingErrors } from "./utils"; export enum AmmAccountIntervalIndexerError { @@ -62,9 +62,4 @@ export const AmmMarketAccountIntervalFetchIndexer: IntervalFetchIndexer = { return Err({ type: AmmAccountIntervalIndexerError.General }); } }, - - indexFromLogs: async (logs: string[]) => { - //TODO: implement if needed - return Err({ type: AmmAccountIntervalIndexerError.General }); - }, }; diff --git a/packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-instruction-indexer.ts b/packages/indexer/src/indexers/amm-market/amm-market-instruction-indexer.ts similarity index 98% rename from packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-instruction-indexer.ts rename to packages/indexer/src/indexers/amm-market/amm-market-instruction-indexer.ts index dfd0c879..7f833a41 100644 --- a/packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-instruction-indexer.ts +++ b/packages/indexer/src/indexers/amm-market/amm-market-instruction-indexer.ts @@ -9,7 +9,7 @@ import { } from "../../types/errors"; import { ammClient, IDL } from "../common"; import { SwapBuilder } from "../../builders/swaps"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; import { GetTransactionErrorType } from "../../transaction/serializer"; export const AmmMarketInstructionsIndexer: InstructionIndexer = { diff --git a/packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-logs-subscribe-indexer.ts b/packages/indexer/src/indexers/amm-market/amm-market-logs-subscribe-indexer.ts similarity index 97% rename from packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-logs-subscribe-indexer.ts rename to packages/indexer/src/indexers/amm-market/amm-market-logs-subscribe-indexer.ts index b559378c..1946b6bc 100644 --- a/packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-logs-subscribe-indexer.ts +++ b/packages/indexer/src/indexers/amm-market/amm-market-logs-subscribe-indexer.ts @@ -2,7 +2,7 @@ import { Context, Logs, PublicKey } from "@solana/web3.js"; import { Err, Ok } from "../../match"; import { AccountLogsIndexer } from "../account-logs-indexer"; import { SwapBuilder } from "../../builders/swaps"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; import { SwapPersistableError } from "../../types/errors"; import { GetTransactionErrorType } from "../../transaction/serializer"; diff --git a/packages/indexer/src/v3_indexer/indexers/amm-market/utils.ts b/packages/indexer/src/indexers/amm-market/utils.ts similarity index 64% rename from packages/indexer/src/v3_indexer/indexers/amm-market/utils.ts rename to packages/indexer/src/indexers/amm-market/utils.ts index b297fb9b..51ed2a32 100644 --- a/packages/indexer/src/v3_indexer/indexers/amm-market/utils.ts +++ b/packages/indexer/src/indexers/amm-market/utils.ts @@ -1,8 +1,7 @@ import { BN } from "@coral-xyz/anchor"; -import { enrichTokenMetadata } from "@metadaoproject/futarchy-sdk"; +import { BN_0, enrichTokenMetadata } from "@metadaoproject/futarchy-sdk"; import { PriceMath } from "@metadaoproject/futarchy/v0.4"; -import { schema, usingDb, eq, inArray } from "@metadaoproject/indexer-db"; -import { TokenRecord } from "@metadaoproject/indexer-db/lib/schema"; +import { schema, usingDb, eq } from "@metadaoproject/indexer-db"; import { PricesType } from "@metadaoproject/indexer-db/lib/schema"; import { TwapRecord, @@ -11,10 +10,8 @@ import { import { AccountInfo, Context, PublicKey } from "@solana/web3.js"; import { provider, rpcReadClient } from "../../connection"; import { Err, Ok, Result, TaggedUnion } from "../../match"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; import { getHumanPrice } from "../../usecases/math"; -import { getMint } from "@solana/spl-token"; -import { connection } from "../../../connection"; export enum AmmMarketAccountIndexingErrors { AmmTwapIndexError = "AmmTwapIndexError", @@ -32,73 +29,15 @@ export async function indexAmmMarketAccountWithContext( const ammMarketAccount = await rpcReadClient.markets.amm.decodeMarket( accountInfo ); - - // TODO: prob need to type these lol - let baseToken; - let quoteToken; - - //get base and quote decimals from db - console.log("utils::indexAmmMarketAccountWithContext::getting tokens from db", ammMarketAccount.baseMint.toString(), ammMarketAccount.quoteMint.toString()); - const tokens = await usingDb((db) => - db - .select() - .from(schema.tokens) - .where(inArray(schema.tokens.mintAcct, [ammMarketAccount.baseMint.toString(), ammMarketAccount.quoteMint.toString()])) - .execute() + const baseToken = await enrichTokenMetadata( + ammMarketAccount.baseMint, + provider + ); + const quoteToken = await enrichTokenMetadata( + ammMarketAccount.quoteMint, + provider ); - if (!tokens || tokens.length < 2) { - // fallback if we don't have the tokens in the db for some reason - console.log("utils::indexAmmMarketAccountWithContext::no tokens in db, fetching from rpc"); - baseToken = await enrichTokenMetadata( - ammMarketAccount.baseMint, - provider - ); - quoteToken = await enrichTokenMetadata( - ammMarketAccount.quoteMint, - provider - ) - - // get token mints from rpc (needed for fetching supply) - const baseMintPubKey = new PublicKey(baseToken.publicKey ?? ""); - const baseTokenMint = await getMint( - connection, - baseMintPubKey - ); - const quoteMintPubKey = new PublicKey(quoteToken.publicKey ?? ""); - const quoteTokenMint = await getMint( - connection, - quoteMintPubKey - ); - const baseTokenRecord: TokenRecord = { - symbol: baseToken.symbol, - name: baseToken.name ? baseToken.name : baseToken.symbol, - decimals: baseToken.decimals, - mintAcct: baseToken.publicKey ?? "", - supply: baseTokenMint.supply.toString(), - updatedAt: new Date(), - } - const quoteTokenRecord: TokenRecord = { - symbol: quoteToken.symbol, - name: quoteToken.name ? quoteToken.name : quoteToken.symbol, - decimals: quoteToken.decimals, - mintAcct: quoteToken.publicKey ?? "", - supply: quoteTokenMint.supply.toString(), - updatedAt: new Date(), - } - const tokensToInsert = [baseTokenRecord, quoteTokenRecord]; - //upsert tokens to db - await usingDb((db) => - db - .insert(schema.tokens) - .values(tokensToInsert) - .onConflictDoNothing() //TODO: probably better to update instead of do nothing on conflict, since supply/name/ticker could've changed - .execute() - ); - } else { - [baseToken, quoteToken] = tokens; - } - // if we don't have an oracle.aggregator of 0 let's run this mf if (!ammMarketAccount.oracle.aggregator.isZero()) { // indexing the twap @@ -121,6 +60,10 @@ export async function indexAmmMarketAccountWithContext( const proposalAcct = market[0].proposalAcct; + // if (proposalAcct === null) { + // logger.error("failed to index amm twap for v4 amm", account.toBase58()); + // return Err({ type: AmmMarketAccountIndexingErrors.AmmV4TwapIndexError }); + // } const twapNumber: string = twapCalculation.toString(); const newTwap: TwapRecord = { curTwap: twapNumber, @@ -137,7 +80,6 @@ export async function indexAmmMarketAccountWithContext( try{ // TODO batch commits across inserts - maybe with event queue - console.log("utils::indexAmmMarketAccountWithContext::upserting twap", newTwap); const twapUpsertResult = await usingDb((db) => db .insert(schema.twaps) @@ -148,9 +90,10 @@ export async function indexAmmMarketAccountWithContext( if (twapUpsertResult === undefined || twapUpsertResult.length === 0) { logger.error("failed to upsert twap", newTwap); + // return Err({ type: AmmMarketAccountIndexingErrors.AmmTwapNoInsertError }); } } catch (e) { - logger.error("error upserting twap", e); + logger.error("failed to upsert twap", e); return Err({ type: AmmMarketAccountIndexingErrors.AmmTwapNoInsertError }); } } diff --git a/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-dao-indexer.ts b/packages/indexer/src/indexers/autocrat/autocrat-dao-indexer.ts similarity index 56% rename from packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-dao-indexer.ts rename to packages/indexer/src/indexers/autocrat/autocrat-dao-indexer.ts index aa4d1bf0..3deb8588 100644 --- a/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-dao-indexer.ts +++ b/packages/indexer/src/indexers/autocrat/autocrat-dao-indexer.ts @@ -6,7 +6,7 @@ import { Err, Ok } from "../../match"; import { PublicKey } from "@solana/web3.js"; import { DaoRecord, TokenRecord } from "@metadaoproject/indexer-db/lib/schema"; import { getMint } from "@solana/spl-token"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; export enum AutocratDaoIndexerError { GeneralError = "GeneralError", @@ -51,7 +51,10 @@ export const AutocratDaoIndexer: IntervalFetchIndexer = { logger.error("Unable to determine public key for dao tokens"); return Err({ type: AutocratDaoIndexerError.MissingParamError }); } - + // const baseTokenData = await enrichTokenMetadata( + // new PublicKey(dao.baseToken.publicKey), + // provider + // ); const baseTokenMint = await getMint( connection, new PublicKey(dao.baseToken.publicKey) @@ -128,104 +131,4 @@ export const AutocratDaoIndexer: IntervalFetchIndexer = { return Err({ type: AutocratDaoIndexerError.GeneralError }); } }, - - indexFromLogs: async (logs: string[]) => { - try { - // Find the relevant log that contains the DAO data - const daoLog = logs.find(log => - log.includes("Instruction:") && - (log.includes("InitializeDao") || log.includes("UpdateDao")) - ); - - if (!daoLog) { - return Err({ type: AutocratDaoIndexerError.MissingParamError }); - } - - // Extract DAO account from logs - const daoAcctMatch = logs.find(log => log.includes("Dao:")); - if (!daoAcctMatch) { - return Err({ type: AutocratDaoIndexerError.MissingParamError }); - } - - const daoAcct = new PublicKey(daoAcctMatch.split(": ")[1]); - - // Fetch the DAO data directly since we need the full account data - const dao = await rpcReadClient.daos.fetchDao(daoAcct); - if (!dao) { - return Err({ type: AutocratDaoIndexerError.NotFoundError }); - } - - // Update database using the same logic as the main indexer - if (dao.baseToken.publicKey == null || dao.quoteToken.publicKey == null) { - logger.error("Unable to determine public key for dao tokens"); - return Err({ type: AutocratDaoIndexerError.MissingParamError }); - } - - const baseTokenMint = await getMint( - connection, - new PublicKey(dao.baseToken.publicKey) - ); - - let token: TokenRecord = { - symbol: dao.baseToken.symbol, - name: dao.baseToken.name ? dao.baseToken.name : dao.baseToken.symbol, - decimals: dao.baseToken.decimals, - mintAcct: dao.baseToken.publicKey, - supply: baseTokenMint.supply.toString(), - updatedAt: new Date(), - }; - - await usingDb((db) => - db.insert(schema.tokens).values(token).onConflictDoNothing().execute() - ); - - let daoToInsert: DaoRecord = { - daoAcct: dao.publicKey.toBase58(), - programAcct: dao.protocol.autocrat.programId.toString(), - baseAcct: dao.baseToken.publicKey, - quoteAcct: dao.quoteToken.publicKey, - slotsPerProposal: dao.daoAccount.slotsPerProposal.toString(), - treasuryAcct: dao.daoAccount.treasury.toBase58(), - minBaseFutarchicLiquidity: - dao.daoAccount.minBaseFutarchicLiquidity - ? dao.daoAccount.minBaseFutarchicLiquidity.toString() - : 0, - minQuoteFutarchicLiquidity: - dao.daoAccount.minQuoteFutarchicLiquidity - ? dao.daoAccount.minQuoteFutarchicLiquidity.toString() - : 0, - passThresholdBps: BigInt(dao.daoAccount.passThresholdBps), - twapInitialObservation: - dao.daoAccount.twapInitialObservation - ? dao.daoAccount.twapInitialObservation.toString() - : 0, - twapMaxObservationChangePerUpdate: - dao.daoAccount.twapMaxObservationChangePerUpdate - ? dao.daoAccount.twapMaxObservationChangePerUpdate.toString() - : 0, - }; - - await usingDb((db) => - db - .insert(schema.daos) - .values(daoToInsert) - .onConflictDoUpdate({ - set: { - minBaseFutarchicLiquidity: daoToInsert.minBaseFutarchicLiquidity, - minQuoteFutarchicLiquidity: daoToInsert.minQuoteFutarchicLiquidity, - twapInitialObservation: daoToInsert.twapInitialObservation, - twapMaxObservationChangePerUpdate: daoToInsert.twapMaxObservationChangePerUpdate, - passThresholdBps: daoToInsert.passThresholdBps, - }, - target: schema.daos.daoAcct, - }) - .execute() - ); - - return Ok({ acct: "Updated dao from logs" }); - } catch (err) { - logger.errorWithChatBotAlert(err); - return Err({ type: AutocratDaoIndexerError.GeneralError }); - } - } }; diff --git a/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-proposal-indexer.ts b/packages/indexer/src/indexers/autocrat/autocrat-proposal-indexer.ts similarity index 80% rename from packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-proposal-indexer.ts rename to packages/indexer/src/indexers/autocrat/autocrat-proposal-indexer.ts index 430877d2..84047d27 100644 --- a/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-proposal-indexer.ts +++ b/packages/indexer/src/indexers/autocrat/autocrat-proposal-indexer.ts @@ -41,7 +41,7 @@ import { import { BN } from "@coral-xyz/anchor"; import { gte } from "drizzle-orm"; import { desc } from "drizzle-orm"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; import { PriceMath, ProposalAccount } from "@metadaoproject/futarchy/v0.3"; import { UserPerformance, UserPerformanceTotals } from "../../types"; import { alias } from "drizzle-orm/pg-core"; @@ -61,7 +61,6 @@ export const AutocratProposalIndexer: IntervalFetchIndexer = { cronExpression: "5 * * * * *", index: async () => { try { - console.log("AutocratProposalIndexer::index::starting"); const { currentSlot, currentTime } = ( await usingDb((db) => @@ -441,217 +440,8 @@ export const AutocratProposalIndexer: IntervalFetchIndexer = { return Err({ type: AutocratDaoIndexerError.GeneralError }); } }, - - indexFromLogs: async (logs: string[]) => { - try { - - //TODO: leaving this here for now, maybe one day we will revisit and do it more efficiently. - console.log("AutocratProposalIndexer::indexFromLogs::logs", logs); - // Find the relevant log that contains the proposal data - const proposalLog = logs.find(log => - log.includes("Instruction:") && - (log.includes("InitializeProposal") || - log.includes("FinalizeProposal") || - log.includes("ExecuteProposal")) - ); - console.log("AutocratProposalIndexer::indexFromLogs::proposalLog", proposalLog); - - if (!proposalLog) { - console.log("AutocratProposalIndexer::indexFromLogs::proposalLog not found"); - return Err({ type: AutocratDaoIndexerError.MissingParamError }); - } - - // Extract proposal account from logs - const proposalAcctMatch = logs.find(log => log.includes("Proposal:")); - if (!proposalAcctMatch) { - console.log("AutocratProposalIndexer::indexFromLogs::proposalAcctMatch not found"); - return Err({ type: AutocratDaoIndexerError.MissingParamError }); - } - - const proposalAcct = new PublicKey(proposalAcctMatch.split(": ")[1]); - console.log("AutocratProposalIndexer::indexFromLogs::proposalAcct", proposalAcct); - - // Fetch the proposal data since we need the full account data - const protocolV0_3 = rpcReadClient.futarchyProtocols.find( - (protocol) => protocol.deploymentVersion == "V0.3" - ); - - if (!protocolV0_3) { - return Err({ type: AutocratDaoIndexerError.MissingProtocolError }); - } - - const proposal = await protocolV0_3.autocrat.account.proposal.fetch(proposalAcct); - if (!proposal) { - return Err({ type: AutocratDaoIndexerError.NotFoundError }); - } - console.log("AutocratProposalIndexer::indexFromLogs::proposal", proposal); - - // Get current slot and time for calculations - const { currentSlot, currentTime } = ( - await usingDb((db) => - db - .select({ - currentSlot: schema.prices.updatedSlot, - currentTime: schema.prices.createdAt, - }) - .from(schema.prices) - .orderBy(sql`${schema.prices.updatedSlot} DESC`) - .limit(1) - .execute() - ) - )?.[0] ?? {}; - - if (!currentSlot || !currentTime) { - return Err({ type: AutocratDaoIndexerError.MissingParamError }); - } - - // If this is a new proposal, insert associated accounts data - if (proposalLog.includes("InitializeProposal")) { - console.log("indexFromLogs::inserting associated accounts data for proposal", proposalAcct); - await upsertProposal({ publicKey: proposalAcct, account: proposal }, currentTime); - await insertAssociatedAccountsDataForProposal( - { publicKey: proposalAcct, account: proposal }, - currentTime - ); - } - - // Handle different proposal states - if (proposal.state.pending) { - // Update proposal as pending - if (!proposalLog.includes("InitializeProposal")) { // If this is a new proposal, we dont need to update the status - await updateProposalStatus(proposalAcct, ProposalStatus.Pending, currentTime); - } - } else if (proposal.state.passed) { - // Update proposal as passed - await updateProposalStatus(proposalAcct, ProposalStatus.Passed, currentTime); - await updateVaultStatuses(proposal.baseVault, proposal.quoteVault, "finalized"); - await calculateUserPerformance({ publicKey: proposalAcct, account: proposal }); - } else if (proposal.state.failed) { - // Update proposal as failed - await updateProposalStatus(proposalAcct, ProposalStatus.Failed, currentTime); - await updateVaultStatuses(proposal.baseVault, proposal.quoteVault, "reverted"); - await calculateUserPerformance({ publicKey: proposalAcct, account: proposal }); - } - - console.log("AutocratProposalIndexer::indexFromLogs::done"); - return Ok({ acct: "Updated proposal from logs" }); - } catch (err) { - logger.error("error with proposal indexer:", err); - return Err({ type: AutocratDaoIndexerError.GeneralError }); - } - } }; -// helper function to upsert proposal -async function upsertProposal(proposal: ProposalAccountWithKey, currentTime: Date) { - const daoAcct = proposal.account.dao; - if (!daoAcct) { - console.log("AutocratProposalIndexer::upsertProposal::daoAcct not found"); - return Err({ type: AutocratDaoIndexerError.MissingParamError }); - } - - // Get DAO details - const dbDao: DaoRecord | undefined = ( - await usingDb((db) => - db - .select() - .from(schema.daos) - .where(eq(schema.daos.daoAcct, daoAcct.toBase58())) - .execute() - ) - )?.[0]; - - if (!dbDao) return; - - // Calculate end slot - const initialSlot = proposal.account.slotEnqueued; - const endSlot = initialSlot.add(new BN(dbDao.slotsPerProposal?.toString())); - - // Prepare proposal record - const dbProposal: ProposalRecord = { - proposalAcct: proposal.publicKey.toString(), - proposalNum: BigInt(proposal.account.number.toString()), - autocratVersion: 0.3, - daoAcct: daoAcct.toString(), - proposerAcct: proposal.account.proposer.toString(), - status: ProposalStatus.Pending, - descriptionURL: proposal.account.descriptionUrl, - initialSlot: initialSlot.toString(), - passMarketAcct: proposal.account.passAmm?.toString() ?? null, - failMarketAcct: proposal.account.failAmm?.toString() ?? null, - baseVault: proposal.account.baseVault.toString(), - quoteVault: proposal.account.quoteVault.toString(), - endSlot: endSlot.toString(), - durationInSlots: dbDao.slotsPerProposal, - minBaseFutarchicLiquidity: dbDao.minBaseFutarchicLiquidity ?? null, - minQuoteFutarchicLiquidity: dbDao.minQuoteFutarchicLiquidity ?? null, - passThresholdBps: dbDao.passThresholdBps, - twapInitialObservation: dbDao.twapInitialObservation ?? null, - twapMaxObservationChangePerUpdate: dbDao.twapMaxObservationChangePerUpdate ?? null, - }; - - // Insert or update the proposal - await usingDb((db) => - db - .insert(schema.proposals) - .values([dbProposal]) - .onConflictDoUpdate({ - target: [schema.proposals.proposalAcct], - set: { - status: dbProposal.status, - descriptionURL: dbProposal.descriptionURL, - initialSlot: dbProposal.initialSlot, - endSlot: dbProposal.endSlot, - updatedAt: sql`NOW()`, - }, - }) - .execute() - ); - - return Ok({ acct: "Proposal upserted successfully" }); -} - -// Helper function to update proposal status -async function updateProposalStatus( - proposalAcct: PublicKey, - status: ProposalStatus, - currentTime: Date -) { - await usingDb((db) => - db - .update(schema.proposals) - .set({ - status, - completedAt: status !== ProposalStatus.Pending ? currentTime : null, - updatedAt: sql`NOW()` - }) - .where( - eq(schema.proposals.proposalAcct, proposalAcct.toString()) - ) - .execute() - ); -} - -// Helper function to update vault statuses -async function updateVaultStatuses( - baseVault: PublicKey, - quoteVault: PublicKey, - status: "finalized" | "reverted" -) { - await usingDb((db) => - db - .update(schema.conditionalVaults) - .set({ status }) - .where( - or( - eq(schema.conditionalVaults.condVaultAcct, baseVault.toString()), - eq(schema.conditionalVaults.condVaultAcct, quoteVault.toString()) - ) - ) - .execute() - ); -} - async function insertAssociatedAccountsDataForProposal( proposal: ProposalAccountWithKey, currentTime: Date diff --git a/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0-indexer.ts b/packages/indexer/src/indexers/autocrat/autocrat-v0-indexer.ts similarity index 94% rename from packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0-indexer.ts rename to packages/indexer/src/indexers/autocrat/autocrat-v0-indexer.ts index f23102f5..9a31a557 100644 --- a/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0-indexer.ts +++ b/packages/indexer/src/indexers/autocrat/autocrat-v0-indexer.ts @@ -1,7 +1,7 @@ import { AUTOCRAT_VERSIONS } from "@metadaoproject/futarchy-sdk/lib/constants"; import { IDL, AutocratV0 } from "@metadaoproject/futarchy-sdk/lib/idl/autocrat_v0"; import { Err, InstructionIndexer, Ok } from "../instruction-indexer"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; const AUTOCRAT_V0 = AUTOCRAT_VERSIONS[AUTOCRAT_VERSIONS.length - 1]; diff --git a/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0_1-indexer.ts b/packages/indexer/src/indexers/autocrat/autocrat-v0_1-indexer.ts similarity index 94% rename from packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0_1-indexer.ts rename to packages/indexer/src/indexers/autocrat/autocrat-v0_1-indexer.ts index 331c3519..95d51d60 100644 --- a/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0_1-indexer.ts +++ b/packages/indexer/src/indexers/autocrat/autocrat-v0_1-indexer.ts @@ -1,7 +1,7 @@ import { AUTOCRAT_VERSIONS } from "@metadaoproject/futarchy-sdk/lib/constants"; import { IDL, AutocratV0 } from "@metadaoproject/futarchy-sdk/lib/idl/autocrat_v0.1"; import { InstructionIndexer, Ok } from "../instruction-indexer"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; const AUTOCRAT_V0_1 = AUTOCRAT_VERSIONS[AUTOCRAT_VERSIONS.length - 2]; diff --git a/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0_2-indexer.ts b/packages/indexer/src/indexers/autocrat/autocrat-v0_2-indexer.ts similarity index 94% rename from packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0_2-indexer.ts rename to packages/indexer/src/indexers/autocrat/autocrat-v0_2-indexer.ts index 68c70cbb..ce56b9bf 100644 --- a/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0_2-indexer.ts +++ b/packages/indexer/src/indexers/autocrat/autocrat-v0_2-indexer.ts @@ -1,7 +1,7 @@ import { AUTOCRAT_VERSIONS } from "@metadaoproject/futarchy-sdk/lib/constants"; import { IDL, AutocratV0 } from "@metadaoproject/futarchy-sdk/lib/idl/autocrat_v0.2"; import { InstructionIndexer, Ok } from "../instruction-indexer"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; const AUTOCRAT_V0_2 = AUTOCRAT_VERSIONS[AUTOCRAT_VERSIONS.length - 1]; diff --git a/packages/indexer/src/v3_indexer/indexers/birdeye/birdeye-prices-indexer.ts b/packages/indexer/src/indexers/birdeye/birdeye-prices-indexer.ts similarity index 98% rename from packages/indexer/src/v3_indexer/indexers/birdeye/birdeye-prices-indexer.ts rename to packages/indexer/src/indexers/birdeye/birdeye-prices-indexer.ts index 7142fac3..cf0515e3 100644 --- a/packages/indexer/src/v3_indexer/indexers/birdeye/birdeye-prices-indexer.ts +++ b/packages/indexer/src/indexers/birdeye/birdeye-prices-indexer.ts @@ -6,7 +6,7 @@ import { PricesRecord, PricesType, } from "@metadaoproject/indexer-db/lib/schema"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; const apiKey = process.env.BIRDEYE_API_KEY ?? ""; diff --git a/packages/indexer/src/v3_indexer/indexers/common.ts b/packages/indexer/src/indexers/common.ts similarity index 100% rename from packages/indexer/src/v3_indexer/indexers/common.ts rename to packages/indexer/src/indexers/common.ts diff --git a/packages/indexer/src/v3_indexer/indexers/index.ts b/packages/indexer/src/indexers/index.ts similarity index 98% rename from packages/indexer/src/v3_indexer/indexers/index.ts rename to packages/indexer/src/indexers/index.ts index f3293924..a6d7f911 100644 --- a/packages/indexer/src/v3_indexer/indexers/index.ts +++ b/packages/indexer/src/indexers/index.ts @@ -9,7 +9,7 @@ import { startAccountInfoIndexer } from "./start-account-info-indexers"; import { startTransactionHistoryIndexer } from "./start-transaction-history-indexers"; import { startLogsSubscribeIndexer } from "./start-logs-subscribe-indexer"; import { IndexerWithAccountDeps } from "../types"; -import { logger } from "../../logger"; +import { logger } from "../logger"; export async function startIndexers() { await startAllIndexers(); diff --git a/packages/indexer/src/v3_indexer/indexers/instruction-indexer.ts b/packages/indexer/src/indexers/instruction-indexer.ts similarity index 100% rename from packages/indexer/src/v3_indexer/indexers/instruction-indexer.ts rename to packages/indexer/src/indexers/instruction-indexer.ts diff --git a/packages/indexer/src/v3_indexer/indexers/interval-fetch-indexer.ts b/packages/indexer/src/indexers/interval-fetch-indexer.ts similarity index 66% rename from packages/indexer/src/v3_indexer/indexers/interval-fetch-indexer.ts rename to packages/indexer/src/indexers/interval-fetch-indexer.ts index 1cc376a4..ce983ffc 100644 --- a/packages/indexer/src/v3_indexer/indexers/interval-fetch-indexer.ts +++ b/packages/indexer/src/indexers/interval-fetch-indexer.ts @@ -10,12 +10,4 @@ export type IntervalFetchIndexer = { TaggedUnion > >; - indexFromLogs(logs: string[]): Promise< - Result< - { - acct: string; - }, - TaggedUnion - > - >; }; diff --git a/packages/indexer/src/v3_indexer/indexers/jupiter/jupiter-quotes-indexer.ts b/packages/indexer/src/indexers/jupiter/jupiter-quotes-indexer.ts similarity index 99% rename from packages/indexer/src/v3_indexer/indexers/jupiter/jupiter-quotes-indexer.ts rename to packages/indexer/src/indexers/jupiter/jupiter-quotes-indexer.ts index 076487d8..743529d7 100644 --- a/packages/indexer/src/v3_indexer/indexers/jupiter/jupiter-quotes-indexer.ts +++ b/packages/indexer/src/indexers/jupiter/jupiter-quotes-indexer.ts @@ -6,7 +6,7 @@ import { PricesRecord, PricesType, } from "@metadaoproject/indexer-db/lib/schema"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; export enum JupiterQuoteIndexingError { JupiterFetchError = "JupiterFetchError", diff --git a/packages/indexer/src/v3_indexer/indexers/openbook-twap/openbook-twap-instruction-indexer.ts b/packages/indexer/src/indexers/openbook-twap/openbook-twap-instruction-indexer.ts similarity index 100% rename from packages/indexer/src/v3_indexer/indexers/openbook-twap/openbook-twap-instruction-indexer.ts rename to packages/indexer/src/indexers/openbook-twap/openbook-twap-instruction-indexer.ts diff --git a/packages/indexer/src/v3_indexer/indexers/openbook-v2/openbook-v2-account-indexer.ts b/packages/indexer/src/indexers/openbook-v2/openbook-v2-account-indexer.ts similarity index 98% rename from packages/indexer/src/v3_indexer/indexers/openbook-v2/openbook-v2-account-indexer.ts rename to packages/indexer/src/indexers/openbook-v2/openbook-v2-account-indexer.ts index 8518760b..6edec736 100644 --- a/packages/indexer/src/v3_indexer/indexers/openbook-v2/openbook-v2-account-indexer.ts +++ b/packages/indexer/src/indexers/openbook-v2/openbook-v2-account-indexer.ts @@ -11,7 +11,7 @@ import { PricesRecord, PricesType, } from "@metadaoproject/indexer-db/lib/schema"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; export enum OpenbookV2MarketAccountIndexerError { MarketNotFound = "MarketNotFound", diff --git a/packages/indexer/src/v3_indexer/indexers/openbook-v2/openbook-v2-indexer.ts b/packages/indexer/src/indexers/openbook-v2/openbook-v2-indexer.ts similarity index 100% rename from packages/indexer/src/v3_indexer/indexers/openbook-v2/openbook-v2-indexer.ts rename to packages/indexer/src/indexers/openbook-v2/openbook-v2-indexer.ts diff --git a/packages/indexer/src/v3_indexer/indexers/start-account-info-indexers.ts b/packages/indexer/src/indexers/start-account-info-indexers.ts similarity index 79% rename from packages/indexer/src/v3_indexer/indexers/start-account-info-indexers.ts rename to packages/indexer/src/indexers/start-account-info-indexers.ts index 49748830..56f8f950 100644 --- a/packages/indexer/src/v3_indexer/indexers/start-account-info-indexers.ts +++ b/packages/indexer/src/indexers/start-account-info-indexers.ts @@ -5,7 +5,7 @@ import { IndexerWithAccountDeps } from "../types"; import { AccountInfoIndexer } from "./account-info-indexer"; import { AmmMarketAccountUpdateIndexer } from "./amm-market/amm-market-account-indexer"; import { OpenbookV2MarketAccountUpdateIndexer } from "./openbook-v2/openbook-v2-account-indexer"; -import { logger } from "../../logger"; +import { logger } from "../logger"; export async function startAccountInfoIndexer( indexerQueryRes: IndexerWithAccountDeps @@ -38,17 +38,16 @@ export async function startAccountInfoIndexer( } } - // // TODO: re-enable this or delete this whole thing if not needed - // connection.onAccountChange(accountPubKey, async (accountInfo, context) => { - // const res = await implementation.index( - // accountInfo, - // accountPubKey, - // context - // ); - // if (!res.success) { - // logger.error("error indexing account update", accountPubKey.toString()); - // } - // }); + connection.onAccountChange(accountPubKey, async (accountInfo, context) => { + const res = await implementation.index( + accountInfo, + accountPubKey, + context + ); + if (!res.success) { + logger.error("error indexing account update", accountPubKey.toString()); + } + }); } } function getAccountInfoIndexerImplementation( diff --git a/packages/indexer/src/v3_indexer/indexers/start-interval-fetch-indexers.ts b/packages/indexer/src/indexers/start-interval-fetch-indexers.ts similarity index 99% rename from packages/indexer/src/v3_indexer/indexers/start-interval-fetch-indexers.ts rename to packages/indexer/src/indexers/start-interval-fetch-indexers.ts index 07037996..cebde233 100644 --- a/packages/indexer/src/v3_indexer/indexers/start-interval-fetch-indexers.ts +++ b/packages/indexer/src/indexers/start-interval-fetch-indexers.ts @@ -13,7 +13,7 @@ import { AutocratProposalIndexer } from "./autocrat/autocrat-proposal-indexer"; import { TokenMintIndexer } from "./token/token-mint-indexer"; import { Cron } from "croner"; import { and, eq, schema, usingDb } from "@metadaoproject/indexer-db"; -import { logger } from "../../logger"; +import { logger } from "../logger"; // add croner for this // instantiates new croner and returns in function, which could be potentially useful diff --git a/packages/indexer/src/v3_indexer/indexers/start-logs-subscribe-indexer.ts b/packages/indexer/src/indexers/start-logs-subscribe-indexer.ts similarity index 97% rename from packages/indexer/src/v3_indexer/indexers/start-logs-subscribe-indexer.ts rename to packages/indexer/src/indexers/start-logs-subscribe-indexer.ts index 4c8f267a..8e5584f7 100644 --- a/packages/indexer/src/v3_indexer/indexers/start-logs-subscribe-indexer.ts +++ b/packages/indexer/src/indexers/start-logs-subscribe-indexer.ts @@ -4,7 +4,7 @@ import { connection } from "../connection"; import { IndexerWithAccountDeps } from "../types"; import { AccountLogsIndexer } from "./account-logs-indexer"; import { AmmMarketLogsSubscribeIndexer } from "./amm-market/amm-market-logs-subscribe-indexer"; -import { logger } from "../../logger"; +import { logger } from "../logger"; export async function startLogsSubscribeIndexer( indexerQueryRes: IndexerWithAccountDeps diff --git a/packages/indexer/src/v3_indexer/indexers/start-transaction-history-indexers.ts b/packages/indexer/src/indexers/start-transaction-history-indexers.ts similarity index 100% rename from packages/indexer/src/v3_indexer/indexers/start-transaction-history-indexers.ts rename to packages/indexer/src/indexers/start-transaction-history-indexers.ts diff --git a/packages/indexer/src/v3_indexer/indexers/token/token-mint-indexer.ts b/packages/indexer/src/indexers/token/token-mint-indexer.ts similarity index 98% rename from packages/indexer/src/v3_indexer/indexers/token/token-mint-indexer.ts rename to packages/indexer/src/indexers/token/token-mint-indexer.ts index c1e7a2be..cde88d49 100644 --- a/packages/indexer/src/v3_indexer/indexers/token/token-mint-indexer.ts +++ b/packages/indexer/src/indexers/token/token-mint-indexer.ts @@ -5,7 +5,7 @@ import { Err, Ok } from "../../match"; import { PublicKey } from "@solana/web3.js"; import { TokenRecord } from "@metadaoproject/indexer-db/lib/schema"; import { TokenAccountNotFoundError, getMint } from "@solana/spl-token"; -import { logger } from "../../../logger"; +import { logger } from "../../logger"; export enum TokenMintIndexerError { GeneralError = "GeneralError", diff --git a/packages/indexer/src/v3_indexer/instruction-dispatch.ts b/packages/indexer/src/instruction-dispatch.ts similarity index 100% rename from packages/indexer/src/v3_indexer/instruction-dispatch.ts rename to packages/indexer/src/instruction-dispatch.ts diff --git a/packages/indexer/src/v3_indexer/local-cache.ts b/packages/indexer/src/local-cache.ts similarity index 100% rename from packages/indexer/src/v3_indexer/local-cache.ts rename to packages/indexer/src/local-cache.ts diff --git a/packages/indexer/src/logger.ts b/packages/indexer/src/logger.ts index 04b78934..7760a066 100644 --- a/packages/indexer/src/logger.ts +++ b/packages/indexer/src/logger.ts @@ -2,23 +2,22 @@ import { Counter } from "@lukasdeco/prom-client"; import { AlertChatBotInterface, TelegramBotAPI } from "./adapters/telegram-bot"; const TELEGRAM_ALERT_CHAT_ID = process.env.TELEGRAM_ALERT_CHAT_ID ?? ""; -const DEPLOY_ENVIRONMENT = process.env.DEPLOY_ENVIRONMENT ?? "STAGING"; export class Logger { - // private errorCounter; - // private warnCounter; + private errorCounter; + private warnCounter; private chatBotApi: AlertChatBotInterface; constructor(chatBotApi: AlertChatBotInterface) { - // this.errorCounter = new Counter({ - // name: "errors", - // help: "number of errors", - // }); + this.errorCounter = new Counter({ + name: "errors", + help: "number of errors", + }); - // this.warnCounter = new Counter({ - // name: "warnings", - // help: "number of warnings", - // }); + this.warnCounter = new Counter({ + name: "warnings", + help: "number of warnings", + }); this.chatBotApi = chatBotApi; } @@ -58,13 +57,13 @@ export class Logger { error(...data: any[]): void { console.error(this.formatData(data)); - // this.errorCounter.inc(); + this.errorCounter.inc(); } errorWithChatBotAlert(...data: any[]): void { - const formattedData = DEPLOY_ENVIRONMENT + "::" + this.formatData(data); + const formattedData = this.formatData(data); console.error(formattedData); - // this.errorCounter.inc(); + this.errorCounter.inc(); if (TELEGRAM_ALERT_CHAT_ID) { this.chatBotApi.sendMessage(TELEGRAM_ALERT_CHAT_ID, formattedData); } @@ -72,7 +71,7 @@ export class Logger { warn(message: string): void { console.warn(message); - // this.warnCounter.inc(); + this.warnCounter.inc(); } } diff --git a/packages/indexer/src/v3_indexer/match.ts b/packages/indexer/src/match.ts similarity index 100% rename from packages/indexer/src/v3_indexer/match.ts rename to packages/indexer/src/match.ts diff --git a/packages/indexer/src/v3_indexer/proposal-indexer.ts b/packages/indexer/src/proposal-indexer.ts similarity index 100% rename from packages/indexer/src/v3_indexer/proposal-indexer.ts rename to packages/indexer/src/proposal-indexer.ts diff --git a/packages/indexer/src/server.ts b/packages/indexer/src/server.ts new file mode 100644 index 00000000..e4f8cd32 --- /dev/null +++ b/packages/indexer/src/server.ts @@ -0,0 +1,18 @@ +import { getMetrics } from "./endpoints/get-metrics"; +import { logger } from "./logger"; +import cors from "cors"; +import express from "express"; + +const PORT = process.env.PORT ?? 8080; + +export function startServer() { + logger.log("starting server"); + const app = express(); + app.use(express.json()); + app.use(cors({ origin: "*", allowedHeaders: ["Content-Type"] })); + app.get("/metrics", getMetrics); + + app.listen(PORT, () => { + logger.log(`Server listening on Port ${PORT}`); + }); +} diff --git a/packages/indexer/src/subscriber.ts b/packages/indexer/src/subscriber.ts deleted file mode 100644 index c347340e..00000000 --- a/packages/indexer/src/subscriber.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { connection } from "./connection"; -import { Context, Logs, PublicKey } from "@solana/web3.js"; -import { AMM_PROGRAM_ID as V4_AMM_PROGRAM_ID, AUTOCRAT_PROGRAM_ID as V4_AUTOCRAT_PROGRAM_ID, CONDITIONAL_VAULT_PROGRAM_ID as V4_CONDITIONAL_VAULT_PROGRAM_ID } from "@metadaoproject/futarchy/v0.4"; -import { AMM_PROGRAM_ID as V3_AMM_PROGRAM_ID, AUTOCRAT_PROGRAM_ID as V3_AUTOCRAT_PROGRAM_ID, CONDITIONAL_VAULT_PROGRAM_ID as V3_CONDITIONAL_VAULT_PROGRAM_ID } from "@metadaoproject/futarchy/v0.3"; -import { IndexerImplementation } from "@metadaoproject/indexer-db/lib/schema"; -import { AccountLogsIndexer } from "./account-logs-indexer"; -import { AmmMarketLogsSubscribeIndexer } from "./amm-market/amm-market-logs-subscribe-indexer"; -import { logger } from "./logger"; -import { indexFromLogs as indexV4 } from "./v4_indexer/indexer"; -import { indexFromLogs as indexV3 } from "./v3_indexer/indexer"; - - -async function processLogs(logs: Logs, ctx: Context, programId: PublicKey) { - //check if programId is v3 or v4 - if (programId.equals(V4_AMM_PROGRAM_ID) || programId.equals(V4_AUTOCRAT_PROGRAM_ID) || programId.equals(V4_CONDITIONAL_VAULT_PROGRAM_ID)) { - await indexV4(logs, ctx, programId); - } else if (programId.equals(V3_AMM_PROGRAM_ID) || programId.equals(V3_AUTOCRAT_PROGRAM_ID) || programId.equals(V3_CONDITIONAL_VAULT_PROGRAM_ID)) { - await indexV3(logs, ctx, programId); - } else { - logger.error(`Unknown programId ${programId.toString()}`); - } -} - -//subscribes to logs for a given account -async function subscribe(accountPubKey: PublicKey) { - connection.onLogs(accountPubKey, async (logs: Logs, ctx: Context) => { //TODO: maybe add commitment "confirmed" (rpc docs doesnt say if this is default) - try { - // wait here because we need to fetch the txn from RPC - // and often we get no response if we try right after recieving the logs notification - console.log("Logs received for account", accountPubKey.toString()); - console.log("Logs", logs); - await new Promise((resolve) => setTimeout(resolve, 500)); - processLogs(logs, ctx, accountPubKey); //trigger processing of logs - } catch (error) { - logger.errorWithChatBotAlert(`Error processing logs for account ${accountPubKey.toString()}`, error); - } - }); -} - -//asynchronously subscribes to logs for all programs -export async function subscribeAll() { - const programIds = [ - V4_AMM_PROGRAM_ID, - V4_AUTOCRAT_PROGRAM_ID, - V4_CONDITIONAL_VAULT_PROGRAM_ID, - // V3_AMM_PROGRAM_ID, - V3_AUTOCRAT_PROGRAM_ID, - // V3_CONDITIONAL_VAULT_PROGRAM_ID - ]; - console.log("Subscribing to logs"); - Promise.all(programIds.map(async (programId) => subscribe(programId))); -} - - - - diff --git a/packages/indexer/src/v3_indexer/transaction/account-resolver.ts b/packages/indexer/src/transaction/account-resolver.ts similarity index 100% rename from packages/indexer/src/v3_indexer/transaction/account-resolver.ts rename to packages/indexer/src/transaction/account-resolver.ts diff --git a/packages/indexer/src/v3_indexer/transaction/history.ts b/packages/indexer/src/transaction/history.ts similarity index 98% rename from packages/indexer/src/v3_indexer/transaction/history.ts rename to packages/indexer/src/transaction/history.ts index cd41d9f1..9a54da42 100644 --- a/packages/indexer/src/v3_indexer/transaction/history.ts +++ b/packages/indexer/src/transaction/history.ts @@ -1,6 +1,6 @@ import { connection } from "../connection"; import { PublicKey } from "@solana/web3.js"; -import { logger } from "../../logger"; +import { logger } from "../logger"; export type TransactionMeta = Awaited< ReturnType<(typeof connection)["getSignaturesForAddress"]> diff --git a/packages/indexer/src/v3_indexer/transaction/serializer.test.ts b/packages/indexer/src/transaction/serializer.test.ts similarity index 100% rename from packages/indexer/src/v3_indexer/transaction/serializer.test.ts rename to packages/indexer/src/transaction/serializer.test.ts diff --git a/packages/indexer/src/v3_indexer/transaction/serializer.ts b/packages/indexer/src/transaction/serializer.ts similarity index 99% rename from packages/indexer/src/v3_indexer/transaction/serializer.ts rename to packages/indexer/src/transaction/serializer.ts index 460ce085..06e68da9 100644 --- a/packages/indexer/src/v3_indexer/transaction/serializer.ts +++ b/packages/indexer/src/transaction/serializer.ts @@ -18,7 +18,7 @@ import { InstructionDisplay, Instruction as AnchorInstruction, } from "@coral-xyz/anchor/dist/cjs/coder/borsh/instruction"; -import { logger } from "../../logger"; +import { logger } from "../logger"; /** * This version should be bumped every time we update this file. diff --git a/packages/indexer/src/v3_indexer/transaction/watcher.ts b/packages/indexer/src/transaction/watcher.ts similarity index 99% rename from packages/indexer/src/v3_indexer/transaction/watcher.ts rename to packages/indexer/src/transaction/watcher.ts index cda8183a..39eed8a3 100644 --- a/packages/indexer/src/v3_indexer/transaction/watcher.ts +++ b/packages/indexer/src/transaction/watcher.ts @@ -8,7 +8,7 @@ import { } from "./serializer"; import { getTransactionHistory } from "./history"; import { connection } from "../connection"; -import { logger } from "../../logger"; +import { logger } from "../logger"; import { Err, Ok, Result, TaggedUnion } from "../match"; import { InstructionType, diff --git a/packages/indexer/src/v3_indexer/types/errors.ts b/packages/indexer/src/types/errors.ts similarity index 100% rename from packages/indexer/src/v3_indexer/types/errors.ts rename to packages/indexer/src/types/errors.ts diff --git a/packages/indexer/src/v3_indexer/types/index.ts b/packages/indexer/src/types/index.ts similarity index 100% rename from packages/indexer/src/v3_indexer/types/index.ts rename to packages/indexer/src/types/index.ts diff --git a/packages/indexer/src/v3_indexer/types/swaps.ts b/packages/indexer/src/types/swaps.ts similarity index 100% rename from packages/indexer/src/v3_indexer/types/swaps.ts rename to packages/indexer/src/types/swaps.ts diff --git a/packages/indexer/src/v3_indexer/usecases/math.test.ts b/packages/indexer/src/usecases/math.test.ts similarity index 100% rename from packages/indexer/src/v3_indexer/usecases/math.test.ts rename to packages/indexer/src/usecases/math.test.ts diff --git a/packages/indexer/src/v3_indexer/usecases/math.ts b/packages/indexer/src/usecases/math.ts similarity index 93% rename from packages/indexer/src/v3_indexer/usecases/math.ts rename to packages/indexer/src/usecases/math.ts index 2e2e5416..e1078b62 100644 --- a/packages/indexer/src/v3_indexer/usecases/math.ts +++ b/packages/indexer/src/usecases/math.ts @@ -1,5 +1,5 @@ import { BN } from "@coral-xyz/anchor"; -import { logger } from "../../logger"; +import { logger } from "../logger"; export function getHumanPrice( ammPrice: BN, diff --git a/packages/indexer/src/v3_indexer/connection.ts b/packages/indexer/src/v3_indexer/connection.ts deleted file mode 100644 index 47e2bd76..00000000 --- a/packages/indexer/src/v3_indexer/connection.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Connection } from "@solana/web3.js"; -import { AnchorProvider, Wallet } from "@coral-xyz/anchor"; -import { - FutarchyRPCClient, - FutarchyIndexerClient, -} from "@metadaoproject/futarchy-sdk"; -import { ConditionalVaultClient } from "@metadaoproject/futarchy/v0.3"; - -export const RPC_ENDPOINT = process.env.RPC_ENDPOINT ?? ""; -export const INDEXER_URL = process.env.INDEXER_URL ?? ""; -export const INDEXER_WSS_URL = process.env.INDEXER_WSS_URL ?? ""; -export const connection: Connection = new Connection(RPC_ENDPOINT, "confirmed"); -// the indexer will only be reading, not writing -export const readonlyWallet: Wallet = undefined as unknown as Wallet; -export const provider = new AnchorProvider(connection, readonlyWallet, { - commitment: "confirmed", -}); - -export const rpcReadClient = FutarchyRPCClient.make(provider, undefined); - -export const indexerReadClient = FutarchyIndexerClient.make( - rpcReadClient, - INDEXER_URL, - INDEXER_WSS_URL, - "" -); - -export const conditionalVaultClient = ConditionalVaultClient.createClient({ - provider, -}); diff --git a/packages/indexer/src/v3_indexer/indexer.ts b/packages/indexer/src/v3_indexer/indexer.ts deleted file mode 100644 index e232d80d..00000000 --- a/packages/indexer/src/v3_indexer/indexer.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Context, Logs, PublicKey } from "@solana/web3.js"; -import { AMM_PROGRAM_ID as V3_AMM_PROGRAM_ID, AUTOCRAT_PROGRAM_ID as V3_AUTOCRAT_PROGRAM_ID, CONDITIONAL_VAULT_PROGRAM_ID as V3_CONDITIONAL_VAULT_PROGRAM_ID } from "@metadaoproject/futarchy/v0.3"; -import { AmmMarketLogsSubscribeIndexer } from "./indexers/amm-market/amm-market-logs-subscribe-indexer"; -import { AutocratDaoIndexer } from "./indexers/autocrat/autocrat-dao-indexer"; -import { AutocratProposalIndexer } from "./indexers/autocrat/autocrat-proposal-indexer"; - - -export async function indexFromLogs(logs: Logs, ctx: Context, programId: PublicKey) { - console.log("indexFromLogs:: indexing logs", logs); - if (programId.equals(V3_AMM_PROGRAM_ID)) { - await AmmMarketLogsSubscribeIndexer.index(logs, programId, ctx); - } else if (programId.equals(V3_CONDITIONAL_VAULT_PROGRAM_ID)) { - //TODO: implement - console.log("Conditional vault logs received"); - console.log(logs); - return; - } else if (programId.equals(V3_AUTOCRAT_PROGRAM_ID)) { - // return; - console.log("indexFromLogs:: autocrat logs received", logs); - // Parse logs to find instruction type - const instructionLog = logs.logs.find(log => - log.includes("Instruction:") && - (log.includes("InitializeDao") || - log.includes("InitializeProposal") || - log.includes("FinalizeProposal") || - log.includes("ExecuteProposal") || - log.includes("UpdateDao")) - ); - - if (instructionLog) { - //TODO: the autocrat proposal and dao indexer(s) doesnt take any args, but the interval indexer interface requires it. maybe fix that lol. - if (instructionLog.includes("InitializeDao") || instructionLog.includes("UpdateDao")) { - await AutocratDaoIndexer.index(programId.toString()); - } else if (instructionLog.includes("InitializeProposal") || - instructionLog.includes("FinalizeProposal") || - instructionLog.includes("ExecuteProposal")) { - await AutocratProposalIndexer.index(programId.toString()); - } - } - } else { - throw new Error(`Unknown programId ${programId.toString()}`); - } -} \ No newline at end of file diff --git a/packages/indexer/src/v3_indexer/processor.ts b/packages/indexer/src/v3_indexer/processor.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/indexer/src/v4_indexer/filler.ts b/packages/indexer/src/v4_indexer/filler.ts deleted file mode 100644 index 1bd3fdd9..00000000 --- a/packages/indexer/src/v4_indexer/filler.ts +++ /dev/null @@ -1,207 +0,0 @@ -import { ConfirmedSignatureInfo, Connection, PublicKey } from "@solana/web3.js"; -import { AMM_PROGRAM_ID as V4_AMM_PROGRAM_ID, AUTOCRAT_PROGRAM_ID as V4_AUTOCRAT_PROGRAM_ID, CONDITIONAL_VAULT_PROGRAM_ID as V4_CONDITIONAL_VAULT_PROGRAM_ID } from "@metadaoproject/futarchy/v0.4"; -import { usingDb, schema, eq, asc, desc } from "@metadaoproject/indexer-db"; -import { TelegramBotAPI } from "../adapters/telegram-bot"; -import { Logger } from "../logger"; -import { index } from "./indexer"; - -const RPC_ENDPOINT = process.env.RPC_ENDPOINT; - -if (!RPC_ENDPOINT) { - throw new Error("RPC_ENDPOINT is not set"); -} -const connection = new Connection(RPC_ENDPOINT); -const logger = new Logger(new TelegramBotAPI({token: process.env.TELEGRAM_BOT_API_KEY ?? ''})); - -// it's possible that there are signatures BEFORE the oldest signature -// because the indexer may not have been running when those signatures were created - -// it's also possible that there are signatures AFTER the newest signature - -// we assume that there aren't signatures between the oldest and newest signatures - -// we split these into two functions: -// - backfillHistoricalSignatures -// - insertNewSignatures - -const backfillHistoricalSignatures = async ( - programId: PublicKey, -) => { - let backfilledSignatures: ConfirmedSignatureInfo[] = []; - let oldestSignature = await usingDb(async (db) => { - return await db.select({ signature: schema.signatures.signature }) - .from(schema.signatures) - .orderBy(asc(schema.signatures.slot)) - .limit(1) - .then(signatures => signatures[0] ? signatures[0].signature : undefined); - }); - - while (true) { - const signatures = await connection.getSignaturesForAddress( - programId, - { before: oldestSignature, limit: 1000 }, - "confirmed" - ); - - if (signatures.length === 0) break; - - await insertSignatures(signatures, programId); - - //trigger indexing - Promise.all(signatures.map(async (signature: ConfirmedSignatureInfo) => { - await index(signature.signature, programId); - })); - - backfilledSignatures = backfilledSignatures.concat(signatures); - oldestSignature = signatures[signatures.length - 1].signature; - - console.log(`backfilled ${backfilledSignatures.length} historical signatures so far...`); - } - - console.log(`now done backfilling. backfilled ${backfilledSignatures.length} historical signatures`); - return backfilledSignatures; -}; - -const insertNewSignatures = async (programId: PublicKey) => { - let allSignatures: ConfirmedSignatureInfo[] = []; - //get latest signature from db indexers table latestTxSigProcessed - let latestRecordedSignature = await getLatestTxSigProcessed(); - - //TODO: this should never happen in theory so im commenting it out for now - // if (!latestRecordedSignature) { - // //fallback just in case - // latestRecordedSignature = await usingDb(async (db) => { - // return await db.select({ signature: schema.signatures.signature, slot: schema.signatures.slot }) - // .from(schema.signatures) - // .orderBy(desc(schema.signatures.slot)) - // .limit(1) - // .then(signatures => { - // if (signatures.length === 0) return undefined; - // return signatures[0].signature; - // }); - // }); - // } - - // console.log(`insertNewSignatures::latestRecordedSignature: ${latestRecordedSignature}`); - - let oldestSignatureInserted: string | undefined; - while (true) { - const signatures = await connection.getSignaturesForAddress( - programId, - { limit: 1000, until: latestRecordedSignature, before: oldestSignatureInserted }, - "confirmed" - ); - - if (signatures.length === 0) break; - - await insertSignatures(signatures, programId); - - //trigger indexing - //TODO: maybe only index if signature doesnt exist in signatures table (which would mean it wasnt indexed yet) - Promise.all(signatures.map(async (signature: ConfirmedSignatureInfo) => { - await index(signature.signature, programId); - })); - - allSignatures = allSignatures.concat(signatures); - if (!oldestSignatureInserted) setLatestTxSigProcessed(signatures[0].signature); //since getSignaturesForAddress is a backwards walk, this should be the latest signature - oldestSignatureInserted = signatures[signatures.length - 1].signature; - } - - return allSignatures; -} - -const insertSignatures = async (signatures: ConfirmedSignatureInfo[], queriedAddr: PublicKey) => { - await usingDb(async (db) => { - await db.insert(schema.signatures).values(signatures.map(tx => ({ - signature: tx.signature, - slot: tx.slot.toString(), - didErr: tx.err !== null, - err: tx.err ? JSON.stringify(tx.err) : null, - blockTime: tx.blockTime ? new Date(tx.blockTime * 1000) : null, - }))).onConflictDoNothing().execute(); - await db.insert(schema.signature_accounts).values(signatures.map(tx => ({ - signature: tx.signature, - account: queriedAddr.toString() - }))).onConflictDoNothing().execute(); - }); -} - -//set latestProcessedSlot in db -async function setLatestProcessedSlot(slot: number) { - try { - await usingDb(async (db) => { - await db.update(schema.indexers) - .set({ latestSlotProcessed: slot.toString() }) - .where(eq(schema.indexers.name, "v0_4_amm_indexer")) - .execute(); - }); - } catch (error: unknown) { - logger.errorWithChatBotAlert([ - error instanceof Error - ? `Error setting latest processed slot: ${error.message}` - : "Unknown error setting latest processed slot" - ]); - } -} - -//get latestProcessedSlot from db -async function getLatestProcessedSlot() { - return await usingDb(async (db) => { - return await db.select({ slot: schema.indexers.latestSlotProcessed }) - .from(schema.indexers) - .where(eq(schema.indexers.name, "v0_4_amm_indexer")) - .then(slots => slots[0] ? slots[0].slot : undefined); - }); -} - -//set latestTxSigProcessed -async function setLatestTxSigProcessed(signature: string) { - await usingDb(async (db) => { - await db.update(schema.indexers).set({ latestTxSigProcessed: signature }).where(eq(schema.indexers.name, "v0_4_amm_indexer")).execute(); - }); -} - -//get latestTxSigProcessed -async function getLatestTxSigProcessed() { - return await usingDb(async (db) => { - return await db.select({ signature: schema.indexers.latestTxSigProcessed }) - .from(schema.indexers) - .where(eq(schema.indexers.name, "v0_4_amm_indexer")) - .then(signatures => signatures[0] ? signatures[0].signature as string : undefined); - }); -} - - -const programIds = [V4_CONDITIONAL_VAULT_PROGRAM_ID, V4_AMM_PROGRAM_ID, V4_AUTOCRAT_PROGRAM_ID]; - -export const backfill = async () => { - await Promise.all(programIds.map(async (programId) => { - try { - const backfilledSignatures = await backfillHistoricalSignatures(programId); - console.log(`backfilled ${backfilledSignatures.length} signatures for ${programId.toString()}`); - } catch (error) { - logger.errorWithChatBotAlert([ - error instanceof Error ? - `Error in backfill for ${programId.toString()}: ${error.message}` : - `Unknown error in backfill for ${programId.toString()}` - ]); - } - })); -} - -export const frontfill = async () => { - await Promise.all(programIds.map(async (programId) => { - try { - setInterval(async () => { - const newSignatures = await insertNewSignatures(programId); - console.log(`inserted up to ${newSignatures.length} new signatures for ${programId.toString()}`); - }, 30000); //every 30s - } catch (error) { - logger.errorWithChatBotAlert([ - error instanceof Error ? - `Error in backfill for ${programId.toString()}: ${error.message}` : - `Unknown error in backfill for ${programId.toString()}` - ]); - } - })); -} diff --git a/packages/indexer/src/v4_indexer/indexer.ts b/packages/indexer/src/v4_indexer/indexer.ts deleted file mode 100644 index b809f9ec..00000000 --- a/packages/indexer/src/v4_indexer/indexer.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { AMM_PROGRAM_ID, CONDITIONAL_VAULT_PROGRAM_ID } from "@metadaoproject/futarchy/v0.4"; -import * as anchor from "@coral-xyz/anchor"; -import { CompiledInnerInstruction, PublicKey, TransactionResponse, VersionedTransactionResponse } from "@solana/web3.js"; - -import { schema, usingDb, eq, and, desc, gt } from "@metadaoproject/indexer-db"; -import { connection, ammClient, conditionalVaultClient } from "../connection"; -import { Program } from "@coral-xyz/anchor"; -import { Context, Logs, PublicKey } from "@solana/web3.js"; - -import { TelegramBotAPI } from "../adapters/telegram-bot"; -import { Logger } from "../logger"; - -import { processAmmEvent, processVaultEvent } from "./processor"; - -const logger = new Logger(new TelegramBotAPI({token: process.env.TELEGRAM_BOT_API_KEY ?? ''})); -type DBConnection = any; // TODO: Fix typing.. - -const parseEvents = (transactionResponse: VersionedTransactionResponse | TransactionResponse): { ammEvents: any, vaultEvents: any } => { - const ammEvents: { name: string; data: any }[] = []; - const vaultEvents: { name: string; data: any }[] = []; - try { - const inner: CompiledInnerInstruction[] = - transactionResponse?.meta?.innerInstructions ?? []; - const ammIdlProgramId = ammClient.program.programId; - const vaultIdlProgramId = conditionalVaultClient.vaultProgram.programId; - for (let i = 0; i < inner.length; i++) { - for (let j = 0; j < inner[i].instructions.length; j++) { - const ix = inner[i].instructions[j]; - const programPubkey = - transactionResponse?.transaction.message.staticAccountKeys[ - ix.programIdIndex - ]; - if (!programPubkey) { - console.log("No program pubkey"); - continue; - } - - // get which program the instruction belongs to - let program: Program; - // console.log("programPubkey", programPubkey.toBase58()); - // console.log("ammIdlProgramId", ammIdlProgramId.toBase58()); - // console.log("vaultIdlProgramId", vaultIdlProgramId.toBase58()); - if (programPubkey.equals(ammIdlProgramId)) { - program = ammClient.program; - const ixData = anchor.utils.bytes.bs58.decode( - ix.data - ); - const eventData = anchor.utils.bytes.base64.encode(ixData.slice(8)); - const event = program.coder.events.decode(eventData); - // console.log(event) - if (event) { - ammEvents.push(event); - } - } else if (programPubkey.equals(vaultIdlProgramId)) { - program = conditionalVaultClient.vaultProgram; - const ixData = anchor.utils.bytes.bs58.decode( - ix.data - ); - const eventData = anchor.utils.bytes.base64.encode(ixData.slice(8)); - const event = program.coder.events.decode(eventData); - // console.log(event) - if (event) { - vaultEvents.push(event); - } - } else { - // console.log("Unknown program pubkey", programPubkey.toBase58()); - } - } - } - } catch (error) { - logger.errorWithChatBotAlert([ - error instanceof Error - ? `Error parsing events: ${error.message}` - : "Unknown error parsing events" - ]); - } - - return { - ammEvents, - vaultEvents - }; -} - -//indexes signature -export async function index(signature: string, programId: PublicKey) { - try { - if (!programId.equals(AMM_PROGRAM_ID) && !programId.equals(CONDITIONAL_VAULT_PROGRAM_ID)) { - //autocrat program id, we aren't indexing these for now - console.log("Unknown program id: ", programId.toBase58()); - return; - } - - const transactionResponse = await connection.getTransaction(signature, { commitment: "confirmed", maxSupportedTransactionVersion: 1 }); - if (!transactionResponse) { - console.log("No transaction response"); - return; - } - - //insert signature to db - await usingDb(async (db: DBConnection) => { - await db.insert(schema.signatures).values({ - signature: transactionResponse.transaction.signatures[0], - slot: BigInt(transactionResponse.slot), - didErr: transactionResponse.meta?.err !== null, - err: transactionResponse.meta?.err ? JSON.stringify(transactionResponse.meta.err) : null, - blockTime: transactionResponse.blockTime ? new Date(transactionResponse.blockTime * 1000) : null, - }).onConflictDoNothing().execute(); - await db.insert(schema.signature_accounts).values({ - signature: transactionResponse.transaction.signatures[0], - account: programId.toString() - }).onConflictDoNothing().execute(); - }); - - const events = parseEvents(transactionResponse); - const ammEvents = events.ammEvents; - const vaultEvents = events.vaultEvents; - - Promise.all(ammEvents.map(async (event) => { - await processAmmEvent(event, signature, transactionResponse); - })); - - Promise.all(vaultEvents.map(async (event) => { - await processVaultEvent(event, signature, transactionResponse); - })); - - } catch (error) { - logger.errorWithChatBotAlert([ - error instanceof Error - ? `Error processing signature: ${error.message}` - : "Unknown error processing signature" - ]); - } -} - -//indexes signature from logs -export async function indexFromLogs(logs: Logs, ctx: Context, programId: PublicKey) { - try { - let signature = logs.signature; - if (!signature) { - console.log("No signature found in logs"); - logger.errorWithChatBotAlert([ - "No signature found in logs" - ]); - return; - } - await index(signature, programId); - } catch (error) { - logger.errorWithChatBotAlert([ - error instanceof Error - ? `Error processing signature: ${error.message}` - : "Unknown error processing signature" - ]); - } -} - diff --git a/packages/indexer/src/v4_indexer/processor.ts b/packages/indexer/src/v4_indexer/processor.ts deleted file mode 100644 index d5cd89fe..00000000 --- a/packages/indexer/src/v4_indexer/processor.ts +++ /dev/null @@ -1,456 +0,0 @@ -import { AddLiquidityEvent, AmmEvent, ConditionalVaultEvent, CreateAmmEvent, getVaultAddr, InitializeConditionalVaultEvent, InitializeQuestionEvent, SwapEvent, PriceMath, SplitTokensEvent, MergeTokensEvent, RemoveLiquidityEvent } from "@metadaoproject/futarchy/v0.4"; -import { schema, usingDb, eq, and, desc, gt } from "@metadaoproject/indexer-db"; -import { PublicKey, VersionedTransactionResponse } from "@solana/web3.js"; -import { PricesType, V04SwapType } from "@metadaoproject/indexer-db/lib/schema"; -import * as token from "@solana/spl-token"; - -import { connection, conditionalVaultClient } from "../connection"; - -import { TelegramBotAPI } from "../adapters/telegram-bot"; -import { Logger } from "../logger"; - -const logger = new Logger(new TelegramBotAPI({token: process.env.TELEGRAM_BOT_API_KEY ?? ''})); - -type Market = { - marketAcct: string; - baseMint: string; - quoteMint: string; -} - -type DBConnection = any; // TODO: Fix typing.. - - -export async function processAmmEvent(event: { name: string; data: AmmEvent }, signature: string, transactionResponse: VersionedTransactionResponse) { - switch (event.name) { - case "CreateAmmEvent": - await handleCreateAmmEvent(event.data as CreateAmmEvent); - break; - case "AddLiquidityEvent": - await handleAddLiquidityEvent(event.data as AddLiquidityEvent); - break; - case "RemoveLiquidityEvent": - await handleRemoveLiquidityEvent(event.data as RemoveLiquidityEvent); - break; - case "SwapEvent": - await handleSwapEvent(event.data as SwapEvent, signature, transactionResponse); - break; - default: - console.log("Unknown event", event); - } -} - -async function handleCreateAmmEvent(event: CreateAmmEvent) { - try { - await usingDb(async (db: DBConnection) => { - await insertTokenIfNotExists(db, event.lpMint); - await insertTokenIfNotExists(db, event.baseMint); - await insertTokenIfNotExists(db, event.quoteMint); - await insertMarketIfNotExists(db, { - marketAcct: event.common.amm.toBase58(), - baseMint: event.baseMint.toString(), - quoteMint: event.quoteMint.toString(), - }); - - await db.insert(schema.v0_4_amms).values({ - ammAddr: event.common.amm.toString(), - lpMintAddr: event.lpMint.toString(), - createdAtSlot: BigInt(event.common.slot.toString()), - baseMintAddr: event.baseMint.toString(), - quoteMintAddr: event.quoteMint.toString(), - latestAmmSeqNumApplied: 0n, - baseReserves: 0n, - quoteReserves: 0n, - }).onConflictDoNothing(); - }); - } catch (error) { - logger.errorWithChatBotAlert([ - error instanceof Error - ? `Error in handleCreateAmmEvent: ${error.message}` - : "Unknown error in handleCreateAmmEvent" - ]); - } -} - -async function handleAddLiquidityEvent(event: AddLiquidityEvent) { - try { - await usingDb(async (db: DBConnection) => { - const amm = await db.select().from(schema.v0_4_amms).where(eq(schema.v0_4_amms.ammAddr, event.common.amm.toString())).limit(1); - - if (amm.length === 0) { - console.log("AMM not found", event.common.amm.toString()); - return; - } - - if (amm[0].latestAmmSeqNumApplied >= BigInt(event.common.seqNum.toString())) { - console.log("Already applied", event.common.seqNum.toString()); - return; - } - - await insertPriceIfNotDuplicate(db, amm, event); - - await db.update(schema.v0_4_amms).set({ - baseReserves: BigInt(event.common.postBaseReserves.toString()), - quoteReserves: BigInt(event.common.postQuoteReserves.toString()), - latestAmmSeqNumApplied: BigInt(event.common.seqNum.toString()), - }).where(eq(schema.v0_4_amms.ammAddr, event.common.amm.toString())); - - console.log("Updated AMM", event.common.amm.toString()); - }); - } catch (error) { - logger.errorWithChatBotAlert([ - error instanceof Error - ? `Error in handleAddLiquidityEvent: ${error.message}` - : "Unknown error in handleAddLiquidityEvent" - ]); - } -} - -async function handleRemoveLiquidityEvent(event: RemoveLiquidityEvent) { - try { - await usingDb(async (db: DBConnection) => { - const amm = await db.select().from(schema.v0_4_amms).where(eq(schema.v0_4_amms.ammAddr, event.common.amm.toString())).limit(1); - - if (amm.length === 0) { - console.log("AMM not found", event.common.amm.toString()); - return; - } - - if (amm[0].latestAmmSeqNumApplied >= BigInt(event.common.seqNum.toString())) { - console.log("Already applied", event.common.seqNum.toString()); - return; - } - - await insertPriceIfNotDuplicate(db, amm, event); - - await db.update(schema.v0_4_amms).set({ - baseReserves: BigInt(event.common.postBaseReserves.toString()), - quoteReserves: BigInt(event.common.postQuoteReserves.toString()), - latestAmmSeqNumApplied: BigInt(event.common.seqNum.toString()), - }).where(eq(schema.v0_4_amms.ammAddr, event.common.amm.toString())); - - console.log("Updated AMM", event.common.amm.toString()); - }); - } catch (error) { - logger.errorWithChatBotAlert([ - error instanceof Error - ? `Error in handleRemoveLiquidityEvent: ${error.message}` - : "Unknown error in handleRemoveLiquidityEvent" - ]); - } -} - -async function handleSwapEvent(event: SwapEvent, signature: string, transactionResponse: VersionedTransactionResponse) { - try { - if (transactionResponse.blockTime === null || transactionResponse.blockTime === undefined) { - return; - }; - await usingDb(async (db: DBConnection) => { - await db.insert(schema.v0_4_swaps).values({ - signature: signature, - slot: BigInt(transactionResponse.slot), - // @ts-ignore - fixed above in the if statement - blockTime: new Date(transactionResponse.blockTime * 1000), - swapType: event.swapType.buy ? V04SwapType.Buy : V04SwapType.Sell, - ammAddr: event.common.amm.toString(), - userAddr: event.common.user.toString(), - inputAmount: event.inputAmount.toString(), - outputAmount: event.outputAmount.toString(), - ammSeqNum: BigInt(event.common.seqNum.toString()) - }).onConflictDoNothing(); - - const amm = await db.select().from(schema.v0_4_amms).where(eq(schema.v0_4_amms.ammAddr, event.common.amm.toString())).limit(1); - - if (amm.length === 0) { - console.log("AMM not found", event.common.amm.toString()); - return; - } - - console.log("latestAmmSeqNumApplied", amm[0].latestAmmSeqNumApplied.toString()); - console.log("event.common.seqNum", event.common.seqNum.toString()); - if (amm[0].latestAmmSeqNumApplied >= BigInt(event.common.seqNum.toString())) { - console.log("Already applied", event.common.seqNum.toString()); - return; - } - - await insertPriceIfNotDuplicate(db, amm, event); - - await db.update(schema.v0_4_amms).set({ - baseReserves: BigInt(event.common.postBaseReserves.toString()), - quoteReserves: BigInt(event.common.postQuoteReserves.toString()), - latestAmmSeqNumApplied: BigInt(event.common.seqNum.toString()), - }).where(eq(schema.v0_4_amms.ammAddr, event.common.amm.toString())); - }); - } catch (error) { - logger.errorWithChatBotAlert([ - error instanceof Error - ? `Error in handleSwapEvent: ${error.message}` - : "Unknown error in handleSwapEvent" - ]); - } -} - -async function handleSplitEvent(event: SplitTokensEvent, signature: string, transactionResponse: VersionedTransactionResponse) { - try { - const insertValues = { - vaultAddr: event.vault.toString(), - vaultSeqNum: BigInt(event.seqNum.toString()), - signature: signature, - slot: BigInt(transactionResponse.slot), - amount: BigInt(event.amount.toString()) - // Note: createdAt will be set automatically by the default value - }; - - console.log("Attempting to insert with values:", insertValues); - - await usingDb(async (db: DBConnection) => { - // First verify the vault exists - const vault = await db.select() - .from(schema.v0_4_conditional_vaults) - .where(eq(schema.v0_4_conditional_vaults.conditionalVaultAddr, event.vault.toString())) - .limit(1); - - if (vault.length === 0) { - console.log("Warning: Referenced vault does not exist:", event.vault.toString()); - } else { - console.log("Vault exists:", event.vault.toString()); - } - - await db.insert(schema.v0_4_splits) - .values(insertValues) - .onConflictDoNothing(); - }); - } catch (error) { - console.error("Full error details:", error); - logger.errorWithChatBotAlert([ - error instanceof Error - ? `Error in handleSplitEvent: ${error.message}` - : "Unknown error in handleSplitEvent" - ]); - } -} - -async function handleMergeEvent(event: MergeTokensEvent, signature: string, transactionResponse: VersionedTransactionResponse) { - try { - await usingDb(async (db: DBConnection) => { - await db.insert(schema.v0_4_merges).values({ - vaultAddr: event.vault.toString(), - vaultSeqNum: BigInt(event.seqNum.toString()), - signature: signature, - slot: BigInt(transactionResponse.slot), - amount: BigInt(event.amount.toString()) - }).onConflictDoNothing(); - }); - } catch (error) { - logger.errorWithChatBotAlert([ - error instanceof Error - ? `Error in handleMergeEvent: ${error.message}` - : "Unknown error in handleMergeEvent" - ]); - } -} - -async function insertTokenIfNotExists(db: DBConnection, mintAcct: PublicKey) { - const existingToken = await db.select().from(schema.tokens).where(eq(schema.tokens.mintAcct, mintAcct.toString())).limit(1); - if (existingToken.length === 0) { - console.log("Inserting token", mintAcct.toString()); - const mint: token.Mint = await token.getMint(connection, mintAcct); - await db.insert(schema.tokens).values({ - mintAcct: mintAcct.toString(), - symbol: mintAcct.toString().slice(0, 3), - name: mintAcct.toString().slice(0, 3), - decimals: mint.decimals, - supply: mint.supply, - updatedAt: new Date(), - }).onConflictDoNothing(); - } -} - - -export async function processVaultEvent(event: { name: string; data: ConditionalVaultEvent }, signature: string, transactionResponse: VersionedTransactionResponse) { - switch (event.name) { - case "InitializeQuestionEvent": - await handleInitializeQuestionEvent(event.data as InitializeQuestionEvent); - break; - case "InitializeConditionalVaultEvent": - await handleInitializeConditionalVaultEvent(event.data as InitializeConditionalVaultEvent); - break; - case "SplitTokensEvent": - await handleSplitEvent(event.data as SplitTokensEvent, signature, transactionResponse); - break; - case "MergeTokensEvent": - await handleMergeEvent(event.data as MergeTokensEvent, signature, transactionResponse); - break; - default: - console.log("Unknown Vault event", event.name); - } -} - -async function handleInitializeQuestionEvent(event: InitializeQuestionEvent) { - try { - await usingDb(async (db) => { - await db.insert(schema.v0_4_questions).values({ - questionAddr: event.question.toString(), - isResolved: false, - oracleAddr: event.oracle.toString(), - numOutcomes: event.numOutcomes, - payoutNumerators: Array(event.numOutcomes).fill(0), - payoutDenominator: 0n, - questionId: event.questionId, - }).onConflictDoNothing(); - }); - } catch (error) { - logger.errorWithChatBotAlert([ - error instanceof Error - ? `Error in handleInitializeQuestionEvent: ${error.message}` - : "Unknown error in handleInitializeQuestionEvent" - ]); - } -} - -async function handleInitializeConditionalVaultEvent(event: InitializeConditionalVaultEvent) { - try { - const vaultAddr = getVaultAddr(conditionalVaultClient.vaultProgram.programId, event.question, event.underlyingTokenMint)[0]; - await usingDb(async (db) => { - await db.transaction(async (trx) => { - if (!await doesQuestionExist(trx, event)) { - return; - } - await insertTokenIfNotExists(trx, event.underlyingTokenMint); - await insertTokenAccountIfNotExists(trx, event); - await insertConditionalVault(trx, event, vaultAddr); - }); - }); - } catch (error) { - logger.errorWithChatBotAlert([ - error instanceof Error - ? `Error in handleInitializeConditionalVaultEvent: ${error.message}` - : "Unknown error in handleInitializeConditionalVaultEvent" - ]); - } -} - -async function doesQuestionExist(db: DBConnection, event: InitializeConditionalVaultEvent): Promise { - const existingQuestion = await db.select().from(schema.v0_4_questions).where(eq(schema.v0_4_questions.questionAddr, event.question.toString())).limit(1); - return existingQuestion.length > 0; - // if (existingQuestion.length === 0) { - // await trx.insert(schema.v0_4_questions).values({ - // questionAddr: event.question.toString(), - // isResolved: false, - // oracleAddr: event.oracle.toString(), - // numOutcomes: event.numOutcomes, - // payoutNumerators: Array(event.numOutcomes).fill(0), - // payoutDenominator: 0n, - // questionId: event.questionId, - // }); - // } -} - -async function insertTokenAccountIfNotExists(db: DBConnection, event: InitializeConditionalVaultEvent) { - const existingTokenAcct = await db.select() - .from(schema.tokenAccts) - .where(eq(schema.tokenAccts.tokenAcct, event.vaultUnderlyingTokenAccount.toString())) - .limit(1); - - if (existingTokenAcct.length === 0) { - await db.insert(schema.tokenAccts).values({ - tokenAcct: event.vaultUnderlyingTokenAccount.toString(), - mintAcct: event.underlyingTokenMint.toString(), - ownerAcct: event.vaultUnderlyingTokenAccount.toString(), - amount: 0n, - }); - } -} - -async function insertMarketIfNotExists(db: DBConnection, market: Market) { - const existingMarket = await db.select() - .from(schema.markets) - .where(eq(schema.markets.marketAcct, market.marketAcct)) - .limit(1); - - if (existingMarket.length === 0) { - await db.insert(schema.markets).values({ - marketAcct: market.marketAcct, - baseMintAcct: market.baseMint, - quoteMintAcct: market.quoteMint, - marketType: 'amm', - createTxSig: '', - baseLotSize: 0n, - quoteLotSize: 0n, - quoteTickSize: 0n, - baseMakerFee: 0, - quoteMakerFee: 0, - baseTakerFee: 0, - quoteTakerFee: 0 - }).onConflictDoNothing(); - } -} - -async function insertPriceIfNotDuplicate(db: DBConnection, amm: any[], event: AddLiquidityEvent | SwapEvent | RemoveLiquidityEvent) { - console.log("insertPriceIfNotDuplicate::event", event); - const existingPrice = await db.select() - .from(schema.prices) - .where(and( - eq(schema.prices.marketAcct, event.common.amm.toBase58()), - eq(schema.prices.updatedSlot, event.common.slot.toString()) - )) - .limit(1); - - if (existingPrice.length > 0) { - console.log("Price already exists", event.common.amm.toBase58(), BigInt(event.common.slot.toString())); - return; - } - - const ammPrice = PriceMath.getAmmPriceFromReserves(event.common.postBaseReserves, event.common.postQuoteReserves); - const baseToken = await db.select() - .from(schema.tokens) - .where(eq(schema.tokens.mintAcct, amm[0].baseMintAddr)) - .limit(1); - const quoteToken = await db.select() - .from(schema.tokens) - .where(eq(schema.tokens.mintAcct, amm[0].quoteMintAddr)) - .limit(1); - - if (!baseToken.length || !quoteToken.length) { - throw new Error(`Token not found: base=${!!baseToken.length}, quote=${!!quoteToken.length}`); - } - - const humanPrice = PriceMath.getHumanPrice(ammPrice, baseToken[0].decimals, quoteToken[0].decimals); - - await db.insert(schema.prices).values({ - marketAcct: event.common.amm.toBase58(), - baseAmount: BigInt(event.common.postBaseReserves.toString()), - quoteAmount: BigInt(event.common.postQuoteReserves.toString()), - price: humanPrice.toString(), - updatedSlot: BigInt(event.common.slot.toString()), - createdBy: 'amm-market-indexer', - pricesType: PricesType.Conditional, - }).onConflictDoNothing(); -} - -async function insertConditionalVault(db: DBConnection, event: InitializeConditionalVaultEvent, vaultAddr: PublicKey) { - await db.insert(schema.v0_4_conditional_vaults).values({ - conditionalVaultAddr: vaultAddr.toString(), - questionAddr: event.question.toString(), - underlyingMintAcct: event.underlyingTokenMint.toString(), - underlyingTokenAcct: event.vaultUnderlyingTokenAccount.toString(), - pdaBump: event.pdaBump, - latestVaultSeqNumApplied: 0n, - }).onConflictDoNothing(); -} - - -// async function fetchTransactionResponses(eligibleSignatures: { signature: string }[]) { -// try { -// return await connection.getTransactions( -// eligibleSignatures.map(s => s.signature), -// { commitment: "confirmed", maxSupportedTransactionVersion: 1 } -// ); -// } catch (error: unknown) { -// logger.errorWithChatBotAlert([ -// error instanceof Error -// ? `Error fetching transaction responses: ${error.message}` -// : "Unknown error fetching transaction responses" -// ]); -// return []; -// } -// } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b59ae695..c033694e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: 16.4.5 version: 16.4.5 drizzle-orm: - specifier: 0.36.3 - version: 0.36.3(@opentelemetry/api@1.8.0)(@types/pg@8.11.0)(@types/react@18.2.55)(bun-types@1.1.6)(pg@8.11.3)(react@18.2.0) + specifier: 0.30.6 + version: 0.30.6(@opentelemetry/api@1.8.0)(@types/pg@8.11.0)(@types/react@18.2.55)(bun-types@1.1.6)(pg@8.11.3)(react@18.2.0) pg: specifier: ^8.11.3 version: 8.11.3 @@ -40,8 +40,8 @@ importers: specifier: ^1.0.55 version: 1.0.55 drizzle-kit: - specifier: 0.28.1 - version: 0.28.1 + specifier: 0.20.18 + version: 0.20.18 inquirer: specifier: ^9.2.14 version: 9.2.14 @@ -280,16 +280,11 @@ packages: '@solana/buffer-layout': ^4.0.0 '@solana/buffer-layout-utils': ^0.2.0 - '@drizzle-team/brocli@0.10.2': - resolution: {integrity: sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==} - '@esbuild-kit/core-utils@3.3.2': resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==} - deprecated: 'Merged into tsx: https://tsx.is' '@esbuild-kit/esm-loader@2.6.5': resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==} - deprecated: 'Merged into tsx: https://tsx.is' '@esbuild/aix-ppc64@0.19.12': resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} @@ -838,6 +833,16 @@ packages: '@hasura/metadata@1.0.2': resolution: {integrity: sha512-bVDwRWC7g/NfLVUwP8HBV07+37g07UAbF+XEujfRmgr8839sH7Q2iwa2M8oQFQXwg4dj5Sn+WRt4/UWXKN7naQ==} + '@hono/node-server@1.12.0': + resolution: {integrity: sha512-e6oHjNiErRxsZRZBmc2KucuvY3btlO/XPncIpP2X75bRdTilF9GLjm3NHvKKunpJbbJJj31/FoPTksTf8djAVw==} + engines: {node: '>=18.14.1'} + + '@hono/zod-validator@0.2.2': + resolution: {integrity: sha512-dSDxaPV70Py8wuIU2QNpoVEIOSzSXZ/6/B/h4xA7eOMz7+AarKTSGV8E6QwrdcCbBLkpqfJ4Q2TmBO0eP1tCBQ==} + peerDependencies: + hono: '>=3.9.0' + zod: ^3.19.1 + '@irys/arweave@0.0.2': resolution: {integrity: sha512-ddE5h4qXbl0xfGlxrtBIwzflaxZUDlDs43TuT0u1OMfyobHul4AA1VEX72Rpzw2bOh4vzoytSqA1jCM7x9YtHg==} @@ -1655,6 +1660,9 @@ packages: brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + braces@2.3.2: resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==} engines: {node: '>=0.10.0'} @@ -1733,6 +1741,10 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} + camelcase@7.0.1: + resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==} + engines: {node: '>=14.16'} + capability@0.2.5: resolution: {integrity: sha512-rsJZYVCgXd08sPqwmaIqjAd5SUTfonV0z/gDJ8D6cN8wQphky1kkAYEqQ+hmDxTw7UihvBfjUVUSY+DBEe44jg==} @@ -1758,6 +1770,10 @@ packages: resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==} engines: {node: '>=0.10.0'} + cli-color@2.0.4: + resolution: {integrity: sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==} + engines: {node: '>=0.10'} + cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} @@ -1824,6 +1840,10 @@ packages: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} + commander@9.5.0: + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} + engines: {node: ^12.20.0 || >=14} + component-emitter@1.3.1: resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==} @@ -1845,6 +1865,10 @@ packages: resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} engines: {node: '>= 0.6'} + copy-anything@3.0.5: + resolution: {integrity: sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==} + engines: {node: '>=12.13'} + copy-descriptor@0.1.1: resolution: {integrity: sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==} engines: {node: '>=0.10.0'} @@ -1902,6 +1926,10 @@ packages: resolution: {integrity: sha512-gRh3yiT9bHBA5ka2yOpyFqAVu/ZpwWzajMUR/es0ljevAE88WyHBuMUy7jzd2o5j6LYQesEO/AyhbQ9BhbDXUA==} engines: {node: '>= 0.1.90'} + d@1.0.2: + resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==} + engines: {node: '>=0.12'} + dayjs@1.11.11: resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==} @@ -1972,6 +2000,9 @@ packages: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + difflib@0.2.4: + resolution: {integrity: sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==} + dir-glob@2.2.2: resolution: {integrity: sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==} engines: {node: '>=4'} @@ -1991,8 +2022,12 @@ packages: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} - drizzle-kit@0.28.1: - resolution: {integrity: sha512-JimOV+ystXTWMgZkLHYHf2w3oS28hxiH1FR0dkmJLc7GHzdGJoJAQtQS5DRppnabsRZwE2U1F6CuezVBgmsBBQ==} + dreamopt@0.8.0: + resolution: {integrity: sha512-vyJTp8+mC+G+5dfgsY+r3ckxlz+QMX40VjPQsZc5gxVAxLmi64TBoVkP54A/pRAXMXsbu2GMMBrZPxNv23waMg==} + engines: {node: '>=0.4.0'} + + drizzle-kit@0.20.18: + resolution: {integrity: sha512-fLTwcnLqtBxGd+51H/dEm9TC0FW6+cIX/RVPyNcitBO77X9+nkogEfMAJebpd/8Yl4KucmePHRYRWWvUlW0rqg==} hasBin: true drizzle-orm@0.30.6: @@ -2075,98 +2110,6 @@ packages: sqlite3: optional: true - drizzle-orm@0.36.3: - resolution: {integrity: sha512-ffQB7CcyCTvQBK6xtRLMl/Jsd5xFTBs+UTHrgs1hbk68i5TPkbsoCPbKEwiEsQZfq2I7VH632XJpV1g7LS2H9Q==} - peerDependencies: - '@aws-sdk/client-rds-data': '>=3' - '@cloudflare/workers-types': '>=3' - '@electric-sql/pglite': '>=0.2.0' - '@libsql/client': '>=0.10.0' - '@libsql/client-wasm': '>=0.10.0' - '@neondatabase/serverless': '>=0.1' - '@op-engineering/op-sqlite': '>=2' - '@opentelemetry/api': ^1.4.1 - '@planetscale/database': '>=1' - '@prisma/client': '*' - '@tidbcloud/serverless': '*' - '@types/better-sqlite3': '*' - '@types/pg': '*' - '@types/react': '>=18' - '@types/sql.js': '*' - '@vercel/postgres': '>=0.8.0' - '@xata.io/client': '*' - better-sqlite3: '>=7' - bun-types: '*' - expo-sqlite: '>=14.0.0' - knex: '*' - kysely: '*' - mysql2: '>=2' - pg: '>=8' - postgres: '>=3' - prisma: '*' - react: '>=18' - sql.js: '>=1' - sqlite3: '>=5' - peerDependenciesMeta: - '@aws-sdk/client-rds-data': - optional: true - '@cloudflare/workers-types': - optional: true - '@electric-sql/pglite': - optional: true - '@libsql/client': - optional: true - '@libsql/client-wasm': - optional: true - '@neondatabase/serverless': - optional: true - '@op-engineering/op-sqlite': - optional: true - '@opentelemetry/api': - optional: true - '@planetscale/database': - optional: true - '@prisma/client': - optional: true - '@tidbcloud/serverless': - optional: true - '@types/better-sqlite3': - optional: true - '@types/pg': - optional: true - '@types/react': - optional: true - '@types/sql.js': - optional: true - '@vercel/postgres': - optional: true - '@xata.io/client': - optional: true - better-sqlite3: - optional: true - bun-types: - optional: true - expo-sqlite: - optional: true - knex: - optional: true - kysely: - optional: true - mysql2: - optional: true - pg: - optional: true - postgres: - optional: true - prisma: - optional: true - react: - optional: true - sql.js: - optional: true - sqlite3: - optional: true - eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -2192,6 +2135,10 @@ packages: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} + env-paths@3.0.0: + resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + error-polyfill@0.1.3: resolution: {integrity: sha512-XHJk60ufE+TG/ydwp4lilOog549iiQF2OAPhkk9DdiYWMrltz5yhDz/xnKuenNwP7gy3dsibssO5QpVhkrSzzg==} @@ -2199,12 +2146,26 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + es5-ext@0.10.64: + resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} + engines: {node: '>=0.10'} + + es6-iterator@2.0.3: + resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==} + es6-promise@4.2.8: resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} es6-promisify@5.0.0: resolution: {integrity: sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==} + es6-symbol@3.1.4: + resolution: {integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==} + engines: {node: '>=0.12'} + + es6-weak-map@2.0.3: + resolution: {integrity: sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==} + esbuild-register@3.5.0: resolution: {integrity: sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==} peerDependencies: @@ -2232,6 +2193,10 @@ packages: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} + esniff@2.0.1: + resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} + engines: {node: '>=0.10'} + etag@1.8.1: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} @@ -2250,6 +2215,9 @@ packages: resolution: {integrity: sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==} engines: {node: '>=6.5.0', npm: '>=3'} + event-emitter@0.3.5: + resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==} + eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} @@ -2267,6 +2235,9 @@ packages: resolution: {integrity: sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==} engines: {node: '>= 0.10.0'} + ext@1.7.0: + resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} + extend-shallow@2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} engines: {node: '>=0.10.0'} @@ -2403,6 +2374,11 @@ packages: glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported + globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -2433,6 +2409,9 @@ packages: resolution: {integrity: sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} + hanji@0.0.5: + resolution: {integrity: sha512-Abxw1Lq+TnYiL4BueXqMau222fPSPMFtya8HdpWsz/xVAhifXou71mPh/kY2+08RgFcVccjG3uZHs6K5HAe3zw==} + has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} @@ -2484,12 +2463,19 @@ packages: engines: {node: '>=8'} hasBin: true + heap@0.2.7: + resolution: {integrity: sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==} + hi-base32@0.5.1: resolution: {integrity: sha512-EmBBpvdYh/4XxsnUybsPag6VikPYnN30td+vQk+GI3qpahVEG9+gTkG0aXVxTjBqQ5T6ijbWIu77O+C5WFWsnA==} hmac-drbg@1.0.1: resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + hono@4.5.3: + resolution: {integrity: sha512-r26WwwbKD3BAYdfB294knNnegNda7VfV1tVn66D9Kvl9WQTdrR+5eKdoeaQNHQcC3Gr0KBikzAtjd6VsRGVSaw==} + engines: {node: '>=16.0.0'} + http-errors@1.8.1: resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==} engines: {node: '>= 0.6'} @@ -2601,10 +2587,17 @@ packages: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} engines: {node: '>=0.10.0'} + is-promise@2.2.2: + resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==} + is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} + is-what@4.1.16: + resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==} + engines: {node: '>=12.13'} + is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} @@ -2645,6 +2638,10 @@ packages: json-bigint@1.0.0: resolution: {integrity: sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==} + json-diff@0.9.0: + resolution: {integrity: sha512-cVnggDrVkAAA3OvFfHpFEhOnmcsUpleEKq4d4O8sQWWSH40MBrWstKigVB1kGrgLWzuom+7rRdaCsnBD6VyObQ==} + hasBin: true + json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} @@ -2730,6 +2727,9 @@ packages: lodash.once@4.1.1: resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} + lodash.throttle@4.1.1: + resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==} + lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -2748,6 +2748,9 @@ packages: lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} + lru-queue@0.1.0: + resolution: {integrity: sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==} + map-cache@0.2.2: resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} engines: {node: '>=0.10.0'} @@ -2766,6 +2769,10 @@ packages: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} + memoizee@0.4.17: + resolution: {integrity: sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==} + engines: {node: '>=0.12'} + merge-descriptors@1.0.1: resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} @@ -2823,6 +2830,14 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + + minimatch@7.4.6: + resolution: {integrity: sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==} + engines: {node: '>=10'} + minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -2883,6 +2898,9 @@ packages: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} + next-tick@1.1.0: + resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} + no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} @@ -3303,6 +3321,9 @@ packages: signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + slash@2.0.0: resolution: {integrity: sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==} engines: {node: '>=6'} @@ -3402,6 +3423,10 @@ packages: resolution: {integrity: sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==} engines: {node: '>=6.5.0', npm: '>=3'} + superjson@2.2.1: + resolution: {integrity: sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA==} + engines: {node: '>=16'} + superstruct@0.14.2: resolution: {integrity: sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==} @@ -3425,6 +3450,10 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + timers-ext@0.1.8: + resolution: {integrity: sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww==} + engines: {node: '>=0.12'} + tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} @@ -3495,6 +3524,9 @@ packages: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} + type@2.7.3: + resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==} + typescript-collections@1.3.3: resolution: {integrity: sha512-7sI4e/bZijOzyURng88oOFZCISQPTHozfE2sUu5AviFYk5QV7fYGb6YiDl+vKjF/pICA354JImBImL9XJWUvdQ==} @@ -3586,6 +3618,9 @@ packages: which-module@2.0.1: resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -3771,8 +3806,6 @@ snapshots: - fastestsmallesttextencoderdecoder - utf-8-validate - '@drizzle-team/brocli@0.10.2': {} - '@esbuild-kit/core-utils@3.3.2': dependencies: esbuild: 0.18.20 @@ -4318,6 +4351,13 @@ snapshots: '@hasura/metadata@1.0.2': {} + '@hono/node-server@1.12.0': {} + + '@hono/zod-validator@0.2.2(hono@4.5.3)(zod@3.22.4)': + dependencies: + hono: 4.5.3 + zod: 3.22.4 + '@irys/arweave@0.0.2(debug@4.3.4)': dependencies: asn1.js: 5.4.1 @@ -5769,6 +5809,10 @@ snapshots: balanced-match: 1.0.2 concat-map: 0.0.1 + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + braces@2.3.2: dependencies: arr-flatten: 1.1.0 @@ -5869,6 +5913,8 @@ snapshots: camelcase@6.3.0: {} + camelcase@7.0.1: {} + capability@0.2.5: {} chalk@2.4.2: @@ -5898,6 +5944,14 @@ snapshots: isobject: 3.0.1 static-extend: 0.1.2 + cli-color@2.0.4: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + es6-iterator: 2.0.3 + memoizee: 0.4.17 + timers-ext: 0.1.8 + cli-cursor@3.1.0: dependencies: restore-cursor: 3.1.0 @@ -5954,6 +6008,8 @@ snapshots: commander@8.3.0: {} + commander@9.5.0: {} + component-emitter@1.3.1: {} concat-map@0.0.1: {} @@ -5968,6 +6024,10 @@ snapshots: cookie@0.6.0: {} + copy-anything@3.0.5: + dependencies: + is-what: 4.1.16 + copy-descriptor@0.1.1: {} cors@2.8.5: @@ -6032,6 +6092,11 @@ snapshots: csv-stringify: 6.4.6 stream-transform: 3.3.1 + d@1.0.2: + dependencies: + es5-ext: 0.10.64 + type: 2.7.3 + dayjs@1.11.11: {} debug@2.6.9: @@ -6082,6 +6147,10 @@ snapshots: destroy@1.2.0: {} + difflib@0.2.4: + dependencies: + heap: 0.2.7 + dir-glob@2.2.2: dependencies: path-type: 3.0.0 @@ -6099,12 +6168,29 @@ snapshots: dotenv@16.4.5: {} - drizzle-kit@0.28.1: + dreamopt@0.8.0: + dependencies: + wordwrap: 1.0.0 + + drizzle-kit@0.20.18: dependencies: - '@drizzle-team/brocli': 0.10.2 '@esbuild-kit/esm-loader': 2.6.5 + '@hono/node-server': 1.12.0 + '@hono/zod-validator': 0.2.2(hono@4.5.3)(zod@3.22.4) + camelcase: 7.0.1 + chalk: 5.3.0 + commander: 9.5.0 + env-paths: 3.0.0 esbuild: 0.19.12 esbuild-register: 3.5.0(esbuild@0.19.12) + glob: 8.1.0 + hanji: 0.0.5 + hono: 4.5.3 + json-diff: 0.9.0 + minimatch: 7.4.6 + semver: 7.6.3 + superjson: 2.2.1 + zod: 3.22.4 transitivePeerDependencies: - supports-color @@ -6117,7 +6203,7 @@ snapshots: pg: 8.11.3 react: 18.2.0 - drizzle-orm@0.36.3(@opentelemetry/api@1.8.0)(@types/pg@8.11.0)(@types/react@18.2.55)(bun-types@1.1.6)(pg@8.11.3)(react@18.2.0): + drizzle-orm@0.30.6(@opentelemetry/api@1.8.0)(@types/pg@8.11.0)(@types/react@18.2.55)(bun-types@1.1.6)(pg@8.11.3)(react@18.2.0): optionalDependencies: '@opentelemetry/api': 1.8.0 '@types/pg': 8.11.0 @@ -6160,6 +6246,8 @@ snapshots: encodeurl@1.0.2: {} + env-paths@3.0.0: {} + error-polyfill@0.1.3: dependencies: capability: 0.2.5 @@ -6168,12 +6256,37 @@ snapshots: es-errors@1.3.0: {} + es5-ext@0.10.64: + dependencies: + es6-iterator: 2.0.3 + es6-symbol: 3.1.4 + esniff: 2.0.1 + next-tick: 1.1.0 + + es6-iterator@2.0.3: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + es6-symbol: 3.1.4 + es6-promise@4.2.8: {} es6-promisify@5.0.0: dependencies: es6-promise: 4.2.8 + es6-symbol@3.1.4: + dependencies: + d: 1.0.2 + ext: 1.7.0 + + es6-weak-map@2.0.3: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + es6-iterator: 2.0.3 + es6-symbol: 3.1.4 + esbuild-register@3.5.0(esbuild@0.19.12): dependencies: debug: 4.3.4 @@ -6261,6 +6374,13 @@ snapshots: escape-string-regexp@1.0.5: {} + esniff@2.0.1: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + event-emitter: 0.3.5 + type: 2.7.3 + etag@1.8.1: {} ethereum-bloom-filters@1.1.0: @@ -6315,6 +6435,11 @@ snapshots: bn.js: 4.11.6 number-to-bn: 1.7.0 + event-emitter@0.3.5: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + eventemitter3@4.0.7: {} eventemitter3@5.0.1: {} @@ -6369,6 +6494,10 @@ snapshots: transitivePeerDependencies: - supports-color + ext@1.7.0: + dependencies: + type: 2.7.3 + extend-shallow@2.0.1: dependencies: is-extendable: 0.1.1 @@ -6528,6 +6657,14 @@ snapshots: once: 1.4.0 path-is-absolute: 1.0.1 + glob@8.1.0: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + globby@11.1.0: dependencies: array-union: 2.1.0 @@ -6566,6 +6703,11 @@ snapshots: graphql@16.8.1: {} + hanji@0.0.5: + dependencies: + lodash.throttle: 4.1.1 + sisteransi: 1.0.5 + has-flag@3.0.0: {} has-flag@4.0.0: {} @@ -6619,6 +6761,8 @@ snapshots: transitivePeerDependencies: - debug + heap@0.2.7: {} + hi-base32@0.5.1: {} hmac-drbg@1.0.1: @@ -6627,6 +6771,8 @@ snapshots: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + hono@4.5.3: {} + http-errors@1.8.1: dependencies: depd: 1.1.2 @@ -6756,8 +6902,12 @@ snapshots: dependencies: isobject: 3.0.1 + is-promise@2.2.2: {} + is-unicode-supported@0.1.0: {} + is-what@4.1.16: {} + is-windows@1.0.2: {} isarray@1.0.0: {} @@ -6802,6 +6952,12 @@ snapshots: dependencies: bignumber.js: 9.1.2 + json-diff@0.9.0: + dependencies: + cli-color: 2.0.4 + difflib: 0.2.4 + dreamopt: 0.8.0 + json-stringify-safe@5.0.1: {} json5@2.2.3: {} @@ -6887,6 +7043,8 @@ snapshots: lodash.once@4.1.1: {} + lodash.throttle@4.1.1: {} + lodash@4.17.21: {} log-symbols@4.1.0: @@ -6910,6 +7068,10 @@ snapshots: dependencies: tslib: 2.6.2 + lru-queue@0.1.0: + dependencies: + es5-ext: 0.10.64 + map-cache@0.2.2: {} map-visit@1.0.0: @@ -6926,6 +7088,17 @@ snapshots: media-typer@0.3.0: {} + memoizee@0.4.17: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + es6-weak-map: 2.0.3 + event-emitter: 0.3.5 + is-promise: 2.2.2 + lru-queue: 0.1.0 + next-tick: 1.1.0 + timers-ext: 0.1.8 + merge-descriptors@1.0.1: {} merge2@1.4.1: {} @@ -6985,6 +7158,14 @@ snapshots: dependencies: brace-expansion: 1.1.11 + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.1 + + minimatch@7.4.6: + dependencies: + brace-expansion: 2.0.1 + minimist@1.2.8: {} mixin-deep@1.3.2: @@ -7066,6 +7247,8 @@ snapshots: negotiator@0.6.3: {} + next-tick@1.1.0: {} + no-case@3.0.4: dependencies: lower-case: 2.0.2 @@ -7477,6 +7660,8 @@ snapshots: signal-exit@3.0.7: {} + sisteransi@1.0.5: {} + slash@2.0.0: {} slash@3.0.0: {} @@ -7584,6 +7769,10 @@ snapshots: dependencies: is-hex-prefixed: 1.0.0 + superjson@2.2.1: + dependencies: + copy-anything: 3.0.5 + superstruct@0.14.2: {} superstruct@0.15.5: {} @@ -7604,6 +7793,11 @@ snapshots: through@2.3.8: {} + timers-ext@0.1.8: + dependencies: + es5-ext: 0.10.64 + next-tick: 1.1.0 + tiny-invariant@1.3.3: {} tmp-promise@3.0.3: @@ -7670,6 +7864,8 @@ snapshots: media-typer: 0.3.0 mime-types: 2.1.35 + type@2.7.3: {} + typescript-collections@1.3.3: {} typescript@5.6.3: {} @@ -7749,6 +7945,8 @@ snapshots: which-module@2.0.1: {} + wordwrap@1.0.0: {} + wrap-ansi@6.2.0: dependencies: ansi-styles: 4.3.0