diff --git a/package.json b/package.json index d5730b94..bdb6ed5a 100644 --- a/package.json +++ b/package.json @@ -15,5 +15,6 @@ }, "devDependencies": { "bun": "1.0.26" - } + }, + "packageManager": "pnpm@9.12.0+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca" } diff --git a/packages/database/drizzle.config.ts b/packages/database/drizzle.config.ts new file mode 100644 index 00000000..35a99425 --- /dev/null +++ b/packages/database/drizzle.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from "drizzle-kit"; +export default defineConfig({ + dialect: "postgresql", // "mysql" | "sqlite" | "postgresql" + schema: "./lib/schema.ts", + out: "./drizzle", +}); \ No newline at end of file diff --git a/packages/database/drizzle/0009_brainy_karma.sql b/packages/database/drizzle/0009_brainy_karma.sql new file mode 100644 index 00000000..dd191579 --- /dev/null +++ b/packages/database/drizzle/0009_brainy_karma.sql @@ -0,0 +1,59 @@ +ALTER TABLE "indexers" ADD COLUMN "latest_tx_sig_processed" varchar(88);--> 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_busy_dreaming_celestial.sql b/packages/database/drizzle/0010_busy_dreaming_celestial.sql new file mode 100644 index 00000000..19fa690c --- /dev/null +++ b/packages/database/drizzle/0010_busy_dreaming_celestial.sql @@ -0,0 +1 @@ +ALTER TABLE "dao_details" ADD COLUMN "colors" jsonb; \ No newline at end of file diff --git a/packages/database/drizzle/meta/0000_snapshot.json b/packages/database/drizzle/meta/0000_snapshot.json index 97307556..3e9ee4a0 100644 --- a/packages/database/drizzle/meta/0000_snapshot.json +++ b/packages/database/drizzle/meta/0000_snapshot.json @@ -1,10 +1,8 @@ { - "id": "12ff8f1b-1044-4827-b918-9b5b421d14df", - "prevId": "00000000-0000-0000-0000-000000000000", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "candles": { + "public.candles": { "name": "candles", "schema": "", "columns": { @@ -74,15 +72,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -95,9 +93,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "comments": { + "public.comments": { "name": "comments", "schema": "", "columns": { @@ -144,42 +145,45 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", - "nullsNotDistinct": false, "columns": [ "comment_id" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "conditional_vaults": { + "public.conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -237,21 +241,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "dao_details": { + "public.dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -358,51 +365,54 @@ "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": {} }, - "daos": { + "public.daos": { "name": "daos", "schema": "", "columns": { @@ -498,76 +508,79 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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": {} }, - "indexer_account_dependencies": { + "public.indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -608,28 +621,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -641,9 +654,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "indexers": { + "public.indexers": { "name": "indexers", "schema": "", "columns": { @@ -675,9 +691,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "makes": { + "public.makes": { "name": "makes", "schema": "", "columns": { @@ -726,45 +745,56 @@ }, "indexes": { "market_index": { - "name": "market_index", "columns": [ - "market_acct" - ], - "isUnique": false + { + "expression": "market_acct", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "market_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "markets": { + "public.markets": { "name": "markets", "schema": "", "columns": { @@ -883,73 +913,76 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "orders": { + "public.orders": { "name": "orders", "schema": "", "columns": { @@ -1040,59 +1073,75 @@ }, "indexes": { "actor_index": { - "name": "actor_index", "columns": [ - "market_acct", - "actor_acct" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "prices": { + "public.prices": { "name": "prices", "schema": "", "columns": { @@ -1151,15 +1200,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -1171,9 +1220,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "program_system": { + "public.program_system": { "name": "program_system", "schema": "", "columns": { @@ -1213,60 +1265,63 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "programs": { + "public.programs": { "name": "programs", "schema": "", "columns": { @@ -1308,15 +1363,18 @@ "uniqueConstraints": { "program_version": { "name": "program_version", - "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposal_details": { + "public.proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1398,29 +1456,32 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", - "nullsNotDistinct": false, "columns": [ "slug" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposals": { + "public.proposals": { "name": "proposals", "schema": "", "columns": { @@ -1582,47 +1643,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "reactions": { + "public.reactions": { "name": "reactions", "schema": "", "columns": { @@ -1669,34 +1733,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "sessions": { + "public.sessions": { "name": "sessions", "schema": "", "columns": { @@ -1732,21 +1799,24 @@ "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" ], - "onDelete": "restrict", - "onUpdate": "restrict" + "onUpdate": "restrict", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "takes": { + "public.takes": { "name": "takes", "schema": "", "columns": { @@ -1820,74 +1890,111 @@ }, "indexes": { "block_index": { - "name": "block_index", "columns": [ - "market_acct", - "order_block" - ], - "isUnique": false + { + "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 }, "time_index": { - "name": "time_index", "columns": [ - "market_acct", - "order_time" - ], - "isUnique": false + { + "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 }, "maker_index": { - "name": "maker_index", "columns": [ - "maker_order_tx_sig" - ], - "isUnique": false + { + "expression": "maker_order_tx_sig", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "maker_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_acct_balances": { + "public.token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -1944,54 +2051,72 @@ }, "indexes": { "acct_amount_created": { - "name": "acct_amount_created", "columns": [ - "token_acct", - "created_at", - "amount" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2005,9 +2130,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_accts": { + "public.token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2054,21 +2182,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "tokens": { + "public.tokens": { "name": "tokens", "schema": "", "columns": { @@ -2118,9 +2249,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watcher_transactions": { + "public.transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2145,40 +2279,53 @@ }, "indexes": { "watcher_slot_index": { - "name": "watcher_slot_index", "columns": [ - "watcher_acct", - "slot" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2190,9 +2337,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watchers": { + "public.transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2257,34 +2407,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transactions": { + "public.transactions": { "name": "transactions", "schema": "", "columns": { @@ -2333,18 +2486,29 @@ }, "indexes": { "txn_slot_index": { - "name": "txn_slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "txn_slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "twaps": { + "public.twaps": { "name": "twaps", "schema": "", "columns": { @@ -2403,28 +2567,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2436,9 +2600,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_deposits": { + "public.user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2479,47 +2646,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_performance": { + "public.user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2634,41 +2804,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2680,9 +2850,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "users": { + "public.users": { "name": "users", "schema": "", "columns": { @@ -2703,14 +2876,23 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "12ff8f1b-1044-4827-b918-9b5b421d14df", + "prevId": "00000000-0000-0000-0000-000000000000", + "sequences": {}, + "policies": {}, + "views": {}, + "roles": {} } \ 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 a7a0ad5b..744ecfc9 100644 --- a/packages/database/drizzle/meta/0001_snapshot.json +++ b/packages/database/drizzle/meta/0001_snapshot.json @@ -1,10 +1,8 @@ { - "id": "01dc3a22-8fb9-4ce8-b122-6b26fb0a83e2", - "prevId": "12ff8f1b-1044-4827-b918-9b5b421d14df", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "candles": { + "public.candles": { "name": "candles", "schema": "", "columns": { @@ -74,15 +72,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -95,9 +93,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "comments": { + "public.comments": { "name": "comments", "schema": "", "columns": { @@ -144,42 +145,45 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", - "nullsNotDistinct": false, "columns": [ "comment_id" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "conditional_vaults": { + "public.conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -237,21 +241,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "dao_details": { + "public.dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -358,51 +365,54 @@ "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": {} }, - "daos": { + "public.daos": { "name": "daos", "schema": "", "columns": { @@ -498,76 +508,79 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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": {} }, - "indexer_account_dependencies": { + "public.indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -608,28 +621,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -641,9 +654,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "indexers": { + "public.indexers": { "name": "indexers", "schema": "", "columns": { @@ -675,9 +691,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "makes": { + "public.makes": { "name": "makes", "schema": "", "columns": { @@ -726,45 +745,56 @@ }, "indexes": { "market_index": { - "name": "market_index", "columns": [ - "market_acct" - ], - "isUnique": false + { + "expression": "market_acct", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "market_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "markets": { + "public.markets": { "name": "markets", "schema": "", "columns": { @@ -883,73 +913,76 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "orders": { + "public.orders": { "name": "orders", "schema": "", "columns": { @@ -1040,59 +1073,75 @@ }, "indexes": { "actor_index": { - "name": "actor_index", "columns": [ - "market_acct", - "actor_acct" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "prices": { + "public.prices": { "name": "prices", "schema": "", "columns": { @@ -1151,15 +1200,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -1171,9 +1220,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "program_system": { + "public.program_system": { "name": "program_system", "schema": "", "columns": { @@ -1213,60 +1265,63 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "programs": { + "public.programs": { "name": "programs", "schema": "", "columns": { @@ -1308,15 +1363,18 @@ "uniqueConstraints": { "program_version": { "name": "program_version", - "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposal_details": { + "public.proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1398,29 +1456,32 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", - "nullsNotDistinct": false, "columns": [ "slug" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposals": { + "public.proposals": { "name": "proposals", "schema": "", "columns": { @@ -1582,47 +1643,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "reactions": { + "public.reactions": { "name": "reactions", "schema": "", "columns": { @@ -1669,34 +1733,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "sessions": { + "public.sessions": { "name": "sessions", "schema": "", "columns": { @@ -1732,21 +1799,24 @@ "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" ], - "onDelete": "restrict", - "onUpdate": "restrict" + "onUpdate": "restrict", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signature_accounts": { + "public.signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1772,11 +1842,19 @@ }, "indexes": { "account_index": { - "name": "account_index", "columns": [ - "account" - ], - "isUnique": false + { + "expression": "account", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "account_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1789,9 +1867,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signatures": { + "public.signatures": { "name": "signatures", "schema": "", "columns": { @@ -1841,18 +1922,34 @@ }, "indexes": { "slot_index": { - "name": "slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "sequence_num_index": { - "name": "sequence_num_index", "columns": [ - "seq_num" - ], - "isUnique": false + { + "expression": "seq_num", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "sequence_num_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1860,14 +1957,17 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", - "nullsNotDistinct": false, "columns": [ "seq_num" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "takes": { + "public.takes": { "name": "takes", "schema": "", "columns": { @@ -1941,74 +2041,111 @@ }, "indexes": { "block_index": { - "name": "block_index", "columns": [ - "market_acct", - "order_block" - ], - "isUnique": false + { + "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 }, "time_index": { - "name": "time_index", "columns": [ - "market_acct", - "order_time" - ], - "isUnique": false + { + "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 }, "maker_index": { - "name": "maker_index", "columns": [ - "maker_order_tx_sig" - ], - "isUnique": false + { + "expression": "maker_order_tx_sig", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "maker_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_acct_balances": { + "public.token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2065,54 +2202,72 @@ }, "indexes": { "acct_amount_created": { - "name": "acct_amount_created", "columns": [ - "token_acct", - "created_at", - "amount" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2126,9 +2281,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_accts": { + "public.token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2175,21 +2333,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "tokens": { + "public.tokens": { "name": "tokens", "schema": "", "columns": { @@ -2239,9 +2400,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watcher_transactions": { + "public.transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2266,40 +2430,53 @@ }, "indexes": { "watcher_slot_index": { - "name": "watcher_slot_index", "columns": [ - "watcher_acct", - "slot" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2311,9 +2488,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watchers": { + "public.transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2378,34 +2558,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transactions": { + "public.transactions": { "name": "transactions", "schema": "", "columns": { @@ -2454,18 +2637,29 @@ }, "indexes": { "txn_slot_index": { - "name": "txn_slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "txn_slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "twaps": { + "public.twaps": { "name": "twaps", "schema": "", "columns": { @@ -2524,28 +2718,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2557,9 +2751,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_deposits": { + "public.user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2600,47 +2797,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_performance": { + "public.user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2755,41 +2955,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2801,9 +3001,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "users": { + "public.users": { "name": "users", "schema": "", "columns": { @@ -2824,9 +3027,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_amms": { + "public.v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -2891,47 +3097,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_conditional_vaults": { + "public.v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -2984,47 +3193,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_merges": { + "public.v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3074,60 +3286,92 @@ }, "indexes": { "merge_vault_index": { - "name": "merge_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_signature_index": { - "name": "merge_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_seq_num_vault_index": { - "name": "merge_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_metric_decisions": { + "public.v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3226,86 +3470,89 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_questions": { + "public.v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3362,9 +3609,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_splits": { + "public.v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3414,60 +3664,92 @@ }, "indexes": { "split_vault_index": { - "name": "split_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_signature_index": { - "name": "split_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_seq_num_vault_index": { - "name": "split_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_swaps": { + "public.v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3541,38 +3823,76 @@ }, "indexes": { "amm_index": { - "name": "amm_index", "columns": [ - "amm_addr" - ], - "isUnique": false + { + "expression": "amm_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "amm_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "signature_index": { - "name": "signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "seq_num_amm_index": { - "name": "seq_num_amm_index", "columns": [ - "amm_seq_num", - "amm_addr" - ], - "isUnique": false + { + "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 } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "01dc3a22-8fb9-4ce8-b122-6b26fb0a83e2", + "prevId": "12ff8f1b-1044-4827-b918-9b5b421d14df", + "sequences": {}, + "policies": {}, + "views": {}, + "roles": {} } \ 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 5a8abdd7..547159df 100644 --- a/packages/database/drizzle/meta/0002_snapshot.json +++ b/packages/database/drizzle/meta/0002_snapshot.json @@ -1,10 +1,8 @@ { - "id": "aa6c6b32-77eb-4d74-ada7-30fe06b4c0cc", - "prevId": "01dc3a22-8fb9-4ce8-b122-6b26fb0a83e2", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "candles": { + "public.candles": { "name": "candles", "schema": "", "columns": { @@ -74,15 +72,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -95,9 +93,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "comments": { + "public.comments": { "name": "comments", "schema": "", "columns": { @@ -144,42 +145,45 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", - "nullsNotDistinct": false, "columns": [ "comment_id" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "conditional_vaults": { + "public.conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -237,21 +241,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "dao_details": { + "public.dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -358,51 +365,54 @@ "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": {} }, - "daos": { + "public.daos": { "name": "daos", "schema": "", "columns": { @@ -498,76 +508,79 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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": {} }, - "indexer_account_dependencies": { + "public.indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -608,28 +621,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -641,9 +654,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "indexers": { + "public.indexers": { "name": "indexers", "schema": "", "columns": { @@ -675,9 +691,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "makes": { + "public.makes": { "name": "makes", "schema": "", "columns": { @@ -726,45 +745,56 @@ }, "indexes": { "market_index": { - "name": "market_index", "columns": [ - "market_acct" - ], - "isUnique": false + { + "expression": "market_acct", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "market_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "markets": { + "public.markets": { "name": "markets", "schema": "", "columns": { @@ -883,73 +913,76 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "orders": { + "public.orders": { "name": "orders", "schema": "", "columns": { @@ -1040,59 +1073,75 @@ }, "indexes": { "actor_index": { - "name": "actor_index", "columns": [ - "market_acct", - "actor_acct" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "prices": { + "public.prices": { "name": "prices", "schema": "", "columns": { @@ -1151,15 +1200,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -1171,9 +1220,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "program_system": { + "public.program_system": { "name": "program_system", "schema": "", "columns": { @@ -1213,60 +1265,63 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "programs": { + "public.programs": { "name": "programs", "schema": "", "columns": { @@ -1308,15 +1363,18 @@ "uniqueConstraints": { "program_version": { "name": "program_version", - "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposal_details": { + "public.proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1398,29 +1456,32 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", - "nullsNotDistinct": false, "columns": [ "slug" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposals": { + "public.proposals": { "name": "proposals", "schema": "", "columns": { @@ -1582,47 +1643,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "reactions": { + "public.reactions": { "name": "reactions", "schema": "", "columns": { @@ -1669,34 +1733,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "sessions": { + "public.sessions": { "name": "sessions", "schema": "", "columns": { @@ -1732,21 +1799,24 @@ "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" ], - "onDelete": "restrict", - "onUpdate": "restrict" + "onUpdate": "restrict", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signature_accounts": { + "public.signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1772,11 +1842,19 @@ }, "indexes": { "account_index": { - "name": "account_index", "columns": [ - "account" - ], - "isUnique": false + { + "expression": "account", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "account_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1789,9 +1867,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signatures": { + "public.signatures": { "name": "signatures", "schema": "", "columns": { @@ -1841,18 +1922,34 @@ }, "indexes": { "slot_index": { - "name": "slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "sequence_num_index": { - "name": "sequence_num_index", "columns": [ - "seq_num" - ], - "isUnique": false + { + "expression": "seq_num", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "sequence_num_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1860,14 +1957,17 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", - "nullsNotDistinct": false, "columns": [ "seq_num" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "takes": { + "public.takes": { "name": "takes", "schema": "", "columns": { @@ -1941,74 +2041,111 @@ }, "indexes": { "block_index": { - "name": "block_index", "columns": [ - "market_acct", - "order_block" - ], - "isUnique": false + { + "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 }, "time_index": { - "name": "time_index", "columns": [ - "market_acct", - "order_time" - ], - "isUnique": false + { + "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 }, "maker_index": { - "name": "maker_index", "columns": [ - "maker_order_tx_sig" - ], - "isUnique": false + { + "expression": "maker_order_tx_sig", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "maker_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_acct_balances": { + "public.token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2065,54 +2202,72 @@ }, "indexes": { "acct_amount_created": { - "name": "acct_amount_created", "columns": [ - "token_acct", - "created_at", - "amount" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2126,9 +2281,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_accts": { + "public.token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2175,21 +2333,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "tokens": { + "public.tokens": { "name": "tokens", "schema": "", "columns": { @@ -2239,9 +2400,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watcher_transactions": { + "public.transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2266,40 +2430,53 @@ }, "indexes": { "watcher_slot_index": { - "name": "watcher_slot_index", "columns": [ - "watcher_acct", - "slot" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2311,9 +2488,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watchers": { + "public.transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2378,34 +2558,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transactions": { + "public.transactions": { "name": "transactions", "schema": "", "columns": { @@ -2454,18 +2637,29 @@ }, "indexes": { "txn_slot_index": { - "name": "txn_slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "txn_slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "twaps": { + "public.twaps": { "name": "twaps", "schema": "", "columns": { @@ -2524,28 +2718,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2557,9 +2751,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_deposits": { + "public.user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2600,47 +2797,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_performance": { + "public.user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2755,41 +2955,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2801,9 +3001,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "users": { + "public.users": { "name": "users", "schema": "", "columns": { @@ -2824,9 +3027,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_amms": { + "public.v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -2891,47 +3097,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_conditional_vaults": { + "public.v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -2984,47 +3193,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_merges": { + "public.v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3074,60 +3286,92 @@ }, "indexes": { "merge_vault_index": { - "name": "merge_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_signature_index": { - "name": "merge_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_seq_num_vault_index": { - "name": "merge_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_metric_decisions": { + "public.v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3233,86 +3477,89 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_questions": { + "public.v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3369,9 +3616,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_splits": { + "public.v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3421,60 +3671,92 @@ }, "indexes": { "split_vault_index": { - "name": "split_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_signature_index": { - "name": "split_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_seq_num_vault_index": { - "name": "split_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_swaps": { + "public.v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3548,38 +3830,76 @@ }, "indexes": { "amm_index": { - "name": "amm_index", "columns": [ - "amm_addr" - ], - "isUnique": false + { + "expression": "amm_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "amm_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "signature_index": { - "name": "signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "seq_num_amm_index": { - "name": "seq_num_amm_index", "columns": [ - "amm_seq_num", - "amm_addr" - ], - "isUnique": false + { + "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 } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "aa6c6b32-77eb-4d74-ada7-30fe06b4c0cc", + "prevId": "01dc3a22-8fb9-4ce8-b122-6b26fb0a83e2", + "sequences": {}, + "policies": {}, + "views": {}, + "roles": {} } \ 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 b22d00f2..1a37268f 100644 --- a/packages/database/drizzle/meta/0003_snapshot.json +++ b/packages/database/drizzle/meta/0003_snapshot.json @@ -1,10 +1,8 @@ { - "id": "8610ddf3-59d1-4ad0-8634-0478d37c5dc9", - "prevId": "aa6c6b32-77eb-4d74-ada7-30fe06b4c0cc", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "candles": { + "public.candles": { "name": "candles", "schema": "", "columns": { @@ -74,15 +72,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -95,9 +93,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "comments": { + "public.comments": { "name": "comments", "schema": "", "columns": { @@ -144,42 +145,45 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", - "nullsNotDistinct": false, "columns": [ "comment_id" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "conditional_vaults": { + "public.conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -237,21 +241,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "dao_details": { + "public.dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -358,51 +365,54 @@ "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": {} }, - "daos": { + "public.daos": { "name": "daos", "schema": "", "columns": { @@ -498,76 +508,79 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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": {} }, - "indexer_account_dependencies": { + "public.indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -608,28 +621,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -641,9 +654,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "indexers": { + "public.indexers": { "name": "indexers", "schema": "", "columns": { @@ -675,9 +691,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "makes": { + "public.makes": { "name": "makes", "schema": "", "columns": { @@ -726,45 +745,56 @@ }, "indexes": { "market_index": { - "name": "market_index", "columns": [ - "market_acct" - ], - "isUnique": false + { + "expression": "market_acct", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "market_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "markets": { + "public.markets": { "name": "markets", "schema": "", "columns": { @@ -883,73 +913,76 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "orders": { + "public.orders": { "name": "orders", "schema": "", "columns": { @@ -1040,59 +1073,75 @@ }, "indexes": { "actor_index": { - "name": "actor_index", "columns": [ - "market_acct", - "actor_acct" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "prices": { + "public.prices": { "name": "prices", "schema": "", "columns": { @@ -1151,15 +1200,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -1171,9 +1220,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "program_system": { + "public.program_system": { "name": "program_system", "schema": "", "columns": { @@ -1213,60 +1265,63 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "programs": { + "public.programs": { "name": "programs", "schema": "", "columns": { @@ -1308,15 +1363,18 @@ "uniqueConstraints": { "program_version": { "name": "program_version", - "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposal_details": { + "public.proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1398,29 +1456,32 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", - "nullsNotDistinct": false, "columns": [ "slug" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposals": { + "public.proposals": { "name": "proposals", "schema": "", "columns": { @@ -1582,47 +1643,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "reactions": { + "public.reactions": { "name": "reactions", "schema": "", "columns": { @@ -1669,34 +1733,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "sessions": { + "public.sessions": { "name": "sessions", "schema": "", "columns": { @@ -1732,21 +1799,24 @@ "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" ], - "onDelete": "restrict", - "onUpdate": "restrict" + "onUpdate": "restrict", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signature_accounts": { + "public.signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1772,11 +1842,19 @@ }, "indexes": { "account_index": { - "name": "account_index", "columns": [ - "account" - ], - "isUnique": false + { + "expression": "account", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "account_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1789,9 +1867,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signatures": { + "public.signatures": { "name": "signatures", "schema": "", "columns": { @@ -1841,18 +1922,34 @@ }, "indexes": { "slot_index": { - "name": "slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "sequence_num_index": { - "name": "sequence_num_index", "columns": [ - "seq_num" - ], - "isUnique": false + { + "expression": "seq_num", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "sequence_num_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1860,14 +1957,17 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", - "nullsNotDistinct": false, "columns": [ "seq_num" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "takes": { + "public.takes": { "name": "takes", "schema": "", "columns": { @@ -1941,74 +2041,111 @@ }, "indexes": { "block_index": { - "name": "block_index", "columns": [ - "market_acct", - "order_block" - ], - "isUnique": false + { + "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 }, "time_index": { - "name": "time_index", "columns": [ - "market_acct", - "order_time" - ], - "isUnique": false + { + "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 }, "maker_index": { - "name": "maker_index", "columns": [ - "maker_order_tx_sig" - ], - "isUnique": false + { + "expression": "maker_order_tx_sig", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "maker_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_acct_balances": { + "public.token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2065,54 +2202,72 @@ }, "indexes": { "acct_amount_created": { - "name": "acct_amount_created", "columns": [ - "token_acct", - "created_at", - "amount" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2126,9 +2281,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_accts": { + "public.token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2175,21 +2333,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "tokens": { + "public.tokens": { "name": "tokens", "schema": "", "columns": { @@ -2239,9 +2400,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watcher_transactions": { + "public.transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2266,40 +2430,53 @@ }, "indexes": { "watcher_slot_index": { - "name": "watcher_slot_index", "columns": [ - "watcher_acct", - "slot" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2311,9 +2488,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watchers": { + "public.transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2378,34 +2558,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transactions": { + "public.transactions": { "name": "transactions", "schema": "", "columns": { @@ -2454,18 +2637,29 @@ }, "indexes": { "txn_slot_index": { - "name": "txn_slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "txn_slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "twaps": { + "public.twaps": { "name": "twaps", "schema": "", "columns": { @@ -2524,28 +2718,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2557,9 +2751,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_deposits": { + "public.user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2600,47 +2797,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_performance": { + "public.user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2755,41 +2955,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2801,9 +3001,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "users": { + "public.users": { "name": "users", "schema": "", "columns": { @@ -2824,9 +3027,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_amms": { + "public.v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -2891,47 +3097,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_conditional_vaults": { + "public.v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -2984,47 +3193,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_merges": { + "public.v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3074,60 +3286,92 @@ }, "indexes": { "merge_vault_index": { - "name": "merge_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_signature_index": { - "name": "merge_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_seq_num_vault_index": { - "name": "merge_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_metric_decisions": { + "public.v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3239,86 +3483,89 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_questions": { + "public.v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3375,9 +3622,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_splits": { + "public.v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3427,60 +3677,92 @@ }, "indexes": { "split_vault_index": { - "name": "split_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_signature_index": { - "name": "split_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_seq_num_vault_index": { - "name": "split_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_swaps": { + "public.v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3554,38 +3836,76 @@ }, "indexes": { "amm_index": { - "name": "amm_index", "columns": [ - "amm_addr" - ], - "isUnique": false + { + "expression": "amm_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "amm_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "signature_index": { - "name": "signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "seq_num_amm_index": { - "name": "seq_num_amm_index", "columns": [ - "amm_seq_num", - "amm_addr" - ], - "isUnique": false + { + "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 } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "8610ddf3-59d1-4ad0-8634-0478d37c5dc9", + "prevId": "aa6c6b32-77eb-4d74-ada7-30fe06b4c0cc", + "sequences": {}, + "policies": {}, + "views": {}, + "roles": {} } \ 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 fb919e3c..c43b1b2e 100644 --- a/packages/database/drizzle/meta/0004_snapshot.json +++ b/packages/database/drizzle/meta/0004_snapshot.json @@ -1,10 +1,8 @@ { - "id": "53364bb0-feb1-4180-8d4b-dc53682e0a67", - "prevId": "8610ddf3-59d1-4ad0-8634-0478d37c5dc9", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "candles": { + "public.candles": { "name": "candles", "schema": "", "columns": { @@ -74,15 +72,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -95,9 +93,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "comments": { + "public.comments": { "name": "comments", "schema": "", "columns": { @@ -144,42 +145,45 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", - "nullsNotDistinct": false, "columns": [ "comment_id" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "conditional_vaults": { + "public.conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -237,21 +241,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "dao_details": { + "public.dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -358,51 +365,54 @@ "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": {} }, - "daos": { + "public.daos": { "name": "daos", "schema": "", "columns": { @@ -498,76 +508,79 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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": {} }, - "indexer_account_dependencies": { + "public.indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -608,28 +621,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -641,9 +654,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "indexers": { + "public.indexers": { "name": "indexers", "schema": "", "columns": { @@ -675,9 +691,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "makes": { + "public.makes": { "name": "makes", "schema": "", "columns": { @@ -726,45 +745,56 @@ }, "indexes": { "market_index": { - "name": "market_index", "columns": [ - "market_acct" - ], - "isUnique": false + { + "expression": "market_acct", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "market_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "markets": { + "public.markets": { "name": "markets", "schema": "", "columns": { @@ -883,73 +913,76 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "orders": { + "public.orders": { "name": "orders", "schema": "", "columns": { @@ -1040,59 +1073,75 @@ }, "indexes": { "actor_index": { - "name": "actor_index", "columns": [ - "market_acct", - "actor_acct" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "prices": { + "public.prices": { "name": "prices", "schema": "", "columns": { @@ -1151,15 +1200,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -1171,9 +1220,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "program_system": { + "public.program_system": { "name": "program_system", "schema": "", "columns": { @@ -1213,60 +1265,63 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "programs": { + "public.programs": { "name": "programs", "schema": "", "columns": { @@ -1308,15 +1363,18 @@ "uniqueConstraints": { "program_version": { "name": "program_version", - "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposal_details": { + "public.proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1398,29 +1456,32 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", - "nullsNotDistinct": false, "columns": [ "slug" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposals": { + "public.proposals": { "name": "proposals", "schema": "", "columns": { @@ -1582,47 +1643,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "reactions": { + "public.reactions": { "name": "reactions", "schema": "", "columns": { @@ -1669,34 +1733,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "sessions": { + "public.sessions": { "name": "sessions", "schema": "", "columns": { @@ -1732,21 +1799,24 @@ "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" ], - "onDelete": "restrict", - "onUpdate": "restrict" + "onUpdate": "restrict", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signature_accounts": { + "public.signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1772,11 +1842,19 @@ }, "indexes": { "account_index": { - "name": "account_index", "columns": [ - "account" - ], - "isUnique": false + { + "expression": "account", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "account_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1789,9 +1867,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signatures": { + "public.signatures": { "name": "signatures", "schema": "", "columns": { @@ -1841,18 +1922,34 @@ }, "indexes": { "slot_index": { - "name": "slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "sequence_num_index": { - "name": "sequence_num_index", "columns": [ - "seq_num" - ], - "isUnique": false + { + "expression": "seq_num", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "sequence_num_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1860,14 +1957,17 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", - "nullsNotDistinct": false, "columns": [ "seq_num" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "takes": { + "public.takes": { "name": "takes", "schema": "", "columns": { @@ -1941,74 +2041,111 @@ }, "indexes": { "block_index": { - "name": "block_index", "columns": [ - "market_acct", - "order_block" - ], - "isUnique": false + { + "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 }, "time_index": { - "name": "time_index", "columns": [ - "market_acct", - "order_time" - ], - "isUnique": false + { + "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 }, "maker_index": { - "name": "maker_index", "columns": [ - "maker_order_tx_sig" - ], - "isUnique": false + { + "expression": "maker_order_tx_sig", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "maker_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_acct_balances": { + "public.token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2065,54 +2202,72 @@ }, "indexes": { "acct_amount_created": { - "name": "acct_amount_created", "columns": [ - "token_acct", - "created_at", - "amount" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2126,9 +2281,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_accts": { + "public.token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2175,21 +2333,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "tokens": { + "public.tokens": { "name": "tokens", "schema": "", "columns": { @@ -2239,9 +2400,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watcher_transactions": { + "public.transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2266,40 +2430,53 @@ }, "indexes": { "watcher_slot_index": { - "name": "watcher_slot_index", "columns": [ - "watcher_acct", - "slot" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2311,9 +2488,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watchers": { + "public.transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2378,34 +2558,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transactions": { + "public.transactions": { "name": "transactions", "schema": "", "columns": { @@ -2454,18 +2637,29 @@ }, "indexes": { "txn_slot_index": { - "name": "txn_slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "txn_slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "twaps": { + "public.twaps": { "name": "twaps", "schema": "", "columns": { @@ -2524,28 +2718,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2557,9 +2751,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_deposits": { + "public.user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2600,47 +2797,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_performance": { + "public.user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2755,41 +2955,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2801,9 +3001,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "users": { + "public.users": { "name": "users", "schema": "", "columns": { @@ -2824,9 +3027,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_amms": { + "public.v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -2891,47 +3097,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_conditional_vaults": { + "public.v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -2984,47 +3193,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_merges": { + "public.v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3074,60 +3286,92 @@ }, "indexes": { "merge_vault_index": { - "name": "merge_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_signature_index": { - "name": "merge_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_seq_num_vault_index": { - "name": "merge_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_metric_decisions": { + "public.v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3251,86 +3495,89 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_questions": { + "public.v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3387,9 +3634,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_splits": { + "public.v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3439,60 +3689,92 @@ }, "indexes": { "split_vault_index": { - "name": "split_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_signature_index": { - "name": "split_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_seq_num_vault_index": { - "name": "split_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_swaps": { + "public.v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3566,38 +3848,76 @@ }, "indexes": { "amm_index": { - "name": "amm_index", "columns": [ - "amm_addr" - ], - "isUnique": false + { + "expression": "amm_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "amm_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "signature_index": { - "name": "signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "seq_num_amm_index": { - "name": "seq_num_amm_index", "columns": [ - "amm_seq_num", - "amm_addr" - ], - "isUnique": false + { + "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 } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "53364bb0-feb1-4180-8d4b-dc53682e0a67", + "prevId": "8610ddf3-59d1-4ad0-8634-0478d37c5dc9", + "sequences": {}, + "policies": {}, + "views": {}, + "roles": {} } \ 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 38d45e46..6ab142ec 100644 --- a/packages/database/drizzle/meta/0005_snapshot.json +++ b/packages/database/drizzle/meta/0005_snapshot.json @@ -1,10 +1,8 @@ { - "id": "8b95ac6a-476f-4c4c-ab15-2a329671556f", - "prevId": "53364bb0-feb1-4180-8d4b-dc53682e0a67", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "candles": { + "public.candles": { "name": "candles", "schema": "", "columns": { @@ -74,15 +72,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -95,9 +93,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "comments": { + "public.comments": { "name": "comments", "schema": "", "columns": { @@ -144,42 +145,45 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", - "nullsNotDistinct": false, "columns": [ "comment_id" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "conditional_vaults": { + "public.conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -237,21 +241,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "dao_details": { + "public.dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -358,51 +365,54 @@ "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": {} }, - "daos": { + "public.daos": { "name": "daos", "schema": "", "columns": { @@ -498,76 +508,79 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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": {} }, - "indexer_account_dependencies": { + "public.indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -608,28 +621,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -641,9 +654,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "indexers": { + "public.indexers": { "name": "indexers", "schema": "", "columns": { @@ -675,9 +691,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "makes": { + "public.makes": { "name": "makes", "schema": "", "columns": { @@ -726,45 +745,56 @@ }, "indexes": { "market_index": { - "name": "market_index", "columns": [ - "market_acct" - ], - "isUnique": false + { + "expression": "market_acct", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "market_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "markets": { + "public.markets": { "name": "markets", "schema": "", "columns": { @@ -883,73 +913,76 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "orders": { + "public.orders": { "name": "orders", "schema": "", "columns": { @@ -1040,59 +1073,75 @@ }, "indexes": { "actor_index": { - "name": "actor_index", "columns": [ - "market_acct", - "actor_acct" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "prices": { + "public.prices": { "name": "prices", "schema": "", "columns": { @@ -1151,15 +1200,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -1171,9 +1220,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "program_system": { + "public.program_system": { "name": "program_system", "schema": "", "columns": { @@ -1213,60 +1265,63 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "programs": { + "public.programs": { "name": "programs", "schema": "", "columns": { @@ -1308,15 +1363,18 @@ "uniqueConstraints": { "program_version": { "name": "program_version", - "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposal_details": { + "public.proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1398,29 +1456,32 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", - "nullsNotDistinct": false, "columns": [ "slug" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposals": { + "public.proposals": { "name": "proposals", "schema": "", "columns": { @@ -1582,47 +1643,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "reactions": { + "public.reactions": { "name": "reactions", "schema": "", "columns": { @@ -1669,34 +1733,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "sessions": { + "public.sessions": { "name": "sessions", "schema": "", "columns": { @@ -1732,21 +1799,24 @@ "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" ], - "onDelete": "restrict", - "onUpdate": "restrict" + "onUpdate": "restrict", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signature_accounts": { + "public.signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1772,11 +1842,19 @@ }, "indexes": { "account_index": { - "name": "account_index", "columns": [ - "account" - ], - "isUnique": false + { + "expression": "account", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "account_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1789,9 +1867,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signatures": { + "public.signatures": { "name": "signatures", "schema": "", "columns": { @@ -1841,18 +1922,34 @@ }, "indexes": { "slot_index": { - "name": "slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "sequence_num_index": { - "name": "sequence_num_index", "columns": [ - "seq_num" - ], - "isUnique": false + { + "expression": "seq_num", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "sequence_num_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1860,14 +1957,17 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", - "nullsNotDistinct": false, "columns": [ "seq_num" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "takes": { + "public.takes": { "name": "takes", "schema": "", "columns": { @@ -1941,74 +2041,111 @@ }, "indexes": { "block_index": { - "name": "block_index", "columns": [ - "market_acct", - "order_block" - ], - "isUnique": false + { + "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 }, "time_index": { - "name": "time_index", "columns": [ - "market_acct", - "order_time" - ], - "isUnique": false + { + "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 }, "maker_index": { - "name": "maker_index", "columns": [ - "maker_order_tx_sig" - ], - "isUnique": false + { + "expression": "maker_order_tx_sig", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "maker_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_acct_balances": { + "public.token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2065,54 +2202,72 @@ }, "indexes": { "acct_amount_created": { - "name": "acct_amount_created", "columns": [ - "token_acct", - "created_at", - "amount" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2126,9 +2281,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_accts": { + "public.token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2175,21 +2333,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "tokens": { + "public.tokens": { "name": "tokens", "schema": "", "columns": { @@ -2239,9 +2400,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watcher_transactions": { + "public.transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2266,40 +2430,53 @@ }, "indexes": { "watcher_slot_index": { - "name": "watcher_slot_index", "columns": [ - "watcher_acct", - "slot" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2311,9 +2488,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watchers": { + "public.transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2378,34 +2558,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transactions": { + "public.transactions": { "name": "transactions", "schema": "", "columns": { @@ -2454,18 +2637,29 @@ }, "indexes": { "txn_slot_index": { - "name": "txn_slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "txn_slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "twaps": { + "public.twaps": { "name": "twaps", "schema": "", "columns": { @@ -2524,28 +2718,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2557,9 +2751,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_deposits": { + "public.user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2600,47 +2797,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_performance": { + "public.user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2755,41 +2955,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2801,9 +3001,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "users": { + "public.users": { "name": "users", "schema": "", "columns": { @@ -2824,9 +3027,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_amms": { + "public.v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -2891,47 +3097,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_conditional_vaults": { + "public.v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -2984,47 +3193,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_merges": { + "public.v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3074,60 +3286,92 @@ }, "indexes": { "merge_vault_index": { - "name": "merge_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_signature_index": { - "name": "merge_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_seq_num_vault_index": { - "name": "merge_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_metric_decisions": { + "public.v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3251,86 +3495,89 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_questions": { + "public.v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3387,9 +3634,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_splits": { + "public.v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3439,60 +3689,92 @@ }, "indexes": { "split_vault_index": { - "name": "split_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_signature_index": { - "name": "split_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_seq_num_vault_index": { - "name": "split_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_swaps": { + "public.v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3566,38 +3848,76 @@ }, "indexes": { "amm_index": { - "name": "amm_index", "columns": [ - "amm_addr" - ], - "isUnique": false + { + "expression": "amm_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "amm_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "signature_index": { - "name": "signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "seq_num_amm_index": { - "name": "seq_num_amm_index", "columns": [ - "amm_seq_num", - "amm_addr" - ], - "isUnique": false + { + "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 } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "8b95ac6a-476f-4c4c-ab15-2a329671556f", + "prevId": "53364bb0-feb1-4180-8d4b-dc53682e0a67", + "sequences": {}, + "policies": {}, + "views": {}, + "roles": {} } \ 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 1e0111cb..1bc8195b 100644 --- a/packages/database/drizzle/meta/0006_snapshot.json +++ b/packages/database/drizzle/meta/0006_snapshot.json @@ -1,10 +1,8 @@ { - "id": "cb8d59ae-d3f5-443e-bcb7-3c992a223857", - "prevId": "8b95ac6a-476f-4c4c-ab15-2a329671556f", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "candles": { + "public.candles": { "name": "candles", "schema": "", "columns": { @@ -74,15 +72,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -95,9 +93,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "comments": { + "public.comments": { "name": "comments", "schema": "", "columns": { @@ -144,42 +145,45 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", - "nullsNotDistinct": false, "columns": [ "comment_id" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "conditional_vaults": { + "public.conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -237,21 +241,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "dao_details": { + "public.dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -358,51 +365,54 @@ "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": {} }, - "daos": { + "public.daos": { "name": "daos", "schema": "", "columns": { @@ -498,76 +508,79 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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": {} }, - "indexer_account_dependencies": { + "public.indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -608,28 +621,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -641,9 +654,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "indexers": { + "public.indexers": { "name": "indexers", "schema": "", "columns": { @@ -675,9 +691,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "makes": { + "public.makes": { "name": "makes", "schema": "", "columns": { @@ -726,45 +745,56 @@ }, "indexes": { "market_index": { - "name": "market_index", "columns": [ - "market_acct" - ], - "isUnique": false + { + "expression": "market_acct", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "market_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "markets": { + "public.markets": { "name": "markets", "schema": "", "columns": { @@ -883,73 +913,76 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "orders": { + "public.orders": { "name": "orders", "schema": "", "columns": { @@ -1040,59 +1073,75 @@ }, "indexes": { "actor_index": { - "name": "actor_index", "columns": [ - "market_acct", - "actor_acct" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "prices": { + "public.prices": { "name": "prices", "schema": "", "columns": { @@ -1151,15 +1200,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -1171,9 +1220,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "program_system": { + "public.program_system": { "name": "program_system", "schema": "", "columns": { @@ -1213,60 +1265,63 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "programs": { + "public.programs": { "name": "programs", "schema": "", "columns": { @@ -1308,15 +1363,18 @@ "uniqueConstraints": { "program_version": { "name": "program_version", - "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposal_details": { + "public.proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1398,29 +1456,32 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", - "nullsNotDistinct": false, "columns": [ "slug" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposals": { + "public.proposals": { "name": "proposals", "schema": "", "columns": { @@ -1582,47 +1643,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "reactions": { + "public.reactions": { "name": "reactions", "schema": "", "columns": { @@ -1669,34 +1733,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "sessions": { + "public.sessions": { "name": "sessions", "schema": "", "columns": { @@ -1732,21 +1799,24 @@ "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" ], - "onDelete": "restrict", - "onUpdate": "restrict" + "onUpdate": "restrict", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signature_accounts": { + "public.signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1772,11 +1842,19 @@ }, "indexes": { "account_index": { - "name": "account_index", "columns": [ - "account" - ], - "isUnique": false + { + "expression": "account", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "account_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1789,9 +1867,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signatures": { + "public.signatures": { "name": "signatures", "schema": "", "columns": { @@ -1841,18 +1922,34 @@ }, "indexes": { "slot_index": { - "name": "slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "sequence_num_index": { - "name": "sequence_num_index", "columns": [ - "seq_num" - ], - "isUnique": false + { + "expression": "seq_num", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "sequence_num_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1860,14 +1957,17 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", - "nullsNotDistinct": false, "columns": [ "seq_num" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "takes": { + "public.takes": { "name": "takes", "schema": "", "columns": { @@ -1941,74 +2041,111 @@ }, "indexes": { "block_index": { - "name": "block_index", "columns": [ - "market_acct", - "order_block" - ], - "isUnique": false + { + "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 }, "time_index": { - "name": "time_index", "columns": [ - "market_acct", - "order_time" - ], - "isUnique": false + { + "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 }, "maker_index": { - "name": "maker_index", "columns": [ - "maker_order_tx_sig" - ], - "isUnique": false + { + "expression": "maker_order_tx_sig", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "maker_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_acct_balances": { + "public.token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2065,54 +2202,72 @@ }, "indexes": { "acct_amount_created": { - "name": "acct_amount_created", "columns": [ - "token_acct", - "created_at", - "amount" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2126,9 +2281,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_accts": { + "public.token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2175,21 +2333,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "tokens": { + "public.tokens": { "name": "tokens", "schema": "", "columns": { @@ -2239,9 +2400,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watcher_transactions": { + "public.transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2266,40 +2430,53 @@ }, "indexes": { "watcher_slot_index": { - "name": "watcher_slot_index", "columns": [ - "watcher_acct", - "slot" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2311,9 +2488,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watchers": { + "public.transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2378,34 +2558,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transactions": { + "public.transactions": { "name": "transactions", "schema": "", "columns": { @@ -2454,18 +2637,29 @@ }, "indexes": { "txn_slot_index": { - "name": "txn_slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "txn_slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "twaps": { + "public.twaps": { "name": "twaps", "schema": "", "columns": { @@ -2524,28 +2718,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2557,9 +2751,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_deposits": { + "public.user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2600,47 +2797,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_performance": { + "public.user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2755,41 +2955,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2801,9 +3001,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "users": { + "public.users": { "name": "users", "schema": "", "columns": { @@ -2824,9 +3027,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_amms": { + "public.v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -2891,47 +3097,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_conditional_vaults": { + "public.v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -2984,47 +3193,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_merges": { + "public.v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3074,60 +3286,92 @@ }, "indexes": { "merge_vault_index": { - "name": "merge_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_signature_index": { - "name": "merge_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_seq_num_vault_index": { - "name": "merge_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_metric_decisions": { + "public.v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3251,86 +3495,89 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_questions": { + "public.v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3387,9 +3634,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_splits": { + "public.v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3439,60 +3689,92 @@ }, "indexes": { "split_vault_index": { - "name": "split_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_signature_index": { - "name": "split_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_seq_num_vault_index": { - "name": "split_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_swaps": { + "public.v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3566,38 +3848,76 @@ }, "indexes": { "amm_index": { - "name": "amm_index", "columns": [ - "amm_addr" - ], - "isUnique": false + { + "expression": "amm_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "amm_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "signature_index": { - "name": "signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "seq_num_amm_index": { - "name": "seq_num_amm_index", "columns": [ - "amm_seq_num", - "amm_addr" - ], - "isUnique": false + { + "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 } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "cb8d59ae-d3f5-443e-bcb7-3c992a223857", + "prevId": "8b95ac6a-476f-4c4c-ab15-2a329671556f", + "sequences": {}, + "policies": {}, + "views": {}, + "roles": {} } \ 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 0cb71d1a..07545325 100644 --- a/packages/database/drizzle/meta/0007_snapshot.json +++ b/packages/database/drizzle/meta/0007_snapshot.json @@ -1,10 +1,8 @@ { - "id": "2f29ee7d-b2cb-458c-9e8f-5e1278f5a691", - "prevId": "cb8d59ae-d3f5-443e-bcb7-3c992a223857", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "candles": { + "public.candles": { "name": "candles", "schema": "", "columns": { @@ -74,15 +72,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -95,9 +93,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "comments": { + "public.comments": { "name": "comments", "schema": "", "columns": { @@ -144,42 +145,45 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", - "nullsNotDistinct": false, "columns": [ "comment_id" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "conditional_vaults": { + "public.conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -237,21 +241,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "dao_details": { + "public.dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -358,51 +365,54 @@ "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": {} }, - "daos": { + "public.daos": { "name": "daos", "schema": "", "columns": { @@ -498,76 +508,79 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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": {} }, - "indexer_account_dependencies": { + "public.indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -608,28 +621,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -641,9 +654,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "indexers": { + "public.indexers": { "name": "indexers", "schema": "", "columns": { @@ -675,9 +691,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "makes": { + "public.makes": { "name": "makes", "schema": "", "columns": { @@ -726,45 +745,56 @@ }, "indexes": { "market_index": { - "name": "market_index", "columns": [ - "market_acct" - ], - "isUnique": false + { + "expression": "market_acct", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "market_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "markets": { + "public.markets": { "name": "markets", "schema": "", "columns": { @@ -883,73 +913,76 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "orders": { + "public.orders": { "name": "orders", "schema": "", "columns": { @@ -1040,59 +1073,75 @@ }, "indexes": { "actor_index": { - "name": "actor_index", "columns": [ - "market_acct", - "actor_acct" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "prices": { + "public.prices": { "name": "prices", "schema": "", "columns": { @@ -1151,15 +1200,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -1171,9 +1220,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "program_system": { + "public.program_system": { "name": "program_system", "schema": "", "columns": { @@ -1213,60 +1265,63 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "programs": { + "public.programs": { "name": "programs", "schema": "", "columns": { @@ -1308,15 +1363,18 @@ "uniqueConstraints": { "program_version": { "name": "program_version", - "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposal_details": { + "public.proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1398,29 +1456,32 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", - "nullsNotDistinct": false, "columns": [ "slug" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposals": { + "public.proposals": { "name": "proposals", "schema": "", "columns": { @@ -1582,47 +1643,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "reactions": { + "public.reactions": { "name": "reactions", "schema": "", "columns": { @@ -1669,34 +1733,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "sessions": { + "public.sessions": { "name": "sessions", "schema": "", "columns": { @@ -1732,21 +1799,24 @@ "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" ], - "onDelete": "restrict", - "onUpdate": "restrict" + "onUpdate": "restrict", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signature_accounts": { + "public.signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1772,11 +1842,19 @@ }, "indexes": { "account_index": { - "name": "account_index", "columns": [ - "account" - ], - "isUnique": false + { + "expression": "account", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "account_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1789,9 +1867,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signatures": { + "public.signatures": { "name": "signatures", "schema": "", "columns": { @@ -1841,18 +1922,34 @@ }, "indexes": { "slot_index": { - "name": "slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "sequence_num_index": { - "name": "sequence_num_index", "columns": [ - "seq_num" - ], - "isUnique": false + { + "expression": "seq_num", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "sequence_num_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1860,14 +1957,17 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", - "nullsNotDistinct": false, "columns": [ "seq_num" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "takes": { + "public.takes": { "name": "takes", "schema": "", "columns": { @@ -1941,74 +2041,111 @@ }, "indexes": { "block_index": { - "name": "block_index", "columns": [ - "market_acct", - "order_block" - ], - "isUnique": false + { + "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 }, "time_index": { - "name": "time_index", "columns": [ - "market_acct", - "order_time" - ], - "isUnique": false + { + "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 }, "maker_index": { - "name": "maker_index", "columns": [ - "maker_order_tx_sig" - ], - "isUnique": false + { + "expression": "maker_order_tx_sig", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "maker_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_acct_balances": { + "public.token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2065,54 +2202,72 @@ }, "indexes": { "acct_amount_created": { - "name": "acct_amount_created", "columns": [ - "token_acct", - "created_at", - "amount" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2126,9 +2281,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_accts": { + "public.token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2175,21 +2333,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "tokens": { + "public.tokens": { "name": "tokens", "schema": "", "columns": { @@ -2239,9 +2400,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watcher_transactions": { + "public.transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2266,40 +2430,53 @@ }, "indexes": { "watcher_slot_index": { - "name": "watcher_slot_index", "columns": [ - "watcher_acct", - "slot" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2311,9 +2488,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watchers": { + "public.transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2378,34 +2558,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transactions": { + "public.transactions": { "name": "transactions", "schema": "", "columns": { @@ -2454,18 +2637,29 @@ }, "indexes": { "txn_slot_index": { - "name": "txn_slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "txn_slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "twaps": { + "public.twaps": { "name": "twaps", "schema": "", "columns": { @@ -2524,28 +2718,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2557,9 +2751,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_deposits": { + "public.user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2600,47 +2797,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_performance": { + "public.user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2755,41 +2955,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2801,9 +3001,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "users": { + "public.users": { "name": "users", "schema": "", "columns": { @@ -2824,9 +3027,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_amms": { + "public.v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -2891,47 +3097,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_conditional_vaults": { + "public.v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -2984,47 +3193,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_merges": { + "public.v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3074,60 +3286,92 @@ }, "indexes": { "merge_vault_index": { - "name": "merge_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_signature_index": { - "name": "merge_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_seq_num_vault_index": { - "name": "merge_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_metric_decisions": { + "public.v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3251,86 +3495,89 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_questions": { + "public.v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3387,9 +3634,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_splits": { + "public.v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3439,60 +3689,92 @@ }, "indexes": { "split_vault_index": { - "name": "split_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_signature_index": { - "name": "split_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_seq_num_vault_index": { - "name": "split_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_swaps": { + "public.v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3566,38 +3848,76 @@ }, "indexes": { "amm_index": { - "name": "amm_index", "columns": [ - "amm_addr" - ], - "isUnique": false + { + "expression": "amm_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "amm_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "signature_index": { - "name": "signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "seq_num_amm_index": { - "name": "seq_num_amm_index", "columns": [ - "amm_seq_num", - "amm_addr" - ], - "isUnique": false + { + "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 } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "2f29ee7d-b2cb-458c-9e8f-5e1278f5a691", + "prevId": "cb8d59ae-d3f5-443e-bcb7-3c992a223857", + "sequences": {}, + "policies": {}, + "views": {}, + "roles": {} } \ 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 91550c92..731d8504 100644 --- a/packages/database/drizzle/meta/0008_snapshot.json +++ b/packages/database/drizzle/meta/0008_snapshot.json @@ -1,10 +1,8 @@ { - "id": "46750075-91a4-4e4d-b00a-3f3ab69abf22", - "prevId": "2f29ee7d-b2cb-458c-9e8f-5e1278f5a691", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "candles": { + "public.candles": { "name": "candles", "schema": "", "columns": { @@ -74,15 +72,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -95,9 +93,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "comments": { + "public.comments": { "name": "comments", "schema": "", "columns": { @@ -144,42 +145,45 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "comments_comment_id_unique": { "name": "comments_comment_id_unique", - "nullsNotDistinct": false, "columns": [ "comment_id" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "conditional_vaults": { + "public.conditional_vaults": { "name": "conditional_vaults", "schema": "", "columns": { @@ -237,21 +241,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "dao_details": { + "public.dao_details": { "name": "dao_details", "schema": "", "columns": { @@ -358,51 +365,54 @@ "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": {} }, - "daos": { + "public.daos": { "name": "daos", "schema": "", "columns": { @@ -498,76 +508,79 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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": {} }, - "indexer_account_dependencies": { + "public.indexer_account_dependencies": { "name": "indexer_account_dependencies", "schema": "", "columns": { @@ -608,28 +621,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -641,9 +654,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "indexers": { + "public.indexers": { "name": "indexers", "schema": "", "columns": { @@ -675,9 +691,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "makes": { + "public.makes": { "name": "makes", "schema": "", "columns": { @@ -726,45 +745,56 @@ }, "indexes": { "market_index": { - "name": "market_index", "columns": [ - "market_acct" - ], - "isUnique": false + { + "expression": "market_acct", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "market_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "markets": { + "public.markets": { "name": "markets", "schema": "", "columns": { @@ -883,73 +913,76 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "orders": { + "public.orders": { "name": "orders", "schema": "", "columns": { @@ -1040,59 +1073,75 @@ }, "indexes": { "actor_index": { - "name": "actor_index", "columns": [ - "market_acct", - "actor_acct" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "prices": { + "public.prices": { "name": "prices", "schema": "", "columns": { @@ -1151,15 +1200,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -1171,9 +1220,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "program_system": { + "public.program_system": { "name": "program_system", "schema": "", "columns": { @@ -1213,60 +1265,63 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "programs": { + "public.programs": { "name": "programs", "schema": "", "columns": { @@ -1308,15 +1363,18 @@ "uniqueConstraints": { "program_version": { "name": "program_version", - "nullsNotDistinct": false, "columns": [ "program_acct", "version" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposal_details": { + "public.proposal_details": { "name": "proposal_details", "schema": "", "columns": { @@ -1398,29 +1456,32 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "proposal_details_slug_unique": { "name": "proposal_details_slug_unique", - "nullsNotDistinct": false, "columns": [ "slug" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "proposals": { + "public.proposals": { "name": "proposals", "schema": "", "columns": { @@ -1582,47 +1643,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "reactions": { + "public.reactions": { "name": "reactions", "schema": "", "columns": { @@ -1669,34 +1733,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "sessions": { + "public.sessions": { "name": "sessions", "schema": "", "columns": { @@ -1732,21 +1799,24 @@ "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" ], - "onDelete": "restrict", - "onUpdate": "restrict" + "onUpdate": "restrict", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signature_accounts": { + "public.signature_accounts": { "name": "signature_accounts", "schema": "", "columns": { @@ -1772,11 +1842,19 @@ }, "indexes": { "account_index": { - "name": "account_index", "columns": [ - "account" - ], - "isUnique": false + { + "expression": "account", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "account_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1789,9 +1867,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "signatures": { + "public.signatures": { "name": "signatures", "schema": "", "columns": { @@ -1841,18 +1922,34 @@ }, "indexes": { "slot_index": { - "name": "slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "sequence_num_index": { - "name": "sequence_num_index", "columns": [ - "seq_num" - ], - "isUnique": false + { + "expression": "seq_num", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "sequence_num_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, @@ -1860,14 +1957,17 @@ "uniqueConstraints": { "signatures_seq_num_unique": { "name": "signatures_seq_num_unique", - "nullsNotDistinct": false, "columns": [ "seq_num" - ] + ], + "nullsNotDistinct": false } - } + }, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "takes": { + "public.takes": { "name": "takes", "schema": "", "columns": { @@ -1948,74 +2048,111 @@ }, "indexes": { "block_index": { - "name": "block_index", "columns": [ - "market_acct", - "order_block" - ], - "isUnique": false + { + "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 }, "time_index": { - "name": "time_index", "columns": [ - "market_acct", - "order_time" - ], - "isUnique": false + { + "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 }, "maker_index": { - "name": "maker_index", "columns": [ - "maker_order_tx_sig" - ], - "isUnique": false + { + "expression": "maker_order_tx_sig", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "maker_index", + "isUnique": false, + "method": "btree", + "concurrently": 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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_acct_balances": { + "public.token_acct_balances": { "name": "token_acct_balances", "schema": "", "columns": { @@ -2072,54 +2209,72 @@ }, "indexes": { "acct_amount_created": { - "name": "acct_amount_created", "columns": [ - "token_acct", - "created_at", - "amount" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2133,9 +2288,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "token_accts": { + "public.token_accts": { "name": "token_accts", "schema": "", "columns": { @@ -2182,21 +2340,24 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "tokens": { + "public.tokens": { "name": "tokens", "schema": "", "columns": { @@ -2246,9 +2407,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watcher_transactions": { + "public.transaction_watcher_transactions": { "name": "transaction_watcher_transactions", "schema": "", "columns": { @@ -2273,40 +2437,53 @@ }, "indexes": { "watcher_slot_index": { - "name": "watcher_slot_index", "columns": [ - "watcher_acct", - "slot" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2318,9 +2495,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transaction_watchers": { + "public.transaction_watchers": { "name": "transaction_watchers", "schema": "", "columns": { @@ -2385,34 +2565,37 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "transactions": { + "public.transactions": { "name": "transactions", "schema": "", "columns": { @@ -2461,18 +2644,29 @@ }, "indexes": { "txn_slot_index": { - "name": "txn_slot_index", "columns": [ - "slot" - ], - "isUnique": false + { + "expression": "slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "txn_slot_index", + "isUnique": false, + "method": "btree", + "concurrently": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "twaps": { + "public.twaps": { "name": "twaps", "schema": "", "columns": { @@ -2531,28 +2725,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2564,9 +2758,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_deposits": { + "public.user_deposits": { "name": "user_deposits", "schema": "", "columns": { @@ -2607,47 +2804,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "user_performance": { + "public.user_performance": { "name": "user_performance", "schema": "", "columns": { @@ -2762,41 +2962,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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": { @@ -2808,9 +3008,12 @@ ] } }, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "users": { + "public.users": { "name": "users", "schema": "", "columns": { @@ -2831,9 +3034,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_amms": { + "public.v0_4_amms": { "name": "v0_4_amms", "schema": "", "columns": { @@ -2898,47 +3104,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_conditional_vaults": { + "public.v0_4_conditional_vaults": { "name": "v0_4_conditional_vaults", "schema": "", "columns": { @@ -2991,47 +3200,50 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_merges": { + "public.v0_4_merges": { "name": "v0_4_merges", "schema": "", "columns": { @@ -3081,60 +3293,92 @@ }, "indexes": { "merge_vault_index": { - "name": "merge_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_signature_index": { - "name": "merge_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "merge_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "merge_seq_num_vault_index": { - "name": "merge_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_metric_decisions": { + "public.v0_4_metric_decisions": { "name": "v0_4_metric_decisions", "schema": "", "columns": { @@ -3258,86 +3502,89 @@ "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_questions": { + "public.v0_4_questions": { "name": "v0_4_questions", "schema": "", "columns": { @@ -3394,9 +3641,12 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_splits": { + "public.v0_4_splits": { "name": "v0_4_splits", "schema": "", "columns": { @@ -3446,60 +3696,92 @@ }, "indexes": { "split_vault_index": { - "name": "split_vault_index", "columns": [ - "vault_addr" - ], - "isUnique": false + { + "expression": "vault_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_vault_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_signature_index": { - "name": "split_signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "split_signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "split_seq_num_vault_index": { - "name": "split_seq_num_vault_index", "columns": [ - "vault_seq_num", - "vault_addr" - ], - "isUnique": false + { + "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 } }, "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "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" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} }, - "v0_4_swaps": { + "public.v0_4_swaps": { "name": "v0_4_swaps", "schema": "", "columns": { @@ -3573,38 +3855,76 @@ }, "indexes": { "amm_index": { - "name": "amm_index", "columns": [ - "amm_addr" - ], - "isUnique": false + { + "expression": "amm_addr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "amm_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "signature_index": { - "name": "signature_index", "columns": [ - "signature" - ], - "isUnique": false + { + "expression": "signature", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "with": {}, + "name": "signature_index", + "isUnique": false, + "method": "btree", + "concurrently": false }, "seq_num_amm_index": { - "name": "seq_num_amm_index", "columns": [ - "amm_seq_num", - "amm_addr" - ], - "isUnique": false + { + "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 } }, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": {}, + "policies": {}, + "isRLSEnabled": false, + "checkConstraints": {} } }, "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "46750075-91a4-4e4d-b00a-3f3ab69abf22", + "prevId": "2f29ee7d-b2cb-458c-9e8f-5e1278f5a691", + "sequences": {}, + "policies": {}, + "views": {}, + "roles": {} } \ No newline at end of file diff --git a/packages/database/drizzle/meta/0009_snapshot.json b/packages/database/drizzle/meta/0009_snapshot.json new file mode 100644 index 00000000..b0540cb5 --- /dev/null +++ b/packages/database/drizzle/meta/0009_snapshot.json @@ -0,0 +1,4036 @@ +{ + "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 new file mode 100644 index 00000000..9c5fef23 --- /dev/null +++ b/packages/database/drizzle/meta/0010_snapshot.json @@ -0,0 +1,4042 @@ +{ + "id": "5030bfc2-b66f-493c-b689-c45c88186a53", + "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 + }, + "colors": { + "name": "colors", + "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/_journal.json b/packages/database/drizzle/meta/_journal.json index 76675b2d..9f65679e 100644 --- a/packages/database/drizzle/meta/_journal.json +++ b/packages/database/drizzle/meta/_journal.json @@ -64,6 +64,20 @@ "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": 1731623854927, + "tag": "0010_busy_dreaming_celestial", + "breakpoints": true } ] } \ No newline at end of file diff --git a/packages/database/lib/index.ts b/packages/database/lib/index.ts index 441e011b..e68c5abf 100644 --- a/packages/database/lib/index.ts +++ b/packages/database/lib/index.ts @@ -91,6 +91,7 @@ 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 c05b7999..dde683aa 100644 --- a/packages/database/lib/schema.ts +++ b/packages/database/lib/schema.ts @@ -386,6 +386,7 @@ 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(), }); @@ -730,6 +731,7 @@ export const daoDetails = pgTable( lp_token_image_url: varchar("lp_token_image_url"), isHide: boolean("is_hide"), socials: jsonb("socials"), + colors: jsonb("colors"), }, (table) => ({ uniqueId: unique("id_name_url").on(table.daoId, table.url, table.name), @@ -1000,7 +1002,6 @@ 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), @@ -1018,7 +1019,6 @@ 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), @@ -1028,6 +1028,7 @@ 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), @@ -1200,4 +1201,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; +export type UserPerformanceRecord = typeof userPerformance._.inferInsert; \ No newline at end of file diff --git a/packages/database/package.json b/packages/database/package.json index 90c608d8..ef4df520 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:pg --schema=./lib/schema.ts", + "migrate:create": "drizzle-kit generate --dialect=postgresql --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": { - "drizzle-orm": "0.30.6", - "pg": "^8.11.3", - "dotenv": "16.4.5" + "dotenv": "16.4.5", + "drizzle-orm": "0.36.0", + "pg": "^8.11.3" }, "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.20.18", + "drizzle-kit": "0.27.0", "inquirer": "^9.2.14" } } diff --git a/packages/hasura/metadata/databases/databases.yaml b/packages/hasura/metadata/databases/databases.yaml index e717ecdf..06a9c58b 100644 --- a/packages/hasura/metadata/databases/databases.yaml +++ b/packages/hasura/metadata/databases/databases.yaml @@ -140,6 +140,122 @@ - fail_quote_amount filter: {} role: anonymous + - fields: + - name: total_volume + type: + nullable: true + scalar: numeric + - name: unique_accounts + type: + nullable: true + scalar: numeric + - name: total_trades + type: + nullable: true + scalar: numeric + name: performance_stats + select_permissions: + - permission: + columns: + - total_volume + - unique_accounts + - total_trades + filter: {} + role: anonymous + - fields: + - name: base_amount + type: + nullable: true + scalar: numeric + - name: quote_amount + type: + nullable: true + scalar: numeric + - name: price + type: + nullable: true + scalar: numeric + - name: prices_type + type: + nullable: true + scalar: text + - name: interv + type: + nullable: true + scalar: timestamptz + name: price_chart_data_unique + select_permissions: + - permission: + columns: + - base_amount + - quote_amount + - price + - prices_type + - interv + filter: {} + role: anonymous + - fields: + - name: proposal_acct + type: + nullable: true + scalar: text + - name: bar_size + type: + nullable: true + scalar: interval + - name: bar_start_time + type: + nullable: true + scalar: timestamptz + - name: pass_market_acct + type: + nullable: true + scalar: text + - name: pass_price + type: + nullable: true + scalar: numeric + - name: pass_base_amount + type: + nullable: true + scalar: numeric + - name: pass_quote_amount + type: + nullable: true + scalar: numeric + - name: fail_market_acct + type: + nullable: true + scalar: text + - name: fail_price + type: + nullable: true + scalar: numeric + - name: fail_base_amount + type: + nullable: true + scalar: numeric + - name: fail_quote_amount + type: + nullable: true + scalar: numeric + name: proposal_bars_unique + select_permissions: + - permission: + columns: + - proposal_acct + - bar_size + - bar_start_time + - pass_market_acct + - pass_price + - pass_base_amount + - pass_quote_amount + - fail_market_acct + - fail_price + - fail_base_amount + - fail_quote_amount + filter: {} + role: anonymous - fields: - name: proposal_acct type: @@ -162,7 +278,185 @@ - 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: website_latest_four_proposals + select_permissions: + - permission: + columns: + - dao_image + - proposal_title + - trade_count + - volume_traded + - proposal_status + - chart_data + 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 + - 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: website_latest_four_proposals + select_permissions: + - permission: + columns: + - dao_image + - proposal_title + - trade_count + - volume_traded + - proposal_status + - chart_data + 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 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 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 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: "" + nullable: true + type: text + proposal_acct: + description: "" + nullable: true + type: text + 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 WHERE \n -- Optional filters that can be commented out or dynamically included\n (NULLIF({{dao_slug}}, '') IS NULL OR dd.slug = {{dao_slug}})\n AND (NULLIF({{proposal_acct}}, '') IS NULL OR m.proposal_acct = {{proposal_acct}})\n),\naggregated_stats AS (\n SELECT \n COUNT(DISTINCT actor_acct) AS unique_trader_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 -- Include these in output for verification/grouping if needed\n NULLIF({{dao_slug}}, '') AS filtered_dao_slug,\n NULLIF({{proposal_acct}}, '') AS filtered_proposal_acct\n FROM base_trades\n)\nSELECT \n total_volume::numeric, \n unique_trader_count::numeric AS unique_accounts,\n total_trades::numeric\nFROM aggregated_stats;" + returns: performance_stats + root_field_name: performance_stats + - 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 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 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 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: "" @@ -215,12 +509,53 @@ code: "WITH changes AS (\n SELECT \n *,\n LAG(pass_price) OVER w AS prev_pass_price,\n LAG(pass_base_amount) OVER w AS prev_pass_base_amount,\n LAG(pass_quote_amount) OVER w AS prev_pass_quote_amount,\n LAG(fail_price) OVER w AS prev_fail_price,\n LAG(fail_base_amount) OVER w AS prev_fail_base_amount,\n LAG(fail_quote_amount) OVER w AS prev_fail_quote_amount,\n LEAD(pass_price) OVER w AS next_pass_price,\n LEAD(pass_base_amount) OVER w AS next_pass_base_amount,\n LEAD(pass_quote_amount) OVER w AS next_pass_quote_amount,\n LEAD(fail_price) OVER w AS next_fail_price,\n LEAD(fail_base_amount) OVER w AS next_fail_base_amount,\n LEAD(fail_quote_amount) OVER w AS next_fail_quote_amount\n FROM proposal_bars\n WHERE proposal_acct = {{proposal_acct}}\n AND ({{start_date}}::timestamptz IS NULL OR bar_start_time >= {{start_date}}::timestamptz)\n AND ({{end_date}}::timestamptz IS NULL OR bar_start_time <= {{end_date}}::timestamptz)\n WINDOW w AS (ORDER BY bar_start_time)\n), agg AS(\nSELECT \n proposal_acct::text, bar_size, bar_start_time::timestamptz,\n pass_market_acct::text, pass_price::numeric, pass_base_amount::numeric, pass_quote_amount::numeric,\n fail_market_acct::text, fail_price::numeric, fail_base_amount::numeric, fail_quote_amount::numeric\nFROM changes\nWHERE \n -- First row - no previous values\n prev_pass_price IS NULL\n\n -- Last row - no next values\n OR next_pass_price IS NULL\n\n -- Price changes - handle nulls in both current and previous\n OR (pass_price IS NULL AND prev_pass_price IS NOT NULL)\n OR (pass_price IS NOT NULL AND prev_pass_price IS NULL)\n OR (pass_price != prev_pass_price AND pass_price IS NOT NULL AND prev_pass_price IS NOT NULL)\n\n -- Quote amount changes\n OR (pass_quote_amount IS NULL AND prev_pass_quote_amount IS NOT NULL)\n OR (pass_quote_amount IS NOT NULL AND prev_pass_quote_amount IS NULL)\n OR (pass_quote_amount != prev_pass_quote_amount AND pass_quote_amount IS NOT NULL AND prev_pass_quote_amount IS NOT NULL)\n\n -- Base amount changes\n OR (pass_base_amount IS NULL AND prev_pass_base_amount IS NOT NULL)\n OR (pass_base_amount IS NOT NULL AND prev_pass_base_amount IS NULL)\n OR (pass_base_amount != prev_pass_base_amount AND pass_base_amount IS NOT NULL AND prev_pass_base_amount IS NOT NULL)\n)\nSELECT * FROM agg WHERE pass_price IS NOT NULL AND fail_price IS NOT NULL;" returns: proposal_bars_unique root_field_name: unique_proposal_bars_data + - arguments: + end_date: + description: "" + nullable: true + type: text + market_acct: + description: "" + nullable: false + type: text + start_date: + description: "" + nullable: true + type: text + code: "WITH changes AS (\n SELECT \n *,\n LAG(price) OVER w AS prev_price,\n LAG(prices_type) OVER w AS prev_prices_type,\n LAG(base_amount) OVER w AS prev_base_amount,\n LAG(quote_amount) OVER w AS prev_quote_amount,\n LEAD(price) OVER w AS next_price,\n LEAD(prices_type) OVER w AS next_prices_type,\n LEAD(base_amount) OVER w AS next_base_amount,\n LEAD(quote_amount) OVER w AS next_quote_amount\n FROM prices_chart_data\n WHERE market_acct = {{market_acct}}\n AND ({{start_date}}::timestamptz IS NULL OR interv >= {{start_date}}::timestamptz)\n AND ({{end_date}}::timestamptz IS NULL OR interv <= {{end_date}}::timestamptz)\n WINDOW w AS (ORDER BY interv)\n)\nSELECT interv, price, base_amount, quote_amount, prices_type::text\nFROM changes\nWHERE \n -- First row\n prev_price IS NULL\n -- Last row\n OR next_price IS NULL\n -- Or where any value changes\n OR price != prev_price\n OR prices_type != prev_prices_type\n OR base_amount != prev_base_amount\n OR quote_amount != prev_quote_amount;" + returns: price_chart_data_unique + root_field_name: unique_price_chart_data + - arguments: + end_date: + description: "" + nullable: true + type: text + proposal_acct: + description: "" + nullable: false + type: text + start_date: + description: "" + nullable: true + type: text + code: "WITH changes AS (\n SELECT \n *,\n LAG(pass_price) OVER w AS prev_pass_price,\n LAG(pass_base_amount) OVER w AS prev_pass_base_amount,\n LAG(pass_quote_amount) OVER w AS prev_pass_quote_amount,\n LAG(fail_price) OVER w AS prev_fail_price,\n LAG(fail_base_amount) OVER w AS prev_fail_base_amount,\n LAG(fail_quote_amount) OVER w AS prev_fail_quote_amount,\n LEAD(pass_price) OVER w AS next_pass_price,\n LEAD(pass_base_amount) OVER w AS next_pass_base_amount,\n LEAD(pass_quote_amount) OVER w AS next_pass_quote_amount,\n LEAD(fail_price) OVER w AS next_fail_price,\n LEAD(fail_base_amount) OVER w AS next_fail_base_amount,\n LEAD(fail_quote_amount) OVER w AS next_fail_quote_amount\n FROM proposal_bars\n WHERE proposal_acct = {{proposal_acct}}\n AND ({{start_date}}::timestamptz IS NULL OR bar_start_time >= {{start_date}}::timestamptz)\n AND ({{end_date}}::timestamptz IS NULL OR bar_start_time <= {{end_date}}::timestamptz)\n WINDOW w AS (ORDER BY bar_start_time)\n), agg AS(\nSELECT \n proposal_acct::text, bar_size, bar_start_time::timestamptz,\n pass_market_acct::text, pass_price::numeric, pass_base_amount::numeric, pass_quote_amount::numeric,\n fail_market_acct::text, fail_price::numeric, fail_base_amount::numeric, fail_quote_amount::numeric\nFROM changes\nWHERE \n -- First row - no previous values\n prev_pass_price IS NULL\n\n -- Last row - no next values\n OR next_pass_price IS NULL\n\n -- Price changes - handle nulls in both current and previous\n OR (pass_price IS NULL AND prev_pass_price IS NOT NULL)\n OR (pass_price IS NOT NULL AND prev_pass_price IS NULL)\n OR (pass_price != prev_pass_price AND pass_price IS NOT NULL AND prev_pass_price IS NOT NULL)\n\n -- Quote amount changes\n OR (pass_quote_amount IS NULL AND prev_pass_quote_amount IS NOT NULL)\n OR (pass_quote_amount IS NOT NULL AND prev_pass_quote_amount IS NULL)\n OR (pass_quote_amount != prev_pass_quote_amount AND pass_quote_amount IS NOT NULL AND prev_pass_quote_amount IS NOT NULL)\n\n -- Base amount changes\n OR (pass_base_amount IS NULL AND prev_pass_base_amount IS NOT NULL)\n OR (pass_base_amount IS NOT NULL AND prev_pass_base_amount IS NULL)\n OR (pass_base_amount != prev_pass_base_amount AND pass_base_amount IS NOT NULL AND prev_pass_base_amount IS NOT NULL)\n)\nSELECT * FROM agg WHERE pass_price IS NOT NULL AND fail_price IS NOT NULL;" + returns: proposal_bars_unique + root_field_name: unique_proposal_bars_data - arguments: proposal_acct: description: the proposal account nullable: true type: varchar 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;" + 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 - tables: "!include futarchy/tables/tables.yaml" \ No newline at end of file + - 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 + - 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" diff --git a/packages/hasura/metadata/databases/futarchy/tables/public_takes.yaml b/packages/hasura/metadata/databases/futarchy/tables/public_takes.yaml index 27736448..74a1515d 100644 --- a/packages/hasura/metadata/databases/futarchy/tables/public_takes.yaml +++ b/packages/hasura/metadata/databases/futarchy/tables/public_takes.yaml @@ -29,4 +29,3 @@ select_permissions: filter: {} allow_aggregations: true comment: "" - diff --git a/packages/hasura/metadata/query_collections.yaml b/packages/hasura/metadata/query_collections.yaml index fe360a07..4c38719f 100644 --- a/packages/hasura/metadata/query_collections.yaml +++ b/packages/hasura/metadata/query_collections.yaml @@ -23,3 +23,28 @@ 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 + } + } diff --git a/packages/hasura/metadata/rest_endpoints.yaml b/packages/hasura/metadata/rest_endpoints.yaml index 95bcda36..935c3306 100644 --- a/packages/hasura/metadata/rest_endpoints.yaml +++ b/packages/hasura/metadata/rest_endpoints.yaml @@ -7,6 +7,24 @@ - 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/Dockerfile b/packages/indexer/Dockerfile index f7f978a6..29b666ef 100644 --- a/packages/indexer/Dockerfile +++ b/packages/indexer/Dockerfile @@ -13,7 +13,7 @@ RUN apk add --no-cache --force-overwrite glibc-2.28-r0.apk RUN apk add --no-cache git EXPOSE 8080 -RUN corepack prepare pnpm@9.12.1 --activate +RUN corepack prepare pnpm@9.11.0 --activate RUN corepack enable ENV REPO_DIR /home/indexer/futarchy-indexer RUN mkdir -p $REPO_DIR diff --git a/packages/indexer/package.json b/packages/indexer/package.json index 0cce1384..c111aea3 100644 --- a/packages/indexer/package.json +++ b/packages/indexer/package.json @@ -11,7 +11,7 @@ "@coral-xyz/anchor": "^0.29.0", "@debridge-finance/solana-transaction-parser": "^2.0.1", "@lukasdeco/prom-client": "^15.1.4", - "@metadaoproject/futarchy": "^0.4.0-alpha.21", + "@metadaoproject/futarchy": "^0.4.0-alpha.18", "@metadaoproject/futarchy-sdk": "4.0.0-alpha.31", "@metadaoproject/indexer-db": "workspace:*", "@metaplex-foundation/umi-bundle-defaults": "^0.9.1", diff --git a/packages/indexer/readme.md b/packages/indexer/readme.md new file mode 100644 index 00000000..c1cc4cbb --- /dev/null +++ b/packages/indexer/readme.md @@ -0,0 +1,20 @@ +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 af64e82b..07a4ea08 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 | null> { + ): Promise> { let response: AxiosResponse>; try { if (method === "GET") { @@ -32,14 +32,11 @@ export class TelegramBotAPI implements AlertChatBotInterface { } return response.data; } catch (error) { - console.error( - `Failed to make request: ${error}. Method: ${method}. Endpoint: ${endpoint}` - ); - return null; + throw new Error(`Failed to make request: ${error}`); } } - public async getMe(): Promise | null> { + public async getMe(): Promise> { return this.request("GET", "getMe"); } @@ -61,7 +58,7 @@ export class TelegramBotAPI implements AlertChatBotInterface { limit?: number, timeout?: number, allowed_updates?: string[] - ): Promise | null> { + ): Promise> { const params = { offset, limit, timeout, allowed_updates }; return this.request("GET", "getUpdates", params); } @@ -77,7 +74,7 @@ type ChatbotApiResponse = { }; export interface AlertChatBotInterface { - getMe(): Promise | null>; + getMe(): Promise>; sendMessage( chatId: number | string, text: string @@ -87,5 +84,5 @@ export interface AlertChatBotInterface { limit?: number, timeout?: number, allowed_updates?: string[] - ): Promise | null>; + ): Promise>; } diff --git a/packages/indexer/src/connection.ts b/packages/indexer/src/connection.ts index 47e2bd76..eafd196f 100644 --- a/packages/indexer/src/connection.ts +++ b/packages/indexer/src/connection.ts @@ -1,14 +1,13 @@ 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"; +import { ConditionalVaultClient, AmmClient } from "@metadaoproject/futarchy/v0.4"; 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 ?? ""; + +if (!RPC_ENDPOINT) { + throw new Error("RPC_ENDPOINT is not set"); +} + 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; @@ -16,15 +15,5 @@ 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, -}); +export const ammClient = AmmClient.createClient({ provider }); +export const conditionalVaultClient = ConditionalVaultClient.createClient({ provider }); diff --git a/packages/indexer/src/endpoints/get-metrics.ts b/packages/indexer/src/endpoints/get-metrics.ts deleted file mode 100644 index 112b3867..00000000 --- a/packages/indexer/src/endpoints/get-metrics.ts +++ /dev/null @@ -1,21 +0,0 @@ -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/frontfiller.ts b/packages/indexer/src/frontfiller.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/indexer/src/index.ts b/packages/indexer/src/index.ts index ca80a5f0..de656eff 100644 --- a/packages/indexer/src/index.ts +++ b/packages/indexer/src/index.ts @@ -1,10 +1,11 @@ -import { startIndexers } from "./indexers"; -import { startIndexerAccountDependencyPopulation } from "./cli/txw/populate"; -import { startTransactionWatchers } from "./transaction/watcher"; -import { startServer } from "./server"; +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"; -startServer(); -startIndexerAccountDependencyPopulation(); + +// startIndexerAccountDependencyPopulation(); +subscribeAll(); await startTransactionWatchers(); await startIndexers(); diff --git a/packages/indexer/src/logger.ts b/packages/indexer/src/logger.ts index 7760a066..f9315a0b 100644 --- a/packages/indexer/src/logger.ts +++ b/packages/indexer/src/logger.ts @@ -4,20 +4,20 @@ import { AlertChatBotInterface, TelegramBotAPI } from "./adapters/telegram-bot"; const TELEGRAM_ALERT_CHAT_ID = process.env.TELEGRAM_ALERT_CHAT_ID ?? ""; 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; } @@ -57,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 = 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); } @@ -71,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/server.ts b/packages/indexer/src/server.ts deleted file mode 100644 index e4f8cd32..00000000 --- a/packages/indexer/src/server.ts +++ /dev/null @@ -1,18 +0,0 @@ -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 new file mode 100644 index 00000000..4346141a --- /dev/null +++ b/packages/indexer/src/subscriber.ts @@ -0,0 +1,110 @@ +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, 1500)); + 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))); +} + + + + + +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 + await new Promise((resolve) => setTimeout(resolve, 1500)); + 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 + ]; + Promise.all(programIds.map(async (programId) => subscribe(programId))); +} + + + + diff --git a/packages/indexer/src/v3_indexer/autocrat_program.rs b/packages/indexer/src/v3_indexer/autocrat_program.rs new file mode 100644 index 00000000..49149df9 --- /dev/null +++ b/packages/indexer/src/v3_indexer/autocrat_program.rs @@ -0,0 +1,111 @@ +//! The orchestrator of a futarchy. Equivalent to the 'governor' of Compound's +//! governance system. +//! +//! Autocrat has two types of accounts: DAOs and proposals. Every DAO has its +//! own token, its own treasury account, and list of configs. Proposals are +//! created for a specific DAO, and contain an SVM instruction and a URL that +//! should point to a description and justification of that instruction. +//! +//! Proposals pass through various states in their lifecycle. Here's a description +//! of these states: +//! - Pre-creation: this is when you initialize the accounts needed for a proposal, +//! including the vaults and the AMM accounts. The proposer will also deposit to +//! create their LP during this time. +//! - Trading: to create a proposal, the proposer must call +//! `initialize_proposal`, which requires them to lock up some LP tokens in each +//! of the markets. Once a proposal is created, anyone can trade its markets. +//! Prices of these markets are aggregated into a time-weighted average price +//! oracle. +//! - Pass or fail: if the TWAP of the pass market is sufficiently higher than the +//! TWAP of the fail market, the proposal will pass. If it's not, the proposal will +//! fail. If it passes, both vaults will be finalized, allowing pTOKEN holders to +//! redeem. If it fails, both vaults will be reverted, allowing fTOKEN holders to +//! redeem. +//! - Executed: if a proposal passes, anyone can make autocrat execute its SVM +//! instruction by calling `execute_proposal`. +use anchor_lang::prelude::*; +use anchor_lang::solana_program; +use anchor_spl::token::{self, Mint, Token, TokenAccount, Transfer}; +// use conditional_vault::cpi::accounts::SettleConditionalVault; +use conditional_vault::program::ConditionalVault as ConditionalVaultProgram; +use conditional_vault::ConditionalVault as ConditionalVaultAccount; +use conditional_vault::Question; +// use conditional_vault::VaultStatus; + +pub mod error; +pub mod instructions; +pub mod state; + +pub use crate::error::AutocratError; +pub use crate::instructions::*; +pub use crate::state::*; + +use amm::state::Amm; + +use solana_program::instruction::Instruction; +#[cfg(not(feature = "no-entrypoint"))] +use solana_security_txt::security_txt; +use std::borrow::Borrow; + +#[cfg(not(feature = "no-entrypoint"))] +security_txt! { + name: "autocrat", + project_url: "https://metadao.fi", + contacts: "email:metaproph3t@protonmail.com", + policy: "The market will decide whether we pay a bug bounty.", + source_code: "https://github.com/metaDAOproject/futarchy", + source_release: "v0.4", + auditors: "Neodyme", + acknowledgements: "DCF = (CF1 / (1 + r)^1) + (CF2 / (1 + r)^2) + ... (CFn / (1 + r)^n)" +} + +declare_id!("autowMzCbM29YXMgVG3T62Hkgo7RcyrvgQQkd54fDQL"); + +pub const SLOTS_PER_10_SECS: u64 = 25; +pub const THREE_DAYS_IN_SLOTS: u64 = 3 * 24 * 60 * 6 * SLOTS_PER_10_SECS; + +pub const TEN_DAYS_IN_SECONDS: i64 = 10 * 24 * 60 * 60; + +// by default, the pass price needs to be 3% higher than the fail price +pub const DEFAULT_PASS_THRESHOLD_BPS: u16 = 300; + +pub const MAX_BPS: u16 = 10_000; + +// the index of the fail and pass outcomes in the question and the index of +// the pass and fail conditional tokens in the conditional vault +pub const FAIL_INDEX: usize = 0; +pub const PASS_INDEX: usize = 1; + +// TWAP can only move by $5 per slot +pub const DEFAULT_MAX_OBSERVATION_CHANGE_PER_UPDATE_LOTS: u64 = 5_000; + +#[program] +pub mod autocrat { + use super::*; + + pub fn initialize_dao(ctx: Context, params: InitializeDaoParams) -> Result<()> { + InitializeDAO::handle(ctx, params) + } + + #[access_control(ctx.accounts.validate())] + pub fn initialize_proposal( + ctx: Context, + params: InitializeProposalParams, + ) -> Result<()> { + InitializeProposal::handle(ctx, params) + } + + #[access_control(ctx.accounts.validate())] + pub fn finalize_proposal(ctx: Context) -> Result<()> { + FinalizeProposal::handle(ctx) + } + + #[access_control(ctx.accounts.validate())] + pub fn execute_proposal(ctx: Context) -> Result<()> { + ExecuteProposal::handle(ctx) + } + + pub fn update_dao(ctx: Context, dao_params: UpdateDaoParams) -> Result<()> { + UpdateDao::handle(ctx, dao_params) + } +} \ No newline at end of file diff --git a/packages/indexer/src/builders/swaps.ts b/packages/indexer/src/v3_indexer/builders/swaps.ts similarity index 94% rename from packages/indexer/src/builders/swaps.ts rename to packages/indexer/src/v3_indexer/builders/swaps.ts index 8981a0bd..1350a066 100644 --- a/packages/indexer/src/builders/swaps.ts +++ b/packages/indexer/src/v3_indexer/builders/swaps.ts @@ -22,7 +22,7 @@ import { parseFormattedInstructionArgsData, serialize, } from "../transaction/serializer"; -import { logger } from "../logger"; +import { logger } from "../../logger"; import { getMainIxTypeFromTransaction } from "../transaction/watcher"; import { getHumanPrice } from "../usecases/math"; @@ -45,27 +45,27 @@ export class SwapPersistable { async persist() { try { - const upsertResult = - (await usingDb((db) => - db - .insert(schema.transactions) - .values(this.transactionRecord) - .onConflictDoUpdate({ - target: schema.transactions.txSig, - set: this.transactionRecord, - }) - .returning({ txSig: schema.transactions.txSig }) - )) ?? []; - if ( - upsertResult.length !== 1 || - upsertResult[0].txSig !== this.transactionRecord.txSig - ) { - logger.warn( - `Failed to upsert ${this.transactionRecord.txSig}. ${JSON.stringify( - this.transactionRecord - )}` - ); - } + // const upsertResult = + // (await usingDb((db) => + // db + // .insert(schema.transactions) + // .values(this.transactionRecord) + // .onConflictDoUpdate({ + // target: schema.transactions.txSig, + // set: this.transactionRecord, + // }) + // .returning({ txSig: schema.transactions.txSig }) + // )) ?? []; + // if ( + // upsertResult.length !== 1 || + // upsertResult[0].txSig !== this.transactionRecord.txSig + // ) { + // logger.warn( + // `Failed to upsert ${this.transactionRecord.txSig}. ${JSON.stringify( + // this.transactionRecord + // )}` + // ); + // } // Insert user if they aren't already in the database const insertUsersResult = (await usingDb((db) => db diff --git a/packages/indexer/src/cli/index.ts b/packages/indexer/src/v3_indexer/cli/index.ts similarity index 100% rename from packages/indexer/src/cli/index.ts rename to packages/indexer/src/v3_indexer/cli/index.ts diff --git a/packages/indexer/src/cli/txw/common/select-account.ts b/packages/indexer/src/v3_indexer/cli/txw/common/select-account.ts similarity index 100% rename from packages/indexer/src/cli/txw/common/select-account.ts rename to packages/indexer/src/v3_indexer/cli/txw/common/select-account.ts diff --git a/packages/indexer/src/cli/txw/create.ts b/packages/indexer/src/v3_indexer/cli/txw/create.ts similarity index 100% rename from packages/indexer/src/cli/txw/create.ts rename to packages/indexer/src/v3_indexer/cli/txw/create.ts diff --git a/packages/indexer/src/cli/txw/index.ts b/packages/indexer/src/v3_indexer/cli/txw/index.ts similarity index 100% rename from packages/indexer/src/cli/txw/index.ts rename to packages/indexer/src/v3_indexer/cli/txw/index.ts diff --git a/packages/indexer/src/cli/txw/populate.ts b/packages/indexer/src/v3_indexer/cli/txw/populate.ts similarity index 99% rename from packages/indexer/src/cli/txw/populate.ts rename to packages/indexer/src/v3_indexer/cli/txw/populate.ts index 1458c3df..adca2d51 100644 --- a/packages/indexer/src/cli/txw/populate.ts +++ b/packages/indexer/src/v3_indexer/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; diff --git a/packages/indexer/src/cli/txw/reset.ts b/packages/indexer/src/v3_indexer/cli/txw/reset.ts similarity index 100% rename from packages/indexer/src/cli/txw/reset.ts rename to packages/indexer/src/v3_indexer/cli/txw/reset.ts diff --git a/packages/indexer/src/cli/txw/validate.ts b/packages/indexer/src/v3_indexer/cli/txw/validate.ts similarity index 100% rename from packages/indexer/src/cli/txw/validate.ts rename to packages/indexer/src/v3_indexer/cli/txw/validate.ts diff --git a/packages/indexer/src/v3_indexer/connection.ts b/packages/indexer/src/v3_indexer/connection.ts new file mode 100644 index 00000000..47e2bd76 --- /dev/null +++ b/packages/indexer/src/v3_indexer/connection.ts @@ -0,0 +1,30 @@ +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/constants.ts b/packages/indexer/src/v3_indexer/constants.ts similarity index 100% rename from packages/indexer/src/constants.ts rename to packages/indexer/src/v3_indexer/constants.ts diff --git a/packages/indexer/src/v3_indexer/indexer.ts b/packages/indexer/src/v3_indexer/indexer.ts new file mode 100644 index 00000000..2f58c376 --- /dev/null +++ b/packages/indexer/src/v3_indexer/indexer.ts @@ -0,0 +1,40 @@ +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) { + 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; + // 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) { + if (instructionLog.includes("InitializeDao") || instructionLog.includes("UpdateDao")) { + await AutocratDaoIndexer.indexFromLogs(logs.logs); + } else if (instructionLog.includes("InitializeProposal") || + instructionLog.includes("FinalizeProposal") || + instructionLog.includes("ExecuteProposal")) { + await AutocratProposalIndexer.indexFromLogs(logs.logs); + } + } + } else { + throw new Error(`Unknown programId ${programId.toString()}`); + } +} \ No newline at end of file diff --git a/packages/indexer/src/indexers/account-info-indexer.ts b/packages/indexer/src/v3_indexer/indexers/account-info-indexer.ts similarity index 100% rename from packages/indexer/src/indexers/account-info-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/account-info-indexer.ts diff --git a/packages/indexer/src/indexers/account-logs-indexer.ts b/packages/indexer/src/v3_indexer/indexers/account-logs-indexer.ts similarity index 100% rename from packages/indexer/src/indexers/account-logs-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/account-logs-indexer.ts diff --git a/packages/indexer/src/indexers/amm-market/amm-market-account-indexer.ts b/packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-account-indexer.ts similarity index 95% rename from packages/indexer/src/indexers/amm-market/amm-market-account-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-account-indexer.ts index d54a4c28..36b323c5 100644 --- a/packages/indexer/src/indexers/amm-market/amm-market-account-indexer.ts +++ b/packages/indexer/src/v3_indexer/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/indexers/amm-market/amm-market-account-interval-indexer.ts b/packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-account-interval-indexer.ts similarity index 91% rename from packages/indexer/src/indexers/amm-market/amm-market-account-interval-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-account-interval-indexer.ts index ad3b511b..89724448 100644 --- a/packages/indexer/src/indexers/amm-market/amm-market-account-interval-indexer.ts +++ b/packages/indexer/src/v3_indexer/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,4 +62,9 @@ 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/indexers/amm-market/amm-market-instruction-indexer.ts b/packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-instruction-indexer.ts similarity index 98% rename from packages/indexer/src/indexers/amm-market/amm-market-instruction-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-instruction-indexer.ts index 7f833a41..dfd0c879 100644 --- a/packages/indexer/src/indexers/amm-market/amm-market-instruction-indexer.ts +++ b/packages/indexer/src/v3_indexer/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/indexers/amm-market/amm-market-logs-subscribe-indexer.ts b/packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-logs-subscribe-indexer.ts similarity index 97% rename from packages/indexer/src/indexers/amm-market/amm-market-logs-subscribe-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/amm-market/amm-market-logs-subscribe-indexer.ts index 1946b6bc..b559378c 100644 --- a/packages/indexer/src/indexers/amm-market/amm-market-logs-subscribe-indexer.ts +++ b/packages/indexer/src/v3_indexer/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/v3_indexer/indexers/amm-market/utils.ts new file mode 100644 index 00000000..6d1e09bc --- /dev/null +++ b/packages/indexer/src/v3_indexer/indexers/amm-market/utils.ts @@ -0,0 +1,160 @@ +import { BN } from "@coral-xyz/anchor"; +import { BN_0, enrichTokenMetadata } from "@metadaoproject/futarchy-sdk"; +import { PriceMath } from "@metadaoproject/futarchy/v0.4"; +import { schema, usingDb, eq } from "@metadaoproject/indexer-db"; +import { PricesType } from "@metadaoproject/indexer-db/lib/schema"; +import { + TwapRecord, + PricesRecord, +} from "@metadaoproject/indexer-db/lib/schema"; +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 { getHumanPrice } from "../../usecases/math"; + +export enum AmmMarketAccountIndexingErrors { + AmmTwapIndexError = "AmmTwapIndexError", + MarketMissingError = "MarketMissingError", + AmmV4TwapIndexError = "AmmV4TwapIndexError", + AmmTwapPriceError = "AmmTwapPriceError", + AmmTwapNoInsertError = "AmmTwapNoInsertError", +} + +export async function indexAmmMarketAccountWithContext( + accountInfo: AccountInfo, + account: PublicKey, + context: Context +): Promise> { + const ammMarketAccount = await rpcReadClient.markets.amm.decodeMarket( + accountInfo + ); + const baseToken = await enrichTokenMetadata( + ammMarketAccount.baseMint, + provider + ); + const quoteToken = await enrichTokenMetadata( + ammMarketAccount.quoteMint, + provider + ); + + // if we don't have an oracle.aggregator of 0 let's run this mf + if (!ammMarketAccount.oracle.aggregator.isZero()) { + // indexing the twap + const market = await usingDb((db) => + db + .select() + .from(schema.markets) + .where(eq(schema.markets.marketAcct, account.toBase58())) + .execute() + ); + if (market === undefined || market.length === 0) { + return Err({ type: AmmMarketAccountIndexingErrors.MarketMissingError }); + } + + const twapCalculation: BN = ammMarketAccount.oracle.aggregator.div( + ammMarketAccount.oracle.lastUpdatedSlot.sub( + ammMarketAccount.createdAtSlot + ) + ); + + 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, + marketAcct: account.toBase58(), + observationAgg: ammMarketAccount.oracle.aggregator.toString(), + proposalAcct: proposalAcct, + // alternatively, we could pass in the context of the update here + updatedSlot: context + ? context.slot.toString() + : ammMarketAccount.oracle.lastUpdatedSlot.toString(), + lastObservation: ammMarketAccount.oracle.lastObservation.toString(), + lastPrice: ammMarketAccount.oracle.lastPrice.toString(), + }; + + try{ + // TODO batch commits across inserts - maybe with event queue + const twapUpsertResult = await usingDb((db) => + db + .insert(schema.twaps) + .values(newTwap) + .onConflictDoNothing() + .returning({ marketAcct: schema.twaps.marketAcct }) + ); + + if (twapUpsertResult === undefined || twapUpsertResult.length === 0) { + logger.error("failed to upsert twap", newTwap); + // return Err({ type: AmmMarketAccountIndexingErrors.AmmTwapNoInsertError }); + } + } catch (e) { + logger.error("failed to upsert twap", e); + return Err({ type: AmmMarketAccountIndexingErrors.AmmTwapNoInsertError }); + } + } + + let priceFromReserves: BN; + + if (ammMarketAccount.baseAmount.isZero() || ammMarketAccount.quoteAmount.isZero()) { + logger.error("NO RESERVES", ammMarketAccount); + logger.error("baseAmount", ammMarketAccount.baseAmount.toString()); + logger.error("quoteAmount", ammMarketAccount.quoteAmount.toString()); + return Ok("no price from reserves"); + } + + try { + priceFromReserves = PriceMath.getAmmPriceFromReserves( + ammMarketAccount.baseAmount, + ammMarketAccount.quoteAmount + ); + } catch (e) { + logger.error("failed to get price from reserves", e); + return Err({ type: AmmMarketAccountIndexingErrors.AmmTwapPriceError }); + } + + let conditionalMarketSpotPrice: number; + try { + conditionalMarketSpotPrice = getHumanPrice( + priceFromReserves, + baseToken.decimals!!, + quoteToken.decimals!! + ); + } catch (e) { + logger.error("failed to get human price", e); + return Err({ type: AmmMarketAccountIndexingErrors.AmmTwapPriceError }); + } + + const newAmmConditionaPrice: PricesRecord = { + marketAcct: account.toBase58(), + updatedSlot: context + ? context.slot.toString() + : ammMarketAccount.oracle.lastUpdatedSlot.toString(), + price: conditionalMarketSpotPrice.toString(), + pricesType: PricesType.Conditional, + createdBy: "amm-market-indexer", + baseAmount: ammMarketAccount.baseAmount.toString(), + quoteAmount: ammMarketAccount.quoteAmount.toString(), + }; + + const pricesInsertResult = await usingDb((db) => + db + .insert(schema.prices) + .values(newAmmConditionaPrice) + .onConflictDoUpdate({ + target: [schema.prices.createdAt, schema.prices.marketAcct], + set: newAmmConditionaPrice, + }) + .returning({ marketAcct: schema.prices.marketAcct }) + ); + if (pricesInsertResult === undefined || pricesInsertResult.length === 0) { + logger.error("failed to index amm price", newAmmConditionaPrice.marketAcct); + return Err({ type: AmmMarketAccountIndexingErrors.AmmTwapPriceError }); + } + + return Ok(`successfully indexed amm: ${account.toBase58()}`); +} diff --git a/packages/indexer/src/indexers/autocrat/autocrat-dao-indexer.ts b/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-dao-indexer.ts similarity index 56% rename from packages/indexer/src/indexers/autocrat/autocrat-dao-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-dao-indexer.ts index 3deb8588..d7f11d32 100644 --- a/packages/indexer/src/indexers/autocrat/autocrat-dao-indexer.ts +++ b/packages/indexer/src/v3_indexer/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", @@ -131,4 +131,104 @@ 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/indexers/autocrat/autocrat-proposal-indexer.ts b/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-proposal-indexer.ts similarity index 88% rename from packages/indexer/src/indexers/autocrat/autocrat-proposal-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-proposal-indexer.ts index 84047d27..81179873 100644 --- a/packages/indexer/src/indexers/autocrat/autocrat-proposal-indexer.ts +++ b/packages/indexer/src/v3_indexer/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"; @@ -440,8 +440,136 @@ export const AutocratProposalIndexer: IntervalFetchIndexer = { return Err({ type: AutocratDaoIndexerError.GeneralError }); } }, + + indexFromLogs: async (logs: string[]) => { + try { + console.log("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")) + ); + + if (!proposalLog) { + return Err({ type: AutocratDaoIndexerError.MissingParamError }); + } + + // Extract proposal account from logs + const proposalAcctMatch = logs.find(log => log.includes("Proposal:")); + if (!proposalAcctMatch) { + return Err({ type: AutocratDaoIndexerError.MissingParamError }); + } + + const proposalAcct = new PublicKey(proposalAcctMatch.split(": ")[1]); + + // 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 }); + } + + // 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 }); + } + + // Handle different proposal states + if (proposal.state.pending) { + // Update proposal as pending + 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 }); + } + + // If this is a new proposal, insert associated accounts data + if (proposalLog.includes("InitializeProposal")) { + await insertAssociatedAccountsDataForProposal( + { publicKey: proposalAcct, account: proposal }, + currentTime + ); + } + + return Ok({ acct: "Updated proposal from logs" }); + } catch (err) { + logger.error("error with proposal indexer:", err); + return Err({ type: AutocratDaoIndexerError.GeneralError }); + } + } }; +// 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/indexers/autocrat/autocrat-v0-indexer.ts b/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0-indexer.ts similarity index 94% rename from packages/indexer/src/indexers/autocrat/autocrat-v0-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0-indexer.ts index 9a31a557..f23102f5 100644 --- a/packages/indexer/src/indexers/autocrat/autocrat-v0-indexer.ts +++ b/packages/indexer/src/v3_indexer/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/indexers/autocrat/autocrat-v0_1-indexer.ts b/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0_1-indexer.ts similarity index 94% rename from packages/indexer/src/indexers/autocrat/autocrat-v0_1-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0_1-indexer.ts index 95d51d60..331c3519 100644 --- a/packages/indexer/src/indexers/autocrat/autocrat-v0_1-indexer.ts +++ b/packages/indexer/src/v3_indexer/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/indexers/autocrat/autocrat-v0_2-indexer.ts b/packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0_2-indexer.ts similarity index 94% rename from packages/indexer/src/indexers/autocrat/autocrat-v0_2-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/autocrat/autocrat-v0_2-indexer.ts index ce56b9bf..68c70cbb 100644 --- a/packages/indexer/src/indexers/autocrat/autocrat-v0_2-indexer.ts +++ b/packages/indexer/src/v3_indexer/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/indexers/birdeye/birdeye-prices-indexer.ts b/packages/indexer/src/v3_indexer/indexers/birdeye/birdeye-prices-indexer.ts similarity index 98% rename from packages/indexer/src/indexers/birdeye/birdeye-prices-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/birdeye/birdeye-prices-indexer.ts index cf0515e3..7142fac3 100644 --- a/packages/indexer/src/indexers/birdeye/birdeye-prices-indexer.ts +++ b/packages/indexer/src/v3_indexer/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/indexers/common.ts b/packages/indexer/src/v3_indexer/indexers/common.ts similarity index 100% rename from packages/indexer/src/indexers/common.ts rename to packages/indexer/src/v3_indexer/indexers/common.ts diff --git a/packages/indexer/src/indexers/index.ts b/packages/indexer/src/v3_indexer/indexers/index.ts similarity index 98% rename from packages/indexer/src/indexers/index.ts rename to packages/indexer/src/v3_indexer/indexers/index.ts index a6d7f911..f3293924 100644 --- a/packages/indexer/src/indexers/index.ts +++ b/packages/indexer/src/v3_indexer/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/indexers/instruction-indexer.ts b/packages/indexer/src/v3_indexer/indexers/instruction-indexer.ts similarity index 100% rename from packages/indexer/src/indexers/instruction-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/instruction-indexer.ts diff --git a/packages/indexer/src/indexers/interval-fetch-indexer.ts b/packages/indexer/src/v3_indexer/indexers/interval-fetch-indexer.ts similarity index 66% rename from packages/indexer/src/indexers/interval-fetch-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/interval-fetch-indexer.ts index ce983ffc..1cc376a4 100644 --- a/packages/indexer/src/indexers/interval-fetch-indexer.ts +++ b/packages/indexer/src/v3_indexer/indexers/interval-fetch-indexer.ts @@ -10,4 +10,12 @@ export type IntervalFetchIndexer = { TaggedUnion > >; + indexFromLogs(logs: string[]): Promise< + Result< + { + acct: string; + }, + TaggedUnion + > + >; }; diff --git a/packages/indexer/src/indexers/jupiter/jupiter-quotes-indexer.ts b/packages/indexer/src/v3_indexer/indexers/jupiter/jupiter-quotes-indexer.ts similarity index 99% rename from packages/indexer/src/indexers/jupiter/jupiter-quotes-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/jupiter/jupiter-quotes-indexer.ts index 743529d7..076487d8 100644 --- a/packages/indexer/src/indexers/jupiter/jupiter-quotes-indexer.ts +++ b/packages/indexer/src/v3_indexer/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/indexers/openbook-twap/openbook-twap-instruction-indexer.ts b/packages/indexer/src/v3_indexer/indexers/openbook-twap/openbook-twap-instruction-indexer.ts similarity index 100% rename from packages/indexer/src/indexers/openbook-twap/openbook-twap-instruction-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/openbook-twap/openbook-twap-instruction-indexer.ts diff --git a/packages/indexer/src/indexers/openbook-v2/openbook-v2-account-indexer.ts b/packages/indexer/src/v3_indexer/indexers/openbook-v2/openbook-v2-account-indexer.ts similarity index 98% rename from packages/indexer/src/indexers/openbook-v2/openbook-v2-account-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/openbook-v2/openbook-v2-account-indexer.ts index 6edec736..8518760b 100644 --- a/packages/indexer/src/indexers/openbook-v2/openbook-v2-account-indexer.ts +++ b/packages/indexer/src/v3_indexer/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/indexers/openbook-v2/openbook-v2-indexer.ts b/packages/indexer/src/v3_indexer/indexers/openbook-v2/openbook-v2-indexer.ts similarity index 100% rename from packages/indexer/src/indexers/openbook-v2/openbook-v2-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/openbook-v2/openbook-v2-indexer.ts diff --git a/packages/indexer/src/indexers/start-account-info-indexers.ts b/packages/indexer/src/v3_indexer/indexers/start-account-info-indexers.ts similarity index 98% rename from packages/indexer/src/indexers/start-account-info-indexers.ts rename to packages/indexer/src/v3_indexer/indexers/start-account-info-indexers.ts index 56f8f950..a9eb65f3 100644 --- a/packages/indexer/src/indexers/start-account-info-indexers.ts +++ b/packages/indexer/src/v3_indexer/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 diff --git a/packages/indexer/src/indexers/start-interval-fetch-indexers.ts b/packages/indexer/src/v3_indexer/indexers/start-interval-fetch-indexers.ts similarity index 99% rename from packages/indexer/src/indexers/start-interval-fetch-indexers.ts rename to packages/indexer/src/v3_indexer/indexers/start-interval-fetch-indexers.ts index cebde233..07037996 100644 --- a/packages/indexer/src/indexers/start-interval-fetch-indexers.ts +++ b/packages/indexer/src/v3_indexer/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/indexers/start-logs-subscribe-indexer.ts b/packages/indexer/src/v3_indexer/indexers/start-logs-subscribe-indexer.ts similarity index 97% rename from packages/indexer/src/indexers/start-logs-subscribe-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/start-logs-subscribe-indexer.ts index 8e5584f7..4c8f267a 100644 --- a/packages/indexer/src/indexers/start-logs-subscribe-indexer.ts +++ b/packages/indexer/src/v3_indexer/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/indexers/start-transaction-history-indexers.ts b/packages/indexer/src/v3_indexer/indexers/start-transaction-history-indexers.ts similarity index 100% rename from packages/indexer/src/indexers/start-transaction-history-indexers.ts rename to packages/indexer/src/v3_indexer/indexers/start-transaction-history-indexers.ts diff --git a/packages/indexer/src/indexers/token/token-mint-indexer.ts b/packages/indexer/src/v3_indexer/indexers/token/token-mint-indexer.ts similarity index 98% rename from packages/indexer/src/indexers/token/token-mint-indexer.ts rename to packages/indexer/src/v3_indexer/indexers/token/token-mint-indexer.ts index cde88d49..c1e7a2be 100644 --- a/packages/indexer/src/indexers/token/token-mint-indexer.ts +++ b/packages/indexer/src/v3_indexer/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/instruction-dispatch.ts b/packages/indexer/src/v3_indexer/instruction-dispatch.ts similarity index 100% rename from packages/indexer/src/instruction-dispatch.ts rename to packages/indexer/src/v3_indexer/instruction-dispatch.ts diff --git a/packages/indexer/src/local-cache.ts b/packages/indexer/src/v3_indexer/local-cache.ts similarity index 100% rename from packages/indexer/src/local-cache.ts rename to packages/indexer/src/v3_indexer/local-cache.ts diff --git a/packages/indexer/src/match.ts b/packages/indexer/src/v3_indexer/match.ts similarity index 100% rename from packages/indexer/src/match.ts rename to packages/indexer/src/v3_indexer/match.ts diff --git a/packages/indexer/src/v3_indexer/processor.ts b/packages/indexer/src/v3_indexer/processor.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/indexer/src/proposal-indexer.ts b/packages/indexer/src/v3_indexer/proposal-indexer.ts similarity index 100% rename from packages/indexer/src/proposal-indexer.ts rename to packages/indexer/src/v3_indexer/proposal-indexer.ts diff --git a/packages/indexer/src/transaction/account-resolver.ts b/packages/indexer/src/v3_indexer/transaction/account-resolver.ts similarity index 100% rename from packages/indexer/src/transaction/account-resolver.ts rename to packages/indexer/src/v3_indexer/transaction/account-resolver.ts diff --git a/packages/indexer/src/transaction/history.ts b/packages/indexer/src/v3_indexer/transaction/history.ts similarity index 98% rename from packages/indexer/src/transaction/history.ts rename to packages/indexer/src/v3_indexer/transaction/history.ts index 9a54da42..cd41d9f1 100644 --- a/packages/indexer/src/transaction/history.ts +++ b/packages/indexer/src/v3_indexer/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/transaction/serializer.test.ts b/packages/indexer/src/v3_indexer/transaction/serializer.test.ts similarity index 100% rename from packages/indexer/src/transaction/serializer.test.ts rename to packages/indexer/src/v3_indexer/transaction/serializer.test.ts diff --git a/packages/indexer/src/transaction/serializer.ts b/packages/indexer/src/v3_indexer/transaction/serializer.ts similarity index 99% rename from packages/indexer/src/transaction/serializer.ts rename to packages/indexer/src/v3_indexer/transaction/serializer.ts index 06e68da9..460ce085 100644 --- a/packages/indexer/src/transaction/serializer.ts +++ b/packages/indexer/src/v3_indexer/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/transaction/watcher.ts b/packages/indexer/src/v3_indexer/transaction/watcher.ts similarity index 99% rename from packages/indexer/src/transaction/watcher.ts rename to packages/indexer/src/v3_indexer/transaction/watcher.ts index 39eed8a3..cda8183a 100644 --- a/packages/indexer/src/transaction/watcher.ts +++ b/packages/indexer/src/v3_indexer/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/types/errors.ts b/packages/indexer/src/v3_indexer/types/errors.ts similarity index 100% rename from packages/indexer/src/types/errors.ts rename to packages/indexer/src/v3_indexer/types/errors.ts diff --git a/packages/indexer/src/types/index.ts b/packages/indexer/src/v3_indexer/types/index.ts similarity index 100% rename from packages/indexer/src/types/index.ts rename to packages/indexer/src/v3_indexer/types/index.ts diff --git a/packages/indexer/src/types/swaps.ts b/packages/indexer/src/v3_indexer/types/swaps.ts similarity index 100% rename from packages/indexer/src/types/swaps.ts rename to packages/indexer/src/v3_indexer/types/swaps.ts diff --git a/packages/indexer/src/usecases/math.test.ts b/packages/indexer/src/v3_indexer/usecases/math.test.ts similarity index 100% rename from packages/indexer/src/usecases/math.test.ts rename to packages/indexer/src/v3_indexer/usecases/math.test.ts diff --git a/packages/indexer/src/usecases/math.ts b/packages/indexer/src/v3_indexer/usecases/math.ts similarity index 93% rename from packages/indexer/src/usecases/math.ts rename to packages/indexer/src/v3_indexer/usecases/math.ts index e1078b62..2e2e5416 100644 --- a/packages/indexer/src/usecases/math.ts +++ b/packages/indexer/src/v3_indexer/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/v4_indexer/filler.ts b/packages/indexer/src/v4_indexer/filler.ts new file mode 100644 index 00000000..3c3cc1df --- /dev/null +++ b/packages/indexer/src/v4_indexer/filler.ts @@ -0,0 +1,158 @@ +import { ConfirmedSignatureInfo, Connection, PublicKey } from "@solana/web3.js"; +import { V4_AMM_PROGRAM_ID, V4_AUTOCRAT_PROGRAM_ID, V4_CONDITIONAL_VAULT_PROGRAM_ID } from "@metadaoproject/futarchy/v0.4"; +import { V3_AMM_PROGRAM_ID, V3_AUTOCRAT_PROGRAM_ID, V3_CONDITIONAL_VAULT_PROGRAM_ID } from "@metadaoproject/futarchy/v0.3"; +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[] = []; + let 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(100) + .then(signatures => { + if (signatures.length === 0) return undefined; + + const latestSlot = signatures[0].slot; + for (let i = 1; i < signatures.length; i++) { + if (signatures[i].slot < latestSlot) { + return signatures[i].signature; + } + } + return signatures[signatures.length - 1].signature; + }); + }); + + 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 + Promise.all(signatures.map(async (signature: ConfirmedSignatureInfo) => { + await index(signature.signature, programId); + })); + + allSignatures = allSignatures.concat(signatures); + 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: BigInt(tx.slot), + 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(); + }); +} + +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 new file mode 100644 index 00000000..f6fa5256 --- /dev/null +++ b/packages/indexer/src/v4_indexer/indexer.ts @@ -0,0 +1,150 @@ +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 } 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.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; + 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)) { + 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; + } + + 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); + })); + + await usingDb(async (db: DBConnection) => { + await db.insert(schema.signatures).values({ + signature: transactionResponse.signature, + slot: BigInt(transactionResponse.slot), + didErr: transactionResponse.err !== null, + err: transactionResponse.err ? JSON.stringify(transactionResponse.err) : null, + blockTime: transactionResponse.blockTime ? new Date(transactionResponse.blockTime * 1000) : null, + }).onConflictDoNothing().execute(); + await db.insert(schema.signature_accounts).values({ + signature: transactionResponse.signature, + account: programId.toString() + }).onConflictDoNothing().execute(); + }); + + } 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 new file mode 100644 index 00000000..70c5a64b --- /dev/null +++ b/packages/indexer/src/v4_indexer/processor.ts @@ -0,0 +1,451 @@ +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; + } + + 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 { + await usingDb(async (db: DBConnection) => { + await db.insert(schema.v0_4_splits).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 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) { + const existingPrice = await db.select() + .from(schema.prices) + .where(and( + eq(schema.prices.marketAcct, event.common.amm.toBase58()), + eq(schema.prices.updatedSlot, BigInt(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 []; + } +} + +//set latestProcessedSlot in db +async function setLatestProcessedSlot(slot: number) { + try { + await usingDb(async (db) => { + await db.update(schema.indexers) + .set({ latestSlotProcessed: BigInt(slot) }) + .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" + ]); + } +} \ No newline at end of file diff --git a/packages/indexer/src/indexers/amm-market/utils.ts b/packages/old_indexer/src/indexers/amm-market/utils.ts similarity index 99% rename from packages/indexer/src/indexers/amm-market/utils.ts rename to packages/old_indexer/src/indexers/amm-market/utils.ts index 51ed2a32..204dc753 100644 --- a/packages/indexer/src/indexers/amm-market/utils.ts +++ b/packages/old_indexer/src/indexers/amm-market/utils.ts @@ -158,3 +158,4 @@ export async function indexAmmMarketAccountWithContext( return Ok(`successfully indexed amm: ${account.toBase58()}`); } + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c033694e..264bc2e1 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.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) + specifier: 0.36.0 + version: 0.36.0(@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,67 +40,12 @@ importers: specifier: ^1.0.55 version: 1.0.55 drizzle-kit: - specifier: 0.20.18 - version: 0.20.18 + specifier: 0.27.0 + version: 0.27.0 inquirer: specifier: ^9.2.14 version: 9.2.14 - packages/futarchy-sdk: - dependencies: - '@coral-xyz/anchor': - specifier: ^0.28.1-beta.2 - version: 0.28.1-beta.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@metadaoproject/futarchy-ts': - specifier: ^1.4.0 - version: 1.6.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) - '@metaplex-foundation/js': - specifier: ^0.20.1 - version: 0.20.1(arweave@1.15.0)(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) - '@metaplex-foundation/mpl-token-metadata': - specifier: ^3.2.1 - version: 3.2.1(@metaplex-foundation/umi@0.9.2) - '@metaplex-foundation/umi': - specifier: ^0.9.1 - version: 0.9.2 - '@openbook-dex/openbook-v2': - specifier: ^0.2.6 - version: 0.2.6(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) - '@solana/spl-token': - specifier: ^0.3.11 - version: 0.3.11(@solana/web3.js@1.91.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) - '@solana/wallet-adapter-base': - specifier: ^0.9.23 - version: 0.9.23(@solana/web3.js@1.91.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@solana/web3.js': - specifier: ^1.91.7 - version: 1.91.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@types/bun': - specifier: ^1.1.0 - version: 1.1.1 - '@types/numeral': - specifier: ^2.0.4 - version: 2.0.5 - graphql-ws: - specifier: ^5.16.0 - version: 5.16.0(graphql@16.8.1) - numeral: - specifier: ^2.0.6 - version: 2.0.6 - rxjs: - specifier: ^7.8.1 - version: 7.8.1 - devDependencies: - tsconfig-paths: - specifier: ^4.2.0 - version: 4.2.0 - tscpaths: - specifier: ^0.0.9 - version: 0.0.9 - typescript: - specifier: ^5.4.5 - version: 5.6.3 - packages/hasura: dependencies: '@hasura/metadata': @@ -127,16 +72,16 @@ importers: version: 0.29.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@debridge-finance/solana-transaction-parser': specifier: ^2.0.1 - version: 2.0.1(@solana/buffer-layout-utils@0.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@solana/buffer-layout@4.0.1)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + version: 2.0.1(@solana/buffer-layout-utils@0.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@solana/buffer-layout@4.0.1)(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@lukasdeco/prom-client': specifier: ^15.1.4 version: 15.1.4 '@metadaoproject/futarchy': - specifier: ^0.4.0-alpha.21 - version: 0.4.0-alpha.21(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^0.4.0-alpha.18 + version: 0.4.0-alpha.21(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@metadaoproject/futarchy-sdk': specifier: 4.0.0-alpha.31 - version: 4.0.0-alpha.31(arweave@1.15.0)(bufferutil@4.0.8)(graphql@16.8.1)(utf-8-validate@5.0.10) + version: 4.0.0-alpha.31(arweave@1.15.0)(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(graphql@16.8.1)(utf-8-validate@5.0.10) '@metadaoproject/indexer-db': specifier: workspace:* version: link:../database @@ -280,11 +225,16 @@ 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==} @@ -833,16 +783,6 @@ 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==} @@ -867,9 +807,6 @@ packages: '@metadaoproject/futarchy-sdk@4.0.0-alpha.31': resolution: {integrity: sha512-uugimbCdzZTW7b+mvecFsd5EYSRVT5h9E3gm/NMq4PoKn14fqtpHt9PkgiAtbNcyYc+aR1B0VRb7sPSo6nZ3Mw==} - '@metadaoproject/futarchy-ts@1.6.0': - resolution: {integrity: sha512-Ib64AOPav4vylhP517nM58esmnIZ9ndB8sVTnCzTHUaf0Zt7JEn62JR3bqCmw4Wt238I7Vx67Ht60QjONmo4oQ==} - '@metadaoproject/futarchy-ts@4.1.0': resolution: {integrity: sha512-qI8EvXXKkwXMdGEISy6GlZ4uG5o3WZDHBWtXhJLs+59uklJTr4tfXpm4YF6q3UgV4052MiJBS5aN6bTKlFvKKw==} @@ -1075,10 +1012,6 @@ packages: '@metaplex-foundation/umi@0.9.2': resolution: {integrity: sha512-9i4Acm4pruQfJcpRrc2EauPBwkfDN0I9QTvJyZocIlKgoZwD6A6wH0PViH1AjOVG5CQCd1YI3tJd5XjYE1ElBw==} - '@mrmlnc/readdir-enhanced@2.2.1': - resolution: {integrity: sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==} - engines: {node: '>=4'} - '@native-to-anchor/buffer-layout@0.1.0': resolution: {integrity: sha512-7Ykz9KRAm53XqHj5blDUKPX+OXAPO4GZBW4zJhfHGIAbzmqsUFh9kMqR66Bak3mp6wyv1OVTwSr8ZGHKswPxDg==} @@ -1148,10 +1081,6 @@ packages: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} - '@nodelib/fs.stat@1.1.3': - resolution: {integrity: sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==} - engines: {node: '>= 6'} - '@nodelib/fs.stat@2.0.5': resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} engines: {node: '>= 8'} @@ -1365,9 +1294,6 @@ packages: '@types/express@4.17.21': resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} - '@types/glob@7.2.0': - resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} - '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} @@ -1383,9 +1309,6 @@ packages: '@types/mime@3.0.4': resolution: {integrity: sha512-iJt33IQnVRkqeqC7PzBHPTC6fDlRNRW8vjrgqtScAhrmMwe8c4Eo7+fUGTa+XdWrpEgpyKWMYmi2dIwMAYRzPw==} - '@types/minimatch@5.1.2': - resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} - '@types/node@11.11.6': resolution: {integrity: sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==} @@ -1509,37 +1432,13 @@ packages: arconnect@0.4.2: resolution: {integrity: sha512-Jkpd4QL3TVqnd3U683gzXmZUVqBUy17DdJDuL/3D9rkysLgX6ymJ2e+sR+xyZF5Rh42CBqDXWNMmCjBXeP7Gbw==} - arr-diff@4.0.0: - resolution: {integrity: sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==} - engines: {node: '>=0.10.0'} - - arr-flatten@1.1.0: - resolution: {integrity: sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==} - engines: {node: '>=0.10.0'} - - arr-union@3.1.0: - resolution: {integrity: sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==} - engines: {node: '>=0.10.0'} - array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} - array-union@1.0.2: - resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==} - engines: {node: '>=0.10.0'} - array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - array-uniq@1.0.3: - resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==} - engines: {node: '>=0.10.0'} - - array-unique@0.3.2: - resolution: {integrity: sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==} - engines: {node: '>=0.10.0'} - arweave-stream-tx@1.2.2: resolution: {integrity: sha512-bNt9rj0hbAEzoUZEF2s6WJbIz8nasZlZpxIw03Xm8fzb9gRiiZlZGW3lxQLjfc9Z0VRUWDzwtqoYeEoB/JDToQ==} peerDependencies: @@ -1555,21 +1454,12 @@ packages: asn1.js@5.4.1: resolution: {integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==} - assign-symbols@1.0.0: - resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} - engines: {node: '>=0.10.0'} - async-retry@1.3.3: resolution: {integrity: sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==} asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - atob@2.1.2: - resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} - engines: {node: '>= 4.5.0'} - hasBin: true - avsc@https://codeload.github.com/Irys-xyz/avsc/tar.gz/a730cc8018b79e114b6a3381bbb57760a24c6cef: resolution: {tarball: https://codeload.github.com/Irys-xyz/avsc/tar.gz/a730cc8018b79e114b6a3381bbb57760a24c6cef} version: 5.4.7 @@ -1603,10 +1493,6 @@ packages: resolution: {integrity: sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==} engines: {node: '>=6.0.0'} - base@0.11.2: - resolution: {integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==} - engines: {node: '>=0.10.0'} - bech32@1.1.4: resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} @@ -1660,13 +1546,6 @@ 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'} - braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} @@ -1722,17 +1601,10 @@ packages: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} - cache-base@1.0.1: - resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==} - engines: {node: '>=0.10.0'} - call-bind@1.0.6: resolution: {integrity: sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==} engines: {node: '>= 0.4'} - call-me-maybe@1.0.2: - resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} - camelcase@5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} @@ -1741,10 +1613,6 @@ 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==} @@ -1766,14 +1634,6 @@ packages: cipher-base@1.0.4: resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} - class-utils@0.3.6: - 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'} @@ -1805,10 +1665,6 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} - collection-visit@1.0.0: - resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==} - engines: {node: '>=0.10.0'} - color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -1840,13 +1696,6 @@ 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==} - concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -1865,14 +1714,6 @@ 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'} - cors@2.8.5: resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} engines: {node: '>= 0.10'} @@ -1926,10 +1767,6 @@ 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==} @@ -1957,10 +1794,6 @@ packages: decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} - decode-uri-component@0.2.2: - resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} - engines: {node: '>=0.10'} - defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} @@ -1968,18 +1801,6 @@ packages: resolution: {integrity: sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g==} engines: {node: '>= 0.4'} - define-property@0.2.5: - resolution: {integrity: sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==} - engines: {node: '>=0.10.0'} - - define-property@1.0.0: - resolution: {integrity: sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==} - engines: {node: '>=0.10.0'} - - define-property@2.0.2: - resolution: {integrity: sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==} - engines: {node: '>=0.10.0'} - delay@5.0.0: resolution: {integrity: sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==} engines: {node: '>=10'} @@ -2000,13 +1821,6 @@ 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'} - dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -2022,12 +1836,8 @@ packages: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} - 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==} + drizzle-kit@0.27.0: + resolution: {integrity: sha512-vJJCPvKGLFcmOFBELKqcRng3Fc6qTOaKNAqetLEoysD7HjlSlJOWwM54FJlhpqA+cZcIdsL8r9/7v9JIFfs3MA==} hasBin: true drizzle-orm@0.30.6: @@ -2110,6 +1920,98 @@ packages: sqlite3: optional: true + drizzle-orm@0.36.0: + resolution: {integrity: sha512-6BETYPdKSR7cDHC0ZfqZk2VrKJ8n/Rfd3ajFPsAbc69gi87nwZ6oBA2wUGMELHA0tQE4kUKN0Ds00LUZQ6Z69A==} + 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: '>=13.2.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==} @@ -2135,10 +2037,6 @@ 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==} @@ -2146,26 +2044,12 @@ 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: @@ -2193,10 +2077,6 @@ 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'} @@ -2215,19 +2095,12 @@ 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==} eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} - expand-brackets@2.1.4: - resolution: {integrity: sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==} - engines: {node: '>=0.10.0'} - exponential-backoff@3.1.1: resolution: {integrity: sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==} @@ -2235,33 +2108,14 @@ 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'} - - extend-shallow@3.0.2: - resolution: {integrity: sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==} - engines: {node: '>=0.10.0'} - external-editor@3.1.0: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} - extglob@2.0.4: - resolution: {integrity: sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==} - engines: {node: '>=0.10.0'} - eyes@0.1.8: resolution: {integrity: sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==} engines: {node: '> 0.1.90'} - fast-glob@2.2.7: - resolution: {integrity: sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==} - engines: {node: '>=4.0.0'} - fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -2282,10 +2136,6 @@ packages: file-uri-to-path@1.0.0: resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} - fill-range@4.0.0: - resolution: {integrity: sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==} - engines: {node: '>=0.10.0'} - fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -2316,10 +2166,6 @@ packages: debug: optional: true - for-in@1.0.2: - resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} - engines: {node: '>=0.10.0'} - form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} @@ -2328,10 +2174,6 @@ packages: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} - fragment-cache@0.2.1: - resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} - engines: {node: '>=0.10.0'} - fresh@0.5.2: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} @@ -2357,36 +2199,17 @@ packages: get-tsconfig@4.7.2: resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} - get-value@2.0.6: - resolution: {integrity: sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==} - engines: {node: '>=0.10.0'} - - glob-parent@3.1.0: - resolution: {integrity: sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==} - glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - glob-to-regexp@0.3.0: - resolution: {integrity: sha512-Iozmtbqv0noj0uDDqoL0zNq0VBEfK2YFoMAZoxJe4cwphvLR+JskfF30QhXHOR4m3KrE6NLRYw+U9MRXvifyig==} - 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'} - globby@9.2.0: - resolution: {integrity: sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==} - engines: {node: '>=6'} - gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} @@ -2409,9 +2232,6 @@ 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'} @@ -2431,22 +2251,6 @@ packages: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} - has-value@0.3.1: - resolution: {integrity: sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==} - engines: {node: '>=0.10.0'} - - has-value@1.0.0: - resolution: {integrity: sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==} - engines: {node: '>=0.10.0'} - - has-values@0.1.4: - resolution: {integrity: sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==} - engines: {node: '>=0.10.0'} - - has-values@1.0.0: - resolution: {integrity: sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==} - engines: {node: '>=0.10.0'} - hash-base@3.1.0: resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} engines: {node: '>=4'} @@ -2463,19 +2267,12 @@ 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'} @@ -2494,10 +2291,6 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - ignore@4.0.6: - resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} - engines: {node: '>= 4'} - ignore@5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} @@ -2520,33 +2313,6 @@ packages: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} - is-accessor-descriptor@1.0.1: - resolution: {integrity: sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==} - engines: {node: '>= 0.10'} - - is-buffer@1.1.6: - resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} - - is-data-descriptor@1.0.1: - resolution: {integrity: sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==} - engines: {node: '>= 0.4'} - - is-descriptor@0.1.7: - resolution: {integrity: sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==} - engines: {node: '>= 0.4'} - - is-descriptor@1.0.3: - resolution: {integrity: sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==} - engines: {node: '>= 0.4'} - - is-extendable@0.1.1: - resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} - engines: {node: '>=0.10.0'} - - is-extendable@1.0.1: - resolution: {integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==} - engines: {node: '>=0.10.0'} - is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -2559,10 +2325,6 @@ packages: resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} engines: {node: '>=12'} - is-glob@3.1.0: - resolution: {integrity: sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==} - engines: {node: '>=0.10.0'} - is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -2575,44 +2337,14 @@ packages: resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} engines: {node: '>=8'} - is-number@3.0.0: - resolution: {integrity: sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==} - engines: {node: '>=0.10.0'} - is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - is-plain-object@2.0.4: - 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'} - - isarray@1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - - isobject@2.1.0: - resolution: {integrity: sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==} - engines: {node: '>=0.10.0'} - - isobject@3.0.1: - resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} - engines: {node: '>=0.10.0'} - isomorphic-ws@4.0.1: resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} peerDependencies: @@ -2638,18 +2370,9 @@ 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==} - json5@2.2.3: - resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} - engines: {node: '>=6'} - hasBin: true - jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -2671,18 +2394,6 @@ packages: resolution: {integrity: sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==} engines: {node: '>=10.0.0'} - kind-of@3.2.2: - resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} - engines: {node: '>=0.10.0'} - - kind-of@4.0.0: - resolution: {integrity: sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==} - engines: {node: '>=0.10.0'} - - kind-of@6.0.3: - resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} - engines: {node: '>=0.10.0'} - kleur@4.1.5: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} @@ -2727,9 +2438,6 @@ 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,17 +2456,6 @@ 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'} - - map-visit@1.0.0: - resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==} - engines: {node: '>=0.10.0'} - match-discriminated-union@1.0.0: resolution: {integrity: sha512-1P7vVC8pwb3NEIRdYz8YSq5Mdnjx/xMH/D8FAqKuDMMbuiGN4LQMtX8YcwUpd3mXRd6ORjnSnibrK/Iq+ObHZw==} @@ -2769,10 +2466,6 @@ 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==} @@ -2791,10 +2484,6 @@ packages: micro-ftch@0.3.1: resolution: {integrity: sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==} - micromatch@3.1.10: - resolution: {integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==} - engines: {node: '>=0.10.0'} - micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -2830,21 +2519,9 @@ 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==} - mixin-deep@1.3.2: - resolution: {integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==} - engines: {node: '>=0.10.0'} - mixme@0.5.10: resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} engines: {node: '>= 8.0.0'} @@ -2876,10 +2553,6 @@ packages: resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - nanomatch@1.2.13: - resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==} - engines: {node: '>=0.10.0'} - native-fetch@4.0.2: resolution: {integrity: sha512-4QcVlKFtv2EYVS5MBgsGX5+NWKtbDbIECdUXDBGDMAZXq3Jkv9zf+y8iS7Ub8fEdga3GpYeazp9gauNqXHJOCg==} peerDependencies: @@ -2898,9 +2571,6 @@ 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==} @@ -2941,21 +2611,9 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - object-copy@0.1.0: - resolution: {integrity: sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==} - engines: {node: '>=0.10.0'} - object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} - object-visit@1.0.1: - resolution: {integrity: sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==} - engines: {node: '>=0.10.0'} - - object.pick@1.3.0: - resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} - engines: {node: '>=0.10.0'} - obuf@1.1.2: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} @@ -3004,13 +2662,6 @@ packages: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} - pascalcase@0.1.1: - resolution: {integrity: sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==} - engines: {node: '>=0.10.0'} - - path-dirname@1.0.2: - resolution: {integrity: sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==} - path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -3022,10 +2673,6 @@ packages: path-to-regexp@0.1.7: resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} - path-type@3.0.0: - resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} - engines: {node: '>=4'} - path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -3080,18 +2727,6 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - pify@3.0.0: - resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} - engines: {node: '>=4'} - - pify@4.0.1: - resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} - engines: {node: '>=6'} - - posix-character-classes@0.1.1: - resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} - engines: {node: '>=0.10.0'} - postgres-array@2.0.0: resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} engines: {node: '>=4'} @@ -3179,21 +2814,9 @@ packages: regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} - regex-not@1.0.2: - resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} - engines: {node: '>=0.10.0'} - remove-trailing-separator@1.1.0: resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==} - repeat-element@1.1.4: - resolution: {integrity: sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==} - engines: {node: '>=0.10.0'} - - repeat-string@1.6.1: - resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} - engines: {node: '>=0.10'} - require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -3208,10 +2831,6 @@ packages: resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - resolve-url@0.2.1: - resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} - deprecated: https://github.com/lydell/resolve-url#deprecated - restore-cursor@3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} @@ -3220,10 +2839,6 @@ packages: resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - ret@0.1.15: - resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==} - engines: {node: '>=0.12'} - retry@0.13.1: resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} engines: {node: '>= 4'} @@ -3266,9 +2881,6 @@ packages: safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - safe-regex@1.1.0: - resolution: {integrity: sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==} - safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} @@ -3303,10 +2915,6 @@ packages: resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==} engines: {node: '>= 0.4'} - set-value@2.0.1: - resolution: {integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==} - engines: {node: '>=0.10.0'} - setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} @@ -3321,13 +2929,6 @@ 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'} - slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -3339,49 +2940,17 @@ packages: snake-case@3.0.4: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} - snapdragon-node@2.1.1: - resolution: {integrity: sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==} - engines: {node: '>=0.10.0'} - - snapdragon-util@3.0.1: - resolution: {integrity: sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==} - engines: {node: '>=0.10.0'} - - snapdragon@0.8.2: - resolution: {integrity: sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==} - engines: {node: '>=0.10.0'} - - source-map-resolve@0.5.3: - resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} - deprecated: See https://github.com/lydell/source-map-resolve#deprecated - source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - source-map-url@0.4.1: - resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==} - deprecated: See https://github.com/lydell/source-map-url#deprecated - - source-map@0.5.7: - resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} - engines: {node: '>=0.10.0'} - source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - split-string@3.1.0: - resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==} - engines: {node: '>=0.10.0'} - split2@4.2.0: resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} engines: {node: '>= 10.x'} - static-extend@0.1.2: - resolution: {integrity: sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==} - engines: {node: '>=0.10.0'} - statuses@1.5.0: resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} engines: {node: '>= 0.6'} @@ -3415,18 +2984,10 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} - strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - strip-hex-prefix@1.0.0: 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==} @@ -3450,10 +3011,6 @@ 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==} @@ -3468,22 +3025,10 @@ packages: resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} engines: {node: '>=14.14'} - to-object-path@0.3.0: - resolution: {integrity: sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==} - engines: {node: '>=0.10.0'} - - to-regex-range@2.1.1: - resolution: {integrity: sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==} - engines: {node: '>=0.10.0'} - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - to-regex@3.0.2: - resolution: {integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==} - engines: {node: '>=0.10.0'} - toidentifier@1.0.1: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} @@ -3498,14 +3043,6 @@ packages: resolution: {integrity: sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==} engines: {node: '>=0.6'} - tsconfig-paths@4.2.0: - resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} - engines: {node: '>=6'} - - tscpaths@0.0.9: - resolution: {integrity: sha512-tz4qimSJTCjYtHVsoY7pvxLcxhmhgmwzm7fyMEiL3/kPFFVyUuZOwuwcWwjkAsIrSUKJK22A7fNuJUwxzQ+H+w==} - hasBin: true - tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} @@ -3524,17 +3061,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==} - typescript@5.6.3: - resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} - engines: {node: '>=14.17'} - hasBin: true - u3@0.1.1: resolution: {integrity: sha512-+J5D5ir763y+Am/QY6hXNRlwljIeRMZMGs0cT6qqZVVzzT3X3nFPXVyPOFRMOR4kupB0T8JnCdpWdp6Q/iXn3w==} @@ -3545,10 +3074,6 @@ packages: resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} engines: {node: '>=14.0'} - union-value@1.0.1: - resolution: {integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==} - engines: {node: '>=0.10.0'} - universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} @@ -3561,18 +3086,6 @@ packages: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} - unset-value@1.0.0: - resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} - engines: {node: '>=0.10.0'} - - urix@0.1.0: - resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} - deprecated: Please see https://github.com/lydell/urix#deprecated - - use@3.1.1: - resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} - engines: {node: '>=0.10.0'} - utf-8-validate@5.0.10: resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==} engines: {node: '>=6.14.2'} @@ -3618,9 +3131,6 @@ 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'} @@ -3791,7 +3301,7 @@ snapshots: - encoding - utf-8-validate - '@debridge-finance/solana-transaction-parser@2.0.1(@solana/buffer-layout-utils@0.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@solana/buffer-layout@4.0.1)(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@debridge-finance/solana-transaction-parser@2.0.1(@solana/buffer-layout-utils@0.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@solana/buffer-layout@4.0.1)(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10)': dependencies: '@coral-xyz/anchor': 0.29.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@coral-xyz/spl-token': 0.29.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -3806,6 +3316,8 @@ snapshots: - fastestsmallesttextencoderdecoder - utf-8-validate + '@drizzle-team/brocli@0.10.2': {} + '@esbuild-kit/core-utils@3.3.2': dependencies: esbuild: 0.18.20 @@ -4351,13 +3863,6 @@ 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 @@ -4418,11 +3923,11 @@ snapshots: '@opentelemetry/api': 1.8.0 tdigest: 0.1.2 - '@metadaoproject/futarchy-sdk@4.0.0-alpha.31(arweave@1.15.0)(bufferutil@4.0.8)(graphql@16.8.1)(utf-8-validate@5.0.10)': + '@metadaoproject/futarchy-sdk@4.0.0-alpha.31(arweave@1.15.0)(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(graphql@16.8.1)(utf-8-validate@5.0.10)': dependencies: '@coral-xyz/anchor': 0.28.1-beta.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@metadaoproject/futarchy': 0.3.0-alpha.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@metadaoproject/futarchy-ts': 4.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@metadaoproject/futarchy': 0.3.0-alpha.10(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) + '@metadaoproject/futarchy-ts': 4.1.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@metaplex-foundation/js': 0.20.1(arweave@1.15.0)(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@metaplex-foundation/mpl-token-metadata': 3.2.1(@metaplex-foundation/umi@0.9.2) '@metaplex-foundation/umi': 0.9.2 @@ -4436,34 +3941,20 @@ snapshots: '@types/bun': 1.1.1 '@types/numeral': 2.0.5 dayjs: 1.11.11 - graphql-ws: 5.16.0(graphql@16.8.1) - numeral: 2.0.6 - rxjs: 7.8.1 - transitivePeerDependencies: - - arweave - - bufferutil - - debug - - encoding - - fastestsmallesttextencoderdecoder - - graphql - - supports-color - - utf-8-validate - - '@metadaoproject/futarchy-ts@1.6.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10)': - dependencies: - '@coral-xyz/anchor': 0.29.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@solana/spl-token': 0.3.11(@solana/web3.js@1.91.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) - '@solana/web3.js': 1.91.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) - bn.js: 5.2.1 - decimal.js: 10.4.3 - esbuild: 0.17.19 + graphql-ws: 5.16.0(graphql@16.8.1) + numeral: 2.0.6 + rxjs: 7.8.1 transitivePeerDependencies: + - arweave - bufferutil + - debug - encoding - fastestsmallesttextencoderdecoder + - graphql + - supports-color - utf-8-validate - '@metadaoproject/futarchy-ts@4.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@metadaoproject/futarchy-ts@4.1.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10)': dependencies: '@coral-xyz/anchor': 0.29.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@solana/spl-token': 0.3.11(@solana/web3.js@1.91.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) @@ -4477,7 +3968,7 @@ snapshots: - fastestsmallesttextencoderdecoder - utf-8-validate - '@metadaoproject/futarchy@0.3.0-alpha.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@metadaoproject/futarchy@0.3.0-alpha.10(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10)': dependencies: '@coral-xyz/anchor': 0.29.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@solana/spl-token': 0.3.11(@solana/web3.js@1.91.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) @@ -4491,7 +3982,7 @@ snapshots: - fastestsmallesttextencoderdecoder - utf-8-validate - '@metadaoproject/futarchy@0.4.0-alpha.21(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@metadaoproject/futarchy@0.4.0-alpha.21(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10)': dependencies: '@coral-xyz/anchor': 0.29.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metaplex-foundation/umi': 0.9.2 @@ -4942,11 +4433,6 @@ snapshots: '@metaplex-foundation/umi-public-keys': 0.8.9 '@metaplex-foundation/umi-serializers': 0.9.0 - '@mrmlnc/readdir-enhanced@2.2.1': - dependencies: - call-me-maybe: 1.0.2 - glob-to-regexp: 0.3.0 - '@native-to-anchor/buffer-layout@0.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@solana/buffer-layout': 4.0.0 @@ -5073,8 +4559,6 @@ snapshots: '@nodelib/fs.stat': 2.0.5 run-parallel: 1.2.0 - '@nodelib/fs.stat@1.1.3': {} - '@nodelib/fs.stat@2.0.5': {} '@nodelib/fs.walk@1.2.8': @@ -5425,11 +4909,6 @@ snapshots: '@types/qs': 6.9.14 '@types/serve-static': 1.15.5 - '@types/glob@7.2.0': - dependencies: - '@types/minimatch': 5.1.2 - '@types/node': 20.11.16 - '@types/http-errors@2.0.4': {} '@types/inquirer@9.0.7': @@ -5445,8 +4924,6 @@ snapshots: '@types/mime@3.0.4': {} - '@types/minimatch@5.1.2': {} - '@types/node@11.11.6': {} '@types/node@12.20.55': {} @@ -5631,24 +5108,10 @@ snapshots: dependencies: arweave: 1.15.0 - arr-diff@4.0.0: {} - - arr-flatten@1.1.0: {} - - arr-union@3.1.0: {} - array-flatten@1.1.1: {} - array-union@1.0.2: - dependencies: - array-uniq: 1.0.3 - array-union@2.1.0: {} - array-uniq@1.0.3: {} - - array-unique@0.3.2: {} - arweave-stream-tx@1.2.2(arweave@1.15.0): dependencies: arweave: 1.15.0 @@ -5672,16 +5135,12 @@ snapshots: minimalistic-assert: 1.0.1 safer-buffer: 2.1.2 - assign-symbols@1.0.0: {} - async-retry@1.3.3: dependencies: retry: 0.13.1 asynckit@0.4.0: {} - atob@2.1.2: {} - avsc@https://codeload.github.com/Irys-xyz/avsc/tar.gz/a730cc8018b79e114b6a3381bbb57760a24c6cef: {} axios@0.21.4: @@ -5723,16 +5182,6 @@ snapshots: base64url@3.0.1: {} - base@0.11.2: - dependencies: - cache-base: 1.0.1 - class-utils: 0.3.6 - component-emitter: 1.3.1 - define-property: 1.0.0 - isobject: 3.0.1 - mixin-deep: 1.3.2 - pascalcase: 0.1.1 - bech32@1.1.4: {} big.js@6.2.1: {} @@ -5809,25 +5258,6 @@ 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 - array-unique: 0.3.2 - extend-shallow: 2.0.1 - fill-range: 4.0.0 - isobject: 3.0.1 - repeat-element: 1.1.4 - snapdragon: 0.8.2 - snapdragon-node: 2.1.1 - split-string: 3.1.0 - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - braces@3.0.2: dependencies: fill-range: 7.0.1 @@ -5888,18 +5318,6 @@ snapshots: bytes@3.1.2: {} - cache-base@1.0.1: - dependencies: - collection-visit: 1.0.0 - component-emitter: 1.3.1 - get-value: 2.0.6 - has-value: 1.0.0 - isobject: 3.0.1 - set-value: 2.0.1 - to-object-path: 0.3.0 - union-value: 1.0.1 - unset-value: 1.0.0 - call-bind@1.0.6: dependencies: es-errors: 1.3.0 @@ -5907,14 +5325,10 @@ snapshots: get-intrinsic: 1.2.4 set-function-length: 1.2.1 - call-me-maybe@1.0.2: {} - camelcase@5.3.1: {} camelcase@6.3.0: {} - camelcase@7.0.1: {} - capability@0.2.5: {} chalk@2.4.2: @@ -5937,21 +5351,6 @@ snapshots: inherits: 2.0.4 safe-buffer: 5.2.1 - class-utils@0.3.6: - dependencies: - arr-union: 3.1.0 - define-property: 0.2.5 - 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 @@ -5979,11 +5378,6 @@ snapshots: clone@1.0.4: {} - collection-visit@1.0.0: - dependencies: - map-visit: 1.0.0 - object-visit: 1.0.1 - color-convert@1.9.3: dependencies: color-name: 1.1.3 @@ -6008,10 +5402,6 @@ snapshots: commander@8.3.0: {} - commander@9.5.0: {} - - component-emitter@1.3.1: {} - concat-map@0.0.1: {} content-disposition@0.5.4: @@ -6024,12 +5414,6 @@ 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: dependencies: object-assign: 4.1.1 @@ -6092,11 +5476,6 @@ 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: @@ -6111,8 +5490,6 @@ snapshots: decimal.js@10.4.3: {} - decode-uri-component@0.2.2: {} - defaults@1.0.4: dependencies: clone: 1.0.4 @@ -6124,19 +5501,6 @@ snapshots: gopd: 1.0.1 has-property-descriptors: 1.0.1 - define-property@0.2.5: - dependencies: - is-descriptor: 0.1.7 - - define-property@1.0.0: - dependencies: - is-descriptor: 1.0.3 - - define-property@2.0.2: - dependencies: - is-descriptor: 1.0.3 - isobject: 3.0.1 - delay@5.0.0: {} delayed-stream@1.0.0: {} @@ -6147,14 +5511,6 @@ 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 - dir-glob@3.0.1: dependencies: path-type: 4.0.0 @@ -6168,29 +5524,12 @@ snapshots: dotenv@16.4.5: {} - dreamopt@0.8.0: - dependencies: - wordwrap: 1.0.0 - - drizzle-kit@0.20.18: + drizzle-kit@0.27.0: 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 @@ -6203,7 +5542,7 @@ snapshots: 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): + drizzle-orm@0.36.0(@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 @@ -6246,8 +5585,6 @@ snapshots: encodeurl@1.0.2: {} - env-paths@3.0.0: {} - error-polyfill@0.1.3: dependencies: capability: 0.2.5 @@ -6256,37 +5593,12 @@ 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 @@ -6374,13 +5686,6 @@ 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: @@ -6435,27 +5740,10 @@ 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: {} - expand-brackets@2.1.4: - dependencies: - debug: 2.6.9 - define-property: 0.2.5 - extend-shallow: 2.0.1 - posix-character-classes: 0.1.1 - regex-not: 1.0.2 - snapdragon: 0.8.2 - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - exponential-backoff@3.1.1: {} express@4.19.2: @@ -6494,51 +5782,14 @@ snapshots: transitivePeerDependencies: - supports-color - ext@1.7.0: - dependencies: - type: 2.7.3 - - extend-shallow@2.0.1: - dependencies: - is-extendable: 0.1.1 - - extend-shallow@3.0.2: - dependencies: - assign-symbols: 1.0.0 - is-extendable: 1.0.1 - external-editor@3.1.0: dependencies: chardet: 0.7.0 iconv-lite: 0.4.24 tmp: 0.0.33 - extglob@2.0.4: - dependencies: - array-unique: 0.3.2 - define-property: 1.0.0 - expand-brackets: 2.1.4 - extend-shallow: 2.0.1 - fragment-cache: 0.2.1 - regex-not: 1.0.2 - snapdragon: 0.8.2 - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - eyes@0.1.8: {} - fast-glob@2.2.7: - dependencies: - '@mrmlnc/readdir-enhanced': 2.2.1 - '@nodelib/fs.stat': 1.1.3 - glob-parent: 3.1.0 - is-glob: 4.0.3 - merge2: 1.4.1 - micromatch: 3.1.10 - transitivePeerDependencies: - - supports-color - fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -6561,13 +5812,6 @@ snapshots: file-uri-to-path@1.0.0: {} - fill-range@4.0.0: - dependencies: - extend-shallow: 2.0.1 - is-number: 3.0.0 - repeat-string: 1.6.1 - to-regex-range: 2.1.1 - fill-range@7.0.1: dependencies: to-regex-range: 5.0.1 @@ -6595,8 +5839,6 @@ snapshots: optionalDependencies: debug: 4.3.4 - for-in@1.0.2: {} - form-data@4.0.0: dependencies: asynckit: 0.4.0 @@ -6605,10 +5847,6 @@ snapshots: forwarded@0.2.0: {} - fragment-cache@0.2.1: - dependencies: - map-cache: 0.2.2 - fresh@0.5.2: {} fs-extra@10.1.0: @@ -6635,19 +5873,10 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 - get-value@2.0.6: {} - - glob-parent@3.1.0: - dependencies: - is-glob: 3.1.0 - path-dirname: 1.0.2 - glob-parent@5.1.2: dependencies: is-glob: 4.0.3 - glob-to-regexp@0.3.0: {} - glob@7.2.3: dependencies: fs.realpath: 1.0.0 @@ -6657,14 +5886,6 @@ 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 @@ -6674,19 +5895,6 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 - globby@9.2.0: - dependencies: - '@types/glob': 7.2.0 - array-union: 1.0.2 - dir-glob: 2.2.2 - fast-glob: 2.2.7 - glob: 7.2.3 - ignore: 4.0.6 - pify: 4.0.1 - slash: 2.0.0 - transitivePeerDependencies: - - supports-color - gopd@1.0.1: dependencies: get-intrinsic: 1.2.4 @@ -6703,11 +5911,6 @@ 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: {} @@ -6720,25 +5923,6 @@ snapshots: has-symbols@1.0.3: {} - has-value@0.3.1: - dependencies: - get-value: 2.0.6 - has-values: 0.1.4 - isobject: 2.1.0 - - has-value@1.0.0: - dependencies: - get-value: 2.0.6 - has-values: 1.0.0 - isobject: 3.0.1 - - has-values@0.1.4: {} - - has-values@1.0.0: - dependencies: - is-number: 3.0.0 - kind-of: 4.0.0 - hash-base@3.1.0: dependencies: inherits: 2.0.4 @@ -6761,8 +5945,6 @@ snapshots: transitivePeerDependencies: - debug - heap@0.2.7: {} - hi-base32@0.5.1: {} hmac-drbg@1.0.1: @@ -6771,8 +5953,6 @@ 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 @@ -6799,8 +5979,6 @@ snapshots: ieee754@1.2.1: {} - ignore@4.0.6: {} - ignore@5.3.1: {} inflight@1.0.6: @@ -6848,42 +6026,12 @@ snapshots: ipaddr.js@1.9.1: {} - is-accessor-descriptor@1.0.1: - dependencies: - hasown: 2.0.0 - - is-buffer@1.1.6: {} - - is-data-descriptor@1.0.1: - dependencies: - hasown: 2.0.0 - - is-descriptor@0.1.7: - dependencies: - is-accessor-descriptor: 1.0.1 - is-data-descriptor: 1.0.1 - - is-descriptor@1.0.3: - dependencies: - is-accessor-descriptor: 1.0.1 - is-data-descriptor: 1.0.1 - - is-extendable@0.1.1: {} - - is-extendable@1.0.1: - dependencies: - is-plain-object: 2.0.4 - is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} is-fullwidth-code-point@4.0.0: {} - is-glob@3.1.0: - dependencies: - is-extglob: 2.1.1 - is-glob@4.0.3: dependencies: is-extglob: 2.1.1 @@ -6892,32 +6040,10 @@ snapshots: is-interactive@1.0.0: {} - is-number@3.0.0: - dependencies: - kind-of: 3.2.2 - is-number@7.0.0: {} - is-plain-object@2.0.4: - 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: {} - - isobject@2.1.0: - dependencies: - isarray: 1.0.0 - - isobject@3.0.1: {} - isomorphic-ws@4.0.1(ws@7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: ws: 7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -6952,16 +6078,8 @@ 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: {} - jsonfile@6.1.0: dependencies: universalify: 2.0.1 @@ -7000,16 +6118,6 @@ snapshots: node-gyp-build: 4.8.0 readable-stream: 3.6.2 - kind-of@3.2.2: - dependencies: - is-buffer: 1.1.6 - - kind-of@4.0.0: - dependencies: - is-buffer: 1.1.6 - - kind-of@6.0.3: {} - kleur@4.1.5: {} listr2@6.6.1: @@ -7043,8 +6151,6 @@ snapshots: lodash.once@4.1.1: {} - lodash.throttle@4.1.1: {} - lodash@4.17.21: {} log-symbols@4.1.0: @@ -7068,16 +6174,6 @@ 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: - dependencies: - object-visit: 1.0.1 - match-discriminated-union@1.0.0: {} md5.js@1.3.5: @@ -7088,17 +6184,6 @@ 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: {} @@ -7115,24 +6200,6 @@ snapshots: micro-ftch@0.3.1: {} - micromatch@3.1.10: - dependencies: - arr-diff: 4.0.0 - array-unique: 0.3.2 - braces: 2.3.2 - define-property: 2.0.2 - extend-shallow: 3.0.2 - extglob: 2.0.4 - fragment-cache: 0.2.1 - kind-of: 6.0.3 - nanomatch: 1.2.13 - object.pick: 1.3.0 - regex-not: 1.0.2 - snapdragon: 0.8.2 - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - micromatch@4.0.5: dependencies: braces: 3.0.2 @@ -7158,21 +6225,8 @@ 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: - dependencies: - for-in: 1.0.2 - is-extendable: 1.0.1 - mixme@0.5.10: {} mkdirp@0.5.6: @@ -7196,22 +6250,6 @@ snapshots: mute-stream@1.0.0: {} - nanomatch@1.2.13: - dependencies: - arr-diff: 4.0.0 - array-unique: 0.3.2 - define-property: 2.0.2 - extend-shallow: 3.0.2 - fragment-cache: 0.2.1 - is-windows: 1.0.2 - kind-of: 6.0.3 - object.pick: 1.3.0 - regex-not: 1.0.2 - snapdragon: 0.8.2 - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - native-fetch@4.0.2(undici@5.28.3): dependencies: undici: 5.28.3 @@ -7247,8 +6285,6 @@ snapshots: negotiator@0.6.3: {} - next-tick@1.1.0: {} - no-case@3.0.4: dependencies: lower-case: 2.0.2 @@ -7281,22 +6317,8 @@ snapshots: object-assign@4.1.1: {} - object-copy@0.1.0: - dependencies: - copy-descriptor: 0.1.1 - define-property: 0.2.5 - kind-of: 3.2.2 - object-inspect@1.13.1: {} - object-visit@1.0.1: - dependencies: - isobject: 3.0.1 - - object.pick@1.3.0: - dependencies: - isobject: 3.0.1 - obuf@1.1.2: {} on-finished@2.4.1: @@ -7345,20 +6367,12 @@ snapshots: parseurl@1.3.3: {} - pascalcase@0.1.1: {} - - path-dirname@1.0.2: {} - path-exists@4.0.0: {} path-is-absolute@1.0.1: {} path-to-regexp@0.1.7: {} - path-type@3.0.0: - dependencies: - pify: 3.0.0 - path-type@4.0.0: {} pbkdf2@3.1.2: @@ -7420,12 +6434,6 @@ snapshots: picomatch@2.3.1: {} - pify@3.0.0: {} - - pify@4.0.1: {} - - posix-character-classes@0.1.1: {} - postgres-array@2.0.0: {} postgres-array@3.0.2: {} @@ -7496,17 +6504,8 @@ snapshots: regenerator-runtime@0.14.1: {} - regex-not@1.0.2: - dependencies: - extend-shallow: 3.0.2 - safe-regex: 1.1.0 - remove-trailing-separator@1.1.0: {} - repeat-element@1.1.4: {} - - repeat-string@1.6.1: {} - require-directory@2.1.1: {} require-main-filename@2.0.0: {} @@ -7515,8 +6514,6 @@ snapshots: resolve-pkg-maps@1.0.0: {} - resolve-url@0.2.1: {} - restore-cursor@3.1.0: dependencies: onetime: 5.1.2 @@ -7527,8 +6524,6 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 - ret@0.1.15: {} - retry@0.13.1: {} reusify@1.0.4: {} @@ -7577,10 +6572,6 @@ snapshots: safe-buffer@5.2.1: {} - safe-regex@1.1.0: - dependencies: - ret: 0.1.15 - safer-buffer@2.1.2: {} scrypt-js@3.0.1: {} @@ -7637,13 +6628,6 @@ snapshots: gopd: 1.0.1 has-property-descriptors: 1.0.1 - set-value@2.0.1: - dependencies: - extend-shallow: 2.0.1 - is-extendable: 0.1.1 - is-plain-object: 2.0.4 - split-string: 3.1.0 - setprototypeof@1.2.0: {} sha.js@2.4.11: @@ -7660,10 +6644,6 @@ snapshots: signal-exit@3.0.7: {} - sisteransi@1.0.5: {} - - slash@2.0.0: {} - slash@3.0.0: {} slice-ansi@5.0.0: @@ -7676,59 +6656,15 @@ snapshots: dot-case: 3.0.4 tslib: 2.6.2 - snapdragon-node@2.1.1: - dependencies: - define-property: 1.0.0 - isobject: 3.0.1 - snapdragon-util: 3.0.1 - - snapdragon-util@3.0.1: - dependencies: - kind-of: 3.2.2 - - snapdragon@0.8.2: - dependencies: - base: 0.11.2 - debug: 2.6.9 - define-property: 0.2.5 - extend-shallow: 2.0.1 - map-cache: 0.2.2 - source-map: 0.5.7 - source-map-resolve: 0.5.3 - use: 3.1.1 - transitivePeerDependencies: - - supports-color - - source-map-resolve@0.5.3: - dependencies: - atob: 2.1.2 - decode-uri-component: 0.2.2 - resolve-url: 0.2.1 - source-map-url: 0.4.1 - urix: 0.1.0 - source-map-support@0.5.21: dependencies: buffer-from: 1.1.2 source-map: 0.6.1 - source-map-url@0.4.1: {} - - source-map@0.5.7: {} - source-map@0.6.1: {} - split-string@3.1.0: - dependencies: - extend-shallow: 3.0.2 - split2@4.2.0: {} - static-extend@0.1.2: - dependencies: - define-property: 0.2.5 - object-copy: 0.1.0 - statuses@1.5.0: {} statuses@2.0.1: {} @@ -7763,16 +6699,10 @@ snapshots: dependencies: ansi-regex: 6.0.1 - strip-bom@3.0.0: {} - strip-hex-prefix@1.0.0: 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: {} @@ -7793,11 +6723,6 @@ 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: @@ -7810,26 +6735,10 @@ snapshots: tmp@0.2.3: {} - to-object-path@0.3.0: - dependencies: - kind-of: 3.2.2 - - to-regex-range@2.1.1: - dependencies: - is-number: 3.0.0 - repeat-string: 1.6.1 - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 - to-regex@3.0.2: - dependencies: - define-property: 2.0.2 - extend-shallow: 3.0.2 - regex-not: 1.0.2 - safe-regex: 1.1.0 - toidentifier@1.0.1: {} toml@3.0.0: {} @@ -7838,19 +6747,6 @@ snapshots: treeify@1.1.0: {} - tsconfig-paths@4.2.0: - dependencies: - json5: 2.2.3 - minimist: 1.2.8 - strip-bom: 3.0.0 - - tscpaths@0.0.9: - dependencies: - commander: 2.20.3 - globby: 9.2.0 - transitivePeerDependencies: - - supports-color - tslib@2.6.2: {} tweetnacl@1.0.3: {} @@ -7864,12 +6760,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: {} - u3@0.1.1: {} undici-types@5.26.5: {} @@ -7878,13 +6770,6 @@ snapshots: dependencies: '@fastify/busboy': 2.1.0 - union-value@1.0.1: - dependencies: - arr-union: 3.1.0 - get-value: 2.0.6 - is-extendable: 0.1.1 - set-value: 2.0.1 - universalify@2.0.1: {} unixify@1.0.0: @@ -7893,15 +6778,6 @@ snapshots: unpipe@1.0.0: {} - unset-value@1.0.0: - dependencies: - has-value: 0.3.1 - isobject: 3.0.1 - - urix@0.1.0: {} - - use@3.1.1: {} - utf-8-validate@5.0.10: dependencies: node-gyp-build: 4.8.0 @@ -7945,8 +6821,6 @@ snapshots: which-module@2.0.1: {} - wordwrap@1.0.0: {} - wrap-ansi@6.2.0: dependencies: ansi-styles: 4.3.0