From 69530bfcd2262ffb092ce9d0f4916ebb49087a5a Mon Sep 17 00:00:00 2001 From: Nikhil Ranjan Date: Thu, 9 Jul 2020 17:52:23 +0530 Subject: [PATCH] Added tip support (#942) * Added tip schema * Tip being added to prisma * added chain db watcher and frontend * Added tip proposal * Added Tip to frontend * Added tip section * Added finder * Added chain db watcher for tip * remove who * Added types in refetch * Added endorse sidebar * Added tip type for new proposal emai; * fix * Update chain-db-watcher/README.md Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update chain-db-watcher/README.md Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * chain db open serve modifications for tip * removed endorsements * removed datamodel * yarn generate * removed endorsements * fix * fix * sidebar component * fix * removed code * fix graphql codegen * correct tip reason * allow numbers * Added time to block * added status update for tips * create tip status * showing only opened status * codegen * fix * added tip closes * fix finder * show only open ones * Hasura migration to v2 and squash (#950) * squash and migrate to v2 * remove useless users mention * remove first useless proposals table creation * delete consecutive add drop column proposal_id * delete consecutive add drop creation and modification_date * delete consecutive add drop on reply * delete consecutive add drop on public.reactions * delete consecutive add drop on public.post_votes * delete consecutive add drop on public.post.poll_id and public.post.has_poll * delete consecutive add drop updated at public.poll and poll_votes * fix tons of nits to make migration sucessful * fix wrong uppercase * remove auto-migration (not-working) and update readme * delete migration_backup and add cron_triggers.yaml * ugly hack * proper closing and closed display * Added check for closing * added more check * fix * fix * Change status name * tip openend * Update chain-db-watcher/src/sync/index.ts Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update chain-db-watcher/src/sync/queries/chain-db.queries.ts Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update front-end/src/screens/Tips/index.tsx * Update front-end/src/screens/Tips/index.tsx * Update front-end/src/components/Listings/TipListing.tsx * Update front-end/src/screens/Tips/index.tsx * Update chain-db-watcher/src/queries.ts * closing shouldnot show negative days Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> Co-authored-by: thib --- auth-server/src/types.ts | 2 + auth-server/src/utils/getPostId.ts | 4 + auth-server/src/utils/getPostType.ts | 5 + chain-db-open-server/prisma/datamodel.prisma | 19 + .../src/generated/prisma-client/index.ts | 807 ++ .../generated/prisma-client/prisma-schema.ts | 484 + .../src/generated/prisma.graphql | 869 +- chain-db-open-server/src/index.ts | 15 + chain-db-open-server/src/resolvers/query.ts | 44 + .../src/resolvers/subscription.ts | 16 + chain-db-open-server/src/schema.graphql | 10 +- chain-db-watcher/README.md | 4 +- .../src/generated/chain-db-graphql.ts | 563 +- .../src/generated/discussion-db-graphql.ts | 8101 +++++++---------- chain-db-watcher/src/graphql_helpers.ts | 108 + chain-db-watcher/src/index.ts | 29 +- chain-db-watcher/src/queries.ts | 34 + .../src/queries/discussions-db.queries.ts | 35 + chain-db-watcher/src/sync/getter.ts | 48 + chain-db-watcher/src/sync/index.ts | 20 + .../src/sync/queries/chain-db.queries.ts | 22 + .../sync/queries/discussions-db.queries.ts | 13 + chain-db-watcher/src/sync/utils.ts | 27 + chain-db-watcher/src/types.ts | 8 +- front-end/src/App.tsx | 28 +- front-end/src/components/BlockCountdown.tsx | 18 +- front-end/src/components/Comment/Comment.tsx | 4 + front-end/src/components/Comment/Comments.tsx | 4 + .../Comment/EditableCommentContent.tsx | 4 + .../src/components/EditablePostContent.tsx | 7 +- .../src/components/Listings/TipListing.tsx | 64 + front-end/src/components/MenuBar/index.tsx | 3 +- front-end/src/components/NoPostFound.tsx | 11 +- .../Post/GovernanceSideBar/EndorseTip.tsx | 174 + .../Post/GovernanceSideBar/index.tsx | 40 +- front-end/src/components/Post/Post.tsx | 89 +- .../src/components/Post/PostCommentForm.tsx | 20 +- .../Post/PostGovernanceInfo/PostTipInfo.tsx | 80 + front-end/src/generated/graphql.tsx | 8015 +++++++++++++--- front-end/src/global/statuses.ts | 7 + .../src/screens/Home/LatestTips/index.tsx | 37 + front-end/src/screens/Home/index.tsx | 5 +- front-end/src/screens/OnChain/Tips/index.tsx | 38 + front-end/src/screens/OnChain/Tips/query.ts | 66 + front-end/src/screens/OnChain/index.tsx | 10 +- front-end/src/screens/TipPost/index.tsx | 23 + front-end/src/screens/TipPost/query.ts | 73 + .../src/screens/Tips/TipContainer/index.tsx | 38 + .../src/screens/Tips/TipContainer/query.ts | 66 + front-end/src/screens/Tips/index.tsx | 58 + front-end/src/ui-components/StatusTag.tsx | 24 +- hasura/README.md | 20 +- hasura/docker-compose.yaml.example | 2 +- hasura/hasura-migrations/config.yaml | 5 + .../metadata/actions.graphql | 2 + .../hasura-migrations/metadata/actions.yaml | 6 + .../down.yaml => metadata/allow_list.yaml} | 0 .../down.yaml => metadata/cron_triggers.yaml} | 0 .../down.yaml => metadata/functions.yaml} | 0 .../query_collections.yaml} | 0 .../metadata/remote_schemas.yaml | 10 + hasura/hasura-migrations/metadata/tables.yaml | 685 ++ .../hasura-migrations/metadata/version.yaml | 1 + .../1572604593716_add replies/up.sql | 100 - .../1572604593716_add replies/up.yaml | 196 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 7 - .../up.yaml | 7 - .../down.yaml | 21 - .../up.yaml | 23 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 21 - .../up.yaml | 23 - .../down.yaml | 22 - .../up.yaml | 24 - .../down.yaml | 24 - .../up.yaml | 25 - .../down.yaml | 22 - .../up.yaml | 25 - .../down.yaml | 6 - .../up.yaml | 17 - .../down.yaml | 6 - .../up.yaml | 17 - .../down.yaml | 6 - .../up.yaml | 21 - .../down.yaml | 10 - .../up.yaml | 6 - .../down.yaml | 19 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 22 - .../down.yaml | 6 - .../up.yaml | 10 - .../down.yaml | 27 - .../up.yaml | 32 - .../down.yaml | 6 - .../up.yaml | 22 - .../down.yaml | 3 - .../up.yaml | 20 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 22 - .../down.yaml | 6 - .../up.yaml | 20 - .../down.yaml | 6 - .../up.yaml | 20 - .../down.yaml | 6 - .../up.yaml | 20 - .../down.yaml | 3 - .../up.yaml | 3 - .../down.yaml | 10 - .../up.yaml | 3 - .../down.yaml | 6 - .../up.yaml | 6 - .../1574246024580_run_sql_migration/up.yaml | 8 - .../up.yaml | 4 - .../down.yaml | 23 - .../up.yaml | 23 - .../down.yaml | 23 - .../up.yaml | 23 - .../down.yaml | 32 - .../up.yaml | 27 - .../down.yaml | 32 - .../up.yaml | 28 - .../down.yaml | 23 - .../up.yaml | 23 - .../down.yaml | 23 - .../up.yaml | 23 - .../down.yaml | 8 - .../up.yaml | 6 - .../down.yaml | 8 - .../up.yaml | 6 - .../1575741722527_run_sql_migration/up.yaml | 4 - .../down.yaml | 3 - .../up.yaml | 9 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 16 - .../down.yaml | 10 - .../up.yaml | 6 - .../down.yaml | 25 - .../up.yaml | 23 - .../down.yaml | 3 - .../up.yaml | 3 - .../down.yaml | 7 - .../up.yaml | 7 - .../down.yaml | 12 - .../up.yaml | 13 - .../1575912700926_run_sql_migration/up.yaml | 4 - .../down.yaml | 3 - .../up.yaml | 8 - .../down.yaml | 3 - .../up.yaml | 4 - .../down.yaml | 4 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 8 - .../up.yaml | 6 - .../down.yaml | 23 - .../up.yaml | 24 - .../down.yaml | 23 - .../up.yaml | 24 - .../down.yaml | 23 - .../up.yaml | 25 - .../down.yaml | 28 - .../up.yaml | 29 - .../down.yaml | 27 - .../up.yaml | 27 - .../down.yaml | 29 - .../up.yaml | 32 - .../down.yaml | 26 - .../up.yaml | 27 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 11 - .../down.yaml | 16 - .../up.yaml | 18 - .../down.yaml | 3 - .../up.yaml | 4 - .../down.yaml | 5 - .../up.yaml | 9 - .../1576175378909_run_sql_migration/down.yaml | 1 - .../1576175378909_run_sql_migration/up.yaml | 6 - .../1576175389718_run_sql_migration/down.yaml | 1 - .../1576175389718_run_sql_migration/up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 19 - .../down.yaml | 6 - .../up.yaml | 19 - .../down.yaml | 25 - .../up.yaml | 24 - .../down.yaml | 6 - .../up.yaml | 24 - .../down.yaml | 27 - .../up.yaml | 24 - .../down.yaml | 3 - .../up.yaml | 3 - .../1576445685035_run_sql_migration/down.yaml | 1 - .../1576445685035_run_sql_migration/up.yaml | 13 - .../down.yaml | 3 - .../up.yaml | 3 - .../down.yaml | 3 - .../up.yaml | 3 - .../down.yaml | 3 - .../up.yaml | 3 - .../down.yaml | 3 - .../up.yaml | 4 - .../down.yaml | 5 - .../up.yaml | 9 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 6 - .../up.yaml | 6 - .../down.yaml | 4 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 18 - .../down.yaml | 29 - .../up.yaml | 28 - .../down.yaml | 16 - .../up.yaml | 23 - .../down.yaml | 16 - .../up.yaml | 23 - .../down.yaml | 6 - .../up.yaml | 20 - .../down.yaml | 6 - .../up.yaml | 16 - .../down.yaml | 12 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 12 - .../1576446665237_run_sql_migration/down.yaml | 1 - .../1576446665237_run_sql_migration/up.yaml | 4 - .../down.yaml | 6 - .../up.yaml | 6 - .../down.yaml | 13 - .../up.yaml | 6 - .../down.yaml | 3 - .../up.yaml | 3 - .../down.yaml | 6 - .../up.yaml | 6 - .../down.yaml | 3 - .../up.yaml | 3 - .../down.yaml | 6 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 23 - .../up.yaml | 23 - .../down.yaml | 23 - .../up.yaml | 23 - .../down.yaml | 3 - .../up.yaml | 17 - .../down.yaml | 3 - .../up.yaml | 11 - .../down.yaml | 4 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 3 - .../up.yaml | 3 - .../down.yaml | 3 - .../up.yaml | 8 - .../down.yaml | 11 - .../up.yaml | 3 - .../down.yaml | 3 - .../up.yaml | 4 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 16 - .../down.yaml | 6 - .../up.yaml | 11 - .../down.yaml | 16 - .../up.yaml | 20 - .../down.yaml | 6 - .../up.yaml | 15 - .../down.yaml | 6 - .../up.yaml | 15 - .../down.yaml | 3 - .../up.yaml | 4 - .../down.yaml | 20 - .../up.yaml | 21 - .../down.yaml | 41 - .../up.yaml | 40 - .../down.yaml | 20 - .../up.yaml | 21 - .../down.yaml | 41 - .../up.yaml | 40 - .../down.yaml | 20 - .../up.yaml | 21 - .../down.yaml | 61 - .../up.yaml | 63 - .../down.yaml | 21 - .../up.yaml | 22 - .../down.yaml | 14 - .../up.yaml | 6 - .../down.yaml | 11 - .../up.yaml | 10 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 36 - .../up.yaml | 61 - .../down.yaml | 27 - .../up.yaml | 24 - .../down.yaml | 14 - .../up.yaml | 6 - .../down.yaml | 3 - .../up.yaml | 3 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 3 - .../up.yaml | 4 - .../down.yaml | 11 - .../up.yaml | 11 - .../down.yaml | 21 - .../up.yaml | 22 - .../down.yaml | 21 - .../up.yaml | 22 - .../down.yaml | 22 - .../up.yaml | 23 - .../down.yaml | 6 - .../up.yaml | 15 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 7 - .../up.yaml | 7 - .../down.yaml | 21 - .../up.yaml | 22 - .../down.yaml | 6 - .../up.yaml | 6 - .../down.yaml | 10 - .../up.yaml | 9 - .../down.yaml | 10 - .../up.yaml | 9 - .../down.yaml | 24 - .../up.yaml | 28 - .../down.yaml | 22 - .../up.yaml | 22 - .../down.yaml | 22 - .../up.yaml | 22 - .../down.yaml | 24 - .../up.yaml | 26 - .../down.yaml | 13 - .../up.yaml | 14 - .../down.yaml | 13 - .../up.yaml | 14 - .../down.yaml | 3 - .../up.yaml | 4 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 22 - .../up.yaml | 23 - .../down.yaml | 22 - .../up.yaml | 23 - .../down.yaml | 22 - .../up.yaml | 23 - .../down.yaml | 23 - .../up.yaml | 24 - .../down.yaml | 21 - .../up.yaml | 22 - .../down.yaml | 23 - .../up.yaml | 22 - .../down.yaml | 23 - .../up.yaml | 22 - .../down.yaml | 25 - .../up.yaml | 24 - .../down.yaml | 8 - .../up.yaml | 6 - .../down.yaml | 12 - .../up.yaml | 6 - .../down.yaml | 4 - .../up.yaml | 3 - .../down.yaml | 7 - .../up.yaml | 3 - .../down.yaml | 17 - .../up.yaml | 3 - .../down.yaml | 3 - .../up.yaml | 17 - .../down.yaml | 3 - .../up.yaml | 17 - .../down.yaml | 13 - .../up.yaml | 6 - .../down.yaml | 13 - .../up.yaml | 6 - .../down.yaml | 11 - .../up.yaml | 11 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 14 - .../up.yaml | 6 - .../down.yaml | 14 - .../up.yaml | 6 - .../down.yaml | 14 - .../up.yaml | 6 - .../down.yaml | 11 - .../up.yaml | 11 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 13 - .../up.yaml | 14 - .../down.yaml | 14 - .../up.yaml | 6 - .../down.yaml | 13 - .../up.yaml | 14 - .../down.yaml | 13 - .../up.yaml | 14 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 3 - .../up.yaml | 4 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 23 - .../up.yaml | 24 - .../down.yaml | 23 - .../up.yaml | 24 - .../down.yaml | 23 - .../up.yaml | 24 - .../down.yaml | 24 - .../up.yaml | 25 - .../down.yaml | 22 - .../up.yaml | 20 - .../down.yaml | 20 - .../up.yaml | 21 - .../down.yaml | 12 - .../up.yaml | 11 - .../down.yaml | 14 - .../up.yaml | 6 - .../down.yaml | 14 - .../up.yaml | 6 - .../down.yaml | 14 - .../up.yaml | 6 - .../down.yaml | 14 - .../up.yaml | 6 - .../down.yaml | 8 - .../up.yaml | 3 - .../down.yaml | 3 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 6 - .../up.yaml | 14 - .../down.yaml | 18 - .../up.yaml | 28 - .../down.yaml | 3 - .../up.yaml | 8 - .../down.yaml | 3 - .../up.yaml | 12 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 3 - .../up.yaml | 12 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 17 - .../down.yaml | 6 - .../up.yaml | 19 - .../down.yaml | 6 - .../up.yaml | 17 - .../down.yaml | 36 - .../up.yaml | 66 - .../down.yaml | 6 - .../up.yaml | 17 - .../down.yaml | 6 - .../up.yaml | 19 - .../down.yaml | 6 - .../up.yaml | 17 - .../down.yaml | 36 - .../up.yaml | 66 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 7 - .../up.yaml | 7 - .../down.yaml | 7 - .../up.yaml | 7 - .../down.yaml | 7 - .../up.yaml | 7 - .../down.yaml | 7 - .../up.yaml | 7 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 13 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 13 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 12 - .../up.yaml | 6 - .../down.yaml | 12 - .../up.yaml | 6 - .../down.yaml | 8 - .../up.yaml | 6 - .../down.yaml | 8 - .../up.yaml | 6 - .../down.yaml | 4 - .../up.yaml | 3 - .../down.yaml | 4 - .../up.yaml | 3 - .../down.yaml | 1 - .../up.yaml | 3 - .../down.yaml | 3 - .../up.yaml | 3 - .../down.yaml | 10 - .../up.yaml | 10 - .../down.yaml | 3 - .../up.yaml | 3 - .../down.yaml | 22 - .../up.yaml | 21 - .../down.yaml | 24 - .../up.yaml | 23 - .../down.yaml | 22 - .../up.yaml | 21 - .../down.yaml | 24 - .../up.yaml | 23 - .../down.yaml | 7 - .../up.yaml | 3 - .../down.yaml | 21 - .../up.yaml | 22 - .../down.yaml | 23 - .../up.yaml | 24 - .../down.yaml | 21 - .../up.yaml | 22 - .../down.yaml | 23 - .../up.yaml | 24 - .../down.yaml | 22 - .../up.yaml | 22 - .../down.yaml | 24 - .../up.yaml | 24 - .../down.yaml | 22 - .../up.yaml | 22 - .../down.yaml | 24 - .../up.yaml | 24 - .../down.yaml | 7 - .../up.yaml | 3 - .../down.yaml | 6 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 6 - .../down.yaml | 10 - .../up.yaml | 10 - .../down.yaml | 5 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 6 - .../up.yaml | 19 - .../down.yaml | 6 - .../up.yaml | 19 - .../down.yaml | 6 - .../up.yaml | 17 - .../down.yaml | 12 - .../up.yaml | 38 - .../down.yaml | 5 - .../up.yaml | 6 - .../down.yaml | 25 - .../up.yaml | 26 - .../down.yaml | 23 - .../up.yaml | 24 - .../down.yaml | 25 - .../up.yaml | 26 - .../down.yaml | 26 - .../up.yaml | 27 - .../down.yaml | 25 - .../up.yaml | 26 - .../down.yaml | 5 - .../up.yaml | 5 - .../down.yaml | 26 - .../up.yaml | 27 - .../down.yaml | 24 - .../up.yaml | 25 - .../down.yaml | 26 - .../up.yaml | 27 - .../down.yaml | 27 - .../up.yaml | 28 - .../down.yaml | 26 - .../up.yaml | 27 - .../1590576328516_run_sql_migration/down.yaml | 1 - .../1590576328516_run_sql_migration/up.yaml | 7 - .../down.yaml | 7 - .../up.yaml | 12 - .../down.yaml | 6 - .../up.yaml | 18 - .../down.yaml | 6 - .../up.yaml | 18 - .../down.yaml | 5 - .../up.yaml | 5 - .../down.yaml | 5 - .../up.yaml | 10 - .../down.yaml | 5 - .../up.yaml | 5 - .../down.yaml | 5 - .../up.yaml | 10 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 5 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 12 - .../up.yaml | 6 - .../down.yaml | 5 - .../up.yaml | 6 - .../down.yaml | 5 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 17 - .../down.yaml | 12 - .../up.yaml | 36 - .../down.yaml | 6 - .../up.yaml | 17 - .../down.yaml | 6 - .../up.yaml | 19 - .../down.yaml | 6 - .../up.yaml | 19 - .../down.yaml | 6 - .../up.yaml | 17 - .../down.yaml | 12 - .../up.yaml | 38 - .../down.yaml | 6 - .../up.yaml | 19 - .../down.yaml | 27 - .../up.yaml | 25 - .../down.yaml | 28 - .../up.yaml | 26 - .../down.yaml | 25 - .../up.yaml | 23 - .../down.yaml | 27 - .../up.yaml | 25 - .../down.yaml | 27 - .../up.yaml | 25 - .../down.yaml | 15 - .../up.yaml | 5 - .../down.yaml | 11 - .../up.yaml | 5 - .../down.yaml | 1 - .../up.yaml | 5 - .../down.yaml | 5 - .../up.yaml | 5 - .../down.yaml | 5 - .../up.yaml | 10 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 8 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 8 - .../down.yaml | 15 - .../up.yaml | 6 - .../down.yaml | 15 - .../up.yaml | 6 - .../down.yaml | 18 - .../up.yaml | 6 - .../down.yaml | 11 - .../up.yaml | 6 - .../down.yaml | 12 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 17 - .../down.yaml | 6 - .../up.yaml | 18 - .../down.yaml | 6 - .../up.yaml | 16 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 8 - .../up.yaml | 6 - .../down.yaml | 16 - .../up.yaml | 5 - .../down.yaml | 21 - .../up.yaml | 22 - .../down.yaml | 21 - .../up.yaml | 20 - .../down.yaml | 11 - .../up.yaml | 6 - .../down.yaml | 22 - .../up.yaml | 21 - .../down.yaml | 22 - .../up.yaml | 21 - .../down.yaml | 15 - .../up.yaml | 5 - .../down.yaml | 7 - .../up.yaml | 11 - .../down.yaml | 21 - .../up.yaml | 22 - .../down.yaml | 21 - .../up.yaml | 22 - .../down.yaml | 23 - .../up.yaml | 22 - .../down.yaml | 23 - .../up.yaml | 22 - .../down.yaml | 15 - .../up.yaml | 5 - .../down.yaml | 7 - .../up.yaml | 12 - .../down.yaml | 6 - .../up.yaml | 12 - .../down.yaml | 22 - .../up.yaml | 23 - .../down.yaml | 22 - .../up.yaml | 23 - .../1591974115375_run_sql_migration/down.yaml | 1 - .../1591974115375_run_sql_migration/up.yaml | 22 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 6 - .../up.yaml | 16 - .../down.yaml | 6 - .../up.yaml | 16 - .../down.yaml | 8 - .../up.yaml | 6 - .../down.yaml | 6 - .../up.yaml | 13 - .../down.yaml | 5 - .../up.yaml | 6 - .../down.yaml | 5 - .../up.yaml | 6 - .../down.yaml | 5 - .../up.yaml | 6 - .../1593523732824_squashed/down.sql | 173 + .../migrations/1593523732824_squashed/up.sql | 318 + .../migrations/metadata.yaml | 698 ++ kubernetes/polkassembly/values.yaml | 2 +- node-watcher/datamodel.prisma | 19 + node-watcher/package.json | 2 +- .../src/generated/prisma-client/index.ts | 807 ++ .../generated/prisma-client/prisma-schema.ts | 484 + node-watcher/src/tasks/createTip.ts | 160 + node-watcher/src/tasks/createTipStatus.ts | 148 + node-watcher/src/tasks/index.ts | 4 + node-watcher/src/tasks/types.ts | 23 +- node-watcher/src/util/statuses.ts | 7 + 802 files changed, 17547 insertions(+), 16148 deletions(-) create mode 100644 front-end/src/components/Listings/TipListing.tsx create mode 100644 front-end/src/components/Post/GovernanceSideBar/EndorseTip.tsx create mode 100644 front-end/src/components/Post/PostGovernanceInfo/PostTipInfo.tsx create mode 100644 front-end/src/screens/Home/LatestTips/index.tsx create mode 100644 front-end/src/screens/OnChain/Tips/index.tsx create mode 100644 front-end/src/screens/OnChain/Tips/query.ts create mode 100644 front-end/src/screens/TipPost/index.tsx create mode 100644 front-end/src/screens/TipPost/query.ts create mode 100644 front-end/src/screens/Tips/TipContainer/index.tsx create mode 100644 front-end/src/screens/Tips/TipContainer/query.ts create mode 100644 front-end/src/screens/Tips/index.tsx create mode 100644 hasura/hasura-migrations/metadata/actions.graphql create mode 100644 hasura/hasura-migrations/metadata/actions.yaml rename hasura/hasura-migrations/{migrations/1574246024580_run_sql_migration/down.yaml => metadata/allow_list.yaml} (100%) rename hasura/hasura-migrations/{migrations/1574691032527_remove_replies_count/down.yaml => metadata/cron_triggers.yaml} (100%) rename hasura/hasura-migrations/{migrations/1575741722527_run_sql_migration/down.yaml => metadata/functions.yaml} (100%) rename hasura/hasura-migrations/{migrations/1575912700926_run_sql_migration/down.yaml => metadata/query_collections.yaml} (100%) create mode 100644 hasura/hasura-migrations/metadata/remote_schemas.yaml create mode 100644 hasura/hasura-migrations/metadata/tables.yaml create mode 100644 hasura/hasura-migrations/metadata/version.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572604593716_add replies/up.sql delete mode 100644 hasura/hasura-migrations/migrations/1572604593716_add replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572604860695_add_relationship_replies_table_public_undefined/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572604860695_add_relationship_replies_table_public_undefined/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572604862431_add_relationship_post_table_public_undefined/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572604862431_add_relationship_post_table_public_undefined/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572604863208_add_relationship_user_table_public_undefined/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572604863208_add_relationship_user_table_public_undefined/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572604863959_add_relationship_replies_table_public_undefined/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572604863959_add_relationship_replies_table_public_undefined/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572604890771_rename_relationship_user_to_author_schema_public_table_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572604890771_rename_relationship_user_to_author_schema_public_table_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605655765_update_permission_anonymous_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605655765_update_permission_anonymous_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605677201_update_permission_anonymous_public_table_categories/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605677201_update_permission_anonymous_public_table_categories/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605691608_update_permission_user_public_table_categories/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605691608_update_permission_user_public_table_categories/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605712013_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605712013_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605771186_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605771186_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605840804_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605840804_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605858206_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605858206_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605878180_update_permission_anonymous_public_table_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605878180_update_permission_anonymous_public_table_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605884136_update_permission_user_public_table_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605884136_update_permission_user_public_table_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605999921_update_permission_user_public_table_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572605999921_update_permission_user_public_table_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572606038568_delete_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572606038568_delete_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572606044524_delete_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572606044524_delete_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572606074612_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572606074612_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572606082858_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1572606082858_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573657566632_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573657566632_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573657698665_update_permission_proposal_bot_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573657698665_update_permission_proposal_bot_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738463047_create_table_public_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738463047_create_table_public_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738491341_add_relationship__table_public_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738491341_add_relationship__table_public_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738500415_add_relationship__table_public_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738500415_add_relationship__table_public_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738538059_update_permission_proposal_bot_public_table_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738538059_update_permission_proposal_bot_public_table_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738549835_update_permission_anonymous_public_table_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738549835_update_permission_anonymous_public_table_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738558789_update_permission_proposal_bot_public_table_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738558789_update_permission_proposal_bot_public_table_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738567289_update_permission_user_public_table_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573738567289_update_permission_user_public_table_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573766172430_alter_table_public_posts_add_column_proposal_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573766172430_alter_table_public_posts_add_column_proposal_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573766216855_alter_table_public_posts_drop_column_proposal_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573766216855_alter_table_public_posts_drop_column_proposal_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573842176395_alter_table_public_proposals_alter_column_deposit/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1573842176395_alter_table_public_proposals_alter_column_deposit/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1574246024580_run_sql_migration/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1574691032527_remove_replies_count/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1574691139892_update_permission_anonymous_public_table_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1574691139892_update_permission_anonymous_public_table_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1574971921162_update_permission_user_public_table_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1574971921162_update_permission_user_public_table_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1574977595328_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1574977595328_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575300356679_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575300356679_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575366466304_update_permission_user_public_table_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575366466304_update_permission_user_public_table_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575643372009_update_permission_user_public_table_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575643372009_update_permission_user_public_table_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575741705711_drop_relationship_author_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575741705711_drop_relationship_author_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575741714852_drop_relationship_author_public_table_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575741714852_drop_relationship_author_public_table_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575741722527_run_sql_migration/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575797453493_create_remote_schema_auth/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575797453493_create_remote_schema_auth/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575797580584_table_posts_create_remote_relationship_author/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575797580584_table_posts_create_remote_relationship_author/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575798465420_table_replies_create_remote_relationship_author/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575798465420_table_replies_create_remote_relationship_author/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575798577360_update_permission_user_public_table_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575798577360_update_permission_user_public_table_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575798608233_delete_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575798608233_delete_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575798630195_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575798630195_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575912510783_rename_table_public_categories/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575912510783_rename_table_public_categories/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575912539353_rename_relationship_category_to_topic_schema_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575912539353_rename_relationship_category_to_topic_schema_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575912650379_alter_table_public_posts_alter_column_category_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575912650379_alter_table_public_posts_alter_column_category_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575912700926_run_sql_migration/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913261082_create_table_public_post_types/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913261082_create_table_public_post_types/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913307990_alter_table_public_posts_add_column_type_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913307990_alter_table_public_posts_add_column_type_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913387316_set_fk_public_posts_type_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913387316_set_fk_public_posts_type_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913421638_add_relationship__table_public_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913421638_add_relationship__table_public_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913449329_add_relationship__table_public_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913449329_add_relationship__table_public_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913476888_add_relationship__table_public_post_types/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913476888_add_relationship__table_public_post_types/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913702591_drop_relationship_post_type_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575913702591_drop_relationship_post_type_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575914829188_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575914829188_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575914846965_update_permission_anonymous_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575914846965_update_permission_anonymous_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575914883092_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575914883092_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575914898410_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575914898410_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575915049637_update_permission_proposal_bot_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575915049637_update_permission_proposal_bot_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575915155690_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575915155690_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575915295180_update_permission_user_public_table_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575915295180_update_permission_user_public_table_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575915685630_update_permission_user_public_table_post_types/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575915685630_update_permission_user_public_table_post_types/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575915698012_update_permission_anonymous_public_table_post_types/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575915698012_update_permission_anonymous_public_table_post_types/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575915705300_update_permission_anonymous_public_table_post_types/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1575915705300_update_permission_anonymous_public_table_post_types/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175206805_alter_table_public_posts_add_column_created_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175206805_alter_table_public_posts_add_column_created_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175211900_alter_table_public_posts_add_column_updated_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175211900_alter_table_public_posts_add_column_updated_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175378909_run_sql_migration/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175378909_run_sql_migration/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175389718_run_sql_migration/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175389718_run_sql_migration/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175479587_update_permission_anonymous_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175479587_update_permission_anonymous_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175495071_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175495071_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175553951_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175553951_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175644974_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175644974_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175806996_update_permission_user_public_table_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175806996_update_permission_user_public_table_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175875703_rename_table_public_topics/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576175875703_rename_table_public_topics/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445685035_run_sql_migration/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445685035_run_sql_migration/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445750797_alter_table_public_comments_alter_column_parent_message/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445750797_alter_table_public_comments_alter_column_parent_message/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445785072_alter_table_public_comments_add_column_post_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445785072_alter_table_public_comments_add_column_post_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445801628_alter_table_public_comments_add_column_author_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445801628_alter_table_public_comments_add_column_author_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445827650_alter_table_public_comments_add_column_created_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445827650_alter_table_public_comments_add_column_created_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445837494_alter_table_public_comments_add_column_updated_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445837494_alter_table_public_comments_add_column_updated_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445929863_table_comments_create_remote_relationship_author/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445929863_table_comments_create_remote_relationship_author/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445945464_add_relationship__table_public_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445945464_add_relationship__table_public_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445951080_add_relationship__table_public_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576445951080_add_relationship__table_public_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446003702_alter_table_public_comments_alter_column_parent_message/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446003702_alter_table_public_comments_alter_column_parent_message/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446058295_set_fk_public_comments_post_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446058295_set_fk_public_comments_post_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446069453_add_relationship__table_public_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446069453_add_relationship__table_public_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446094051_update_permission_anonymous_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446094051_update_permission_anonymous_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446133783_apply_same_permissions_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446133783_apply_same_permissions_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446145888_update_permission_anonymous_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446145888_update_permission_anonymous_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446153812_update_permission_user_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446153812_update_permission_user_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446514894_update_permission_user_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446514894_update_permission_user_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446558047_update_permission_user_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446558047_update_permission_user_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446652098_drop_relationship_replies_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446652098_drop_relationship_replies_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446656839_add_relationship__table_public_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446656839_add_relationship__table_public_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446665237_run_sql_migration/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446665237_run_sql_migration/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446679625_alter_table_public_comments_alter_column_parent_comment/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576446679625_alter_table_public_comments_alter_column_parent_comment/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576448067442_table_comments_drop_remote_relationship_author/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576448067442_table_comments_drop_remote_relationship_author/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576448077512_rename_table_public_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576448077512_rename_table_public_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576448105487_alter_table_public_replies_alter_column_parent_comment_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576448105487_alter_table_public_replies_alter_column_parent_comment_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576448183745_rename_table_public_replies/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576448183745_rename_table_public_replies/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576448202475_alter_table_public_comments_alter_column_parent_reply_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576448202475_alter_table_public_comments_alter_column_parent_reply_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576448237616_table_comments_create_remote_relationship_author/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576448237616_table_comments_create_remote_relationship_author/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576450672551_update_permission_anonymous_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576450672551_update_permission_anonymous_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576450680664_update_permission_user_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1576450680664_update_permission_user_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1577893820108_create_trigger_post_subscription/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1577893820108_create_trigger_post_subscription/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578931943968_create_table_public_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578931943968_create_table_public_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578931980873_set_fk_public_proposals_post_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578931980873_set_fk_public_proposals_post_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578931998683_add_relationship__table_public_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578931998683_add_relationship__table_public_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578932261667_rename_table_public_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578932261667_rename_table_public_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578932276990_create_remote_schema_chain-db/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578932276990_create_remote_schema_chain-db/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578999740424_alter_table_public_onchain_proposals_drop_column_chain_db_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578999740424_alter_table_public_onchain_proposals_drop_column_chain_db_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578999772469_alter_table_public_onchain_proposals_add_column_chain_db_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578999772469_alter_table_public_onchain_proposals_add_column_chain_db_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578999801505_table_onchain_proposals_create_remote_relationship_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1578999801505_table_onchain_proposals_create_remote_relationship_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579000780898_add_relationship__table_public_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579000780898_add_relationship__table_public_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579007443923_update_permission_proposal_bot_public_table_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579007443923_update_permission_proposal_bot_public_table_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579007459238_update_permission_user_public_table_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579007459238_update_permission_user_public_table_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579007466945_update_permission_user_public_table_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579007466945_update_permission_user_public_table_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579007499473_update_permission_anonymous_public_table_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579007499473_update_permission_anonymous_public_table_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579007533170_update_permission_proposal_bot_public_table_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579007533170_update_permission_proposal_bot_public_table_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009860363_alter_table_public_onchain_proposals_add_column_proposer_address/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009860363_alter_table_public_onchain_proposals_add_column_proposer_address/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009891474_update_permission_anonymous_public_table_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009891474_update_permission_anonymous_public_table_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009903222_apply_same_permissions_public_table_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009903222_apply_same_permissions_public_table_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009917927_update_permission_anonymous_public_table_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009917927_update_permission_anonymous_public_table_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009931648_apply_same_permissions_public_table_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009931648_apply_same_permissions_public_table_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009945935_update_permission_user_public_table_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009945935_update_permission_user_public_table_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009963620_apply_same_permissions_public_table_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009963620_apply_same_permissions_public_table_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009981229_update_permission_proposal_bot_public_table_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579009981229_update_permission_proposal_bot_public_table_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579021598518_table_onchain_proposals_drop_remote_relationship_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579021598518_table_onchain_proposals_drop_remote_relationship_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579021606920_alter_table_public_onchain_proposals_alter_column_chain_db_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579021606920_alter_table_public_onchain_proposals_alter_column_chain_db_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579021654138_table_onchain_proposals_create_remote_relationship_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579021654138_table_onchain_proposals_create_remote_relationship_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579022451785_apply_same_permissions_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579022451785_apply_same_permissions_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579022498117_update_permission_proposal_bot_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1579022498117_update_permission_proposal_bot_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580148698331_table_onchain_proposals_drop_remote_relationship_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580148698331_table_onchain_proposals_drop_remote_relationship_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580148716134_rename_table_public_onchain_proposals/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580148716134_rename_table_public_onchain_proposals/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580148790706_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580148790706_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149006511_alter_table_public_onchain_links_add_column_onchain_referendum_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149006511_alter_table_public_onchain_links_add_column_onchain_referendum_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149017783_alter_table_public_onchain_links_alter_column_onchain_proposal_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149017783_alter_table_public_onchain_links_alter_column_onchain_proposal_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149055449_update_permission_anonymous_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149055449_update_permission_anonymous_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149062208_update_permission_proposal_bot_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149062208_update_permission_proposal_bot_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149076860_update_permission_proposal_bot_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149076860_update_permission_proposal_bot_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149138051_update_permission_proposal_bot_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149138051_update_permission_proposal_bot_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149171516_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580149171516_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580167344799_rename_relationship_onchain_proposal_to_onchain_link_schema_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580167344799_rename_relationship_onchain_proposal_to_onchain_link_schema_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580235067478_update_permission_user_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580235067478_update_permission_user_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580235142132_alter_table_public_posts_alter_column_topic_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580235142132_alter_table_public_posts_alter_column_topic_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580236437839_alter_table_public_posts_alter_column_created_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580236437839_alter_table_public_posts_alter_column_created_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580236444981_alter_table_public_posts_alter_column_updated_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580236444981_alter_table_public_posts_alter_column_updated_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580286221713_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580286221713_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580740922837_update_permission_anonymous_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580740922837_update_permission_anonymous_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580740931101_update_permission_user_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580740931101_update_permission_user_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580897919204_update_permission_proposal_bot_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580897919204_update_permission_proposal_bot_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580901666299_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580901666299_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580901723761_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1580901723761_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529252179_alter_table_public_onchain_links_add_column_onchain_motion_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529252179_alter_table_public_onchain_links_add_column_onchain_motion_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529328961_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529328961_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529350797_update_permission_proposal_bot_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529350797_update_permission_proposal_bot_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529362839_update_permission_anonymous_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529362839_update_permission_anonymous_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529371808_update_permission_user_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529371808_update_permission_user_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529380814_update_permission_proposal_bot_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529380814_update_permission_proposal_bot_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529398610_update_permission_proposal_bot_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581529398610_update_permission_proposal_bot_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963155466_update_permission_user_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963155466_update_permission_user_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963163194_update_permission_anonymous_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963163194_update_permission_anonymous_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963179201_update_permission_user_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963179201_update_permission_user_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963205483_drop_relationship_comment_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963205483_drop_relationship_comment_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963279778_drop_relationship_comments_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963279778_drop_relationship_comments_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963288889_delete_fk_public_comments_comments_parent_message_fkey/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963288889_delete_fk_public_comments_comments_parent_message_fkey/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963300572_alter_table_public_comments_drop_column_parent_comment_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1581963300572_alter_table_public_comments_drop_column_parent_comment_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582534538758_delete_trigger_post_subscription/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582534538758_delete_trigger_post_subscription/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582534572909_create_trigger_comment_create/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582534572909_create_trigger_comment_create/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582547761965_create_trigger_onchain_link_create/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582547761965_create_trigger_onchain_link_create/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552076335_table_posts_drop_remote_relationship_author/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552076335_table_posts_drop_remote_relationship_author/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552087743_table_comments_drop_remote_relationship_author/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552087743_table_comments_drop_remote_relationship_author/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552105476_update_remote_schema_auth/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552105476_update_remote_schema_auth/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552134767_table_posts_create_remote_relationship_author/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552134767_table_posts_create_remote_relationship_author/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552151971_table_comments_create_remote_relationship_author/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552151971_table_comments_create_remote_relationship_author/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552229731_table_onchain_links_drop_remote_relationship_onchain_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552229731_table_onchain_links_drop_remote_relationship_onchain_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552237735_table_onchain_links_drop_remote_relationship_onchain_referendum/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552237735_table_onchain_links_drop_remote_relationship_onchain_referendum/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552248166_table_onchain_links_drop_remote_relationship_onchain_motion/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552248166_table_onchain_links_drop_remote_relationship_onchain_motion/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552281519_update_remote_schema_chain-db/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552281519_update_remote_schema_chain-db/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552468902_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552468902_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552496160_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552496160_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552517341_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582552517341_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582631584192_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582631584192_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582631619424_table_onchain_links_drop_remote_relationship_onchain_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582631619424_table_onchain_links_drop_remote_relationship_onchain_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582631659991_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582631659991_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582631766314_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582631766314_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582631823541_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582631823541_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582874306534_alter_table_public_onchain_links_add_column_onchain_treasury_proposal_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582874306534_alter_table_public_onchain_links_add_column_onchain_treasury_proposal_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582891815240_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1582891815240_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583160765774_update_permission_proposal_bot_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583160765774_update_permission_proposal_bot_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583160772808_update_permission_anonymous_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583160772808_update_permission_anonymous_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583160780222_update_permission_user_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583160780222_update_permission_user_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583160793903_update_permission_proposal_bot_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583160793903_update_permission_proposal_bot_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583160911479_update_permission_proposal_bot_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583160911479_update_permission_proposal_bot_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583174810003_update_permission_proposal_bot_public_table_onchain_links/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583174810003_update_permission_proposal_bot_public_table_onchain_links/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583261325406_alter_table_public_onchain_links_alter_column_onchain_treasury_proposal_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583261325406_alter_table_public_onchain_links_alter_column_onchain_treasury_proposal_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343381115_table_onchain_links_drop_remote_relationship_onchain_referendum/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343381115_table_onchain_links_drop_remote_relationship_onchain_referendum/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343385618_table_onchain_links_drop_remote_relationship_onchain_motion/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343385618_table_onchain_links_drop_remote_relationship_onchain_motion/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343390568_table_onchain_links_drop_remote_relationship_onchain_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343390568_table_onchain_links_drop_remote_relationship_onchain_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343434377_table_onchain_links_drop_remote_relationship_onchain_treasury_spend_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343434377_table_onchain_links_drop_remote_relationship_onchain_treasury_spend_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343458805_remove_remote_schema_chain-db/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343458805_remove_remote_schema_chain-db/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343552059_create_remote_schema_chain-db/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343552059_create_remote_schema_chain-db/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343614940_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343614940_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343651816_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343651816_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343703170_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343703170_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343780587_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583343780587_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583398528688_modify_tr_onchain_link_create_ops/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1583398528688_modify_tr_onchain_link_create_ops/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584428358108_create_table_public_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584428358108_create_table_public_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584429477420_create_table_public_post_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584429477420_create_table_public_post_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584429556118_table_post_reactions_create_remote_relationship_reactor/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584429556118_table_post_reactions_create_remote_relationship_reactor/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584430212995_create_table_public_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584430212995_create_table_public_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584430241194_table_comment_reactions_create_remote_relationship_reactor/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584430241194_table_comment_reactions_create_remote_relationship_reactor/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584430355283_update_permission_anonymous_public_table_post_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584430355283_update_permission_anonymous_public_table_post_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584430935514_update_permission_user_public_table_post_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584430935514_update_permission_user_public_table_post_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584430958467_update_permission_user_public_table_post_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584430958467_update_permission_user_public_table_post_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584431036619_apply_same_permissions_public_table_post_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584431036619_apply_same_permissions_public_table_post_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584431116589_update_permission_anonymous_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584431116589_update_permission_anonymous_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584431155471_update_permission_user_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584431155471_update_permission_user_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584431166239_update_permission_user_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584431166239_update_permission_user_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584431196039_apply_same_permissions_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584431196039_apply_same_permissions_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439444388_add_relationship__table_public_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439444388_add_relationship__table_public_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439484406_add_relationship__table_public_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439484406_add_relationship__table_public_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439635410_add_relationship__table_public_post_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439635410_add_relationship__table_public_post_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439640242_add_relationship__table_public_post_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439640242_add_relationship__table_public_post_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439647720_add_relationship__table_public_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439647720_add_relationship__table_public_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439650411_add_relationship__table_public_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439650411_add_relationship__table_public_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439741599_rename_relationship_post_reactions_to_reactions_schema_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439741599_rename_relationship_post_reactions_to_reactions_schema_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439752764_rename_relationship_comment_reactions_to_reactions_schema_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584439752764_rename_relationship_comment_reactions_to_reactions_schema_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584446493586_rename_relationship_reactions_to_post_reactions_schema_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584446493586_rename_relationship_reactions_to_post_reactions_schema_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584446531681_rename_relationship_reactions_to_comment_reactions_schema_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584446531681_rename_relationship_reactions_to_comment_reactions_schema_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584533428256_update_permission_anonymous_public_table_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584533428256_update_permission_anonymous_public_table_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584533441059_update_permission_user_public_table_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584533441059_update_permission_user_public_table_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584616062898_create_relationship_reactions_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584616062898_create_relationship_reactions_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584616073168_create_relationship_reactions_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584616073168_create_relationship_reactions_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584704715110_table_comment_reactions_drop_remote_relationship_reactor/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584704715110_table_comment_reactions_drop_remote_relationship_reactor/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584704749958_table_comment_reactions_create_remote_relationship_reacting_user/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584704749958_table_comment_reactions_create_remote_relationship_reacting_user/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584704765149_table_post_reactions_drop_remote_relationship_reactor/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584704765149_table_post_reactions_drop_remote_relationship_reactor/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584704783342_table_post_reactions_create_remote_relationship_reacting_user/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1584704783342_table_post_reactions_create_remote_relationship_reacting_user/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070080311_drop_relationship_reactions_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070080311_drop_relationship_reactions_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070102064_drop_relationship_reactions_public_table_comments/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070102064_drop_relationship_reactions_public_table_comments/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070136784_drop_relationship_reaction_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070136784_drop_relationship_reaction_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070151364_drop_relationship_reaction_public_table_post_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070151364_drop_relationship_reaction_public_table_post_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070246777_delete_fk_public_post_reactions_post_reactions_reaction_id_fkey/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070246777_delete_fk_public_post_reactions_post_reactions_reaction_id_fkey/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070262777_delete_fk_public_comment_reactions_comment_reactions_reaction_id_fkey/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070262777_delete_fk_public_comment_reactions_comment_reactions_reaction_id_fkey/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070285557_drop_table_public_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070285557_drop_table_public_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070357441_alter_table_public_comment_reactions_add_column_reaction/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070357441_alter_table_public_comment_reactions_add_column_reaction/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070432177_alter_table_public_comment_reactions_alter_column_reaction/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070432177_alter_table_public_comment_reactions_alter_column_reaction/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070455396_alter_table_public_post_reactions_add_column_reaction/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070455396_alter_table_public_post_reactions_add_column_reaction/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070686316_update_permission_anonymous_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070686316_update_permission_anonymous_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070699776_update_permission_user_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070699776_update_permission_user_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070708485_update_permission_user_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070708485_update_permission_user_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070717846_update_permission_user_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070717846_update_permission_user_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070735275_alter_table_public_comment_reactions_drop_column_reaction_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070735275_alter_table_public_comment_reactions_drop_column_reaction_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070771245_update_permission_anonymous_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070771245_update_permission_anonymous_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070780477_update_permission_user_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070780477_update_permission_user_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070785504_update_permission_user_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070785504_update_permission_user_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070789506_update_permission_user_public_table_comment_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070789506_update_permission_user_public_table_comment_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070817204_update_permission_anonymous_public_table_post_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070817204_update_permission_anonymous_public_table_post_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070825735_update_permission_user_public_table_post_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070825735_update_permission_user_public_table_post_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070834731_update_permission_user_public_table_post_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070834731_update_permission_user_public_table_post_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070948440_update_permission_user_public_table_post_reactions/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070948440_update_permission_user_public_table_post_reactions/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070990800_alter_table_public_post_reactions_drop_column_reaction_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585070990800_alter_table_public_post_reactions_drop_column_reaction_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585072400445_alter_table_public_post_reactions_alter_column_reaction/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585072400445_alter_table_public_post_reactions_alter_column_reaction/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585072413124_alter_table_public_comment_reactions_alter_column_reaction/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1585072413124_alter_table_public_comment_reactions_alter_column_reaction/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1587052949446_alter_table_public_posts_alter_column_title/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1587052949446_alter_table_public_posts_alter_column_title/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713322733_create_table_public_post_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713322733_create_table_public_post_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713356426_add_relationship__table_public_post_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713356426_add_relationship__table_public_post_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713396627_table_post_votes_create_remote_relationship_voter/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713396627_table_post_votes_create_remote_relationship_voter/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713424209_add_relationship__table_public_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713424209_add_relationship__table_public_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713763447_update_permission_anonymous_public_table_post_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713763447_update_permission_anonymous_public_table_post_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713783663_update_permission_user_public_table_post_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713783663_update_permission_user_public_table_post_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713825290_update_permission_user_public_table_post_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713825290_update_permission_user_public_table_post_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713857773_apply_same_permissions_public_table_post_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1589713857773_apply_same_permissions_public_table_post_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590394794357_alter_table_public_posts_add_column_has_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590394794357_alter_table_public_posts_add_column_has_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590398012080_update_permission_anonymous_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590398012080_update_permission_anonymous_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590398036930_update_permission_proposal_bot_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590398036930_update_permission_proposal_bot_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590398042712_update_permission_proposal_bot_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590398042712_update_permission_proposal_bot_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590398048601_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590398048601_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590398053786_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590398053786_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590551879644_alter_table_public_posts_add_column_block_number/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590551879644_alter_table_public_posts_add_column_block_number/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590551903082_update_permission_anonymous_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590551903082_update_permission_anonymous_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590551914387_update_permission_proposal_bot_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590551914387_update_permission_proposal_bot_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590551918775_update_permission_proposal_bot_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590551918775_update_permission_proposal_bot_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590551931219_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590551931219_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590551936342_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590551936342_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590576328516_run_sql_migration/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590576328516_run_sql_migration/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590576353167_alter_table_public_post_votes_add_column_updated_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590576353167_alter_table_public_post_votes_add_column_updated_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590576386997_update_permission_user_public_table_post_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590576386997_update_permission_user_public_table_post_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590576430409_update_permission_anonymous_public_table_post_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1590576430409_update_permission_anonymous_public_table_post_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591588689454_alter_table_public_posts_alter_column_block_number/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591588689454_alter_table_public_posts_alter_column_block_number/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591691644022_create_table_public_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591691644022_create_table_public_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591691691193_alter_table_public_posts_add_column_poll_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591691691193_alter_table_public_posts_add_column_poll_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591691714640_set_fk_public_posts_poll_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591691714640_set_fk_public_posts_poll_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591691750165_add_relationship__table_public_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591691750165_add_relationship__table_public_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692079949_create_table_public_poll_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692079949_create_table_public_poll_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692108483_add_relationship__table_public_poll_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692108483_add_relationship__table_public_poll_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692145733_table_poll_votes_create_remote_relationship_voter/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692145733_table_poll_votes_create_remote_relationship_voter/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692234831_add_relationship__table_public_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692234831_add_relationship__table_public_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692243735_add_relationship__table_public_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692243735_add_relationship__table_public_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692261923_drop_relationship_post_votes_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692261923_drop_relationship_post_votes_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692369110_alter_table_public_poll_add_column_created_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692369110_alter_table_public_poll_add_column_created_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692383595_alter_table_public_poll_add_column_updated_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692383595_alter_table_public_poll_add_column_updated_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692413798_update_permission_anonymous_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692413798_update_permission_anonymous_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692844048_apply_same_permissions_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692844048_apply_same_permissions_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692878220_update_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692878220_update_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692915618_apply_same_permissions_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692915618_apply_same_permissions_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692960440_update_permission_anonymous_public_table_poll_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692960440_update_permission_anonymous_public_table_poll_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692994943_update_permission_user_public_table_poll_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591692994943_update_permission_user_public_table_poll_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693013352_apply_same_permissions_public_table_poll_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693013352_apply_same_permissions_public_table_poll_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693032342_update_permission_user_public_table_poll_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693032342_update_permission_user_public_table_poll_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693127056_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693127056_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693135655_update_permission_user_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693135655_update_permission_user_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693143030_update_permission_proposal_bot_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693143030_update_permission_proposal_bot_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693151518_update_permission_proposal_bot_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693151518_update_permission_proposal_bot_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693193633_update_permission_anonymous_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693193633_update_permission_anonymous_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693205543_alter_table_public_posts_drop_column_has_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693205543_alter_table_public_posts_drop_column_has_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693227470_alter_table_public_posts_drop_column_poll_block_number_end/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591693227470_alter_table_public_posts_drop_column_poll_block_number_end/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591694916750_drop_table_public_post_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591694916750_drop_table_public_post_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591710822941_alter_table_public_poll_add_column_post_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591710822941_alter_table_public_poll_add_column_post_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591710846626_set_fk_public_poll_post_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591710846626_set_fk_public_poll_post_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591710865995_add_relationship__table_public_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591710865995_add_relationship__table_public_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591710875868_drop_relationship_poll_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591710875868_drop_relationship_poll_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711198482_add_relationship__table_public_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711198482_add_relationship__table_public_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711295651_delete_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711295651_delete_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711298802_delete_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711298802_delete_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711301778_delete_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711301778_delete_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711304546_delete_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711304546_delete_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711349916_drop_relationship_posts_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711349916_drop_relationship_posts_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711415750_update_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711415750_update_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711424931_update_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711424931_update_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711440804_update_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711440804_update_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711449429_update_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711449429_update_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711486018_drop_relationship_poll_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711486018_drop_relationship_poll_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711496030_alter_table_public_posts_drop_column_poll_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591711496030_alter_table_public_posts_drop_column_poll_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591714881453_update_permission_anonymous_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591714881453_update_permission_anonymous_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591783921171_update_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591783921171_update_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591783928515_delete_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591783928515_delete_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784156111_update_permission_anonymous_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784156111_update_permission_anonymous_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784203328_update_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784203328_update_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784218585_alter_table_public_poll_drop_column_updated_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784218585_alter_table_public_poll_drop_column_updated_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784231257_alter_table_public_poll_add_column_updated_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784231257_alter_table_public_poll_add_column_updated_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784238235_update_permission_anonymous_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784238235_update_permission_anonymous_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784245879_update_permission_user_public_table_poll/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784245879_update_permission_user_public_table_poll/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784265460_update_permission_anonymous_public_table_poll_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784265460_update_permission_anonymous_public_table_poll_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784271440_update_permission_user_public_table_poll_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784271440_update_permission_user_public_table_poll_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784279283_alter_table_public_poll_votes_drop_column_updated_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784279283_alter_table_public_poll_votes_drop_column_updated_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784288149_alter_table_public_poll_votes_add_column_updated_at/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784288149_alter_table_public_poll_votes_add_column_updated_at/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784367682_add_relationship__table_public_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591784367682_add_relationship__table_public_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591787142733_update_permission_anonymous_public_table_poll_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591787142733_update_permission_anonymous_public_table_poll_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591787147722_update_permission_user_public_table_poll_votes/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591787147722_update_permission_user_public_table_poll_votes/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591974115375_run_sql_migration/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591974115375_run_sql_migration/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591974154804_create_relationship_post_public_table_post_last_update/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591974154804_create_relationship_post_public_table_post_last_update/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591974175368_update_permission_anonymous_public_table_post_last_update/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591974175368_update_permission_anonymous_public_table_post_last_update/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591974197981_update_permission_user_public_table_post_last_update/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1591974197981_update_permission_user_public_table_post_last_update/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1592305332830_drop_relationship_post_public_table_post_last_update/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1592305332830_drop_relationship_post_public_table_post_last_update/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1592305755095_create_relationship_last_update_public_table_posts/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1592305755095_create_relationship_last_update_public_table_posts/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1592400318046_alter_table_public_poll_votes_add_unique_poll_id_user_id/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1592400318046_alter_table_public_poll_votes_add_unique_poll_id_user_id/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1592400359607_alter_table_public_comment_reactions_add_unique_comment_id_user_id_reaction/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1592400359607_alter_table_public_comment_reactions_add_unique_comment_id_user_id_reaction/up.yaml delete mode 100644 hasura/hasura-migrations/migrations/1592400398659_alter_table_public_post_reactions_add_unique_post_id_user_id_reaction/down.yaml delete mode 100644 hasura/hasura-migrations/migrations/1592400398659_alter_table_public_post_reactions_add_unique_post_id_user_id_reaction/up.yaml create mode 100644 hasura/hasura-migrations/migrations/1593523732824_squashed/down.sql create mode 100644 hasura/hasura-migrations/migrations/1593523732824_squashed/up.sql create mode 100644 hasura/hasura-migrations/migrations/metadata.yaml create mode 100644 node-watcher/src/tasks/createTip.ts create mode 100644 node-watcher/src/tasks/createTipStatus.ts diff --git a/auth-server/src/types.ts b/auth-server/src/types.ts index 94d2470ef..79d8f91dd 100644 --- a/auth-server/src/types.ts +++ b/auth-server/src/types.ts @@ -129,6 +129,7 @@ export interface OnchainLinkType { onchain_motion_id?: number; onchain_proposal_id?: number; onchain_referendum_id?: number; + onchain_tip_id?: number; onchain_treasury_proposal_id?: number; } @@ -238,6 +239,7 @@ export interface VerifyEmailArgs { export enum PostTypeEnum { POST = 'post', PROPOSAL = 'proposal', + TIP = 'tip', TREASURY = 'treasury', MOTION = 'motion', REFERENDUM = 'referendum', diff --git a/auth-server/src/utils/getPostId.ts b/auth-server/src/utils/getPostId.ts index 369930a20..52a23790d 100644 --- a/auth-server/src/utils/getPostId.ts +++ b/auth-server/src/utils/getPostId.ts @@ -13,6 +13,7 @@ export default (type: PostType, onchainLink: OnchainLinkType): number => { onchain_motion_id, onchain_proposal_id, onchain_referendum_id, + onchain_tip_id, onchain_treasury_proposal_id } = onchainLink; @@ -31,6 +32,9 @@ export default (type: PostType, onchainLink: OnchainLinkType): number => { case PostTypeEnum.REFERENDUM: id = onchain_referendum_id; break; + case PostTypeEnum.TIP: + id = onchain_tip_id; + break; default: break; } diff --git a/auth-server/src/utils/getPostType.ts b/auth-server/src/utils/getPostType.ts index a919724b0..88afc3437 100644 --- a/auth-server/src/utils/getPostType.ts +++ b/auth-server/src/utils/getPostType.ts @@ -12,11 +12,16 @@ export default (onchainLink: OnchainLinkType): PostType => { onchain_motion_id, onchain_proposal_id, onchain_referendum_id, + onchain_tip_id, onchain_treasury_proposal_id } = onchainLink; let type = PostTypeEnum.POST; + if (onchain_tip_id === 0 || onchain_tip_id) { + type = PostTypeEnum.TIP; + } + if (onchain_proposal_id === 0 || onchain_proposal_id) { type = PostTypeEnum.PROPOSAL; } diff --git a/chain-db-open-server/prisma/datamodel.prisma b/chain-db-open-server/prisma/datamodel.prisma index ca653ef15..b5b0bbbd7 100644 --- a/chain-db-open-server/prisma/datamodel.prisma +++ b/chain-db-open-server/prisma/datamodel.prisma @@ -215,3 +215,22 @@ type TreasuryStatus { status: String! uniqueStatus: String! @unique } + +type Tip { + id: Int! @id(strategy: SEQUENCE) @sequence(name: "TIP_SEQUENCE" initialValue:1 allocationSize:1) + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int + tipStatus: [TipStatus]! @relation(name: "TipStatusFromTip") +} + +type TipStatus { + id: ID! @id + blockNumber: BlockNumber! @relation(name: "TipStatusAtBlockNumber", link: INLINE) + tip: Tip! @relation(name: "TipStatusFromTip", link: INLINE) + status: String! + uniqueStatus: String! @unique +} diff --git a/chain-db-open-server/src/generated/prisma-client/index.ts b/chain-db-open-server/src/generated/prisma-client/index.ts index eb3acfe4f..d176cb9c5 100644 --- a/chain-db-open-server/src/generated/prisma-client/index.ts +++ b/chain-db-open-server/src/generated/prisma-client/index.ts @@ -40,6 +40,8 @@ export interface Exists { session: (where?: SessionWhereInput) => Promise; slashing: (where?: SlashingWhereInput) => Promise; stake: (where?: StakeWhereInput) => Promise; + tip: (where?: TipWhereInput) => Promise; + tipStatus: (where?: TipStatusWhereInput) => Promise; totalIssuance: (where?: TotalIssuanceWhereInput) => Promise; treasurySpendProposal: ( where?: TreasurySpendProposalWhereInput @@ -503,6 +505,44 @@ export interface Prisma { first?: Int; last?: Int; }) => StakeConnectionPromise; + tip: (where: TipWhereUniqueInput) => TipNullablePromise; + tips: (args?: { + where?: TipWhereInput; + orderBy?: TipOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => FragmentableArray; + tipsConnection: (args?: { + where?: TipWhereInput; + orderBy?: TipOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => TipConnectionPromise; + tipStatus: (where: TipStatusWhereUniqueInput) => TipStatusNullablePromise; + tipStatuses: (args?: { + where?: TipStatusWhereInput; + orderBy?: TipStatusOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => FragmentableArray; + tipStatusesConnection: (args?: { + where?: TipStatusWhereInput; + orderBy?: TipStatusOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => TipStatusConnectionPromise; totalIssuance: ( where: TotalIssuanceWhereUniqueInput ) => TotalIssuanceNullablePromise; @@ -985,6 +1025,38 @@ export interface Prisma { }) => StakePromise; deleteStake: (where: StakeWhereUniqueInput) => StakePromise; deleteManyStakes: (where?: StakeWhereInput) => BatchPayloadPromise; + createTip: (data: TipCreateInput) => TipPromise; + updateTip: (args: { + data: TipUpdateInput; + where: TipWhereUniqueInput; + }) => TipPromise; + updateManyTips: (args: { + data: TipUpdateManyMutationInput; + where?: TipWhereInput; + }) => BatchPayloadPromise; + upsertTip: (args: { + where: TipWhereUniqueInput; + create: TipCreateInput; + update: TipUpdateInput; + }) => TipPromise; + deleteTip: (where: TipWhereUniqueInput) => TipPromise; + deleteManyTips: (where?: TipWhereInput) => BatchPayloadPromise; + createTipStatus: (data: TipStatusCreateInput) => TipStatusPromise; + updateTipStatus: (args: { + data: TipStatusUpdateInput; + where: TipStatusWhereUniqueInput; + }) => TipStatusPromise; + updateManyTipStatuses: (args: { + data: TipStatusUpdateManyMutationInput; + where?: TipStatusWhereInput; + }) => BatchPayloadPromise; + upsertTipStatus: (args: { + where: TipStatusWhereUniqueInput; + create: TipStatusCreateInput; + update: TipStatusUpdateInput; + }) => TipStatusPromise; + deleteTipStatus: (where: TipStatusWhereUniqueInput) => TipStatusPromise; + deleteManyTipStatuses: (where?: TipStatusWhereInput) => BatchPayloadPromise; createTotalIssuance: (data: TotalIssuanceCreateInput) => TotalIssuancePromise; updateTotalIssuance: (args: { data: TotalIssuanceUpdateInput; @@ -1140,6 +1212,12 @@ export interface Subscription { stake: ( where?: StakeSubscriptionWhereInput ) => StakeSubscriptionPayloadSubscription; + tip: ( + where?: TipSubscriptionWhereInput + ) => TipSubscriptionPayloadSubscription; + tipStatus: ( + where?: TipStatusSubscriptionWhereInput + ) => TipStatusSubscriptionPayloadSubscription; totalIssuance: ( where?: TotalIssuanceSubscriptionWhereInput ) => TotalIssuanceSubscriptionPayloadSubscription; @@ -1374,6 +1452,30 @@ export type StakeOrderByInput = | "totalStake_ASC" | "totalStake_DESC"; +export type TipStatusOrderByInput = + | "id_ASC" + | "id_DESC" + | "status_ASC" + | "status_DESC" + | "uniqueStatus_ASC" + | "uniqueStatus_DESC"; + +export type TipOrderByInput = + | "id_ASC" + | "id_DESC" + | "hash_ASC" + | "hash_DESC" + | "reason_ASC" + | "reason_DESC" + | "who_ASC" + | "who_DESC" + | "finder_ASC" + | "finder_DESC" + | "finderFee_ASC" + | "finderFee_DESC" + | "closes_ASC" + | "closes_DESC"; + export type TotalIssuanceOrderByInput = | "id_ASC" | "id_DESC" @@ -2878,6 +2980,160 @@ export interface StakeWhereInput { NOT?: Maybe; } +export type TipWhereUniqueInput = AtLeastOne<{ + id: Maybe; +}>; + +export interface TipStatusWhereInput { + id?: Maybe; + id_not?: Maybe; + id_in?: Maybe; + id_not_in?: Maybe; + id_lt?: Maybe; + id_lte?: Maybe; + id_gt?: Maybe; + id_gte?: Maybe; + id_contains?: Maybe; + id_not_contains?: Maybe; + id_starts_with?: Maybe; + id_not_starts_with?: Maybe; + id_ends_with?: Maybe; + id_not_ends_with?: Maybe; + blockNumber?: Maybe; + tip?: Maybe; + status?: Maybe; + status_not?: Maybe; + status_in?: Maybe; + status_not_in?: Maybe; + status_lt?: Maybe; + status_lte?: Maybe; + status_gt?: Maybe; + status_gte?: Maybe; + status_contains?: Maybe; + status_not_contains?: Maybe; + status_starts_with?: Maybe; + status_not_starts_with?: Maybe; + status_ends_with?: Maybe; + status_not_ends_with?: Maybe; + uniqueStatus?: Maybe; + uniqueStatus_not?: Maybe; + uniqueStatus_in?: Maybe; + uniqueStatus_not_in?: Maybe; + uniqueStatus_lt?: Maybe; + uniqueStatus_lte?: Maybe; + uniqueStatus_gt?: Maybe; + uniqueStatus_gte?: Maybe; + uniqueStatus_contains?: Maybe; + uniqueStatus_not_contains?: Maybe; + uniqueStatus_starts_with?: Maybe; + uniqueStatus_not_starts_with?: Maybe; + uniqueStatus_ends_with?: Maybe; + uniqueStatus_not_ends_with?: Maybe; + AND?: Maybe; + OR?: Maybe; + NOT?: Maybe; +} + +export interface TipWhereInput { + id?: Maybe; + id_not?: Maybe; + id_in?: Maybe; + id_not_in?: Maybe; + id_lt?: Maybe; + id_lte?: Maybe; + id_gt?: Maybe; + id_gte?: Maybe; + hash?: Maybe; + hash_not?: Maybe; + hash_in?: Maybe; + hash_not_in?: Maybe; + hash_lt?: Maybe; + hash_lte?: Maybe; + hash_gt?: Maybe; + hash_gte?: Maybe; + hash_contains?: Maybe; + hash_not_contains?: Maybe; + hash_starts_with?: Maybe; + hash_not_starts_with?: Maybe; + hash_ends_with?: Maybe; + hash_not_ends_with?: Maybe; + reason?: Maybe; + reason_not?: Maybe; + reason_in?: Maybe; + reason_not_in?: Maybe; + reason_lt?: Maybe; + reason_lte?: Maybe; + reason_gt?: Maybe; + reason_gte?: Maybe; + reason_contains?: Maybe; + reason_not_contains?: Maybe; + reason_starts_with?: Maybe; + reason_not_starts_with?: Maybe; + reason_ends_with?: Maybe; + reason_not_ends_with?: Maybe; + who?: Maybe; + who_not?: Maybe; + who_in?: Maybe; + who_not_in?: Maybe; + who_lt?: Maybe; + who_lte?: Maybe; + who_gt?: Maybe; + who_gte?: Maybe; + who_contains?: Maybe; + who_not_contains?: Maybe; + who_starts_with?: Maybe; + who_not_starts_with?: Maybe; + who_ends_with?: Maybe; + who_not_ends_with?: Maybe; + finder?: Maybe; + finder_not?: Maybe; + finder_in?: Maybe; + finder_not_in?: Maybe; + finder_lt?: Maybe; + finder_lte?: Maybe; + finder_gt?: Maybe; + finder_gte?: Maybe; + finder_contains?: Maybe; + finder_not_contains?: Maybe; + finder_starts_with?: Maybe; + finder_not_starts_with?: Maybe; + finder_ends_with?: Maybe; + finder_not_ends_with?: Maybe; + finderFee?: Maybe; + finderFee_not?: Maybe; + finderFee_in?: Maybe; + finderFee_not_in?: Maybe; + finderFee_lt?: Maybe; + finderFee_lte?: Maybe; + finderFee_gt?: Maybe; + finderFee_gte?: Maybe; + finderFee_contains?: Maybe; + finderFee_not_contains?: Maybe; + finderFee_starts_with?: Maybe; + finderFee_not_starts_with?: Maybe; + finderFee_ends_with?: Maybe; + finderFee_not_ends_with?: Maybe; + closes?: Maybe; + closes_not?: Maybe; + closes_in?: Maybe; + closes_not_in?: Maybe; + closes_lt?: Maybe; + closes_lte?: Maybe; + closes_gt?: Maybe; + closes_gte?: Maybe; + tipStatus_every?: Maybe; + tipStatus_some?: Maybe; + tipStatus_none?: Maybe; + AND?: Maybe; + OR?: Maybe; + NOT?: Maybe; +} + +export type TipStatusWhereUniqueInput = AtLeastOne<{ + id: Maybe; + uniqueStatus?: Maybe; +}>; + export type TotalIssuanceWhereUniqueInput = AtLeastOne<{ id: Maybe; }>; @@ -5162,6 +5418,202 @@ export interface StakeUpdateManyMutationInput { totalStake?: Maybe; } +export interface TipCreateInput { + hash: String; + reason: String; + who: String; + finder?: Maybe; + finderFee?: Maybe; + closes?: Maybe; + tipStatus?: Maybe; +} + +export interface TipStatusCreateManyWithoutTipInput { + create?: Maybe< + TipStatusCreateWithoutTipInput[] | TipStatusCreateWithoutTipInput + >; + connect?: Maybe; +} + +export interface TipStatusCreateWithoutTipInput { + id?: Maybe; + blockNumber: BlockNumberCreateOneInput; + status: String; + uniqueStatus: String; +} + +export interface TipUpdateInput { + hash?: Maybe; + reason?: Maybe; + who?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + closes?: Maybe; + tipStatus?: Maybe; +} + +export interface TipStatusUpdateManyWithoutTipInput { + create?: Maybe< + TipStatusCreateWithoutTipInput[] | TipStatusCreateWithoutTipInput + >; + delete?: Maybe; + connect?: Maybe; + set?: Maybe; + disconnect?: Maybe; + update?: Maybe< + | TipStatusUpdateWithWhereUniqueWithoutTipInput[] + | TipStatusUpdateWithWhereUniqueWithoutTipInput + >; + upsert?: Maybe< + | TipStatusUpsertWithWhereUniqueWithoutTipInput[] + | TipStatusUpsertWithWhereUniqueWithoutTipInput + >; + deleteMany?: Maybe; + updateMany?: Maybe< + | TipStatusUpdateManyWithWhereNestedInput[] + | TipStatusUpdateManyWithWhereNestedInput + >; +} + +export interface TipStatusUpdateWithWhereUniqueWithoutTipInput { + where: TipStatusWhereUniqueInput; + data: TipStatusUpdateWithoutTipDataInput; +} + +export interface TipStatusUpdateWithoutTipDataInput { + blockNumber?: Maybe; + status?: Maybe; + uniqueStatus?: Maybe; +} + +export interface TipStatusUpsertWithWhereUniqueWithoutTipInput { + where: TipStatusWhereUniqueInput; + update: TipStatusUpdateWithoutTipDataInput; + create: TipStatusCreateWithoutTipInput; +} + +export interface TipStatusScalarWhereInput { + id?: Maybe; + id_not?: Maybe; + id_in?: Maybe; + id_not_in?: Maybe; + id_lt?: Maybe; + id_lte?: Maybe; + id_gt?: Maybe; + id_gte?: Maybe; + id_contains?: Maybe; + id_not_contains?: Maybe; + id_starts_with?: Maybe; + id_not_starts_with?: Maybe; + id_ends_with?: Maybe; + id_not_ends_with?: Maybe; + status?: Maybe; + status_not?: Maybe; + status_in?: Maybe; + status_not_in?: Maybe; + status_lt?: Maybe; + status_lte?: Maybe; + status_gt?: Maybe; + status_gte?: Maybe; + status_contains?: Maybe; + status_not_contains?: Maybe; + status_starts_with?: Maybe; + status_not_starts_with?: Maybe; + status_ends_with?: Maybe; + status_not_ends_with?: Maybe; + uniqueStatus?: Maybe; + uniqueStatus_not?: Maybe; + uniqueStatus_in?: Maybe; + uniqueStatus_not_in?: Maybe; + uniqueStatus_lt?: Maybe; + uniqueStatus_lte?: Maybe; + uniqueStatus_gt?: Maybe; + uniqueStatus_gte?: Maybe; + uniqueStatus_contains?: Maybe; + uniqueStatus_not_contains?: Maybe; + uniqueStatus_starts_with?: Maybe; + uniqueStatus_not_starts_with?: Maybe; + uniqueStatus_ends_with?: Maybe; + uniqueStatus_not_ends_with?: Maybe; + AND?: Maybe; + OR?: Maybe; + NOT?: Maybe; +} + +export interface TipStatusUpdateManyWithWhereNestedInput { + where: TipStatusScalarWhereInput; + data: TipStatusUpdateManyDataInput; +} + +export interface TipStatusUpdateManyDataInput { + status?: Maybe; + uniqueStatus?: Maybe; +} + +export interface TipUpdateManyMutationInput { + hash?: Maybe; + reason?: Maybe; + who?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + closes?: Maybe; +} + +export interface TipStatusCreateInput { + id?: Maybe; + blockNumber: BlockNumberCreateOneInput; + tip: TipCreateOneWithoutTipStatusInput; + status: String; + uniqueStatus: String; +} + +export interface TipCreateOneWithoutTipStatusInput { + create?: Maybe; + connect?: Maybe; +} + +export interface TipCreateWithoutTipStatusInput { + hash: String; + reason: String; + who: String; + finder?: Maybe; + finderFee?: Maybe; + closes?: Maybe; +} + +export interface TipStatusUpdateInput { + blockNumber?: Maybe; + tip?: Maybe; + status?: Maybe; + uniqueStatus?: Maybe; +} + +export interface TipUpdateOneRequiredWithoutTipStatusInput { + create?: Maybe; + update?: Maybe; + upsert?: Maybe; + connect?: Maybe; +} + +export interface TipUpdateWithoutTipStatusDataInput { + hash?: Maybe; + reason?: Maybe; + who?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + closes?: Maybe; +} + +export interface TipUpsertWithoutTipStatusInput { + update: TipUpdateWithoutTipStatusDataInput; + create: TipCreateWithoutTipStatusInput; +} + +export interface TipStatusUpdateManyMutationInput { + status?: Maybe; + uniqueStatus?: Maybe; +} + export interface TotalIssuanceCreateInput { id?: Maybe; blockNumber: BlockNumberCreateOneInput; @@ -5688,6 +6140,34 @@ export interface StakeSubscriptionWhereInput { NOT?: Maybe; } +export interface TipSubscriptionWhereInput { + mutation_in?: Maybe; + updatedFields_contains?: Maybe; + updatedFields_contains_every?: Maybe; + updatedFields_contains_some?: Maybe; + node?: Maybe; + AND?: Maybe; + OR?: Maybe; + NOT?: Maybe; +} + +export interface TipStatusSubscriptionWhereInput { + mutation_in?: Maybe; + updatedFields_contains?: Maybe; + updatedFields_contains_every?: Maybe; + updatedFields_contains_some?: Maybe; + node?: Maybe; + AND?: Maybe< + TipStatusSubscriptionWhereInput[] | TipStatusSubscriptionWhereInput + >; + OR?: Maybe< + TipStatusSubscriptionWhereInput[] | TipStatusSubscriptionWhereInput + >; + NOT?: Maybe< + TipStatusSubscriptionWhereInput[] | TipStatusSubscriptionWhereInput + >; +} + export interface TotalIssuanceSubscriptionWhereInput { mutation_in?: Maybe; updatedFields_contains?: Maybe; @@ -8130,6 +8610,219 @@ export interface AggregateStakeSubscription count: () => Promise>; } +export interface Tip { + id: Int; + hash: String; + reason: String; + who: String; + finder?: String; + finderFee?: String; + closes?: Int; +} + +export interface TipPromise extends Promise, Fragmentable { + id: () => Promise; + hash: () => Promise; + reason: () => Promise; + who: () => Promise; + finder: () => Promise; + finderFee: () => Promise; + closes: () => Promise; + tipStatus: >(args?: { + where?: TipStatusWhereInput; + orderBy?: TipStatusOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => T; +} + +export interface TipSubscription + extends Promise>, + Fragmentable { + id: () => Promise>; + hash: () => Promise>; + reason: () => Promise>; + who: () => Promise>; + finder: () => Promise>; + finderFee: () => Promise>; + closes: () => Promise>; + tipStatus: >>(args?: { + where?: TipStatusWhereInput; + orderBy?: TipStatusOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => T; +} + +export interface TipNullablePromise extends Promise, Fragmentable { + id: () => Promise; + hash: () => Promise; + reason: () => Promise; + who: () => Promise; + finder: () => Promise; + finderFee: () => Promise; + closes: () => Promise; + tipStatus: >(args?: { + where?: TipStatusWhereInput; + orderBy?: TipStatusOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => T; +} + +export interface TipStatus { + id: ID_Output; + status: String; + uniqueStatus: String; +} + +export interface TipStatusPromise extends Promise, Fragmentable { + id: () => Promise; + blockNumber: () => T; + tip: () => T; + status: () => Promise; + uniqueStatus: () => Promise; +} + +export interface TipStatusSubscription + extends Promise>, + Fragmentable { + id: () => Promise>; + blockNumber: () => T; + tip: () => T; + status: () => Promise>; + uniqueStatus: () => Promise>; +} + +export interface TipStatusNullablePromise + extends Promise, + Fragmentable { + id: () => Promise; + blockNumber: () => T; + tip: () => T; + status: () => Promise; + uniqueStatus: () => Promise; +} + +export interface TipConnection { + pageInfo: PageInfo; + edges: TipEdge[]; +} + +export interface TipConnectionPromise + extends Promise, + Fragmentable { + pageInfo: () => T; + edges: >() => T; + aggregate: () => T; +} + +export interface TipConnectionSubscription + extends Promise>, + Fragmentable { + pageInfo: () => T; + edges: >>() => T; + aggregate: () => T; +} + +export interface TipEdge { + node: Tip; + cursor: String; +} + +export interface TipEdgePromise extends Promise, Fragmentable { + node: () => T; + cursor: () => Promise; +} + +export interface TipEdgeSubscription + extends Promise>, + Fragmentable { + node: () => T; + cursor: () => Promise>; +} + +export interface AggregateTip { + count: Int; +} + +export interface AggregateTipPromise + extends Promise, + Fragmentable { + count: () => Promise; +} + +export interface AggregateTipSubscription + extends Promise>, + Fragmentable { + count: () => Promise>; +} + +export interface TipStatusConnection { + pageInfo: PageInfo; + edges: TipStatusEdge[]; +} + +export interface TipStatusConnectionPromise + extends Promise, + Fragmentable { + pageInfo: () => T; + edges: >() => T; + aggregate: () => T; +} + +export interface TipStatusConnectionSubscription + extends Promise>, + Fragmentable { + pageInfo: () => T; + edges: >>() => T; + aggregate: () => T; +} + +export interface TipStatusEdge { + node: TipStatus; + cursor: String; +} + +export interface TipStatusEdgePromise + extends Promise, + Fragmentable { + node: () => T; + cursor: () => Promise; +} + +export interface TipStatusEdgeSubscription + extends Promise>, + Fragmentable { + node: () => T; + cursor: () => Promise>; +} + +export interface AggregateTipStatus { + count: Int; +} + +export interface AggregateTipStatusPromise + extends Promise, + Fragmentable { + count: () => Promise; +} + +export interface AggregateTipStatusSubscription + extends Promise>, + Fragmentable { + count: () => Promise>; +} + export interface TotalIssuance { id: ID_Output; amount: String; @@ -9521,6 +10214,112 @@ export interface StakePreviousValuesSubscription totalStake: () => Promise>; } +export interface TipSubscriptionPayload { + mutation: MutationType; + node: Tip; + updatedFields: String[]; + previousValues: TipPreviousValues; +} + +export interface TipSubscriptionPayloadPromise + extends Promise, + Fragmentable { + mutation: () => Promise; + node: () => T; + updatedFields: () => Promise; + previousValues: () => T; +} + +export interface TipSubscriptionPayloadSubscription + extends Promise>, + Fragmentable { + mutation: () => Promise>; + node: () => T; + updatedFields: () => Promise>; + previousValues: () => T; +} + +export interface TipPreviousValues { + id: Int; + hash: String; + reason: String; + who: String; + finder?: String; + finderFee?: String; + closes?: Int; +} + +export interface TipPreviousValuesPromise + extends Promise, + Fragmentable { + id: () => Promise; + hash: () => Promise; + reason: () => Promise; + who: () => Promise; + finder: () => Promise; + finderFee: () => Promise; + closes: () => Promise; +} + +export interface TipPreviousValuesSubscription + extends Promise>, + Fragmentable { + id: () => Promise>; + hash: () => Promise>; + reason: () => Promise>; + who: () => Promise>; + finder: () => Promise>; + finderFee: () => Promise>; + closes: () => Promise>; +} + +export interface TipStatusSubscriptionPayload { + mutation: MutationType; + node: TipStatus; + updatedFields: String[]; + previousValues: TipStatusPreviousValues; +} + +export interface TipStatusSubscriptionPayloadPromise + extends Promise, + Fragmentable { + mutation: () => Promise; + node: () => T; + updatedFields: () => Promise; + previousValues: () => T; +} + +export interface TipStatusSubscriptionPayloadSubscription + extends Promise>, + Fragmentable { + mutation: () => Promise>; + node: () => T; + updatedFields: () => Promise>; + previousValues: () => T; +} + +export interface TipStatusPreviousValues { + id: ID_Output; + status: String; + uniqueStatus: String; +} + +export interface TipStatusPreviousValuesPromise + extends Promise, + Fragmentable { + id: () => Promise; + status: () => Promise; + uniqueStatus: () => Promise; +} + +export interface TipStatusPreviousValuesSubscription + extends Promise>, + Fragmentable { + id: () => Promise>; + status: () => Promise>; + uniqueStatus: () => Promise>; +} + export interface TotalIssuanceSubscriptionPayload { mutation: MutationType; node: TotalIssuance; @@ -9861,6 +10660,14 @@ export const models: Model[] = [ { name: "TreasuryStatus", embedded: false + }, + { + name: "Tip", + embedded: false + }, + { + name: "TipStatus", + embedded: false } ]; diff --git a/chain-db-open-server/src/generated/prisma-client/prisma-schema.ts b/chain-db-open-server/src/generated/prisma-client/prisma-schema.ts index 4fa44a490..265c8d382 100644 --- a/chain-db-open-server/src/generated/prisma-client/prisma-schema.ts +++ b/chain-db-open-server/src/generated/prisma-client/prisma-schema.ts @@ -90,6 +90,14 @@ type AggregateStake { count: Int! } +type AggregateTip { + count: Int! +} + +type AggregateTipStatus { + count: Int! +} + type AggregateTotalIssuance { count: Int! } @@ -1979,6 +1987,18 @@ type Mutation { upsertStake(where: StakeWhereUniqueInput!, create: StakeCreateInput!, update: StakeUpdateInput!): Stake! deleteStake(where: StakeWhereUniqueInput!): Stake deleteManyStakes(where: StakeWhereInput): BatchPayload! + createTip(data: TipCreateInput!): Tip! + updateTip(data: TipUpdateInput!, where: TipWhereUniqueInput!): Tip + updateManyTips(data: TipUpdateManyMutationInput!, where: TipWhereInput): BatchPayload! + upsertTip(where: TipWhereUniqueInput!, create: TipCreateInput!, update: TipUpdateInput!): Tip! + deleteTip(where: TipWhereUniqueInput!): Tip + deleteManyTips(where: TipWhereInput): BatchPayload! + createTipStatus(data: TipStatusCreateInput!): TipStatus! + updateTipStatus(data: TipStatusUpdateInput!, where: TipStatusWhereUniqueInput!): TipStatus + updateManyTipStatuses(data: TipStatusUpdateManyMutationInput!, where: TipStatusWhereInput): BatchPayload! + upsertTipStatus(where: TipStatusWhereUniqueInput!, create: TipStatusCreateInput!, update: TipStatusUpdateInput!): TipStatus! + deleteTipStatus(where: TipStatusWhereUniqueInput!): TipStatus + deleteManyTipStatuses(where: TipStatusWhereInput): BatchPayload! createTotalIssuance(data: TotalIssuanceCreateInput!): TotalIssuance! updateTotalIssuance(data: TotalIssuanceUpdateInput!, where: TotalIssuanceWhereUniqueInput!): TotalIssuance updateManyTotalIssuances(data: TotalIssuanceUpdateManyMutationInput!, where: TotalIssuanceWhereInput): BatchPayload! @@ -3740,6 +3760,12 @@ type Query { stake(where: StakeWhereUniqueInput!): Stake stakes(where: StakeWhereInput, orderBy: StakeOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Stake]! stakesConnection(where: StakeWhereInput, orderBy: StakeOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): StakeConnection! + tip(where: TipWhereUniqueInput!): Tip + tips(where: TipWhereInput, orderBy: TipOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Tip]! + tipsConnection(where: TipWhereInput, orderBy: TipOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TipConnection! + tipStatus(where: TipStatusWhereUniqueInput!): TipStatus + tipStatuses(where: TipStatusWhereInput, orderBy: TipStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TipStatus]! + tipStatusesConnection(where: TipStatusWhereInput, orderBy: TipStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TipStatusConnection! totalIssuance(where: TotalIssuanceWhereUniqueInput!): TotalIssuance totalIssuances(where: TotalIssuanceWhereInput, orderBy: TotalIssuanceOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TotalIssuance]! totalIssuancesConnection(where: TotalIssuanceWhereInput, orderBy: TotalIssuanceOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TotalIssuanceConnection! @@ -4711,12 +4737,470 @@ type Subscription { session(where: SessionSubscriptionWhereInput): SessionSubscriptionPayload slashing(where: SlashingSubscriptionWhereInput): SlashingSubscriptionPayload stake(where: StakeSubscriptionWhereInput): StakeSubscriptionPayload + tip(where: TipSubscriptionWhereInput): TipSubscriptionPayload + tipStatus(where: TipStatusSubscriptionWhereInput): TipStatusSubscriptionPayload totalIssuance(where: TotalIssuanceSubscriptionWhereInput): TotalIssuanceSubscriptionPayload treasurySpendProposal(where: TreasurySpendProposalSubscriptionWhereInput): TreasurySpendProposalSubscriptionPayload treasuryStatus(where: TreasuryStatusSubscriptionWhereInput): TreasuryStatusSubscriptionPayload validator(where: ValidatorSubscriptionWhereInput): ValidatorSubscriptionPayload } +type Tip { + id: Int! + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int + tipStatus(where: TipStatusWhereInput, orderBy: TipStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TipStatus!] +} + +type TipConnection { + pageInfo: PageInfo! + edges: [TipEdge]! + aggregate: AggregateTip! +} + +input TipCreateInput { + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int + tipStatus: TipStatusCreateManyWithoutTipInput +} + +input TipCreateOneWithoutTipStatusInput { + create: TipCreateWithoutTipStatusInput + connect: TipWhereUniqueInput +} + +input TipCreateWithoutTipStatusInput { + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int +} + +type TipEdge { + node: Tip! + cursor: String! +} + +enum TipOrderByInput { + id_ASC + id_DESC + hash_ASC + hash_DESC + reason_ASC + reason_DESC + who_ASC + who_DESC + finder_ASC + finder_DESC + finderFee_ASC + finderFee_DESC + closes_ASC + closes_DESC +} + +type TipPreviousValues { + id: Int! + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int +} + +type TipStatus { + id: ID! + blockNumber: BlockNumber! + tip: Tip! + status: String! + uniqueStatus: String! +} + +type TipStatusConnection { + pageInfo: PageInfo! + edges: [TipStatusEdge]! + aggregate: AggregateTipStatus! +} + +input TipStatusCreateInput { + id: ID + blockNumber: BlockNumberCreateOneInput! + tip: TipCreateOneWithoutTipStatusInput! + status: String! + uniqueStatus: String! +} + +input TipStatusCreateManyWithoutTipInput { + create: [TipStatusCreateWithoutTipInput!] + connect: [TipStatusWhereUniqueInput!] +} + +input TipStatusCreateWithoutTipInput { + id: ID + blockNumber: BlockNumberCreateOneInput! + status: String! + uniqueStatus: String! +} + +type TipStatusEdge { + node: TipStatus! + cursor: String! +} + +enum TipStatusOrderByInput { + id_ASC + id_DESC + status_ASC + status_DESC + uniqueStatus_ASC + uniqueStatus_DESC +} + +type TipStatusPreviousValues { + id: ID! + status: String! + uniqueStatus: String! +} + +input TipStatusScalarWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + id_lt: ID + id_lte: ID + id_gt: ID + id_gte: ID + id_contains: ID + id_not_contains: ID + id_starts_with: ID + id_not_starts_with: ID + id_ends_with: ID + id_not_ends_with: ID + status: String + status_not: String + status_in: [String!] + status_not_in: [String!] + status_lt: String + status_lte: String + status_gt: String + status_gte: String + status_contains: String + status_not_contains: String + status_starts_with: String + status_not_starts_with: String + status_ends_with: String + status_not_ends_with: String + uniqueStatus: String + uniqueStatus_not: String + uniqueStatus_in: [String!] + uniqueStatus_not_in: [String!] + uniqueStatus_lt: String + uniqueStatus_lte: String + uniqueStatus_gt: String + uniqueStatus_gte: String + uniqueStatus_contains: String + uniqueStatus_not_contains: String + uniqueStatus_starts_with: String + uniqueStatus_not_starts_with: String + uniqueStatus_ends_with: String + uniqueStatus_not_ends_with: String + AND: [TipStatusScalarWhereInput!] + OR: [TipStatusScalarWhereInput!] + NOT: [TipStatusScalarWhereInput!] +} + +type TipStatusSubscriptionPayload { + mutation: MutationType! + node: TipStatus + updatedFields: [String!] + previousValues: TipStatusPreviousValues +} + +input TipStatusSubscriptionWhereInput { + mutation_in: [MutationType!] + updatedFields_contains: String + updatedFields_contains_every: [String!] + updatedFields_contains_some: [String!] + node: TipStatusWhereInput + AND: [TipStatusSubscriptionWhereInput!] + OR: [TipStatusSubscriptionWhereInput!] + NOT: [TipStatusSubscriptionWhereInput!] +} + +input TipStatusUpdateInput { + blockNumber: BlockNumberUpdateOneRequiredInput + tip: TipUpdateOneRequiredWithoutTipStatusInput + status: String + uniqueStatus: String +} + +input TipStatusUpdateManyDataInput { + status: String + uniqueStatus: String +} + +input TipStatusUpdateManyMutationInput { + status: String + uniqueStatus: String +} + +input TipStatusUpdateManyWithoutTipInput { + create: [TipStatusCreateWithoutTipInput!] + delete: [TipStatusWhereUniqueInput!] + connect: [TipStatusWhereUniqueInput!] + set: [TipStatusWhereUniqueInput!] + disconnect: [TipStatusWhereUniqueInput!] + update: [TipStatusUpdateWithWhereUniqueWithoutTipInput!] + upsert: [TipStatusUpsertWithWhereUniqueWithoutTipInput!] + deleteMany: [TipStatusScalarWhereInput!] + updateMany: [TipStatusUpdateManyWithWhereNestedInput!] +} + +input TipStatusUpdateManyWithWhereNestedInput { + where: TipStatusScalarWhereInput! + data: TipStatusUpdateManyDataInput! +} + +input TipStatusUpdateWithoutTipDataInput { + blockNumber: BlockNumberUpdateOneRequiredInput + status: String + uniqueStatus: String +} + +input TipStatusUpdateWithWhereUniqueWithoutTipInput { + where: TipStatusWhereUniqueInput! + data: TipStatusUpdateWithoutTipDataInput! +} + +input TipStatusUpsertWithWhereUniqueWithoutTipInput { + where: TipStatusWhereUniqueInput! + update: TipStatusUpdateWithoutTipDataInput! + create: TipStatusCreateWithoutTipInput! +} + +input TipStatusWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + id_lt: ID + id_lte: ID + id_gt: ID + id_gte: ID + id_contains: ID + id_not_contains: ID + id_starts_with: ID + id_not_starts_with: ID + id_ends_with: ID + id_not_ends_with: ID + blockNumber: BlockNumberWhereInput + tip: TipWhereInput + status: String + status_not: String + status_in: [String!] + status_not_in: [String!] + status_lt: String + status_lte: String + status_gt: String + status_gte: String + status_contains: String + status_not_contains: String + status_starts_with: String + status_not_starts_with: String + status_ends_with: String + status_not_ends_with: String + uniqueStatus: String + uniqueStatus_not: String + uniqueStatus_in: [String!] + uniqueStatus_not_in: [String!] + uniqueStatus_lt: String + uniqueStatus_lte: String + uniqueStatus_gt: String + uniqueStatus_gte: String + uniqueStatus_contains: String + uniqueStatus_not_contains: String + uniqueStatus_starts_with: String + uniqueStatus_not_starts_with: String + uniqueStatus_ends_with: String + uniqueStatus_not_ends_with: String + AND: [TipStatusWhereInput!] + OR: [TipStatusWhereInput!] + NOT: [TipStatusWhereInput!] +} + +input TipStatusWhereUniqueInput { + id: ID + uniqueStatus: String +} + +type TipSubscriptionPayload { + mutation: MutationType! + node: Tip + updatedFields: [String!] + previousValues: TipPreviousValues +} + +input TipSubscriptionWhereInput { + mutation_in: [MutationType!] + updatedFields_contains: String + updatedFields_contains_every: [String!] + updatedFields_contains_some: [String!] + node: TipWhereInput + AND: [TipSubscriptionWhereInput!] + OR: [TipSubscriptionWhereInput!] + NOT: [TipSubscriptionWhereInput!] +} + +input TipUpdateInput { + hash: String + reason: String + who: String + finder: String + finderFee: String + closes: Int + tipStatus: TipStatusUpdateManyWithoutTipInput +} + +input TipUpdateManyMutationInput { + hash: String + reason: String + who: String + finder: String + finderFee: String + closes: Int +} + +input TipUpdateOneRequiredWithoutTipStatusInput { + create: TipCreateWithoutTipStatusInput + update: TipUpdateWithoutTipStatusDataInput + upsert: TipUpsertWithoutTipStatusInput + connect: TipWhereUniqueInput +} + +input TipUpdateWithoutTipStatusDataInput { + hash: String + reason: String + who: String + finder: String + finderFee: String + closes: Int +} + +input TipUpsertWithoutTipStatusInput { + update: TipUpdateWithoutTipStatusDataInput! + create: TipCreateWithoutTipStatusInput! +} + +input TipWhereInput { + id: Int + id_not: Int + id_in: [Int!] + id_not_in: [Int!] + id_lt: Int + id_lte: Int + id_gt: Int + id_gte: Int + hash: String + hash_not: String + hash_in: [String!] + hash_not_in: [String!] + hash_lt: String + hash_lte: String + hash_gt: String + hash_gte: String + hash_contains: String + hash_not_contains: String + hash_starts_with: String + hash_not_starts_with: String + hash_ends_with: String + hash_not_ends_with: String + reason: String + reason_not: String + reason_in: [String!] + reason_not_in: [String!] + reason_lt: String + reason_lte: String + reason_gt: String + reason_gte: String + reason_contains: String + reason_not_contains: String + reason_starts_with: String + reason_not_starts_with: String + reason_ends_with: String + reason_not_ends_with: String + who: String + who_not: String + who_in: [String!] + who_not_in: [String!] + who_lt: String + who_lte: String + who_gt: String + who_gte: String + who_contains: String + who_not_contains: String + who_starts_with: String + who_not_starts_with: String + who_ends_with: String + who_not_ends_with: String + finder: String + finder_not: String + finder_in: [String!] + finder_not_in: [String!] + finder_lt: String + finder_lte: String + finder_gt: String + finder_gte: String + finder_contains: String + finder_not_contains: String + finder_starts_with: String + finder_not_starts_with: String + finder_ends_with: String + finder_not_ends_with: String + finderFee: String + finderFee_not: String + finderFee_in: [String!] + finderFee_not_in: [String!] + finderFee_lt: String + finderFee_lte: String + finderFee_gt: String + finderFee_gte: String + finderFee_contains: String + finderFee_not_contains: String + finderFee_starts_with: String + finderFee_not_starts_with: String + finderFee_ends_with: String + finderFee_not_ends_with: String + closes: Int + closes_not: Int + closes_in: [Int!] + closes_not_in: [Int!] + closes_lt: Int + closes_lte: Int + closes_gt: Int + closes_gte: Int + tipStatus_every: TipStatusWhereInput + tipStatus_some: TipStatusWhereInput + tipStatus_none: TipStatusWhereInput + AND: [TipWhereInput!] + OR: [TipWhereInput!] + NOT: [TipWhereInput!] +} + +input TipWhereUniqueInput { + id: Int +} + type TotalIssuance { id: ID! blockNumber: BlockNumber! diff --git a/chain-db-open-server/src/generated/prisma.graphql b/chain-db-open-server/src/generated/prisma.graphql index 5aec8ee31..4a7848e6c 100644 --- a/chain-db-open-server/src/generated/prisma.graphql +++ b/chain-db-open-server/src/generated/prisma.graphql @@ -1,5 +1,5 @@ # source: http://127.0.0.1:4466 -# timestamp: Thu Apr 30 2020 18:02:36 GMT+0800 (Malaysia Time) +# timestamp: Thu Jun 25 2020 14:09:51 GMT+0200 (Central European Summer Time) type AggregateBlockIndex { count: Int! @@ -89,6 +89,14 @@ type AggregateStake { count: Int! } +type AggregateTip { + count: Int! +} + +type AggregateTipStatus { + count: Int! +} + type AggregateTotalIssuance { count: Int! } @@ -3155,6 +3163,8 @@ type Mutation { createBlockIndex(data: BlockIndexCreateInput!): BlockIndex! createTreasurySpendProposal(data: TreasurySpendProposalCreateInput!): TreasurySpendProposal! createTreasuryStatus(data: TreasuryStatusCreateInput!): TreasuryStatus! + createTip(data: TipCreateInput!): Tip! + createTipStatus(data: TipStatusCreateInput!): TipStatus! createBlockNumber(data: BlockNumberCreateInput!): BlockNumber! createSession(data: SessionCreateInput!): Session! updateHeartBeat(data: HeartBeatUpdateInput!, where: HeartBeatWhereUniqueInput!): HeartBeat @@ -3181,6 +3191,8 @@ type Mutation { updateBlockIndex(data: BlockIndexUpdateInput!, where: BlockIndexWhereUniqueInput!): BlockIndex updateTreasurySpendProposal(data: TreasurySpendProposalUpdateInput!, where: TreasurySpendProposalWhereUniqueInput!): TreasurySpendProposal updateTreasuryStatus(data: TreasuryStatusUpdateInput!, where: TreasuryStatusWhereUniqueInput!): TreasuryStatus + updateTip(data: TipUpdateInput!, where: TipWhereUniqueInput!): Tip + updateTipStatus(data: TipStatusUpdateInput!, where: TipStatusWhereUniqueInput!): TipStatus updateBlockNumber(data: BlockNumberUpdateInput!, where: BlockNumberWhereUniqueInput!): BlockNumber updateSession(data: SessionUpdateInput!, where: SessionWhereUniqueInput!): Session deleteHeartBeat(where: HeartBeatWhereUniqueInput!): HeartBeat @@ -3207,6 +3219,8 @@ type Mutation { deleteBlockIndex(where: BlockIndexWhereUniqueInput!): BlockIndex deleteTreasurySpendProposal(where: TreasurySpendProposalWhereUniqueInput!): TreasurySpendProposal deleteTreasuryStatus(where: TreasuryStatusWhereUniqueInput!): TreasuryStatus + deleteTip(where: TipWhereUniqueInput!): Tip + deleteTipStatus(where: TipStatusWhereUniqueInput!): TipStatus deleteBlockNumber(where: BlockNumberWhereUniqueInput!): BlockNumber deleteSession(where: SessionWhereUniqueInput!): Session upsertHeartBeat(where: HeartBeatWhereUniqueInput!, create: HeartBeatCreateInput!, update: HeartBeatUpdateInput!): HeartBeat! @@ -3233,6 +3247,8 @@ type Mutation { upsertBlockIndex(where: BlockIndexWhereUniqueInput!, create: BlockIndexCreateInput!, update: BlockIndexUpdateInput!): BlockIndex! upsertTreasurySpendProposal(where: TreasurySpendProposalWhereUniqueInput!, create: TreasurySpendProposalCreateInput!, update: TreasurySpendProposalUpdateInput!): TreasurySpendProposal! upsertTreasuryStatus(where: TreasuryStatusWhereUniqueInput!, create: TreasuryStatusCreateInput!, update: TreasuryStatusUpdateInput!): TreasuryStatus! + upsertTip(where: TipWhereUniqueInput!, create: TipCreateInput!, update: TipUpdateInput!): Tip! + upsertTipStatus(where: TipStatusWhereUniqueInput!, create: TipStatusCreateInput!, update: TipStatusUpdateInput!): TipStatus! upsertBlockNumber(where: BlockNumberWhereUniqueInput!, create: BlockNumberCreateInput!, update: BlockNumberUpdateInput!): BlockNumber! upsertSession(where: SessionWhereUniqueInput!, create: SessionCreateInput!, update: SessionUpdateInput!): Session! updateManyHeartBeats(data: HeartBeatUpdateManyMutationInput!, where: HeartBeatWhereInput): BatchPayload! @@ -3258,6 +3274,8 @@ type Mutation { updateManyBlockIndexes(data: BlockIndexUpdateManyMutationInput!, where: BlockIndexWhereInput): BatchPayload! updateManyTreasurySpendProposals(data: TreasurySpendProposalUpdateManyMutationInput!, where: TreasurySpendProposalWhereInput): BatchPayload! updateManyTreasuryStatuses(data: TreasuryStatusUpdateManyMutationInput!, where: TreasuryStatusWhereInput): BatchPayload! + updateManyTips(data: TipUpdateManyMutationInput!, where: TipWhereInput): BatchPayload! + updateManyTipStatuses(data: TipStatusUpdateManyMutationInput!, where: TipStatusWhereInput): BatchPayload! updateManyBlockNumbers(data: BlockNumberUpdateManyMutationInput!, where: BlockNumberWhereInput): BatchPayload! updateManySessions(data: SessionUpdateManyMutationInput!, where: SessionWhereInput): BatchPayload! deleteManyHeartBeats(where: HeartBeatWhereInput): BatchPayload! @@ -3284,6 +3302,8 @@ type Mutation { deleteManyBlockIndexes(where: BlockIndexWhereInput): BatchPayload! deleteManyTreasurySpendProposals(where: TreasurySpendProposalWhereInput): BatchPayload! deleteManyTreasuryStatuses(where: TreasuryStatusWhereInput): BatchPayload! + deleteManyTips(where: TipWhereInput): BatchPayload! + deleteManyTipStatuses(where: TipStatusWhereInput): BatchPayload! deleteManyBlockNumbers(where: BlockNumberWhereInput): BatchPayload! deleteManySessions(where: SessionWhereInput): BatchPayload! executeRaw(database: PrismaDatabase, query: String!): Json! @@ -6199,6 +6219,8 @@ type Query { blockIndexes(where: BlockIndexWhereInput, orderBy: BlockIndexOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [BlockIndex]! treasurySpendProposals(where: TreasurySpendProposalWhereInput, orderBy: TreasurySpendProposalOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TreasurySpendProposal]! treasuryStatuses(where: TreasuryStatusWhereInput, orderBy: TreasuryStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TreasuryStatus]! + tips(where: TipWhereInput, orderBy: TipOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Tip]! + tipStatuses(where: TipStatusWhereInput, orderBy: TipStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TipStatus]! blockNumbers(where: BlockNumberWhereInput, orderBy: BlockNumberOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [BlockNumber]! sessions(where: SessionWhereInput, orderBy: SessionOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Session]! heartBeat(where: HeartBeatWhereUniqueInput!): HeartBeat @@ -6225,6 +6247,8 @@ type Query { blockIndex(where: BlockIndexWhereUniqueInput!): BlockIndex treasurySpendProposal(where: TreasurySpendProposalWhereUniqueInput!): TreasurySpendProposal treasuryStatus(where: TreasuryStatusWhereUniqueInput!): TreasuryStatus + tip(where: TipWhereUniqueInput!): Tip + tipStatus(where: TipStatusWhereUniqueInput!): TipStatus blockNumber(where: BlockNumberWhereUniqueInput!): BlockNumber session(where: SessionWhereUniqueInput!): Session heartBeatsConnection(where: HeartBeatWhereInput, orderBy: HeartBeatOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): HeartBeatConnection! @@ -6251,6 +6275,8 @@ type Query { blockIndexesConnection(where: BlockIndexWhereInput, orderBy: BlockIndexOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): BlockIndexConnection! treasurySpendProposalsConnection(where: TreasurySpendProposalWhereInput, orderBy: TreasurySpendProposalOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TreasurySpendProposalConnection! treasuryStatusesConnection(where: TreasuryStatusWhereInput, orderBy: TreasuryStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TreasuryStatusConnection! + tipsConnection(where: TipWhereInput, orderBy: TipOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TipConnection! + tipStatusesConnection(where: TipStatusWhereInput, orderBy: TipStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TipStatusConnection! blockNumbersConnection(where: BlockNumberWhereInput, orderBy: BlockNumberOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): BlockNumberConnection! sessionsConnection(where: SessionWhereInput, orderBy: SessionOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): SessionConnection! @@ -7928,10 +7954,851 @@ type Subscription { blockIndex(where: BlockIndexSubscriptionWhereInput): BlockIndexSubscriptionPayload treasurySpendProposal(where: TreasurySpendProposalSubscriptionWhereInput): TreasurySpendProposalSubscriptionPayload treasuryStatus(where: TreasuryStatusSubscriptionWhereInput): TreasuryStatusSubscriptionPayload + tip(where: TipSubscriptionWhereInput): TipSubscriptionPayload + tipStatus(where: TipStatusSubscriptionWhereInput): TipStatusSubscriptionPayload blockNumber(where: BlockNumberSubscriptionWhereInput): BlockNumberSubscriptionPayload session(where: SessionSubscriptionWhereInput): SessionSubscriptionPayload } +type Tip { + id: Int! + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int + tipStatus(where: TipStatusWhereInput, orderBy: TipStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TipStatus!] +} + +"""A connection to a list of items.""" +type TipConnection { + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """A list of edges.""" + edges: [TipEdge]! + aggregate: AggregateTip! +} + +input TipCreateInput { + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int + tipStatus: TipStatusCreateManyWithoutTipInput +} + +input TipCreateOneWithoutTipStatusInput { + create: TipCreateWithoutTipStatusInput + connect: TipWhereUniqueInput +} + +input TipCreateWithoutTipStatusInput { + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int +} + +"""An edge in a connection.""" +type TipEdge { + """The item at the end of the edge.""" + node: Tip! + + """A cursor for use in pagination.""" + cursor: String! +} + +enum TipOrderByInput { + id_ASC + id_DESC + hash_ASC + hash_DESC + reason_ASC + reason_DESC + who_ASC + who_DESC + finder_ASC + finder_DESC + finderFee_ASC + finderFee_DESC + closes_ASC + closes_DESC +} + +type TipPreviousValues { + id: Int! + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int +} + +type TipStatus implements Node { + id: ID! + blockNumber: BlockNumber! + tip: Tip! + status: String! + uniqueStatus: String! +} + +"""A connection to a list of items.""" +type TipStatusConnection { + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """A list of edges.""" + edges: [TipStatusEdge]! + aggregate: AggregateTipStatus! +} + +input TipStatusCreateInput { + id: ID + status: String! + uniqueStatus: String! + blockNumber: BlockNumberCreateOneInput! + tip: TipCreateOneWithoutTipStatusInput! +} + +input TipStatusCreateManyWithoutTipInput { + create: [TipStatusCreateWithoutTipInput!] + connect: [TipStatusWhereUniqueInput!] +} + +input TipStatusCreateWithoutTipInput { + id: ID + status: String! + uniqueStatus: String! + blockNumber: BlockNumberCreateOneInput! +} + +"""An edge in a connection.""" +type TipStatusEdge { + """The item at the end of the edge.""" + node: TipStatus! + + """A cursor for use in pagination.""" + cursor: String! +} + +enum TipStatusOrderByInput { + id_ASC + id_DESC + status_ASC + status_DESC + uniqueStatus_ASC + uniqueStatus_DESC +} + +type TipStatusPreviousValues { + id: ID! + status: String! + uniqueStatus: String! +} + +input TipStatusScalarWhereInput { + """Logical AND on all given filters.""" + AND: [TipStatusScalarWhereInput!] + + """Logical OR on all given filters.""" + OR: [TipStatusScalarWhereInput!] + + """Logical NOT on all given filters combined by AND.""" + NOT: [TipStatusScalarWhereInput!] + id: ID + + """All values that are not equal to given value.""" + id_not: ID + + """All values that are contained in given list.""" + id_in: [ID!] + + """All values that are not contained in given list.""" + id_not_in: [ID!] + + """All values less than the given value.""" + id_lt: ID + + """All values less than or equal the given value.""" + id_lte: ID + + """All values greater than the given value.""" + id_gt: ID + + """All values greater than or equal the given value.""" + id_gte: ID + + """All values containing the given string.""" + id_contains: ID + + """All values not containing the given string.""" + id_not_contains: ID + + """All values starting with the given string.""" + id_starts_with: ID + + """All values not starting with the given string.""" + id_not_starts_with: ID + + """All values ending with the given string.""" + id_ends_with: ID + + """All values not ending with the given string.""" + id_not_ends_with: ID + status: String + + """All values that are not equal to given value.""" + status_not: String + + """All values that are contained in given list.""" + status_in: [String!] + + """All values that are not contained in given list.""" + status_not_in: [String!] + + """All values less than the given value.""" + status_lt: String + + """All values less than or equal the given value.""" + status_lte: String + + """All values greater than the given value.""" + status_gt: String + + """All values greater than or equal the given value.""" + status_gte: String + + """All values containing the given string.""" + status_contains: String + + """All values not containing the given string.""" + status_not_contains: String + + """All values starting with the given string.""" + status_starts_with: String + + """All values not starting with the given string.""" + status_not_starts_with: String + + """All values ending with the given string.""" + status_ends_with: String + + """All values not ending with the given string.""" + status_not_ends_with: String + uniqueStatus: String + + """All values that are not equal to given value.""" + uniqueStatus_not: String + + """All values that are contained in given list.""" + uniqueStatus_in: [String!] + + """All values that are not contained in given list.""" + uniqueStatus_not_in: [String!] + + """All values less than the given value.""" + uniqueStatus_lt: String + + """All values less than or equal the given value.""" + uniqueStatus_lte: String + + """All values greater than the given value.""" + uniqueStatus_gt: String + + """All values greater than or equal the given value.""" + uniqueStatus_gte: String + + """All values containing the given string.""" + uniqueStatus_contains: String + + """All values not containing the given string.""" + uniqueStatus_not_contains: String + + """All values starting with the given string.""" + uniqueStatus_starts_with: String + + """All values not starting with the given string.""" + uniqueStatus_not_starts_with: String + + """All values ending with the given string.""" + uniqueStatus_ends_with: String + + """All values not ending with the given string.""" + uniqueStatus_not_ends_with: String +} + +type TipStatusSubscriptionPayload { + mutation: MutationType! + node: TipStatus + updatedFields: [String!] + previousValues: TipStatusPreviousValues +} + +input TipStatusSubscriptionWhereInput { + """Logical AND on all given filters.""" + AND: [TipStatusSubscriptionWhereInput!] + + """Logical OR on all given filters.""" + OR: [TipStatusSubscriptionWhereInput!] + + """Logical NOT on all given filters combined by AND.""" + NOT: [TipStatusSubscriptionWhereInput!] + + """The subscription event gets dispatched when it's listed in mutation_in""" + mutation_in: [MutationType!] + + """ + The subscription event gets only dispatched when one of the updated fields names is included in this list + """ + updatedFields_contains: String + + """ + The subscription event gets only dispatched when all of the field names included in this list have been updated + """ + updatedFields_contains_every: [String!] + + """ + The subscription event gets only dispatched when some of the field names included in this list have been updated + """ + updatedFields_contains_some: [String!] + node: TipStatusWhereInput +} + +input TipStatusUpdateInput { + status: String + uniqueStatus: String + blockNumber: BlockNumberUpdateOneRequiredInput + tip: TipUpdateOneRequiredWithoutTipStatusInput +} + +input TipStatusUpdateManyDataInput { + status: String + uniqueStatus: String +} + +input TipStatusUpdateManyMutationInput { + status: String + uniqueStatus: String +} + +input TipStatusUpdateManyWithoutTipInput { + create: [TipStatusCreateWithoutTipInput!] + connect: [TipStatusWhereUniqueInput!] + set: [TipStatusWhereUniqueInput!] + disconnect: [TipStatusWhereUniqueInput!] + delete: [TipStatusWhereUniqueInput!] + update: [TipStatusUpdateWithWhereUniqueWithoutTipInput!] + updateMany: [TipStatusUpdateManyWithWhereNestedInput!] + deleteMany: [TipStatusScalarWhereInput!] + upsert: [TipStatusUpsertWithWhereUniqueWithoutTipInput!] +} + +input TipStatusUpdateManyWithWhereNestedInput { + where: TipStatusScalarWhereInput! + data: TipStatusUpdateManyDataInput! +} + +input TipStatusUpdateWithoutTipDataInput { + status: String + uniqueStatus: String + blockNumber: BlockNumberUpdateOneRequiredInput +} + +input TipStatusUpdateWithWhereUniqueWithoutTipInput { + where: TipStatusWhereUniqueInput! + data: TipStatusUpdateWithoutTipDataInput! +} + +input TipStatusUpsertWithWhereUniqueWithoutTipInput { + where: TipStatusWhereUniqueInput! + update: TipStatusUpdateWithoutTipDataInput! + create: TipStatusCreateWithoutTipInput! +} + +input TipStatusWhereInput { + """Logical AND on all given filters.""" + AND: [TipStatusWhereInput!] + + """Logical OR on all given filters.""" + OR: [TipStatusWhereInput!] + + """Logical NOT on all given filters combined by AND.""" + NOT: [TipStatusWhereInput!] + id: ID + + """All values that are not equal to given value.""" + id_not: ID + + """All values that are contained in given list.""" + id_in: [ID!] + + """All values that are not contained in given list.""" + id_not_in: [ID!] + + """All values less than the given value.""" + id_lt: ID + + """All values less than or equal the given value.""" + id_lte: ID + + """All values greater than the given value.""" + id_gt: ID + + """All values greater than or equal the given value.""" + id_gte: ID + + """All values containing the given string.""" + id_contains: ID + + """All values not containing the given string.""" + id_not_contains: ID + + """All values starting with the given string.""" + id_starts_with: ID + + """All values not starting with the given string.""" + id_not_starts_with: ID + + """All values ending with the given string.""" + id_ends_with: ID + + """All values not ending with the given string.""" + id_not_ends_with: ID + status: String + + """All values that are not equal to given value.""" + status_not: String + + """All values that are contained in given list.""" + status_in: [String!] + + """All values that are not contained in given list.""" + status_not_in: [String!] + + """All values less than the given value.""" + status_lt: String + + """All values less than or equal the given value.""" + status_lte: String + + """All values greater than the given value.""" + status_gt: String + + """All values greater than or equal the given value.""" + status_gte: String + + """All values containing the given string.""" + status_contains: String + + """All values not containing the given string.""" + status_not_contains: String + + """All values starting with the given string.""" + status_starts_with: String + + """All values not starting with the given string.""" + status_not_starts_with: String + + """All values ending with the given string.""" + status_ends_with: String + + """All values not ending with the given string.""" + status_not_ends_with: String + uniqueStatus: String + + """All values that are not equal to given value.""" + uniqueStatus_not: String + + """All values that are contained in given list.""" + uniqueStatus_in: [String!] + + """All values that are not contained in given list.""" + uniqueStatus_not_in: [String!] + + """All values less than the given value.""" + uniqueStatus_lt: String + + """All values less than or equal the given value.""" + uniqueStatus_lte: String + + """All values greater than the given value.""" + uniqueStatus_gt: String + + """All values greater than or equal the given value.""" + uniqueStatus_gte: String + + """All values containing the given string.""" + uniqueStatus_contains: String + + """All values not containing the given string.""" + uniqueStatus_not_contains: String + + """All values starting with the given string.""" + uniqueStatus_starts_with: String + + """All values not starting with the given string.""" + uniqueStatus_not_starts_with: String + + """All values ending with the given string.""" + uniqueStatus_ends_with: String + + """All values not ending with the given string.""" + uniqueStatus_not_ends_with: String + blockNumber: BlockNumberWhereInput + tip: TipWhereInput +} + +input TipStatusWhereUniqueInput { + id: ID + uniqueStatus: String +} + +type TipSubscriptionPayload { + mutation: MutationType! + node: Tip + updatedFields: [String!] + previousValues: TipPreviousValues +} + +input TipSubscriptionWhereInput { + """Logical AND on all given filters.""" + AND: [TipSubscriptionWhereInput!] + + """Logical OR on all given filters.""" + OR: [TipSubscriptionWhereInput!] + + """Logical NOT on all given filters combined by AND.""" + NOT: [TipSubscriptionWhereInput!] + + """The subscription event gets dispatched when it's listed in mutation_in""" + mutation_in: [MutationType!] + + """ + The subscription event gets only dispatched when one of the updated fields names is included in this list + """ + updatedFields_contains: String + + """ + The subscription event gets only dispatched when all of the field names included in this list have been updated + """ + updatedFields_contains_every: [String!] + + """ + The subscription event gets only dispatched when some of the field names included in this list have been updated + """ + updatedFields_contains_some: [String!] + node: TipWhereInput +} + +input TipUpdateInput { + hash: String + reason: String + who: String + finder: String + finderFee: String + closes: Int + tipStatus: TipStatusUpdateManyWithoutTipInput +} + +input TipUpdateManyMutationInput { + hash: String + reason: String + who: String + finder: String + finderFee: String + closes: Int +} + +input TipUpdateOneRequiredWithoutTipStatusInput { + create: TipCreateWithoutTipStatusInput + connect: TipWhereUniqueInput + update: TipUpdateWithoutTipStatusDataInput + upsert: TipUpsertWithoutTipStatusInput +} + +input TipUpdateWithoutTipStatusDataInput { + hash: String + reason: String + who: String + finder: String + finderFee: String + closes: Int +} + +input TipUpsertWithoutTipStatusInput { + update: TipUpdateWithoutTipStatusDataInput! + create: TipCreateWithoutTipStatusInput! +} + +input TipWhereInput { + """Logical AND on all given filters.""" + AND: [TipWhereInput!] + + """Logical OR on all given filters.""" + OR: [TipWhereInput!] + + """Logical NOT on all given filters combined by AND.""" + NOT: [TipWhereInput!] + id: Int + + """All values that are not equal to given value.""" + id_not: Int + + """All values that are contained in given list.""" + id_in: [Int!] + + """All values that are not contained in given list.""" + id_not_in: [Int!] + + """All values less than the given value.""" + id_lt: Int + + """All values less than or equal the given value.""" + id_lte: Int + + """All values greater than the given value.""" + id_gt: Int + + """All values greater than or equal the given value.""" + id_gte: Int + hash: String + + """All values that are not equal to given value.""" + hash_not: String + + """All values that are contained in given list.""" + hash_in: [String!] + + """All values that are not contained in given list.""" + hash_not_in: [String!] + + """All values less than the given value.""" + hash_lt: String + + """All values less than or equal the given value.""" + hash_lte: String + + """All values greater than the given value.""" + hash_gt: String + + """All values greater than or equal the given value.""" + hash_gte: String + + """All values containing the given string.""" + hash_contains: String + + """All values not containing the given string.""" + hash_not_contains: String + + """All values starting with the given string.""" + hash_starts_with: String + + """All values not starting with the given string.""" + hash_not_starts_with: String + + """All values ending with the given string.""" + hash_ends_with: String + + """All values not ending with the given string.""" + hash_not_ends_with: String + reason: String + + """All values that are not equal to given value.""" + reason_not: String + + """All values that are contained in given list.""" + reason_in: [String!] + + """All values that are not contained in given list.""" + reason_not_in: [String!] + + """All values less than the given value.""" + reason_lt: String + + """All values less than or equal the given value.""" + reason_lte: String + + """All values greater than the given value.""" + reason_gt: String + + """All values greater than or equal the given value.""" + reason_gte: String + + """All values containing the given string.""" + reason_contains: String + + """All values not containing the given string.""" + reason_not_contains: String + + """All values starting with the given string.""" + reason_starts_with: String + + """All values not starting with the given string.""" + reason_not_starts_with: String + + """All values ending with the given string.""" + reason_ends_with: String + + """All values not ending with the given string.""" + reason_not_ends_with: String + who: String + + """All values that are not equal to given value.""" + who_not: String + + """All values that are contained in given list.""" + who_in: [String!] + + """All values that are not contained in given list.""" + who_not_in: [String!] + + """All values less than the given value.""" + who_lt: String + + """All values less than or equal the given value.""" + who_lte: String + + """All values greater than the given value.""" + who_gt: String + + """All values greater than or equal the given value.""" + who_gte: String + + """All values containing the given string.""" + who_contains: String + + """All values not containing the given string.""" + who_not_contains: String + + """All values starting with the given string.""" + who_starts_with: String + + """All values not starting with the given string.""" + who_not_starts_with: String + + """All values ending with the given string.""" + who_ends_with: String + + """All values not ending with the given string.""" + who_not_ends_with: String + finder: String + + """All values that are not equal to given value.""" + finder_not: String + + """All values that are contained in given list.""" + finder_in: [String!] + + """All values that are not contained in given list.""" + finder_not_in: [String!] + + """All values less than the given value.""" + finder_lt: String + + """All values less than or equal the given value.""" + finder_lte: String + + """All values greater than the given value.""" + finder_gt: String + + """All values greater than or equal the given value.""" + finder_gte: String + + """All values containing the given string.""" + finder_contains: String + + """All values not containing the given string.""" + finder_not_contains: String + + """All values starting with the given string.""" + finder_starts_with: String + + """All values not starting with the given string.""" + finder_not_starts_with: String + + """All values ending with the given string.""" + finder_ends_with: String + + """All values not ending with the given string.""" + finder_not_ends_with: String + finderFee: String + + """All values that are not equal to given value.""" + finderFee_not: String + + """All values that are contained in given list.""" + finderFee_in: [String!] + + """All values that are not contained in given list.""" + finderFee_not_in: [String!] + + """All values less than the given value.""" + finderFee_lt: String + + """All values less than or equal the given value.""" + finderFee_lte: String + + """All values greater than the given value.""" + finderFee_gt: String + + """All values greater than or equal the given value.""" + finderFee_gte: String + + """All values containing the given string.""" + finderFee_contains: String + + """All values not containing the given string.""" + finderFee_not_contains: String + + """All values starting with the given string.""" + finderFee_starts_with: String + + """All values not starting with the given string.""" + finderFee_not_starts_with: String + + """All values ending with the given string.""" + finderFee_ends_with: String + + """All values not ending with the given string.""" + finderFee_not_ends_with: String + closes: Int + + """All values that are not equal to given value.""" + closes_not: Int + + """All values that are contained in given list.""" + closes_in: [Int!] + + """All values that are not contained in given list.""" + closes_not_in: [Int!] + + """All values less than the given value.""" + closes_lt: Int + + """All values less than or equal the given value.""" + closes_lte: Int + + """All values greater than the given value.""" + closes_gt: Int + + """All values greater than or equal the given value.""" + closes_gte: Int + tipStatus_every: TipStatusWhereInput + tipStatus_some: TipStatusWhereInput + tipStatus_none: TipStatusWhereInput +} + +input TipWhereUniqueInput { + id: Int +} + type TotalIssuance implements Node { id: ID! blockNumber: BlockNumber! diff --git a/chain-db-open-server/src/index.ts b/chain-db-open-server/src/index.ts index 586a17a5a..609611c72 100644 --- a/chain-db-open-server/src/index.ts +++ b/chain-db-open-server/src/index.ts @@ -193,6 +193,21 @@ const resolvers = { return prisma.proposalStatus({ id: parent.id }).blockNumber(); }, }, + Tip: { + tipStatus( + parent: any, + { where, orderBy, skip, after, before, first, last }: Selectors + ) { + return prisma + .tip({ id: parent.id }) + .tipStatus({ where, orderBy, skip, after, before, first, last }); + }, + }, + TipStatus: { + blockNumber(parent: any) { + return prisma.tipStatus({ id: parent.id }).blockNumber(); + }, + }, TreasurySpendProposal: { treasuryStatus( parent: any, diff --git a/chain-db-open-server/src/resolvers/query.ts b/chain-db-open-server/src/resolvers/query.ts index 681e20c9a..b2140fa22 100644 --- a/chain-db-open-server/src/resolvers/query.ts +++ b/chain-db-open-server/src/resolvers/query.ts @@ -539,6 +539,50 @@ const Query = { ) { return prisma.referendumStatus(referendumStatusWhereUniqueInput); }, + tips( + _parent: any, + { where, orderBy, skip, after, before, first, last }: Selectors, + { prisma }: Context + ) { + return prisma.tips({ + where, + orderBy, + skip, + after, + before, + first, + last, + }); + }, + tip( + _parent: any, + { TipWhereUniqueInput }: Selectors, + { prisma }: Context + ) { + return prisma.tip(TipWhereUniqueInput); + }, + tipStatuses( + _parent: any, + { where, orderBy, skip, after, before, first, last }: Selectors, + { prisma }: Context + ) { + return prisma.tipStatuses({ + where, + orderBy, + skip, + after, + before, + first, + last, + }); + }, + tipStatus( + _parent: any, + { TipStatusWhereUniqueInput }: Selectors, + { prisma }: Context + ) { + return prisma.tipStatus(TipStatusWhereUniqueInput); + }, }; export { Query }; diff --git a/chain-db-open-server/src/resolvers/subscription.ts b/chain-db-open-server/src/resolvers/subscription.ts index d1386c3d7..e3e1dde5d 100644 --- a/chain-db-open-server/src/resolvers/subscription.ts +++ b/chain-db-open-server/src/resolvers/subscription.ts @@ -18,6 +18,8 @@ import { SessionSubscription, SlashingSubscription, StakeSubscription, + TipSubscriptionPayloadSubscription, + TipSubscriptionWhereInput, TreasurySpendProposalSubscriptionPayloadSubscription, TreasurySpendProposalSubscriptionWhereInput, ValidatorSubscription, @@ -266,6 +268,19 @@ const treasurySpendProposal = { }, }; +const tip = { + subscribe: ( + parent: any, + { where }: { where: TipSubscriptionWhereInput }, + context: Context + ): TipSubscriptionPayloadSubscription => { + return context.prisma.$subscribe.tip(where); + }, + resolve: (payload: any) => { + return payload; + }, +}; + export const Subscription = { blockNumber, era, @@ -279,6 +294,7 @@ export const Subscription = { validator, motion, proposal, + tip, treasurySpendProposal, referendum, }; diff --git a/chain-db-open-server/src/schema.graphql b/chain-db-open-server/src/schema.graphql index aae018376..9c421c5b0 100644 --- a/chain-db-open-server/src/schema.graphql +++ b/chain-db-open-server/src/schema.graphql @@ -68,6 +68,12 @@ type Query { stake(where: StakeWhereUniqueInput!): Stake stakes(where: StakeWhereInput, orderBy: StakeOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Stake]! stakesConnection(where: StakeWhereInput, orderBy: StakeOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): StakeConnection! + tip(where: TipWhereUniqueInput!): Tip + tips(where: TipWhereInput, orderBy: TipOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Tip]! + tipsConnection(where: TipWhereInput, orderBy: TipOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TipConnection! + tipStatus(where: TipStatusWhereUniqueInput!): TipStatus + tipStatuses(where: TipStatusWhereInput, orderBy: TipStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TipStatus]! + tipStatusesConnection(where: TipStatusWhereInput, orderBy: TipStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TipStatusConnection! totalIssuance(where: TotalIssuanceWhereUniqueInput!): TotalIssuance totalIssuances(where: TotalIssuanceWhereInput, orderBy: TotalIssuanceOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TotalIssuance]! totalIssuancesConnection(where: TotalIssuanceWhereInput, orderBy: TotalIssuanceOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TotalIssuanceConnection! @@ -106,8 +112,10 @@ type Subscription { session(where: SessionSubscriptionWhereInput): SessionSubscriptionPayload slashing(where: SlashingSubscriptionWhereInput): SlashingSubscriptionPayload stake(where: StakeSubscriptionWhereInput): StakeSubscriptionPayload + tip(where: TipSubscriptionWhereInput): TipSubscriptionPayload + tipStatus(where: TipStatusSubscriptionWhereInput): TipStatusSubscriptionPayload totalIssuance(where: TotalIssuanceSubscriptionWhereInput): TotalIssuanceSubscriptionPayload treasurySpendProposal(where: TreasurySpendProposalSubscriptionWhereInput): TreasurySpendProposalSubscriptionPayload treasuryStatus(where: TreasuryStatusSubscriptionWhereInput): TreasuryStatusSubscriptionPayload validator(where: ValidatorSubscriptionWhereInput): ValidatorSubscriptionPayload -} \ No newline at end of file +} diff --git a/chain-db-watcher/README.md b/chain-db-watcher/README.md index aa8707261..6cd4a466c 100644 --- a/chain-db-watcher/README.md +++ b/chain-db-watcher/README.md @@ -1,10 +1,10 @@ # Chain DB watcher -This service is listening to a graphQL based chain DB and creates new proposal posts on Polkassembly.io as soon as an on-chain proposal is created. +This service is listening to a graphQL based chain DB and creates new on-chain posts on Polkassembly.io as soon as an on-chain proposal is created. ## .env variable ```bash -# auth credentials for this user to create proposals +# auth credentials for this user to create on-chain posts PROPOSAL_BOT_USERNAME=bot PROPOSAL_BOT_PASSWORD= PROPOSAL_BOT_USER_ID=6 diff --git a/chain-db-watcher/src/generated/chain-db-graphql.ts b/chain-db-watcher/src/generated/chain-db-graphql.ts index e628eb699..79af88f0d 100644 --- a/chain-db-watcher/src/generated/chain-db-graphql.ts +++ b/chain-db-watcher/src/generated/chain-db-graphql.ts @@ -124,6 +124,16 @@ export type AggregateStake = { count: Scalars['Int']; }; +export type AggregateTip = { + __typename?: 'AggregateTip'; + count: Scalars['Int']; +}; + +export type AggregateTipStatus = { + __typename?: 'AggregateTipStatus'; + count: Scalars['Int']; +}; + export type AggregateTotalIssuance = { __typename?: 'AggregateTotalIssuance'; count: Scalars['Int']; @@ -3301,6 +3311,12 @@ export type Query = { stake?: Maybe; stakes: Array>; stakesConnection: StakeConnection; + tip?: Maybe; + tips: Array>; + tipsConnection: TipConnection; + tipStatus?: Maybe; + tipStatuses: Array>; + tipStatusesConnection: TipStatusConnection; totalIssuance?: Maybe; totalIssuances: Array>; totalIssuancesConnection: TotalIssuanceConnection; @@ -3911,6 +3927,60 @@ export type QueryStakesConnectionArgs = { }; +export type QueryTipArgs = { + where: TipWhereUniqueInput; +}; + + +export type QueryTipsArgs = { + where?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; +}; + + +export type QueryTipsConnectionArgs = { + where?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; +}; + + +export type QueryTipStatusArgs = { + where: TipStatusWhereUniqueInput; +}; + + +export type QueryTipStatusesArgs = { + where?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; +}; + + +export type QueryTipStatusesConnectionArgs = { + where?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; +}; + + export type QueryTotalIssuanceArgs = { where: TotalIssuanceWhereUniqueInput; }; @@ -5025,6 +5095,8 @@ export type Subscription = { session?: Maybe; slashing?: Maybe; stake?: Maybe; + tip?: Maybe; + tipStatus?: Maybe; totalIssuance?: Maybe; treasurySpendProposal?: Maybe; treasuryStatus?: Maybe; @@ -5142,6 +5214,16 @@ export type SubscriptionStakeArgs = { }; +export type SubscriptionTipArgs = { + where?: Maybe; +}; + + +export type SubscriptionTipStatusArgs = { + where?: Maybe; +}; + + export type SubscriptionTotalIssuanceArgs = { where?: Maybe; }; @@ -5161,6 +5243,450 @@ export type SubscriptionValidatorArgs = { where?: Maybe; }; +export type Tip = { + __typename?: 'Tip'; + id: Scalars['Int']; + hash: Scalars['String']; + reason: Scalars['String']; + who: Scalars['String']; + finder?: Maybe; + finderFee?: Maybe; + closes?: Maybe; + tipStatus?: Maybe>; +}; + + +export type TipTipStatusArgs = { + where?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; +}; + +/** A connection to a list of items. */ +export type TipConnection = { + __typename?: 'TipConnection'; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** A list of edges. */ + edges: Array>; + aggregate: AggregateTip; +}; + +/** An edge in a connection. */ +export type TipEdge = { + __typename?: 'TipEdge'; + /** The item at the end of the edge. */ + node: Tip; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; +}; + +export enum TipOrderByInput { + IdAsc = 'id_ASC', + IdDesc = 'id_DESC', + HashAsc = 'hash_ASC', + HashDesc = 'hash_DESC', + ReasonAsc = 'reason_ASC', + ReasonDesc = 'reason_DESC', + WhoAsc = 'who_ASC', + WhoDesc = 'who_DESC', + FinderAsc = 'finder_ASC', + FinderDesc = 'finder_DESC', + FinderFeeAsc = 'finderFee_ASC', + FinderFeeDesc = 'finderFee_DESC', + ClosesAsc = 'closes_ASC', + ClosesDesc = 'closes_DESC' +} + +export type TipPreviousValues = { + __typename?: 'TipPreviousValues'; + id: Scalars['Int']; + hash: Scalars['String']; + reason: Scalars['String']; + who: Scalars['String']; + finder?: Maybe; + finderFee?: Maybe; + closes?: Maybe; +}; + +export type TipStatus = Node & { + __typename?: 'TipStatus'; + id: Scalars['ID']; + blockNumber: BlockNumber; + tip: Tip; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + +/** A connection to a list of items. */ +export type TipStatusConnection = { + __typename?: 'TipStatusConnection'; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** A list of edges. */ + edges: Array>; + aggregate: AggregateTipStatus; +}; + +/** An edge in a connection. */ +export type TipStatusEdge = { + __typename?: 'TipStatusEdge'; + /** The item at the end of the edge. */ + node: TipStatus; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; +}; + +export enum TipStatusOrderByInput { + IdAsc = 'id_ASC', + IdDesc = 'id_DESC', + StatusAsc = 'status_ASC', + StatusDesc = 'status_DESC', + UniqueStatusAsc = 'uniqueStatus_ASC', + UniqueStatusDesc = 'uniqueStatus_DESC' +} + +export type TipStatusPreviousValues = { + __typename?: 'TipStatusPreviousValues'; + id: Scalars['ID']; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + +export type TipStatusSubscriptionPayload = { + __typename?: 'TipStatusSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + updatedFields?: Maybe>; + previousValues?: Maybe; +}; + +export type TipStatusSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; + node?: Maybe; +}; + +export type TipStatusWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + id?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + status?: Maybe; + /** All values that are not equal to given value. */ + status_not?: Maybe; + /** All values that are contained in given list. */ + status_in?: Maybe>; + /** All values that are not contained in given list. */ + status_not_in?: Maybe>; + /** All values less than the given value. */ + status_lt?: Maybe; + /** All values less than or equal the given value. */ + status_lte?: Maybe; + /** All values greater than the given value. */ + status_gt?: Maybe; + /** All values greater than or equal the given value. */ + status_gte?: Maybe; + /** All values containing the given string. */ + status_contains?: Maybe; + /** All values not containing the given string. */ + status_not_contains?: Maybe; + /** All values starting with the given string. */ + status_starts_with?: Maybe; + /** All values not starting with the given string. */ + status_not_starts_with?: Maybe; + /** All values ending with the given string. */ + status_ends_with?: Maybe; + /** All values not ending with the given string. */ + status_not_ends_with?: Maybe; + uniqueStatus?: Maybe; + /** All values that are not equal to given value. */ + uniqueStatus_not?: Maybe; + /** All values that are contained in given list. */ + uniqueStatus_in?: Maybe>; + /** All values that are not contained in given list. */ + uniqueStatus_not_in?: Maybe>; + /** All values less than the given value. */ + uniqueStatus_lt?: Maybe; + /** All values less than or equal the given value. */ + uniqueStatus_lte?: Maybe; + /** All values greater than the given value. */ + uniqueStatus_gt?: Maybe; + /** All values greater than or equal the given value. */ + uniqueStatus_gte?: Maybe; + /** All values containing the given string. */ + uniqueStatus_contains?: Maybe; + /** All values not containing the given string. */ + uniqueStatus_not_contains?: Maybe; + /** All values starting with the given string. */ + uniqueStatus_starts_with?: Maybe; + /** All values not starting with the given string. */ + uniqueStatus_not_starts_with?: Maybe; + /** All values ending with the given string. */ + uniqueStatus_ends_with?: Maybe; + /** All values not ending with the given string. */ + uniqueStatus_not_ends_with?: Maybe; + blockNumber?: Maybe; + tip?: Maybe; +}; + +export type TipStatusWhereUniqueInput = { + id?: Maybe; + uniqueStatus?: Maybe; +}; + +export type TipSubscriptionPayload = { + __typename?: 'TipSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + updatedFields?: Maybe>; + previousValues?: Maybe; +}; + +export type TipSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; + node?: Maybe; +}; + +export type TipWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + id?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + hash?: Maybe; + /** All values that are not equal to given value. */ + hash_not?: Maybe; + /** All values that are contained in given list. */ + hash_in?: Maybe>; + /** All values that are not contained in given list. */ + hash_not_in?: Maybe>; + /** All values less than the given value. */ + hash_lt?: Maybe; + /** All values less than or equal the given value. */ + hash_lte?: Maybe; + /** All values greater than the given value. */ + hash_gt?: Maybe; + /** All values greater than or equal the given value. */ + hash_gte?: Maybe; + /** All values containing the given string. */ + hash_contains?: Maybe; + /** All values not containing the given string. */ + hash_not_contains?: Maybe; + /** All values starting with the given string. */ + hash_starts_with?: Maybe; + /** All values not starting with the given string. */ + hash_not_starts_with?: Maybe; + /** All values ending with the given string. */ + hash_ends_with?: Maybe; + /** All values not ending with the given string. */ + hash_not_ends_with?: Maybe; + reason?: Maybe; + /** All values that are not equal to given value. */ + reason_not?: Maybe; + /** All values that are contained in given list. */ + reason_in?: Maybe>; + /** All values that are not contained in given list. */ + reason_not_in?: Maybe>; + /** All values less than the given value. */ + reason_lt?: Maybe; + /** All values less than or equal the given value. */ + reason_lte?: Maybe; + /** All values greater than the given value. */ + reason_gt?: Maybe; + /** All values greater than or equal the given value. */ + reason_gte?: Maybe; + /** All values containing the given string. */ + reason_contains?: Maybe; + /** All values not containing the given string. */ + reason_not_contains?: Maybe; + /** All values starting with the given string. */ + reason_starts_with?: Maybe; + /** All values not starting with the given string. */ + reason_not_starts_with?: Maybe; + /** All values ending with the given string. */ + reason_ends_with?: Maybe; + /** All values not ending with the given string. */ + reason_not_ends_with?: Maybe; + who?: Maybe; + /** All values that are not equal to given value. */ + who_not?: Maybe; + /** All values that are contained in given list. */ + who_in?: Maybe>; + /** All values that are not contained in given list. */ + who_not_in?: Maybe>; + /** All values less than the given value. */ + who_lt?: Maybe; + /** All values less than or equal the given value. */ + who_lte?: Maybe; + /** All values greater than the given value. */ + who_gt?: Maybe; + /** All values greater than or equal the given value. */ + who_gte?: Maybe; + /** All values containing the given string. */ + who_contains?: Maybe; + /** All values not containing the given string. */ + who_not_contains?: Maybe; + /** All values starting with the given string. */ + who_starts_with?: Maybe; + /** All values not starting with the given string. */ + who_not_starts_with?: Maybe; + /** All values ending with the given string. */ + who_ends_with?: Maybe; + /** All values not ending with the given string. */ + who_not_ends_with?: Maybe; + finder?: Maybe; + /** All values that are not equal to given value. */ + finder_not?: Maybe; + /** All values that are contained in given list. */ + finder_in?: Maybe>; + /** All values that are not contained in given list. */ + finder_not_in?: Maybe>; + /** All values less than the given value. */ + finder_lt?: Maybe; + /** All values less than or equal the given value. */ + finder_lte?: Maybe; + /** All values greater than the given value. */ + finder_gt?: Maybe; + /** All values greater than or equal the given value. */ + finder_gte?: Maybe; + /** All values containing the given string. */ + finder_contains?: Maybe; + /** All values not containing the given string. */ + finder_not_contains?: Maybe; + /** All values starting with the given string. */ + finder_starts_with?: Maybe; + /** All values not starting with the given string. */ + finder_not_starts_with?: Maybe; + /** All values ending with the given string. */ + finder_ends_with?: Maybe; + /** All values not ending with the given string. */ + finder_not_ends_with?: Maybe; + finderFee?: Maybe; + /** All values that are not equal to given value. */ + finderFee_not?: Maybe; + /** All values that are contained in given list. */ + finderFee_in?: Maybe>; + /** All values that are not contained in given list. */ + finderFee_not_in?: Maybe>; + /** All values less than the given value. */ + finderFee_lt?: Maybe; + /** All values less than or equal the given value. */ + finderFee_lte?: Maybe; + /** All values greater than the given value. */ + finderFee_gt?: Maybe; + /** All values greater than or equal the given value. */ + finderFee_gte?: Maybe; + /** All values containing the given string. */ + finderFee_contains?: Maybe; + /** All values not containing the given string. */ + finderFee_not_contains?: Maybe; + /** All values starting with the given string. */ + finderFee_starts_with?: Maybe; + /** All values not starting with the given string. */ + finderFee_not_starts_with?: Maybe; + /** All values ending with the given string. */ + finderFee_ends_with?: Maybe; + /** All values not ending with the given string. */ + finderFee_not_ends_with?: Maybe; + closes?: Maybe; + /** All values that are not equal to given value. */ + closes_not?: Maybe; + /** All values that are contained in given list. */ + closes_in?: Maybe>; + /** All values that are not contained in given list. */ + closes_not_in?: Maybe>; + /** All values less than the given value. */ + closes_lt?: Maybe; + /** All values less than or equal the given value. */ + closes_lte?: Maybe; + /** All values greater than the given value. */ + closes_gt?: Maybe; + /** All values greater than or equal the given value. */ + closes_gte?: Maybe; + tipStatus_every?: Maybe; + tipStatus_some?: Maybe; + tipStatus_none?: Maybe; +}; + +export type TipWhereUniqueInput = { + id?: Maybe; +}; + export type TotalIssuance = Node & { __typename?: 'TotalIssuance'; id: Scalars['ID']; @@ -6020,6 +6546,24 @@ export type OnchainTreasuryProposalFragment = ( & Pick ); +export type GetOnchainTipsQueryVariables = { + startBlock: Scalars['Int']; +}; + + +export type GetOnchainTipsQuery = ( + { __typename?: 'Query' } + & { tips: Array> } +); + +export type OnchainTipFragment = ( + { __typename?: 'Tip' } + & Pick +); + export const OnchainReferendumFragmentDoc = gql` fragment onchainReferendum on Referendum { preimageHash @@ -6061,6 +6605,13 @@ export const OnchainTreasuryProposalFragmentDoc = gql` treasuryProposalId } `; +export const OnchainTipFragmentDoc = gql` + fragment onchainTip on Tip { + finder + id + hash +} + `; export const GetExecutedMotionsWithPreimageHashDocument = gql` query getExecutedMotionsWithPreimageHash($preimageHash: String!, $blockNumber: Int!) { motions(where: {AND: [{motionStatus_some: {blockNumber: {number_lt: $blockNumber}}}, {motionStatus_some: {status: "Executed"}}, {preimageHash: $preimageHash}]}, orderBy: id_DESC) { @@ -6106,6 +6657,13 @@ export const GetOnchainTreasuryProposalsDocument = gql` } } ${OnchainTreasuryProposalFragmentDoc}`; +export const GetOnchainTipsDocument = gql` + query getOnchainTips($startBlock: Int!) { + tips(where: {tipStatus_some: {AND: [{status: "TipOpened"}, {blockNumber: {number_gte: $startBlock}}]}}) { + ...onchainTip + } +} + ${OnchainTipFragmentDoc}`; export type SdkFunctionWrapper = (action: () => Promise) => Promise; @@ -6130,7 +6688,10 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = }, getOnchainTreasuryProposals(variables: GetOnchainTreasuryProposalsQueryVariables): Promise { return withWrapper(() => client.request(print(GetOnchainTreasuryProposalsDocument), variables)); + }, + getOnchainTips(variables: GetOnchainTipsQueryVariables): Promise { + return withWrapper(() => client.request(print(GetOnchainTipsDocument), variables)); } }; } -export type Sdk = ReturnType; \ No newline at end of file +export type Sdk = ReturnType; diff --git a/chain-db-watcher/src/generated/discussion-db-graphql.ts b/chain-db-watcher/src/generated/discussion-db-graphql.ts index 763582bb1..58f756687 100644 --- a/chain-db-watcher/src/generated/discussion-db-graphql.ts +++ b/chain-db-watcher/src/generated/discussion-db-graphql.ts @@ -16,11 +16,6 @@ export type Scalars = { bpchar: any; /** Raw JSON value */ Json: any; - /** - * The `Long` scalar type represents non-fractional signed whole numeric values. - * Long can represent values between -(2^63) and 2^63 - 1. - */ - Long: any; /** The `Upload` scalar type represents a file upload. */ Upload: any; }; @@ -156,6 +151,16 @@ export type AggregateStake = { count: Scalars['Int']; }; +export type AggregateTip = { + __typename?: 'AggregateTip'; + count: Scalars['Int']; +}; + +export type AggregateTipStatus = { + __typename?: 'AggregateTipStatus'; + count: Scalars['Int']; +}; + export type AggregateTotalIssuance = { __typename?: 'AggregateTotalIssuance'; count: Scalars['Int']; @@ -176,12 +181,6 @@ export type AggregateValidator = { count: Scalars['Int']; }; -export type BatchPayload = { - __typename?: 'BatchPayload'; - /** The number of nodes that have been affected by the Batch operation. */ - count: Scalars['Long']; -}; - export type BlockIndex = Node & { __typename?: 'BlockIndex'; id: Scalars['ID']; @@ -200,13 +199,6 @@ export type BlockIndexConnection = { pageInfo: PageInfo; }; -export type BlockIndexCreateInput = { - id?: Maybe; - identifier: Scalars['String']; - index: Scalars['Int']; - startFrom: Scalars['Int']; -}; - /** An edge in a connection. */ export type BlockIndexEdge = { __typename?: 'BlockIndexEdge'; @@ -261,18 +253,6 @@ export type BlockIndexSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type BlockIndexUpdateInput = { - identifier?: Maybe; - index?: Maybe; - startFrom?: Maybe; -}; - -export type BlockIndexUpdateManyMutationInput = { - identifier?: Maybe; - index?: Maybe; - startFrom?: Maybe; -}; - export type BlockIndexWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -390,19 +370,6 @@ export type BlockNumberConnection = { pageInfo: PageInfo; }; -export type BlockNumberCreateInput = { - authoredBy: Scalars['String']; - hash: Scalars['String']; - id?: Maybe; - number: Scalars['Int']; - startDateTime: Scalars['DateTime']; -}; - -export type BlockNumberCreateOneInput = { - connect?: Maybe; - create?: Maybe; -}; - /** An edge in a connection. */ export type BlockNumberEdge = { __typename?: 'BlockNumberEdge'; @@ -460,39 +427,6 @@ export type BlockNumberSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type BlockNumberUpdateDataInput = { - authoredBy?: Maybe; - hash?: Maybe; - number?: Maybe; - startDateTime?: Maybe; -}; - -export type BlockNumberUpdateInput = { - authoredBy?: Maybe; - hash?: Maybe; - number?: Maybe; - startDateTime?: Maybe; -}; - -export type BlockNumberUpdateManyMutationInput = { - authoredBy?: Maybe; - hash?: Maybe; - number?: Maybe; - startDateTime?: Maybe; -}; - -export type BlockNumberUpdateOneRequiredInput = { - connect?: Maybe; - create?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type BlockNumberUpsertNestedInput = { - create: BlockNumberCreateInput; - update: BlockNumberUpdateDataInput; -}; - export type BlockNumberWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -739,11 +673,13 @@ export type Comment_Reactions_Bool_Exp = { /** unique or primary key constraints on table "comment_reactions" */ export enum Comment_Reactions_Constraint { + /** unique or primary key constraint */ + CommentReactionsCommentIdUserIdReactionKey = 'comment_reactions_comment_id_user_id_reaction_key', /** unique or primary key constraint */ CommentReactionsPkey = 'comment_reactions_pkey' } -/** input type for incrementing integer columne in table "comment_reactions" */ +/** input type for incrementing integer column in table "comment_reactions" */ export type Comment_Reactions_Inc_Input = { id?: Maybe; user_id?: Maybe; @@ -764,14 +700,18 @@ export type Comment_Reactions_Insert_Input = { export type Comment_Reactions_Max_Fields = { __typename?: 'comment_reactions_max_fields'; comment_id?: Maybe; + created_at?: Maybe; id?: Maybe; + updated_at?: Maybe; user_id?: Maybe; }; /** order by max() on columns of table "comment_reactions" */ export type Comment_Reactions_Max_Order_By = { comment_id?: Maybe; + created_at?: Maybe; id?: Maybe; + updated_at?: Maybe; user_id?: Maybe; }; @@ -779,14 +719,18 @@ export type Comment_Reactions_Max_Order_By = { export type Comment_Reactions_Min_Fields = { __typename?: 'comment_reactions_min_fields'; comment_id?: Maybe; + created_at?: Maybe; id?: Maybe; + updated_at?: Maybe; user_id?: Maybe; }; /** order by min() on columns of table "comment_reactions" */ export type Comment_Reactions_Min_Order_By = { comment_id?: Maybe; + created_at?: Maybe; id?: Maybe; + updated_at?: Maybe; user_id?: Maybe; }; @@ -1085,7 +1029,7 @@ export enum Comments_Constraint { CommentsPkey = 'comments_pkey' } -/** input type for incrementing integer columne in table "comments" */ +/** input type for incrementing integer column in table "comments" */ export type Comments_Inc_Input = { author_id?: Maybe; post_id?: Maybe; @@ -1345,22 +1289,6 @@ export type CouncilConnection = { pageInfo: PageInfo; }; -export type CouncilCreateInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - members?: Maybe; -}; - -export type CouncilCreateManyWithoutMembersInput = { - connect?: Maybe>; - create?: Maybe>; -}; - -export type CouncilCreateWithoutMembersInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; -}; - /** An edge in a connection. */ export type CouncilEdge = { __typename?: 'CouncilEdge'; @@ -1398,22 +1326,6 @@ export type CouncilMemberConnection = { pageInfo: PageInfo; }; -export type CouncilMemberCreateInput = { - address: Scalars['String']; - councils?: Maybe; - id?: Maybe; -}; - -export type CouncilMemberCreateManyWithoutCouncilsInput = { - connect?: Maybe>; - create?: Maybe>; -}; - -export type CouncilMemberCreateWithoutCouncilsInput = { - address: Scalars['String']; - id?: Maybe; -}; - /** An edge in a connection. */ export type CouncilMemberEdge = { __typename?: 'CouncilMemberEdge'; @@ -1436,69 +1348,6 @@ export type CouncilMemberPreviousValues = { id: Scalars['ID']; }; -export type CouncilMemberScalarWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - address?: Maybe; - /** All values containing the given string. */ - address_contains?: Maybe; - /** All values ending with the given string. */ - address_ends_with?: Maybe; - /** All values greater than the given value. */ - address_gt?: Maybe; - /** All values greater than or equal the given value. */ - address_gte?: Maybe; - /** All values that are contained in given list. */ - address_in?: Maybe>; - /** All values less than the given value. */ - address_lt?: Maybe; - /** All values less than or equal the given value. */ - address_lte?: Maybe; - /** All values that are not equal to given value. */ - address_not?: Maybe; - /** All values not containing the given string. */ - address_not_contains?: Maybe; - /** All values not ending with the given string. */ - address_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - address_not_in?: Maybe>; - /** All values not starting with the given string. */ - address_not_starts_with?: Maybe; - /** All values starting with the given string. */ - address_starts_with?: Maybe; - id?: Maybe; - /** All values containing the given string. */ - id_contains?: Maybe; - /** All values ending with the given string. */ - id_ends_with?: Maybe; - /** All values greater than the given value. */ - id_gt?: Maybe; - /** All values greater than or equal the given value. */ - id_gte?: Maybe; - /** All values that are contained in given list. */ - id_in?: Maybe>; - /** All values less than the given value. */ - id_lt?: Maybe; - /** All values less than or equal the given value. */ - id_lte?: Maybe; - /** All values that are not equal to given value. */ - id_not?: Maybe; - /** All values not containing the given string. */ - id_not_contains?: Maybe; - /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - id_not_in?: Maybe>; - /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; - /** All values starting with the given string. */ - id_starts_with?: Maybe; -}; - export type CouncilMemberSubscriptionPayload = { __typename?: 'CouncilMemberSubscriptionPayload'; mutation: MutationType; @@ -1525,51 +1374,6 @@ export type CouncilMemberSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type CouncilMemberUpdateInput = { - address?: Maybe; - councils?: Maybe; -}; - -export type CouncilMemberUpdateManyDataInput = { - address?: Maybe; -}; - -export type CouncilMemberUpdateManyMutationInput = { - address?: Maybe; -}; - -export type CouncilMemberUpdateManyWithoutCouncilsInput = { - connect?: Maybe>; - create?: Maybe>; - delete?: Maybe>; - deleteMany?: Maybe>; - disconnect?: Maybe>; - set?: Maybe>; - update?: Maybe>; - updateMany?: Maybe>; - upsert?: Maybe>; -}; - -export type CouncilMemberUpdateManyWithWhereNestedInput = { - data: CouncilMemberUpdateManyDataInput; - where: CouncilMemberScalarWhereInput; -}; - -export type CouncilMemberUpdateWithoutCouncilsDataInput = { - address?: Maybe; -}; - -export type CouncilMemberUpdateWithWhereUniqueWithoutCouncilsInput = { - data: CouncilMemberUpdateWithoutCouncilsDataInput; - where: CouncilMemberWhereUniqueInput; -}; - -export type CouncilMemberUpsertWithWhereUniqueWithoutCouncilsInput = { - create: CouncilMemberCreateWithoutCouncilsInput; - update: CouncilMemberUpdateWithoutCouncilsDataInput; - where: CouncilMemberWhereUniqueInput; -}; - export type CouncilMemberWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -1651,42 +1455,6 @@ export type CouncilPreviousValues = { id: Scalars['ID']; }; -export type CouncilScalarWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - id?: Maybe; - /** All values containing the given string. */ - id_contains?: Maybe; - /** All values ending with the given string. */ - id_ends_with?: Maybe; - /** All values greater than the given value. */ - id_gt?: Maybe; - /** All values greater than or equal the given value. */ - id_gte?: Maybe; - /** All values that are contained in given list. */ - id_in?: Maybe>; - /** All values less than the given value. */ - id_lt?: Maybe; - /** All values less than or equal the given value. */ - id_lte?: Maybe; - /** All values that are not equal to given value. */ - id_not?: Maybe; - /** All values not containing the given string. */ - id_not_contains?: Maybe; - /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - id_not_in?: Maybe>; - /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; - /** All values starting with the given string. */ - id_starts_with?: Maybe; -}; - export type CouncilSubscriptionPayload = { __typename?: 'CouncilSubscriptionPayload'; mutation: MutationType; @@ -1713,37 +1481,6 @@ export type CouncilSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type CouncilUpdateInput = { - blockNumber?: Maybe; - members?: Maybe; -}; - -export type CouncilUpdateManyWithoutMembersInput = { - connect?: Maybe>; - create?: Maybe>; - delete?: Maybe>; - deleteMany?: Maybe>; - disconnect?: Maybe>; - set?: Maybe>; - update?: Maybe>; - upsert?: Maybe>; -}; - -export type CouncilUpdateWithoutMembersDataInput = { - blockNumber?: Maybe; -}; - -export type CouncilUpdateWithWhereUniqueWithoutMembersInput = { - data: CouncilUpdateWithoutMembersDataInput; - where: CouncilWhereUniqueInput; -}; - -export type CouncilUpsertWithWhereUniqueWithoutMembersInput = { - create: CouncilCreateWithoutMembersInput; - update: CouncilUpdateWithoutMembersDataInput; - where: CouncilWhereUniqueInput; -}; - export type CouncilWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -1808,18 +1545,6 @@ export type EraConnection = { pageInfo: PageInfo; }; -export type EraCreateindividualPointsInput = { - set?: Maybe>; -}; - -export type EraCreateInput = { - eraStartSessionIndex: SessionCreateOneInput; - id?: Maybe; - index: Scalars['Int']; - individualPoints?: Maybe; - totalPoints: Scalars['String']; -}; - /** An edge in a connection. */ export type EraEdge = { __typename?: 'EraEdge'; @@ -1872,23 +1597,6 @@ export type EraSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type EraUpdateindividualPointsInput = { - set?: Maybe>; -}; - -export type EraUpdateInput = { - eraStartSessionIndex?: Maybe; - index?: Maybe; - individualPoints?: Maybe; - totalPoints?: Maybe; -}; - -export type EraUpdateManyMutationInput = { - index?: Maybe; - individualPoints?: Maybe; - totalPoints?: Maybe; -}; - export type EraWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -1990,12 +1698,6 @@ export type HeartBeatConnection = { pageInfo: PageInfo; }; -export type HeartBeatCreateInput = { - authorityId: Scalars['String']; - id?: Maybe; - sessionIndex: SessionCreateOneInput; -}; - /** An edge in a connection. */ export type HeartBeatEdge = { __typename?: 'HeartBeatEdge'; @@ -2044,15 +1746,6 @@ export type HeartBeatSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type HeartBeatUpdateInput = { - authorityId?: Maybe; - sessionIndex?: Maybe; -}; - -export type HeartBeatUpdateManyMutationInput = { - authorityId?: Maybe; -}; - export type HeartBeatWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -2138,10 +1831,8 @@ export type Int_Comparison_Exp = { export type LoginResponse = { __typename?: 'LoginResponse'; token?: Maybe; - user?: Maybe; }; - export type Message = { __typename?: 'Message'; message?: Maybe; @@ -2196,104 +1887,13 @@ export type MotionConnection = { pageInfo: PageInfo; }; -export type MotionCreateInput = { - author: Scalars['String']; - memberCount: Scalars['Int']; - metaDescription: Scalars['String']; - method: Scalars['String']; - motionProposalArguments?: Maybe; - motionProposalHash: Scalars['String']; - motionProposalId: Scalars['Int']; - motionStatus?: Maybe; - preimage?: Maybe; - preimageHash?: Maybe; - section: Scalars['String']; - treasurySpendProposal?: Maybe; -}; - -export type MotionCreateOneWithoutMotionProposalArgumentsInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type MotionCreateOneWithoutMotionStatusInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type MotionCreateOneWithoutPreimageInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type MotionCreateOneWithoutTreasurySpendProposalInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type MotionCreateWithoutMotionProposalArgumentsInput = { - author: Scalars['String']; - memberCount: Scalars['Int']; - metaDescription: Scalars['String']; - method: Scalars['String']; - motionProposalHash: Scalars['String']; - motionProposalId: Scalars['Int']; - motionStatus?: Maybe; - preimage?: Maybe; - preimageHash?: Maybe; - section: Scalars['String']; - treasurySpendProposal?: Maybe; -}; - -export type MotionCreateWithoutMotionStatusInput = { - author: Scalars['String']; - memberCount: Scalars['Int']; - metaDescription: Scalars['String']; - method: Scalars['String']; - motionProposalArguments?: Maybe; - motionProposalHash: Scalars['String']; - motionProposalId: Scalars['Int']; - preimage?: Maybe; - preimageHash?: Maybe; - section: Scalars['String']; - treasurySpendProposal?: Maybe; -}; - -export type MotionCreateWithoutPreimageInput = { - author: Scalars['String']; - memberCount: Scalars['Int']; - metaDescription: Scalars['String']; - method: Scalars['String']; - motionProposalArguments?: Maybe; - motionProposalHash: Scalars['String']; - motionProposalId: Scalars['Int']; - motionStatus?: Maybe; - preimageHash?: Maybe; - section: Scalars['String']; - treasurySpendProposal?: Maybe; -}; - -export type MotionCreateWithoutTreasurySpendProposalInput = { - author: Scalars['String']; - memberCount: Scalars['Int']; - metaDescription: Scalars['String']; - method: Scalars['String']; - motionProposalArguments?: Maybe; - motionProposalHash: Scalars['String']; - motionProposalId: Scalars['Int']; - motionStatus?: Maybe; - preimage?: Maybe; - preimageHash?: Maybe; - section: Scalars['String']; -}; - -/** An edge in a connection. */ -export type MotionEdge = { - __typename?: 'MotionEdge'; - /** A cursor for use in pagination. */ - cursor: Scalars['String']; - /** The item at the end of the edge. */ - node: Motion; +/** An edge in a connection. */ +export type MotionEdge = { + __typename?: 'MotionEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; + /** The item at the end of the edge. */ + node: Motion; }; export enum MotionOrderByInput { @@ -2348,24 +1948,6 @@ export type MotionProposalArgumentConnection = { pageInfo: PageInfo; }; -export type MotionProposalArgumentCreateInput = { - id?: Maybe; - motion: MotionCreateOneWithoutMotionProposalArgumentsInput; - name: Scalars['String']; - value: Scalars['String']; -}; - -export type MotionProposalArgumentCreateManyWithoutMotionInput = { - connect?: Maybe>; - create?: Maybe>; -}; - -export type MotionProposalArgumentCreateWithoutMotionInput = { - id?: Maybe; - name: Scalars['String']; - value: Scalars['String']; -}; - /** An edge in a connection. */ export type MotionProposalArgumentEdge = { __typename?: 'MotionProposalArgumentEdge'; @@ -2391,96 +1973,6 @@ export type MotionProposalArgumentPreviousValues = { value: Scalars['String']; }; -export type MotionProposalArgumentScalarWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - id?: Maybe; - /** All values containing the given string. */ - id_contains?: Maybe; - /** All values ending with the given string. */ - id_ends_with?: Maybe; - /** All values greater than the given value. */ - id_gt?: Maybe; - /** All values greater than or equal the given value. */ - id_gte?: Maybe; - /** All values that are contained in given list. */ - id_in?: Maybe>; - /** All values less than the given value. */ - id_lt?: Maybe; - /** All values less than or equal the given value. */ - id_lte?: Maybe; - /** All values that are not equal to given value. */ - id_not?: Maybe; - /** All values not containing the given string. */ - id_not_contains?: Maybe; - /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - id_not_in?: Maybe>; - /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; - /** All values starting with the given string. */ - id_starts_with?: Maybe; - name?: Maybe; - /** All values containing the given string. */ - name_contains?: Maybe; - /** All values ending with the given string. */ - name_ends_with?: Maybe; - /** All values greater than the given value. */ - name_gt?: Maybe; - /** All values greater than or equal the given value. */ - name_gte?: Maybe; - /** All values that are contained in given list. */ - name_in?: Maybe>; - /** All values less than the given value. */ - name_lt?: Maybe; - /** All values less than or equal the given value. */ - name_lte?: Maybe; - /** All values that are not equal to given value. */ - name_not?: Maybe; - /** All values not containing the given string. */ - name_not_contains?: Maybe; - /** All values not ending with the given string. */ - name_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - name_not_in?: Maybe>; - /** All values not starting with the given string. */ - name_not_starts_with?: Maybe; - /** All values starting with the given string. */ - name_starts_with?: Maybe; - value?: Maybe; - /** All values containing the given string. */ - value_contains?: Maybe; - /** All values ending with the given string. */ - value_ends_with?: Maybe; - /** All values greater than the given value. */ - value_gt?: Maybe; - /** All values greater than or equal the given value. */ - value_gte?: Maybe; - /** All values that are contained in given list. */ - value_in?: Maybe>; - /** All values less than the given value. */ - value_lt?: Maybe; - /** All values less than or equal the given value. */ - value_lte?: Maybe; - /** All values that are not equal to given value. */ - value_not?: Maybe; - /** All values not containing the given string. */ - value_not_contains?: Maybe; - /** All values not ending with the given string. */ - value_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - value_not_in?: Maybe>; - /** All values not starting with the given string. */ - value_not_starts_with?: Maybe; - /** All values starting with the given string. */ - value_starts_with?: Maybe; -}; - export type MotionProposalArgumentSubscriptionPayload = { __typename?: 'MotionProposalArgumentSubscriptionPayload'; mutation: MutationType; @@ -2507,55 +1999,6 @@ export type MotionProposalArgumentSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type MotionProposalArgumentUpdateInput = { - motion?: Maybe; - name?: Maybe; - value?: Maybe; -}; - -export type MotionProposalArgumentUpdateManyDataInput = { - name?: Maybe; - value?: Maybe; -}; - -export type MotionProposalArgumentUpdateManyMutationInput = { - name?: Maybe; - value?: Maybe; -}; - -export type MotionProposalArgumentUpdateManyWithoutMotionInput = { - connect?: Maybe>; - create?: Maybe>; - delete?: Maybe>; - deleteMany?: Maybe>; - disconnect?: Maybe>; - set?: Maybe>; - update?: Maybe>; - updateMany?: Maybe>; - upsert?: Maybe>; -}; - -export type MotionProposalArgumentUpdateManyWithWhereNestedInput = { - data: MotionProposalArgumentUpdateManyDataInput; - where: MotionProposalArgumentScalarWhereInput; -}; - -export type MotionProposalArgumentUpdateWithoutMotionDataInput = { - name?: Maybe; - value?: Maybe; -}; - -export type MotionProposalArgumentUpdateWithWhereUniqueWithoutMotionInput = { - data: MotionProposalArgumentUpdateWithoutMotionDataInput; - where: MotionProposalArgumentWhereUniqueInput; -}; - -export type MotionProposalArgumentUpsertWithWhereUniqueWithoutMotionInput = { - create: MotionProposalArgumentCreateWithoutMotionInput; - update: MotionProposalArgumentUpdateWithoutMotionDataInput; - where: MotionProposalArgumentWhereUniqueInput; -}; - export type MotionProposalArgumentWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -2670,26 +2113,6 @@ export type MotionStatusConnection = { pageInfo: PageInfo; }; -export type MotionStatusCreateInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - motion: MotionCreateOneWithoutMotionStatusInput; - status: Scalars['String']; - uniqueStatus: Scalars['String']; -}; - -export type MotionStatusCreateManyWithoutMotionInput = { - connect?: Maybe>; - create?: Maybe>; -}; - -export type MotionStatusCreateWithoutMotionInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - status: Scalars['String']; - uniqueStatus: Scalars['String']; -}; - /** An edge in a connection. */ export type MotionStatusEdge = { __typename?: 'MotionStatusEdge'; @@ -2715,13 +2138,40 @@ export type MotionStatusPreviousValues = { uniqueStatus: Scalars['String']; }; -export type MotionStatusScalarWhereInput = { +export type MotionStatusSubscriptionPayload = { + __typename?: 'MotionStatusSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; +}; + +export type MotionStatusSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; +}; + +export type MotionStatusWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; + OR?: Maybe>; + blockNumber?: Maybe; id?: Maybe; /** All values containing the given string. */ id_contains?: Maybe; @@ -2749,6 +2199,7 @@ export type MotionStatusScalarWhereInput = { id_not_starts_with?: Maybe; /** All values starting with the given string. */ id_starts_with?: Maybe; + motion?: Maybe; status?: Maybe; /** All values containing the given string. */ status_contains?: Maybe; @@ -2805,24 +2256,29 @@ export type MotionStatusScalarWhereInput = { uniqueStatus_starts_with?: Maybe; }; -export type MotionStatusSubscriptionPayload = { - __typename?: 'MotionStatusSubscriptionPayload'; +export type MotionStatusWhereUniqueInput = { + id?: Maybe; + uniqueStatus?: Maybe; +}; + +export type MotionSubscriptionPayload = { + __typename?: 'MotionSubscriptionPayload'; mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; + node?: Maybe; + previousValues?: Maybe; updatedFields?: Maybe>; }; -export type MotionStatusSubscriptionWhereInput = { +export type MotionSubscriptionWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; + OR?: Maybe>; /** The subscription event gets dispatched when it's listed in mutation_in */ mutation_in?: Maybe>; - node?: Maybe; + node?: Maybe; /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ updatedFields_contains?: Maybe; /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ @@ -2831,314 +2287,6 @@ export type MotionStatusSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type MotionStatusUpdateInput = { - blockNumber?: Maybe; - motion?: Maybe; - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type MotionStatusUpdateManyDataInput = { - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type MotionStatusUpdateManyMutationInput = { - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type MotionStatusUpdateManyWithoutMotionInput = { - connect?: Maybe>; - create?: Maybe>; - delete?: Maybe>; - deleteMany?: Maybe>; - disconnect?: Maybe>; - set?: Maybe>; - update?: Maybe>; - updateMany?: Maybe>; - upsert?: Maybe>; -}; - -export type MotionStatusUpdateManyWithWhereNestedInput = { - data: MotionStatusUpdateManyDataInput; - where: MotionStatusScalarWhereInput; -}; - -export type MotionStatusUpdateWithoutMotionDataInput = { - blockNumber?: Maybe; - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type MotionStatusUpdateWithWhereUniqueWithoutMotionInput = { - data: MotionStatusUpdateWithoutMotionDataInput; - where: MotionStatusWhereUniqueInput; -}; - -export type MotionStatusUpsertWithWhereUniqueWithoutMotionInput = { - create: MotionStatusCreateWithoutMotionInput; - update: MotionStatusUpdateWithoutMotionDataInput; - where: MotionStatusWhereUniqueInput; -}; - -export type MotionStatusWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - blockNumber?: Maybe; - id?: Maybe; - /** All values containing the given string. */ - id_contains?: Maybe; - /** All values ending with the given string. */ - id_ends_with?: Maybe; - /** All values greater than the given value. */ - id_gt?: Maybe; - /** All values greater than or equal the given value. */ - id_gte?: Maybe; - /** All values that are contained in given list. */ - id_in?: Maybe>; - /** All values less than the given value. */ - id_lt?: Maybe; - /** All values less than or equal the given value. */ - id_lte?: Maybe; - /** All values that are not equal to given value. */ - id_not?: Maybe; - /** All values not containing the given string. */ - id_not_contains?: Maybe; - /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - id_not_in?: Maybe>; - /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; - /** All values starting with the given string. */ - id_starts_with?: Maybe; - motion?: Maybe; - status?: Maybe; - /** All values containing the given string. */ - status_contains?: Maybe; - /** All values ending with the given string. */ - status_ends_with?: Maybe; - /** All values greater than the given value. */ - status_gt?: Maybe; - /** All values greater than or equal the given value. */ - status_gte?: Maybe; - /** All values that are contained in given list. */ - status_in?: Maybe>; - /** All values less than the given value. */ - status_lt?: Maybe; - /** All values less than or equal the given value. */ - status_lte?: Maybe; - /** All values that are not equal to given value. */ - status_not?: Maybe; - /** All values not containing the given string. */ - status_not_contains?: Maybe; - /** All values not ending with the given string. */ - status_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - status_not_in?: Maybe>; - /** All values not starting with the given string. */ - status_not_starts_with?: Maybe; - /** All values starting with the given string. */ - status_starts_with?: Maybe; - uniqueStatus?: Maybe; - /** All values containing the given string. */ - uniqueStatus_contains?: Maybe; - /** All values ending with the given string. */ - uniqueStatus_ends_with?: Maybe; - /** All values greater than the given value. */ - uniqueStatus_gt?: Maybe; - /** All values greater than or equal the given value. */ - uniqueStatus_gte?: Maybe; - /** All values that are contained in given list. */ - uniqueStatus_in?: Maybe>; - /** All values less than the given value. */ - uniqueStatus_lt?: Maybe; - /** All values less than or equal the given value. */ - uniqueStatus_lte?: Maybe; - /** All values that are not equal to given value. */ - uniqueStatus_not?: Maybe; - /** All values not containing the given string. */ - uniqueStatus_not_contains?: Maybe; - /** All values not ending with the given string. */ - uniqueStatus_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - uniqueStatus_not_in?: Maybe>; - /** All values not starting with the given string. */ - uniqueStatus_not_starts_with?: Maybe; - /** All values starting with the given string. */ - uniqueStatus_starts_with?: Maybe; -}; - -export type MotionStatusWhereUniqueInput = { - id?: Maybe; - uniqueStatus?: Maybe; -}; - -export type MotionSubscriptionPayload = { - __typename?: 'MotionSubscriptionPayload'; - mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; - updatedFields?: Maybe>; -}; - -export type MotionSubscriptionWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - /** The subscription event gets dispatched when it's listed in mutation_in */ - mutation_in?: Maybe>; - node?: Maybe; - /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ - updatedFields_contains?: Maybe; - /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ - updatedFields_contains_every?: Maybe>; - /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ - updatedFields_contains_some?: Maybe>; -}; - -export type MotionUpdateInput = { - author?: Maybe; - memberCount?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - motionProposalArguments?: Maybe; - motionProposalHash?: Maybe; - motionProposalId?: Maybe; - motionStatus?: Maybe; - preimage?: Maybe; - preimageHash?: Maybe; - section?: Maybe; - treasurySpendProposal?: Maybe; -}; - -export type MotionUpdateManyMutationInput = { - author?: Maybe; - memberCount?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - motionProposalHash?: Maybe; - motionProposalId?: Maybe; - preimageHash?: Maybe; - section?: Maybe; -}; - -export type MotionUpdateOneRequiredWithoutMotionProposalArgumentsInput = { - connect?: Maybe; - create?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type MotionUpdateOneRequiredWithoutMotionStatusInput = { - connect?: Maybe; - create?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type MotionUpdateOneWithoutPreimageInput = { - connect?: Maybe; - create?: Maybe; - delete?: Maybe; - disconnect?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type MotionUpdateOneWithoutTreasurySpendProposalInput = { - connect?: Maybe; - create?: Maybe; - delete?: Maybe; - disconnect?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type MotionUpdateWithoutMotionProposalArgumentsDataInput = { - author?: Maybe; - memberCount?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - motionProposalHash?: Maybe; - motionProposalId?: Maybe; - motionStatus?: Maybe; - preimage?: Maybe; - preimageHash?: Maybe; - section?: Maybe; - treasurySpendProposal?: Maybe; -}; - -export type MotionUpdateWithoutMotionStatusDataInput = { - author?: Maybe; - memberCount?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - motionProposalArguments?: Maybe; - motionProposalHash?: Maybe; - motionProposalId?: Maybe; - preimage?: Maybe; - preimageHash?: Maybe; - section?: Maybe; - treasurySpendProposal?: Maybe; -}; - -export type MotionUpdateWithoutPreimageDataInput = { - author?: Maybe; - memberCount?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - motionProposalArguments?: Maybe; - motionProposalHash?: Maybe; - motionProposalId?: Maybe; - motionStatus?: Maybe; - preimageHash?: Maybe; - section?: Maybe; - treasurySpendProposal?: Maybe; -}; - -export type MotionUpdateWithoutTreasurySpendProposalDataInput = { - author?: Maybe; - memberCount?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - motionProposalArguments?: Maybe; - motionProposalHash?: Maybe; - motionProposalId?: Maybe; - motionStatus?: Maybe; - preimage?: Maybe; - preimageHash?: Maybe; - section?: Maybe; -}; - -export type MotionUpsertWithoutMotionProposalArgumentsInput = { - create: MotionCreateWithoutMotionProposalArgumentsInput; - update: MotionUpdateWithoutMotionProposalArgumentsDataInput; -}; - -export type MotionUpsertWithoutMotionStatusInput = { - create: MotionCreateWithoutMotionStatusInput; - update: MotionUpdateWithoutMotionStatusDataInput; -}; - -export type MotionUpsertWithoutPreimageInput = { - create: MotionCreateWithoutPreimageInput; - update: MotionUpdateWithoutPreimageDataInput; -}; - -export type MotionUpsertWithoutTreasurySpendProposalInput = { - create: MotionCreateWithoutTreasurySpendProposalInput; - update: MotionUpdateWithoutTreasurySpendProposalDataInput; -}; - export type MotionWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -3601,7 +2749,6 @@ export type Mutation = { addressSignupStart?: Maybe; addressUnlink?: Maybe; changeEmail?: Maybe; - changeName?: Maybe; changeNotificationPreference?: Maybe; changePassword?: Maybe; changeUsername?: Maybe; @@ -3668,11 +2815,6 @@ export type MutationChangeEmailArgs = { }; -export type MutationChangeNameArgs = { - newName: Scalars['String']; -}; - - export type MutationChangeNotificationPreferenceArgs = { notificationPreferences?: Maybe; }; @@ -3748,7 +2890,6 @@ export type MutationSetDefaultAddressArgs = { export type MutationSignupArgs = { email?: Maybe; - name?: Maybe; password: Scalars['String']; username: Scalars['String']; }; @@ -3774,88 +2915,9 @@ export type Mutation_Root = { addressSignupStart?: Maybe; addressUnlink?: Maybe; changeEmail?: Maybe; - changeName?: Maybe; changeNotificationPreference?: Maybe; changePassword?: Maybe; changeUsername?: Maybe; - createBlockIndex: BlockIndex; - createBlockNumber: BlockNumber; - createCouncil: Council; - createCouncilMember: CouncilMember; - createEra: Era; - createHeartBeat: HeartBeat; - createMotion: Motion; - createMotionProposalArgument: MotionProposalArgument; - createMotionStatus: MotionStatus; - createNomination: Nomination; - createOfflineValidator: OfflineValidator; - createPreimage: Preimage; - createPreimageArgument: PreimageArgument; - createPreimageStatus: PreimageStatus; - createProposal: Proposal; - createProposalStatus: ProposalStatus; - createReferendum: Referendum; - createReferendumStatus: ReferendumStatus; - createReward: Reward; - createSession: Session; - createSlashing: Slashing; - createStake: Stake; - createTotalIssuance: TotalIssuance; - createTreasurySpendProposal: TreasurySpendProposal; - createTreasuryStatus: TreasuryStatus; - createValidator: Validator; - deleteBlockIndex?: Maybe; - deleteBlockNumber?: Maybe; - deleteCouncil?: Maybe; - deleteCouncilMember?: Maybe; - deleteEra?: Maybe; - deleteHeartBeat?: Maybe; - deleteManyBlockIndexes: BatchPayload; - deleteManyBlockNumbers: BatchPayload; - deleteManyCouncilMembers: BatchPayload; - deleteManyCouncils: BatchPayload; - deleteManyEras: BatchPayload; - deleteManyHeartBeats: BatchPayload; - deleteManyMotionProposalArguments: BatchPayload; - deleteManyMotionStatuses: BatchPayload; - deleteManyMotions: BatchPayload; - deleteManyNominations: BatchPayload; - deleteManyOfflineValidators: BatchPayload; - deleteManyPreimageArguments: BatchPayload; - deleteManyPreimageStatuses: BatchPayload; - deleteManyPreimages: BatchPayload; - deleteManyProposalStatuses: BatchPayload; - deleteManyProposals: BatchPayload; - deleteManyReferendumStatuses: BatchPayload; - deleteManyReferendums: BatchPayload; - deleteManyRewards: BatchPayload; - deleteManySessions: BatchPayload; - deleteManySlashings: BatchPayload; - deleteManyStakes: BatchPayload; - deleteManyTotalIssuances: BatchPayload; - deleteManyTreasurySpendProposals: BatchPayload; - deleteManyTreasuryStatuses: BatchPayload; - deleteManyValidators: BatchPayload; - deleteMotion?: Maybe; - deleteMotionProposalArgument?: Maybe; - deleteMotionStatus?: Maybe; - deleteNomination?: Maybe; - deleteOfflineValidator?: Maybe; - deletePreimage?: Maybe; - deletePreimageArgument?: Maybe; - deletePreimageStatus?: Maybe; - deleteProposal?: Maybe; - deleteProposalStatus?: Maybe; - deleteReferendum?: Maybe; - deleteReferendumStatus?: Maybe; - deleteReward?: Maybe; - deleteSession?: Maybe; - deleteSlashing?: Maybe; - deleteStake?: Maybe; - deleteTotalIssuance?: Maybe; - deleteTreasurySpendProposal?: Maybe; - deleteTreasuryStatus?: Maybe; - deleteValidator?: Maybe; /** delete data from the table: "comment_reactions" */ delete_comment_reactions?: Maybe; /** delete single row from the table: "comment_reactions" */ @@ -3868,6 +2930,14 @@ export type Mutation_Root = { delete_onchain_links?: Maybe; /** delete single row from the table: "onchain_links" */ delete_onchain_links_by_pk?: Maybe; + /** delete data from the table: "poll" */ + delete_poll?: Maybe; + /** delete single row from the table: "poll" */ + delete_poll_by_pk?: Maybe; + /** delete data from the table: "poll_votes" */ + delete_poll_votes?: Maybe; + /** delete single row from the table: "poll_votes" */ + delete_poll_votes_by_pk?: Maybe; /** delete data from the table: "post_reactions" */ delete_post_reactions?: Maybe; /** delete single row from the table: "post_reactions" */ @@ -3884,7 +2954,6 @@ export type Mutation_Root = { delete_posts?: Maybe; /** delete single row from the table: "posts" */ delete_posts_by_pk?: Maybe; - executeRaw: Scalars['Json']; /** insert data into the table: "comment_reactions" */ insert_comment_reactions?: Maybe; /** insert a single row into the table: "comment_reactions" */ @@ -3897,6 +2966,14 @@ export type Mutation_Root = { insert_onchain_links?: Maybe; /** insert a single row into the table: "onchain_links" */ insert_onchain_links_one?: Maybe; + /** insert data into the table: "poll" */ + insert_poll?: Maybe; + /** insert a single row into the table: "poll" */ + insert_poll_one?: Maybe; + /** insert data into the table: "poll_votes" */ + insert_poll_votes?: Maybe; + /** insert a single row into the table: "poll_votes" */ + insert_poll_votes_one?: Maybe; /** insert data into the table: "post_reactions" */ insert_post_reactions?: Maybe; /** insert a single row into the table: "post_reactions" */ @@ -3926,57 +3003,6 @@ export type Mutation_Root = { setDefaultAddress?: Maybe; signup?: Maybe; undoEmailChange?: Maybe; - updateBlockIndex?: Maybe; - updateBlockNumber?: Maybe; - updateCouncil?: Maybe; - updateCouncilMember?: Maybe; - updateEra?: Maybe; - updateHeartBeat?: Maybe; - updateManyBlockIndexes: BatchPayload; - updateManyBlockNumbers: BatchPayload; - updateManyCouncilMembers: BatchPayload; - updateManyEras: BatchPayload; - updateManyHeartBeats: BatchPayload; - updateManyMotionProposalArguments: BatchPayload; - updateManyMotionStatuses: BatchPayload; - updateManyMotions: BatchPayload; - updateManyNominations: BatchPayload; - updateManyOfflineValidators: BatchPayload; - updateManyPreimageArguments: BatchPayload; - updateManyPreimageStatuses: BatchPayload; - updateManyPreimages: BatchPayload; - updateManyProposalStatuses: BatchPayload; - updateManyProposals: BatchPayload; - updateManyReferendumStatuses: BatchPayload; - updateManyReferendums: BatchPayload; - updateManyRewards: BatchPayload; - updateManySessions: BatchPayload; - updateManySlashings: BatchPayload; - updateManyStakes: BatchPayload; - updateManyTotalIssuances: BatchPayload; - updateManyTreasurySpendProposals: BatchPayload; - updateManyTreasuryStatuses: BatchPayload; - updateManyValidators: BatchPayload; - updateMotion?: Maybe; - updateMotionProposalArgument?: Maybe; - updateMotionStatus?: Maybe; - updateNomination?: Maybe; - updateOfflineValidator?: Maybe; - updatePreimage?: Maybe; - updatePreimageArgument?: Maybe; - updatePreimageStatus?: Maybe; - updateProposal?: Maybe; - updateProposalStatus?: Maybe; - updateReferendum?: Maybe; - updateReferendumStatus?: Maybe; - updateReward?: Maybe; - updateSession?: Maybe; - updateSlashing?: Maybe; - updateStake?: Maybe; - updateTotalIssuance?: Maybe; - updateTreasurySpendProposal?: Maybe; - updateTreasuryStatus?: Maybe; - updateValidator?: Maybe; /** update data of the table: "comment_reactions" */ update_comment_reactions?: Maybe; /** update single row of the table: "comment_reactions" */ @@ -3989,6 +3015,14 @@ export type Mutation_Root = { update_onchain_links?: Maybe; /** update single row of the table: "onchain_links" */ update_onchain_links_by_pk?: Maybe; + /** update data of the table: "poll" */ + update_poll?: Maybe; + /** update single row of the table: "poll" */ + update_poll_by_pk?: Maybe; + /** update data of the table: "poll_votes" */ + update_poll_votes?: Maybe; + /** update single row of the table: "poll_votes" */ + update_poll_votes_by_pk?: Maybe; /** update data of the table: "post_reactions" */ update_post_reactions?: Maybe; /** update single row of the table: "post_reactions" */ @@ -4005,32 +3039,6 @@ export type Mutation_Root = { update_posts?: Maybe; /** update single row of the table: "posts" */ update_posts_by_pk?: Maybe; - upsertBlockIndex: BlockIndex; - upsertBlockNumber: BlockNumber; - upsertCouncil: Council; - upsertCouncilMember: CouncilMember; - upsertEra: Era; - upsertHeartBeat: HeartBeat; - upsertMotion: Motion; - upsertMotionProposalArgument: MotionProposalArgument; - upsertMotionStatus: MotionStatus; - upsertNomination: Nomination; - upsertOfflineValidator: OfflineValidator; - upsertPreimage: Preimage; - upsertPreimageArgument: PreimageArgument; - upsertPreimageStatus: PreimageStatus; - upsertProposal: Proposal; - upsertProposalStatus: ProposalStatus; - upsertReferendum: Referendum; - upsertReferendumStatus: ReferendumStatus; - upsertReward: Reward; - upsertSession: Session; - upsertSlashing: Slashing; - upsertStake: Stake; - upsertTotalIssuance: TotalIssuance; - upsertTreasurySpendProposal: TreasurySpendProposal; - upsertTreasuryStatus: TreasuryStatus; - upsertValidator: Validator; verifyEmail?: Maybe; }; @@ -4089,12 +3097,6 @@ export type Mutation_RootChangeEmailArgs = { }; -/** mutation root */ -export type Mutation_RootChangeNameArgs = { - newName: Scalars['String']; -}; - - /** mutation root */ export type Mutation_RootChangeNotificationPreferenceArgs = { notificationPreferences?: Maybe; @@ -4116,2501 +3118,2436 @@ export type Mutation_RootChangeUsernameArgs = { /** mutation root */ -export type Mutation_RootCreateBlockIndexArgs = { - data: BlockIndexCreateInput; +export type Mutation_RootDelete_Comment_ReactionsArgs = { + where: Comment_Reactions_Bool_Exp; }; /** mutation root */ -export type Mutation_RootCreateBlockNumberArgs = { - data: BlockNumberCreateInput; +export type Mutation_RootDelete_Comment_Reactions_By_PkArgs = { + id: Scalars['Int']; }; /** mutation root */ -export type Mutation_RootCreateCouncilArgs = { - data: CouncilCreateInput; +export type Mutation_RootDelete_CommentsArgs = { + where: Comments_Bool_Exp; }; /** mutation root */ -export type Mutation_RootCreateCouncilMemberArgs = { - data: CouncilMemberCreateInput; +export type Mutation_RootDelete_Comments_By_PkArgs = { + id: Scalars['uuid']; }; /** mutation root */ -export type Mutation_RootCreateEraArgs = { - data: EraCreateInput; +export type Mutation_RootDelete_Onchain_LinksArgs = { + where: Onchain_Links_Bool_Exp; }; /** mutation root */ -export type Mutation_RootCreateHeartBeatArgs = { - data: HeartBeatCreateInput; +export type Mutation_RootDelete_Onchain_Links_By_PkArgs = { + id: Scalars['Int']; }; /** mutation root */ -export type Mutation_RootCreateMotionArgs = { - data: MotionCreateInput; +export type Mutation_RootDelete_PollArgs = { + where: Poll_Bool_Exp; }; /** mutation root */ -export type Mutation_RootCreateMotionProposalArgumentArgs = { - data: MotionProposalArgumentCreateInput; +export type Mutation_RootDelete_Poll_By_PkArgs = { + id: Scalars['Int']; }; /** mutation root */ -export type Mutation_RootCreateMotionStatusArgs = { - data: MotionStatusCreateInput; +export type Mutation_RootDelete_Poll_VotesArgs = { + where: Poll_Votes_Bool_Exp; }; /** mutation root */ -export type Mutation_RootCreateNominationArgs = { - data: NominationCreateInput; +export type Mutation_RootDelete_Poll_Votes_By_PkArgs = { + id: Scalars['Int']; }; /** mutation root */ -export type Mutation_RootCreateOfflineValidatorArgs = { - data: OfflineValidatorCreateInput; +export type Mutation_RootDelete_Post_ReactionsArgs = { + where: Post_Reactions_Bool_Exp; }; /** mutation root */ -export type Mutation_RootCreatePreimageArgs = { - data: PreimageCreateInput; +export type Mutation_RootDelete_Post_Reactions_By_PkArgs = { + id: Scalars['Int']; }; /** mutation root */ -export type Mutation_RootCreatePreimageArgumentArgs = { - data: PreimageArgumentCreateInput; +export type Mutation_RootDelete_Post_TopicsArgs = { + where: Post_Topics_Bool_Exp; }; /** mutation root */ -export type Mutation_RootCreatePreimageStatusArgs = { - data: PreimageStatusCreateInput; +export type Mutation_RootDelete_Post_Topics_By_PkArgs = { + id: Scalars['Int']; }; /** mutation root */ -export type Mutation_RootCreateProposalArgs = { - data: ProposalCreateInput; +export type Mutation_RootDelete_Post_TypesArgs = { + where: Post_Types_Bool_Exp; }; /** mutation root */ -export type Mutation_RootCreateProposalStatusArgs = { - data: ProposalStatusCreateInput; +export type Mutation_RootDelete_Post_Types_By_PkArgs = { + id: Scalars['Int']; }; /** mutation root */ -export type Mutation_RootCreateReferendumArgs = { - data: ReferendumCreateInput; +export type Mutation_RootDelete_PostsArgs = { + where: Posts_Bool_Exp; }; /** mutation root */ -export type Mutation_RootCreateReferendumStatusArgs = { - data: ReferendumStatusCreateInput; +export type Mutation_RootDelete_Posts_By_PkArgs = { + id: Scalars['Int']; }; /** mutation root */ -export type Mutation_RootCreateRewardArgs = { - data: RewardCreateInput; +export type Mutation_RootInsert_Comment_ReactionsArgs = { + objects: Array; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootCreateSessionArgs = { - data: SessionCreateInput; +export type Mutation_RootInsert_Comment_Reactions_OneArgs = { + object: Comment_Reactions_Insert_Input; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootCreateSlashingArgs = { - data: SlashingCreateInput; -}; - - -/** mutation root */ -export type Mutation_RootCreateStakeArgs = { - data: StakeCreateInput; -}; - - -/** mutation root */ -export type Mutation_RootCreateTotalIssuanceArgs = { - data: TotalIssuanceCreateInput; +export type Mutation_RootInsert_CommentsArgs = { + objects: Array; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootCreateTreasurySpendProposalArgs = { - data: TreasurySpendProposalCreateInput; +export type Mutation_RootInsert_Comments_OneArgs = { + object: Comments_Insert_Input; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootCreateTreasuryStatusArgs = { - data: TreasuryStatusCreateInput; +export type Mutation_RootInsert_Onchain_LinksArgs = { + objects: Array; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootCreateValidatorArgs = { - data: ValidatorCreateInput; +export type Mutation_RootInsert_Onchain_Links_OneArgs = { + object: Onchain_Links_Insert_Input; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteBlockIndexArgs = { - where: BlockIndexWhereUniqueInput; +export type Mutation_RootInsert_PollArgs = { + objects: Array; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteBlockNumberArgs = { - where: BlockNumberWhereUniqueInput; +export type Mutation_RootInsert_Poll_OneArgs = { + object: Poll_Insert_Input; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteCouncilArgs = { - where: CouncilWhereUniqueInput; +export type Mutation_RootInsert_Poll_VotesArgs = { + objects: Array; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteCouncilMemberArgs = { - where: CouncilMemberWhereUniqueInput; +export type Mutation_RootInsert_Poll_Votes_OneArgs = { + object: Poll_Votes_Insert_Input; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteEraArgs = { - where: EraWhereUniqueInput; +export type Mutation_RootInsert_Post_ReactionsArgs = { + objects: Array; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteHeartBeatArgs = { - where: HeartBeatWhereUniqueInput; +export type Mutation_RootInsert_Post_Reactions_OneArgs = { + object: Post_Reactions_Insert_Input; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteManyBlockIndexesArgs = { - where?: Maybe; +export type Mutation_RootInsert_Post_TopicsArgs = { + objects: Array; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteManyBlockNumbersArgs = { - where?: Maybe; +export type Mutation_RootInsert_Post_Topics_OneArgs = { + object: Post_Topics_Insert_Input; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteManyCouncilMembersArgs = { - where?: Maybe; +export type Mutation_RootInsert_Post_TypesArgs = { + objects: Array; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteManyCouncilsArgs = { - where?: Maybe; +export type Mutation_RootInsert_Post_Types_OneArgs = { + object: Post_Types_Insert_Input; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteManyErasArgs = { - where?: Maybe; +export type Mutation_RootInsert_PostsArgs = { + objects: Array; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteManyHeartBeatsArgs = { - where?: Maybe; +export type Mutation_RootInsert_Posts_OneArgs = { + object: Posts_Insert_Input; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootDeleteManyMotionProposalArgumentsArgs = { - where?: Maybe; +export type Mutation_RootLoginArgs = { + password: Scalars['String']; + username: Scalars['String']; }; /** mutation root */ -export type Mutation_RootDeleteManyMotionStatusesArgs = { - where?: Maybe; +export type Mutation_RootPostSubscribeArgs = { + post_id: Scalars['Int']; }; /** mutation root */ -export type Mutation_RootDeleteManyMotionsArgs = { - where?: Maybe; +export type Mutation_RootPostUnsubscribeArgs = { + post_id: Scalars['Int']; }; /** mutation root */ -export type Mutation_RootDeleteManyNominationsArgs = { - where?: Maybe; +export type Mutation_RootReportContentArgs = { + comments?: Maybe; + content_id: Scalars['String']; + network: Scalars['String']; + reason: Scalars['String']; + type: Scalars['String']; }; /** mutation root */ -export type Mutation_RootDeleteManyOfflineValidatorsArgs = { - where?: Maybe; +export type Mutation_RootRequestResetPasswordArgs = { + email: Scalars['String']; }; /** mutation root */ -export type Mutation_RootDeleteManyPreimageArgumentsArgs = { - where?: Maybe; +export type Mutation_RootResetPasswordArgs = { + newPassword: Scalars['String']; + token: Scalars['String']; + userId: Scalars['Int']; }; /** mutation root */ -export type Mutation_RootDeleteManyPreimageStatusesArgs = { - where?: Maybe; +export type Mutation_RootSetCredentialsConfirmArgs = { + address: Scalars['String']; + email?: Maybe; + password: Scalars['String']; + signature: Scalars['String']; + username: Scalars['String']; }; /** mutation root */ -export type Mutation_RootDeleteManyPreimagesArgs = { - where?: Maybe; +export type Mutation_RootSetCredentialsStartArgs = { + address: Scalars['String']; }; /** mutation root */ -export type Mutation_RootDeleteManyProposalStatusesArgs = { - where?: Maybe; +export type Mutation_RootSetDefaultAddressArgs = { + address: Scalars['String']; }; /** mutation root */ -export type Mutation_RootDeleteManyProposalsArgs = { - where?: Maybe; +export type Mutation_RootSignupArgs = { + email?: Maybe; + password: Scalars['String']; + username: Scalars['String']; }; /** mutation root */ -export type Mutation_RootDeleteManyReferendumStatusesArgs = { - where?: Maybe; +export type Mutation_RootUndoEmailChangeArgs = { + token: Scalars['String']; }; /** mutation root */ -export type Mutation_RootDeleteManyReferendumsArgs = { - where?: Maybe; +export type Mutation_RootUpdate_Comment_ReactionsArgs = { + _inc?: Maybe; + _set?: Maybe; + where: Comment_Reactions_Bool_Exp; }; /** mutation root */ -export type Mutation_RootDeleteManyRewardsArgs = { - where?: Maybe; +export type Mutation_RootUpdate_Comment_Reactions_By_PkArgs = { + _inc?: Maybe; + _set?: Maybe; + pk_columns: Comment_Reactions_Pk_Columns_Input; }; /** mutation root */ -export type Mutation_RootDeleteManySessionsArgs = { - where?: Maybe; +export type Mutation_RootUpdate_CommentsArgs = { + _inc?: Maybe; + _set?: Maybe; + where: Comments_Bool_Exp; }; /** mutation root */ -export type Mutation_RootDeleteManySlashingsArgs = { - where?: Maybe; +export type Mutation_RootUpdate_Comments_By_PkArgs = { + _inc?: Maybe; + _set?: Maybe; + pk_columns: Comments_Pk_Columns_Input; }; /** mutation root */ -export type Mutation_RootDeleteManyStakesArgs = { - where?: Maybe; +export type Mutation_RootUpdate_Onchain_LinksArgs = { + _inc?: Maybe; + _set?: Maybe; + where: Onchain_Links_Bool_Exp; }; /** mutation root */ -export type Mutation_RootDeleteManyTotalIssuancesArgs = { - where?: Maybe; +export type Mutation_RootUpdate_Onchain_Links_By_PkArgs = { + _inc?: Maybe; + _set?: Maybe; + pk_columns: Onchain_Links_Pk_Columns_Input; }; /** mutation root */ -export type Mutation_RootDeleteManyTreasurySpendProposalsArgs = { - where?: Maybe; +export type Mutation_RootUpdate_PollArgs = { + _inc?: Maybe; + _set?: Maybe; + where: Poll_Bool_Exp; }; /** mutation root */ -export type Mutation_RootDeleteManyTreasuryStatusesArgs = { - where?: Maybe; +export type Mutation_RootUpdate_Poll_By_PkArgs = { + _inc?: Maybe; + _set?: Maybe; + pk_columns: Poll_Pk_Columns_Input; }; /** mutation root */ -export type Mutation_RootDeleteManyValidatorsArgs = { - where?: Maybe; +export type Mutation_RootUpdate_Poll_VotesArgs = { + _inc?: Maybe; + _set?: Maybe; + where: Poll_Votes_Bool_Exp; }; /** mutation root */ -export type Mutation_RootDeleteMotionArgs = { - where: MotionWhereUniqueInput; +export type Mutation_RootUpdate_Poll_Votes_By_PkArgs = { + _inc?: Maybe; + _set?: Maybe; + pk_columns: Poll_Votes_Pk_Columns_Input; }; /** mutation root */ -export type Mutation_RootDeleteMotionProposalArgumentArgs = { - where: MotionProposalArgumentWhereUniqueInput; +export type Mutation_RootUpdate_Post_ReactionsArgs = { + _inc?: Maybe; + _set?: Maybe; + where: Post_Reactions_Bool_Exp; }; /** mutation root */ -export type Mutation_RootDeleteMotionStatusArgs = { - where: MotionStatusWhereUniqueInput; +export type Mutation_RootUpdate_Post_Reactions_By_PkArgs = { + _inc?: Maybe; + _set?: Maybe; + pk_columns: Post_Reactions_Pk_Columns_Input; }; /** mutation root */ -export type Mutation_RootDeleteNominationArgs = { - where: NominationWhereUniqueInput; +export type Mutation_RootUpdate_Post_TopicsArgs = { + _inc?: Maybe; + _set?: Maybe; + where: Post_Topics_Bool_Exp; }; /** mutation root */ -export type Mutation_RootDeleteOfflineValidatorArgs = { - where: OfflineValidatorWhereUniqueInput; +export type Mutation_RootUpdate_Post_Topics_By_PkArgs = { + _inc?: Maybe; + _set?: Maybe; + pk_columns: Post_Topics_Pk_Columns_Input; }; /** mutation root */ -export type Mutation_RootDeletePreimageArgs = { - where: PreimageWhereUniqueInput; +export type Mutation_RootUpdate_Post_TypesArgs = { + _inc?: Maybe; + _set?: Maybe; + where: Post_Types_Bool_Exp; }; /** mutation root */ -export type Mutation_RootDeletePreimageArgumentArgs = { - where: PreimageArgumentWhereUniqueInput; +export type Mutation_RootUpdate_Post_Types_By_PkArgs = { + _inc?: Maybe; + _set?: Maybe; + pk_columns: Post_Types_Pk_Columns_Input; }; /** mutation root */ -export type Mutation_RootDeletePreimageStatusArgs = { - where: PreimageStatusWhereUniqueInput; +export type Mutation_RootUpdate_PostsArgs = { + _inc?: Maybe; + _set?: Maybe; + where: Posts_Bool_Exp; }; /** mutation root */ -export type Mutation_RootDeleteProposalArgs = { - where: ProposalWhereUniqueInput; +export type Mutation_RootUpdate_Posts_By_PkArgs = { + _inc?: Maybe; + _set?: Maybe; + pk_columns: Posts_Pk_Columns_Input; }; /** mutation root */ -export type Mutation_RootDeleteProposalStatusArgs = { - where: ProposalStatusWhereUniqueInput; +export type Mutation_RootVerifyEmailArgs = { + token: Scalars['String']; }; +export enum MutationType { + Created = 'CREATED', + Deleted = 'DELETED', + Updated = 'UPDATED' +} -/** mutation root */ -export type Mutation_RootDeleteReferendumArgs = { - where: ReferendumWhereUniqueInput; +/** An object with an ID */ +export type Node = { + /** The id of the object. */ + id: Scalars['ID']; }; - -/** mutation root */ -export type Mutation_RootDeleteReferendumStatusArgs = { - where: ReferendumStatusWhereUniqueInput; +export type Nomination = Node & { + __typename?: 'Nomination'; + id: Scalars['ID']; + nominatorController: Scalars['String']; + nominatorStash: Scalars['String']; + session: Session; + stakedAmount: Scalars['String']; + validatorController: Scalars['String']; + validatorStash: Scalars['String']; }; - -/** mutation root */ -export type Mutation_RootDeleteRewardArgs = { - where: RewardWhereUniqueInput; +/** A connection to a list of items. */ +export type NominationConnection = { + __typename?: 'NominationConnection'; + aggregate: AggregateNomination; + /** A list of edges. */ + edges: Array>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; }; - -/** mutation root */ -export type Mutation_RootDeleteSessionArgs = { - where: SessionWhereUniqueInput; +/** An edge in a connection. */ +export type NominationEdge = { + __typename?: 'NominationEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; + /** The item at the end of the edge. */ + node: Nomination; }; +export enum NominationOrderByInput { + IdAsc = 'id_ASC', + IdDesc = 'id_DESC', + NominatorControllerAsc = 'nominatorController_ASC', + NominatorControllerDesc = 'nominatorController_DESC', + NominatorStashAsc = 'nominatorStash_ASC', + NominatorStashDesc = 'nominatorStash_DESC', + StakedAmountAsc = 'stakedAmount_ASC', + StakedAmountDesc = 'stakedAmount_DESC', + ValidatorControllerAsc = 'validatorController_ASC', + ValidatorControllerDesc = 'validatorController_DESC', + ValidatorStashAsc = 'validatorStash_ASC', + ValidatorStashDesc = 'validatorStash_DESC' +} -/** mutation root */ -export type Mutation_RootDeleteSlashingArgs = { - where: SlashingWhereUniqueInput; +export type NominationPreviousValues = { + __typename?: 'NominationPreviousValues'; + id: Scalars['ID']; + nominatorController: Scalars['String']; + nominatorStash: Scalars['String']; + stakedAmount: Scalars['String']; + validatorController: Scalars['String']; + validatorStash: Scalars['String']; }; - -/** mutation root */ -export type Mutation_RootDeleteStakeArgs = { - where: StakeWhereUniqueInput; +export type NominationSubscriptionPayload = { + __typename?: 'NominationSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; }; - -/** mutation root */ -export type Mutation_RootDeleteTotalIssuanceArgs = { - where: TotalIssuanceWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootDeleteTreasurySpendProposalArgs = { - where: TreasurySpendProposalWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootDeleteTreasuryStatusArgs = { - where: TreasuryStatusWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootDeleteValidatorArgs = { - where: ValidatorWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootDelete_Comment_ReactionsArgs = { - where: Comment_Reactions_Bool_Exp; -}; - - -/** mutation root */ -export type Mutation_RootDelete_Comment_Reactions_By_PkArgs = { - id: Scalars['Int']; -}; - - -/** mutation root */ -export type Mutation_RootDelete_CommentsArgs = { - where: Comments_Bool_Exp; -}; - - -/** mutation root */ -export type Mutation_RootDelete_Comments_By_PkArgs = { - id: Scalars['uuid']; -}; - - -/** mutation root */ -export type Mutation_RootDelete_Onchain_LinksArgs = { - where: Onchain_Links_Bool_Exp; -}; - - -/** mutation root */ -export type Mutation_RootDelete_Onchain_Links_By_PkArgs = { - id: Scalars['Int']; -}; - - -/** mutation root */ -export type Mutation_RootDelete_Post_ReactionsArgs = { - where: Post_Reactions_Bool_Exp; -}; - - -/** mutation root */ -export type Mutation_RootDelete_Post_Reactions_By_PkArgs = { - id: Scalars['Int']; -}; - - -/** mutation root */ -export type Mutation_RootDelete_Post_TopicsArgs = { - where: Post_Topics_Bool_Exp; -}; - - -/** mutation root */ -export type Mutation_RootDelete_Post_Topics_By_PkArgs = { - id: Scalars['Int']; -}; - - -/** mutation root */ -export type Mutation_RootDelete_Post_TypesArgs = { - where: Post_Types_Bool_Exp; -}; - - -/** mutation root */ -export type Mutation_RootDelete_Post_Types_By_PkArgs = { - id: Scalars['Int']; -}; - - -/** mutation root */ -export type Mutation_RootDelete_PostsArgs = { - where: Posts_Bool_Exp; -}; - - -/** mutation root */ -export type Mutation_RootDelete_Posts_By_PkArgs = { - id: Scalars['Int']; -}; - - -/** mutation root */ -export type Mutation_RootExecuteRawArgs = { - database?: Maybe; - query: Scalars['String']; -}; - - -/** mutation root */ -export type Mutation_RootInsert_Comment_ReactionsArgs = { - objects: Array; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_Comment_Reactions_OneArgs = { - object: Comment_Reactions_Insert_Input; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_CommentsArgs = { - objects: Array; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_Comments_OneArgs = { - object: Comments_Insert_Input; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_Onchain_LinksArgs = { - objects: Array; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_Onchain_Links_OneArgs = { - object: Onchain_Links_Insert_Input; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_Post_ReactionsArgs = { - objects: Array; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_Post_Reactions_OneArgs = { - object: Post_Reactions_Insert_Input; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_Post_TopicsArgs = { - objects: Array; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_Post_Topics_OneArgs = { - object: Post_Topics_Insert_Input; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_Post_TypesArgs = { - objects: Array; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_Post_Types_OneArgs = { - object: Post_Types_Insert_Input; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_PostsArgs = { - objects: Array; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootInsert_Posts_OneArgs = { - object: Posts_Insert_Input; - on_conflict?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootLoginArgs = { - password: Scalars['String']; - username: Scalars['String']; -}; - - -/** mutation root */ -export type Mutation_RootPostSubscribeArgs = { - post_id: Scalars['Int']; -}; - - -/** mutation root */ -export type Mutation_RootPostUnsubscribeArgs = { - post_id: Scalars['Int']; -}; - - -/** mutation root */ -export type Mutation_RootReportContentArgs = { - comments?: Maybe; - content_id: Scalars['String']; - network: Scalars['String']; - reason: Scalars['String']; - type: Scalars['String']; -}; - - -/** mutation root */ -export type Mutation_RootRequestResetPasswordArgs = { - email: Scalars['String']; -}; - - -/** mutation root */ -export type Mutation_RootResetPasswordArgs = { - newPassword: Scalars['String']; - token: Scalars['String']; - userId: Scalars['Int']; -}; - - -/** mutation root */ -export type Mutation_RootSetCredentialsConfirmArgs = { - address: Scalars['String']; - email?: Maybe; - password: Scalars['String']; - signature: Scalars['String']; - username: Scalars['String']; -}; - - -/** mutation root */ -export type Mutation_RootSetCredentialsStartArgs = { - address: Scalars['String']; -}; - - -/** mutation root */ -export type Mutation_RootSetDefaultAddressArgs = { - address: Scalars['String']; -}; - - -/** mutation root */ -export type Mutation_RootSignupArgs = { - email?: Maybe; - name?: Maybe; - password: Scalars['String']; - username: Scalars['String']; -}; - - -/** mutation root */ -export type Mutation_RootUndoEmailChangeArgs = { - token: Scalars['String']; -}; - - -/** mutation root */ -export type Mutation_RootUpdateBlockIndexArgs = { - data: BlockIndexUpdateInput; - where: BlockIndexWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateBlockNumberArgs = { - data: BlockNumberUpdateInput; - where: BlockNumberWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateCouncilArgs = { - data: CouncilUpdateInput; - where: CouncilWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateCouncilMemberArgs = { - data: CouncilMemberUpdateInput; - where: CouncilMemberWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateEraArgs = { - data: EraUpdateInput; - where: EraWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateHeartBeatArgs = { - data: HeartBeatUpdateInput; - where: HeartBeatWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyBlockIndexesArgs = { - data: BlockIndexUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyBlockNumbersArgs = { - data: BlockNumberUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyCouncilMembersArgs = { - data: CouncilMemberUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyErasArgs = { - data: EraUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyHeartBeatsArgs = { - data: HeartBeatUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyMotionProposalArgumentsArgs = { - data: MotionProposalArgumentUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyMotionStatusesArgs = { - data: MotionStatusUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyMotionsArgs = { - data: MotionUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyNominationsArgs = { - data: NominationUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyOfflineValidatorsArgs = { - data: OfflineValidatorUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyPreimageArgumentsArgs = { - data: PreimageArgumentUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyPreimageStatusesArgs = { - data: PreimageStatusUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyPreimagesArgs = { - data: PreimageUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyProposalStatusesArgs = { - data: ProposalStatusUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyProposalsArgs = { - data: ProposalUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyReferendumStatusesArgs = { - data: ReferendumStatusUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyReferendumsArgs = { - data: ReferendumUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyRewardsArgs = { - data: RewardUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManySessionsArgs = { - data: SessionUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManySlashingsArgs = { - data: SlashingUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyStakesArgs = { - data: StakeUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyTotalIssuancesArgs = { - data: TotalIssuanceUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyTreasurySpendProposalsArgs = { - data: TreasurySpendProposalUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyTreasuryStatusesArgs = { - data: TreasuryStatusUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateManyValidatorsArgs = { - data: ValidatorUpdateManyMutationInput; - where?: Maybe; -}; - - -/** mutation root */ -export type Mutation_RootUpdateMotionArgs = { - data: MotionUpdateInput; - where: MotionWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateMotionProposalArgumentArgs = { - data: MotionProposalArgumentUpdateInput; - where: MotionProposalArgumentWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateMotionStatusArgs = { - data: MotionStatusUpdateInput; - where: MotionStatusWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateNominationArgs = { - data: NominationUpdateInput; - where: NominationWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateOfflineValidatorArgs = { - data: OfflineValidatorUpdateInput; - where: OfflineValidatorWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdatePreimageArgs = { - data: PreimageUpdateInput; - where: PreimageWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdatePreimageArgumentArgs = { - data: PreimageArgumentUpdateInput; - where: PreimageArgumentWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdatePreimageStatusArgs = { - data: PreimageStatusUpdateInput; - where: PreimageStatusWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateProposalArgs = { - data: ProposalUpdateInput; - where: ProposalWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateProposalStatusArgs = { - data: ProposalStatusUpdateInput; - where: ProposalStatusWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateReferendumArgs = { - data: ReferendumUpdateInput; - where: ReferendumWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateReferendumStatusArgs = { - data: ReferendumStatusUpdateInput; - where: ReferendumStatusWhereUniqueInput; -}; - - -/** mutation root */ -export type Mutation_RootUpdateRewardArgs = { - data: RewardUpdateInput; - where: RewardWhereUniqueInput; +export type NominationSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; }; - -/** mutation root */ -export type Mutation_RootUpdateSessionArgs = { - data: SessionUpdateInput; - where: SessionWhereUniqueInput; +export type NominationWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + nominatorController?: Maybe; + /** All values containing the given string. */ + nominatorController_contains?: Maybe; + /** All values ending with the given string. */ + nominatorController_ends_with?: Maybe; + /** All values greater than the given value. */ + nominatorController_gt?: Maybe; + /** All values greater than or equal the given value. */ + nominatorController_gte?: Maybe; + /** All values that are contained in given list. */ + nominatorController_in?: Maybe>; + /** All values less than the given value. */ + nominatorController_lt?: Maybe; + /** All values less than or equal the given value. */ + nominatorController_lte?: Maybe; + /** All values that are not equal to given value. */ + nominatorController_not?: Maybe; + /** All values not containing the given string. */ + nominatorController_not_contains?: Maybe; + /** All values not ending with the given string. */ + nominatorController_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + nominatorController_not_in?: Maybe>; + /** All values not starting with the given string. */ + nominatorController_not_starts_with?: Maybe; + /** All values starting with the given string. */ + nominatorController_starts_with?: Maybe; + nominatorStash?: Maybe; + /** All values containing the given string. */ + nominatorStash_contains?: Maybe; + /** All values ending with the given string. */ + nominatorStash_ends_with?: Maybe; + /** All values greater than the given value. */ + nominatorStash_gt?: Maybe; + /** All values greater than or equal the given value. */ + nominatorStash_gte?: Maybe; + /** All values that are contained in given list. */ + nominatorStash_in?: Maybe>; + /** All values less than the given value. */ + nominatorStash_lt?: Maybe; + /** All values less than or equal the given value. */ + nominatorStash_lte?: Maybe; + /** All values that are not equal to given value. */ + nominatorStash_not?: Maybe; + /** All values not containing the given string. */ + nominatorStash_not_contains?: Maybe; + /** All values not ending with the given string. */ + nominatorStash_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + nominatorStash_not_in?: Maybe>; + /** All values not starting with the given string. */ + nominatorStash_not_starts_with?: Maybe; + /** All values starting with the given string. */ + nominatorStash_starts_with?: Maybe; + session?: Maybe; + stakedAmount?: Maybe; + /** All values containing the given string. */ + stakedAmount_contains?: Maybe; + /** All values ending with the given string. */ + stakedAmount_ends_with?: Maybe; + /** All values greater than the given value. */ + stakedAmount_gt?: Maybe; + /** All values greater than or equal the given value. */ + stakedAmount_gte?: Maybe; + /** All values that are contained in given list. */ + stakedAmount_in?: Maybe>; + /** All values less than the given value. */ + stakedAmount_lt?: Maybe; + /** All values less than or equal the given value. */ + stakedAmount_lte?: Maybe; + /** All values that are not equal to given value. */ + stakedAmount_not?: Maybe; + /** All values not containing the given string. */ + stakedAmount_not_contains?: Maybe; + /** All values not ending with the given string. */ + stakedAmount_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + stakedAmount_not_in?: Maybe>; + /** All values not starting with the given string. */ + stakedAmount_not_starts_with?: Maybe; + /** All values starting with the given string. */ + stakedAmount_starts_with?: Maybe; + validatorController?: Maybe; + /** All values containing the given string. */ + validatorController_contains?: Maybe; + /** All values ending with the given string. */ + validatorController_ends_with?: Maybe; + /** All values greater than the given value. */ + validatorController_gt?: Maybe; + /** All values greater than or equal the given value. */ + validatorController_gte?: Maybe; + /** All values that are contained in given list. */ + validatorController_in?: Maybe>; + /** All values less than the given value. */ + validatorController_lt?: Maybe; + /** All values less than or equal the given value. */ + validatorController_lte?: Maybe; + /** All values that are not equal to given value. */ + validatorController_not?: Maybe; + /** All values not containing the given string. */ + validatorController_not_contains?: Maybe; + /** All values not ending with the given string. */ + validatorController_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + validatorController_not_in?: Maybe>; + /** All values not starting with the given string. */ + validatorController_not_starts_with?: Maybe; + /** All values starting with the given string. */ + validatorController_starts_with?: Maybe; + validatorStash?: Maybe; + /** All values containing the given string. */ + validatorStash_contains?: Maybe; + /** All values ending with the given string. */ + validatorStash_ends_with?: Maybe; + /** All values greater than the given value. */ + validatorStash_gt?: Maybe; + /** All values greater than or equal the given value. */ + validatorStash_gte?: Maybe; + /** All values that are contained in given list. */ + validatorStash_in?: Maybe>; + /** All values less than the given value. */ + validatorStash_lt?: Maybe; + /** All values less than or equal the given value. */ + validatorStash_lte?: Maybe; + /** All values that are not equal to given value. */ + validatorStash_not?: Maybe; + /** All values not containing the given string. */ + validatorStash_not_contains?: Maybe; + /** All values not ending with the given string. */ + validatorStash_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + validatorStash_not_in?: Maybe>; + /** All values not starting with the given string. */ + validatorStash_not_starts_with?: Maybe; + /** All values starting with the given string. */ + validatorStash_starts_with?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpdateSlashingArgs = { - data: SlashingUpdateInput; - where: SlashingWhereUniqueInput; +export type NominationWhereUniqueInput = { + id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpdateStakeArgs = { - data: StakeUpdateInput; - where: StakeWhereUniqueInput; +export type NotificationPreferences = { + __typename?: 'NotificationPreferences'; + newProposal?: Maybe; + ownProposal?: Maybe; + postCreated?: Maybe; + postParticipated?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpdateTotalIssuanceArgs = { - data: TotalIssuanceUpdateInput; - where: TotalIssuanceWhereUniqueInput; +export type NotificationPreferencesInput = { + newProposal?: Maybe; + ownProposal?: Maybe; + postCreated?: Maybe; + postParticipated?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpdateTreasurySpendProposalArgs = { - data: TreasurySpendProposalUpdateInput; - where: TreasurySpendProposalWhereUniqueInput; +export type OfflineValidator = Node & { + __typename?: 'OfflineValidator'; + id: Scalars['ID']; + others: Array; + own: Scalars['String']; + sessionIndex: Session; + total: Scalars['String']; + validatorId: Scalars['String']; }; - -/** mutation root */ -export type Mutation_RootUpdateTreasuryStatusArgs = { - data: TreasuryStatusUpdateInput; - where: TreasuryStatusWhereUniqueInput; +/** A connection to a list of items. */ +export type OfflineValidatorConnection = { + __typename?: 'OfflineValidatorConnection'; + aggregate: AggregateOfflineValidator; + /** A list of edges. */ + edges: Array>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; }; - -/** mutation root */ -export type Mutation_RootUpdateValidatorArgs = { - data: ValidatorUpdateInput; - where: ValidatorWhereUniqueInput; +/** An edge in a connection. */ +export type OfflineValidatorEdge = { + __typename?: 'OfflineValidatorEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; + /** The item at the end of the edge. */ + node: OfflineValidator; }; +export enum OfflineValidatorOrderByInput { + IdAsc = 'id_ASC', + IdDesc = 'id_DESC', + OwnAsc = 'own_ASC', + OwnDesc = 'own_DESC', + TotalAsc = 'total_ASC', + TotalDesc = 'total_DESC', + ValidatorIdAsc = 'validatorId_ASC', + ValidatorIdDesc = 'validatorId_DESC' +} -/** mutation root */ -export type Mutation_RootUpdate_Comment_ReactionsArgs = { - _inc?: Maybe; - _set?: Maybe; - where: Comment_Reactions_Bool_Exp; +export type OfflineValidatorPreviousValues = { + __typename?: 'OfflineValidatorPreviousValues'; + id: Scalars['ID']; + others: Array; + own: Scalars['String']; + total: Scalars['String']; + validatorId: Scalars['String']; }; - -/** mutation root */ -export type Mutation_RootUpdate_Comment_Reactions_By_PkArgs = { - _inc?: Maybe; - _set?: Maybe; - pk_columns: Comment_Reactions_Pk_Columns_Input; +export type OfflineValidatorSubscriptionPayload = { + __typename?: 'OfflineValidatorSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; }; - -/** mutation root */ -export type Mutation_RootUpdate_CommentsArgs = { - _inc?: Maybe; - _set?: Maybe; - where: Comments_Bool_Exp; +export type OfflineValidatorSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; }; - -/** mutation root */ -export type Mutation_RootUpdate_Comments_By_PkArgs = { - _inc?: Maybe; - _set?: Maybe; - pk_columns: Comments_Pk_Columns_Input; +export type OfflineValidatorWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + own?: Maybe; + /** All values containing the given string. */ + own_contains?: Maybe; + /** All values ending with the given string. */ + own_ends_with?: Maybe; + /** All values greater than the given value. */ + own_gt?: Maybe; + /** All values greater than or equal the given value. */ + own_gte?: Maybe; + /** All values that are contained in given list. */ + own_in?: Maybe>; + /** All values less than the given value. */ + own_lt?: Maybe; + /** All values less than or equal the given value. */ + own_lte?: Maybe; + /** All values that are not equal to given value. */ + own_not?: Maybe; + /** All values not containing the given string. */ + own_not_contains?: Maybe; + /** All values not ending with the given string. */ + own_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + own_not_in?: Maybe>; + /** All values not starting with the given string. */ + own_not_starts_with?: Maybe; + /** All values starting with the given string. */ + own_starts_with?: Maybe; + sessionIndex?: Maybe; + total?: Maybe; + /** All values containing the given string. */ + total_contains?: Maybe; + /** All values ending with the given string. */ + total_ends_with?: Maybe; + /** All values greater than the given value. */ + total_gt?: Maybe; + /** All values greater than or equal the given value. */ + total_gte?: Maybe; + /** All values that are contained in given list. */ + total_in?: Maybe>; + /** All values less than the given value. */ + total_lt?: Maybe; + /** All values less than or equal the given value. */ + total_lte?: Maybe; + /** All values that are not equal to given value. */ + total_not?: Maybe; + /** All values not containing the given string. */ + total_not_contains?: Maybe; + /** All values not ending with the given string. */ + total_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + total_not_in?: Maybe>; + /** All values not starting with the given string. */ + total_not_starts_with?: Maybe; + /** All values starting with the given string. */ + total_starts_with?: Maybe; + validatorId?: Maybe; + /** All values containing the given string. */ + validatorId_contains?: Maybe; + /** All values ending with the given string. */ + validatorId_ends_with?: Maybe; + /** All values greater than the given value. */ + validatorId_gt?: Maybe; + /** All values greater than or equal the given value. */ + validatorId_gte?: Maybe; + /** All values that are contained in given list. */ + validatorId_in?: Maybe>; + /** All values less than the given value. */ + validatorId_lt?: Maybe; + /** All values less than or equal the given value. */ + validatorId_lte?: Maybe; + /** All values that are not equal to given value. */ + validatorId_not?: Maybe; + /** All values not containing the given string. */ + validatorId_not_contains?: Maybe; + /** All values not ending with the given string. */ + validatorId_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + validatorId_not_in?: Maybe>; + /** All values not starting with the given string. */ + validatorId_not_starts_with?: Maybe; + /** All values starting with the given string. */ + validatorId_starts_with?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpdate_Onchain_LinksArgs = { - _inc?: Maybe; - _set?: Maybe; - where: Onchain_Links_Bool_Exp; +export type OfflineValidatorWhereUniqueInput = { + id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpdate_Onchain_Links_By_PkArgs = { - _inc?: Maybe; - _set?: Maybe; - pk_columns: Onchain_Links_Pk_Columns_Input; +/** + * on chain proposal created automatically by chain-db-watcher + * + * + * columns and relationships of "onchain_links" + */ +export type Onchain_Links = { + __typename?: 'onchain_links'; + created_at: Scalars['timestamptz']; + id: Scalars['Int']; + /** Remote relationship field */ + onchain_motion: Array>; + onchain_motion_id?: Maybe; + /** Remote relationship field */ + onchain_proposal: Array>; + onchain_proposal_id?: Maybe; + /** Remote relationship field */ + onchain_referendum: Array>; + onchain_referendum_id?: Maybe; + /** Remote relationship field */ + onchain_tip: Array>; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + /** Remote relationship field */ + onchain_treasury_spend_proposal: Array>; + /** An object relationship */ + post: Posts; + post_id: Scalars['Int']; + proposer_address: Scalars['String']; }; -/** mutation root */ -export type Mutation_RootUpdate_Post_ReactionsArgs = { - _inc?: Maybe; - _set?: Maybe; - where: Post_Reactions_Bool_Exp; +/** + * on chain proposal created automatically by chain-db-watcher + * + * + * columns and relationships of "onchain_links" + */ +export type Onchain_LinksOnchain_MotionArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; }; -/** mutation root */ -export type Mutation_RootUpdate_Post_Reactions_By_PkArgs = { - _inc?: Maybe; - _set?: Maybe; - pk_columns: Post_Reactions_Pk_Columns_Input; +/** + * on chain proposal created automatically by chain-db-watcher + * + * + * columns and relationships of "onchain_links" + */ +export type Onchain_LinksOnchain_ProposalArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; }; -/** mutation root */ -export type Mutation_RootUpdate_Post_TopicsArgs = { - _inc?: Maybe; - _set?: Maybe; - where: Post_Topics_Bool_Exp; +/** + * on chain proposal created automatically by chain-db-watcher + * + * + * columns and relationships of "onchain_links" + */ +export type Onchain_LinksOnchain_ReferendumArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; }; -/** mutation root */ -export type Mutation_RootUpdate_Post_Topics_By_PkArgs = { - _inc?: Maybe; - _set?: Maybe; - pk_columns: Post_Topics_Pk_Columns_Input; +/** + * on chain proposal created automatically by chain-db-watcher + * + * + * columns and relationships of "onchain_links" + */ +export type Onchain_LinksOnchain_TipArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; }; -/** mutation root */ -export type Mutation_RootUpdate_Post_TypesArgs = { - _inc?: Maybe; - _set?: Maybe; - where: Post_Types_Bool_Exp; +/** + * on chain proposal created automatically by chain-db-watcher + * + * + * columns and relationships of "onchain_links" + */ +export type Onchain_LinksOnchain_Treasury_Spend_ProposalArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpdate_Post_Types_By_PkArgs = { - _inc?: Maybe; - _set?: Maybe; - pk_columns: Post_Types_Pk_Columns_Input; +/** aggregated selection of "onchain_links" */ +export type Onchain_Links_Aggregate = { + __typename?: 'onchain_links_aggregate'; + aggregate?: Maybe; + nodes: Array; }; - -/** mutation root */ -export type Mutation_RootUpdate_PostsArgs = { - _inc?: Maybe; - _set?: Maybe; - where: Posts_Bool_Exp; +/** aggregate fields of "onchain_links" */ +export type Onchain_Links_Aggregate_Fields = { + __typename?: 'onchain_links_aggregate_fields'; + avg?: Maybe; + count?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; }; -/** mutation root */ -export type Mutation_RootUpdate_Posts_By_PkArgs = { - _inc?: Maybe; - _set?: Maybe; - pk_columns: Posts_Pk_Columns_Input; +/** aggregate fields of "onchain_links" */ +export type Onchain_Links_Aggregate_FieldsCountArgs = { + columns?: Maybe>; + distinct?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertBlockIndexArgs = { - create: BlockIndexCreateInput; - update: BlockIndexUpdateInput; - where: BlockIndexWhereUniqueInput; +/** order by aggregate values of table "onchain_links" */ +export type Onchain_Links_Aggregate_Order_By = { + avg?: Maybe; + count?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertBlockNumberArgs = { - create: BlockNumberCreateInput; - update: BlockNumberUpdateInput; - where: BlockNumberWhereUniqueInput; +/** input type for inserting array relation for remote table "onchain_links" */ +export type Onchain_Links_Arr_Rel_Insert_Input = { + data: Array; + on_conflict?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertCouncilArgs = { - create: CouncilCreateInput; - update: CouncilUpdateInput; - where: CouncilWhereUniqueInput; +/** aggregate avg on columns */ +export type Onchain_Links_Avg_Fields = { + __typename?: 'onchain_links_avg_fields'; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertCouncilMemberArgs = { - create: CouncilMemberCreateInput; - update: CouncilMemberUpdateInput; - where: CouncilMemberWhereUniqueInput; +/** order by avg() on columns of table "onchain_links" */ +export type Onchain_Links_Avg_Order_By = { + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertEraArgs = { - create: EraCreateInput; - update: EraUpdateInput; - where: EraWhereUniqueInput; +/** Boolean expression to filter rows from the table "onchain_links". All fields are combined with a logical 'AND'. */ +export type Onchain_Links_Bool_Exp = { + _and?: Maybe>>; + _not?: Maybe; + _or?: Maybe>>; + created_at?: Maybe; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post?: Maybe; + post_id?: Maybe; + proposer_address?: Maybe; }; +/** unique or primary key constraints on table "onchain_links" */ +export enum Onchain_Links_Constraint { + /** unique or primary key constraint */ + OnchainLinksOnchainMotionIdKey = 'onchain_links_onchain_motion_id_key', + /** unique or primary key constraint */ + OnchainLinksOnchainReferendumIdKey = 'onchain_links_onchain_referendum_id_key', + /** unique or primary key constraint */ + OnchainLinksOnchainTipIdKey = 'onchain_links_onchain_tip_id_key', + /** unique or primary key constraint */ + OnchainProposalsChainDbIdKey = 'onchain_proposals_chain_db_id_key', + /** unique or primary key constraint */ + ProposalsPkey = 'proposals_pkey', + /** unique or primary key constraint */ + ProposalsPostIdKey = 'proposals_post_id_key' +} -/** mutation root */ -export type Mutation_RootUpsertHeartBeatArgs = { - create: HeartBeatCreateInput; - update: HeartBeatUpdateInput; - where: HeartBeatWhereUniqueInput; +/** input type for incrementing integer column in table "onchain_links" */ +export type Onchain_Links_Inc_Input = { + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; +/** input type for inserting data into table "onchain_links" */ +export type Onchain_Links_Insert_Input = { + created_at?: Maybe; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post?: Maybe; + post_id?: Maybe; + proposer_address?: Maybe; +}; -/** mutation root */ -export type Mutation_RootUpsertMotionArgs = { - create: MotionCreateInput; - update: MotionUpdateInput; - where: MotionWhereUniqueInput; +/** aggregate max on columns */ +export type Onchain_Links_Max_Fields = { + __typename?: 'onchain_links_max_fields'; + created_at?: Maybe; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; + proposer_address?: Maybe; }; +/** order by max() on columns of table "onchain_links" */ +export type Onchain_Links_Max_Order_By = { + created_at?: Maybe; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; + proposer_address?: Maybe; +}; -/** mutation root */ -export type Mutation_RootUpsertMotionProposalArgumentArgs = { - create: MotionProposalArgumentCreateInput; - update: MotionProposalArgumentUpdateInput; - where: MotionProposalArgumentWhereUniqueInput; +/** aggregate min on columns */ +export type Onchain_Links_Min_Fields = { + __typename?: 'onchain_links_min_fields'; + created_at?: Maybe; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; + proposer_address?: Maybe; }; +/** order by min() on columns of table "onchain_links" */ +export type Onchain_Links_Min_Order_By = { + created_at?: Maybe; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; + proposer_address?: Maybe; +}; -/** mutation root */ -export type Mutation_RootUpsertMotionStatusArgs = { - create: MotionStatusCreateInput; - update: MotionStatusUpdateInput; - where: MotionStatusWhereUniqueInput; +/** response of any mutation on the table "onchain_links" */ +export type Onchain_Links_Mutation_Response = { + __typename?: 'onchain_links_mutation_response'; + /** number of affected rows by the mutation */ + affected_rows: Scalars['Int']; + /** data of the affected rows by the mutation */ + returning: Array; }; +/** input type for inserting object relation for remote table "onchain_links" */ +export type Onchain_Links_Obj_Rel_Insert_Input = { + data: Onchain_Links_Insert_Input; + on_conflict?: Maybe; +}; -/** mutation root */ -export type Mutation_RootUpsertNominationArgs = { - create: NominationCreateInput; - update: NominationUpdateInput; - where: NominationWhereUniqueInput; +/** on conflict condition type for table "onchain_links" */ +export type Onchain_Links_On_Conflict = { + constraint: Onchain_Links_Constraint; + update_columns: Array; + where?: Maybe; }; +/** ordering options when selecting data from "onchain_links" */ +export type Onchain_Links_Order_By = { + created_at?: Maybe; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post?: Maybe; + post_id?: Maybe; + proposer_address?: Maybe; +}; -/** mutation root */ -export type Mutation_RootUpsertOfflineValidatorArgs = { - create: OfflineValidatorCreateInput; - update: OfflineValidatorUpdateInput; - where: OfflineValidatorWhereUniqueInput; +/** primary key columns input for table: "onchain_links" */ +export type Onchain_Links_Pk_Columns_Input = { + id: Scalars['Int']; }; +/** select columns of table "onchain_links" */ +export enum Onchain_Links_Select_Column { + /** column name */ + CreatedAt = 'created_at', + /** column name */ + Id = 'id', + /** column name */ + OnchainMotionId = 'onchain_motion_id', + /** column name */ + OnchainProposalId = 'onchain_proposal_id', + /** column name */ + OnchainReferendumId = 'onchain_referendum_id', + /** column name */ + OnchainTipId = 'onchain_tip_id', + /** column name */ + OnchainTreasuryProposalId = 'onchain_treasury_proposal_id', + /** column name */ + PostId = 'post_id', + /** column name */ + ProposerAddress = 'proposer_address' +} -/** mutation root */ -export type Mutation_RootUpsertPreimageArgs = { - create: PreimageCreateInput; - update: PreimageUpdateInput; - where: PreimageWhereUniqueInput; +/** input type for updating data in table "onchain_links" */ +export type Onchain_Links_Set_Input = { + created_at?: Maybe; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; + proposer_address?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertPreimageArgumentArgs = { - create: PreimageArgumentCreateInput; - update: PreimageArgumentUpdateInput; - where: PreimageArgumentWhereUniqueInput; +/** aggregate stddev on columns */ +export type Onchain_Links_Stddev_Fields = { + __typename?: 'onchain_links_stddev_fields'; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; +/** order by stddev() on columns of table "onchain_links" */ +export type Onchain_Links_Stddev_Order_By = { + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; +}; -/** mutation root */ -export type Mutation_RootUpsertPreimageStatusArgs = { - create: PreimageStatusCreateInput; - update: PreimageStatusUpdateInput; - where: PreimageStatusWhereUniqueInput; +/** aggregate stddev_pop on columns */ +export type Onchain_Links_Stddev_Pop_Fields = { + __typename?: 'onchain_links_stddev_pop_fields'; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertProposalArgs = { - create: ProposalCreateInput; - update: ProposalUpdateInput; - where: ProposalWhereUniqueInput; +/** order by stddev_pop() on columns of table "onchain_links" */ +export type Onchain_Links_Stddev_Pop_Order_By = { + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertProposalStatusArgs = { - create: ProposalStatusCreateInput; - update: ProposalStatusUpdateInput; - where: ProposalStatusWhereUniqueInput; +/** aggregate stddev_samp on columns */ +export type Onchain_Links_Stddev_Samp_Fields = { + __typename?: 'onchain_links_stddev_samp_fields'; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertReferendumArgs = { - create: ReferendumCreateInput; - update: ReferendumUpdateInput; - where: ReferendumWhereUniqueInput; +/** order by stddev_samp() on columns of table "onchain_links" */ +export type Onchain_Links_Stddev_Samp_Order_By = { + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertReferendumStatusArgs = { - create: ReferendumStatusCreateInput; - update: ReferendumStatusUpdateInput; - where: ReferendumStatusWhereUniqueInput; +/** aggregate sum on columns */ +export type Onchain_Links_Sum_Fields = { + __typename?: 'onchain_links_sum_fields'; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertRewardArgs = { - create: RewardCreateInput; - update: RewardUpdateInput; - where: RewardWhereUniqueInput; +/** order by sum() on columns of table "onchain_links" */ +export type Onchain_Links_Sum_Order_By = { + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; +/** update columns of table "onchain_links" */ +export enum Onchain_Links_Update_Column { + /** column name */ + CreatedAt = 'created_at', + /** column name */ + Id = 'id', + /** column name */ + OnchainMotionId = 'onchain_motion_id', + /** column name */ + OnchainProposalId = 'onchain_proposal_id', + /** column name */ + OnchainReferendumId = 'onchain_referendum_id', + /** column name */ + OnchainTipId = 'onchain_tip_id', + /** column name */ + OnchainTreasuryProposalId = 'onchain_treasury_proposal_id', + /** column name */ + PostId = 'post_id', + /** column name */ + ProposerAddress = 'proposer_address' +} -/** mutation root */ -export type Mutation_RootUpsertSessionArgs = { - create: SessionCreateInput; - update: SessionUpdateInput; - where: SessionWhereUniqueInput; +/** aggregate var_pop on columns */ +export type Onchain_Links_Var_Pop_Fields = { + __typename?: 'onchain_links_var_pop_fields'; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertSlashingArgs = { - create: SlashingCreateInput; - update: SlashingUpdateInput; - where: SlashingWhereUniqueInput; +/** order by var_pop() on columns of table "onchain_links" */ +export type Onchain_Links_Var_Pop_Order_By = { + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertStakeArgs = { - create: StakeCreateInput; - update: StakeUpdateInput; - where: StakeWhereUniqueInput; +/** aggregate var_samp on columns */ +export type Onchain_Links_Var_Samp_Fields = { + __typename?: 'onchain_links_var_samp_fields'; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertTotalIssuanceArgs = { - create: TotalIssuanceCreateInput; - update: TotalIssuanceUpdateInput; - where: TotalIssuanceWhereUniqueInput; +/** order by var_samp() on columns of table "onchain_links" */ +export type Onchain_Links_Var_Samp_Order_By = { + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertTreasurySpendProposalArgs = { - create: TreasurySpendProposalCreateInput; - update: TreasurySpendProposalUpdateInput; - where: TreasurySpendProposalWhereUniqueInput; +/** aggregate variance on columns */ +export type Onchain_Links_Variance_Fields = { + __typename?: 'onchain_links_variance_fields'; + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; - -/** mutation root */ -export type Mutation_RootUpsertTreasuryStatusArgs = { - create: TreasuryStatusCreateInput; - update: TreasuryStatusUpdateInput; - where: TreasuryStatusWhereUniqueInput; +/** order by variance() on columns of table "onchain_links" */ +export type Onchain_Links_Variance_Order_By = { + id?: Maybe; + onchain_motion_id?: Maybe; + onchain_proposal_id?: Maybe; + onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; + onchain_treasury_proposal_id?: Maybe; + post_id?: Maybe; }; +/** column ordering options */ +export enum Order_By { + /** in the ascending order, nulls last */ + Asc = 'asc', + /** in the ascending order, nulls first */ + AscNullsFirst = 'asc_nulls_first', + /** in the ascending order, nulls last */ + AscNullsLast = 'asc_nulls_last', + /** in the descending order, nulls first */ + Desc = 'desc', + /** in the descending order, nulls first */ + DescNullsFirst = 'desc_nulls_first', + /** in the descending order, nulls last */ + DescNullsLast = 'desc_nulls_last' +} -/** mutation root */ -export type Mutation_RootUpsertValidatorArgs = { - create: ValidatorCreateInput; - update: ValidatorUpdateInput; - where: ValidatorWhereUniqueInput; +/** Information about pagination in a connection. */ +export type PageInfo = { + __typename?: 'PageInfo'; + /** When paginating forwards, the cursor to continue. */ + endCursor?: Maybe; + /** When paginating forwards, are there more items? */ + hasNextPage: Scalars['Boolean']; + /** When paginating backwards, are there more items? */ + hasPreviousPage: Scalars['Boolean']; + /** When paginating backwards, the cursor to continue. */ + startCursor?: Maybe; }; - -/** mutation root */ -export type Mutation_RootVerifyEmailArgs = { - token: Scalars['String']; +/** columns and relationships of "poll" */ +export type Poll = { + __typename?: 'poll'; + block_end: Scalars['Int']; + created_at: Scalars['timestamp']; + id: Scalars['Int']; + /** An array relationship */ + poll_votes: Array; + /** An aggregated array relationship */ + poll_votes_aggregate: Poll_Votes_Aggregate; + /** An object relationship */ + post: Posts; + post_id: Scalars['Int']; + updated_at?: Maybe; }; -export enum MutationType { - Created = 'CREATED', - Deleted = 'DELETED', - Updated = 'UPDATED' -} -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']; +/** columns and relationships of "poll" */ +export type PollPoll_VotesArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; }; -export type Nomination = Node & { - __typename?: 'Nomination'; - id: Scalars['ID']; - nominatorController: Scalars['String']; - nominatorStash: Scalars['String']; - session: Session; - stakedAmount: Scalars['String']; - validatorController: Scalars['String']; - validatorStash: Scalars['String']; -}; -/** A connection to a list of items. */ -export type NominationConnection = { - __typename?: 'NominationConnection'; - aggregate: AggregateNomination; - /** A list of edges. */ - edges: Array>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; +/** columns and relationships of "poll" */ +export type PollPoll_Votes_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; }; -export type NominationCreateInput = { - id?: Maybe; - nominatorController: Scalars['String']; - nominatorStash: Scalars['String']; - session: SessionCreateOneInput; - stakedAmount: Scalars['String']; - validatorController: Scalars['String']; - validatorStash: Scalars['String']; +/** aggregated selection of "poll" */ +export type Poll_Aggregate = { + __typename?: 'poll_aggregate'; + aggregate?: Maybe; + nodes: Array; }; -/** An edge in a connection. */ -export type NominationEdge = { - __typename?: 'NominationEdge'; - /** A cursor for use in pagination. */ - cursor: Scalars['String']; - /** The item at the end of the edge. */ - node: Nomination; +/** aggregate fields of "poll" */ +export type Poll_Aggregate_Fields = { + __typename?: 'poll_aggregate_fields'; + avg?: Maybe; + count?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; }; - -export enum NominationOrderByInput { - IdAsc = 'id_ASC', - IdDesc = 'id_DESC', - NominatorControllerAsc = 'nominatorController_ASC', - NominatorControllerDesc = 'nominatorController_DESC', - NominatorStashAsc = 'nominatorStash_ASC', - NominatorStashDesc = 'nominatorStash_DESC', - StakedAmountAsc = 'stakedAmount_ASC', - StakedAmountDesc = 'stakedAmount_DESC', - ValidatorControllerAsc = 'validatorController_ASC', - ValidatorControllerDesc = 'validatorController_DESC', - ValidatorStashAsc = 'validatorStash_ASC', - ValidatorStashDesc = 'validatorStash_DESC' -} - -export type NominationPreviousValues = { - __typename?: 'NominationPreviousValues'; - id: Scalars['ID']; - nominatorController: Scalars['String']; - nominatorStash: Scalars['String']; - stakedAmount: Scalars['String']; - validatorController: Scalars['String']; - validatorStash: Scalars['String']; + + +/** aggregate fields of "poll" */ +export type Poll_Aggregate_FieldsCountArgs = { + columns?: Maybe>; + distinct?: Maybe; }; -export type NominationSubscriptionPayload = { - __typename?: 'NominationSubscriptionPayload'; - mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; - updatedFields?: Maybe>; +/** order by aggregate values of table "poll" */ +export type Poll_Aggregate_Order_By = { + avg?: Maybe; + count?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; }; -export type NominationSubscriptionWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - /** The subscription event gets dispatched when it's listed in mutation_in */ - mutation_in?: Maybe>; - node?: Maybe; - /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ - updatedFields_contains?: Maybe; - /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ - updatedFields_contains_every?: Maybe>; - /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ - updatedFields_contains_some?: Maybe>; +/** input type for inserting array relation for remote table "poll" */ +export type Poll_Arr_Rel_Insert_Input = { + data: Array; + on_conflict?: Maybe; }; -export type NominationUpdateInput = { - nominatorController?: Maybe; - nominatorStash?: Maybe; - session?: Maybe; - stakedAmount?: Maybe; - validatorController?: Maybe; - validatorStash?: Maybe; +/** aggregate avg on columns */ +export type Poll_Avg_Fields = { + __typename?: 'poll_avg_fields'; + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; -export type NominationUpdateManyMutationInput = { - nominatorController?: Maybe; - nominatorStash?: Maybe; - stakedAmount?: Maybe; - validatorController?: Maybe; - validatorStash?: Maybe; +/** order by avg() on columns of table "poll" */ +export type Poll_Avg_Order_By = { + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; -export type NominationWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - id?: Maybe; - /** All values containing the given string. */ - id_contains?: Maybe; - /** All values ending with the given string. */ - id_ends_with?: Maybe; - /** All values greater than the given value. */ - id_gt?: Maybe; - /** All values greater than or equal the given value. */ - id_gte?: Maybe; - /** All values that are contained in given list. */ - id_in?: Maybe>; - /** All values less than the given value. */ - id_lt?: Maybe; - /** All values less than or equal the given value. */ - id_lte?: Maybe; - /** All values that are not equal to given value. */ - id_not?: Maybe; - /** All values not containing the given string. */ - id_not_contains?: Maybe; - /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - id_not_in?: Maybe>; - /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; - /** All values starting with the given string. */ - id_starts_with?: Maybe; - nominatorController?: Maybe; - /** All values containing the given string. */ - nominatorController_contains?: Maybe; - /** All values ending with the given string. */ - nominatorController_ends_with?: Maybe; - /** All values greater than the given value. */ - nominatorController_gt?: Maybe; - /** All values greater than or equal the given value. */ - nominatorController_gte?: Maybe; - /** All values that are contained in given list. */ - nominatorController_in?: Maybe>; - /** All values less than the given value. */ - nominatorController_lt?: Maybe; - /** All values less than or equal the given value. */ - nominatorController_lte?: Maybe; - /** All values that are not equal to given value. */ - nominatorController_not?: Maybe; - /** All values not containing the given string. */ - nominatorController_not_contains?: Maybe; - /** All values not ending with the given string. */ - nominatorController_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - nominatorController_not_in?: Maybe>; - /** All values not starting with the given string. */ - nominatorController_not_starts_with?: Maybe; - /** All values starting with the given string. */ - nominatorController_starts_with?: Maybe; - nominatorStash?: Maybe; - /** All values containing the given string. */ - nominatorStash_contains?: Maybe; - /** All values ending with the given string. */ - nominatorStash_ends_with?: Maybe; - /** All values greater than the given value. */ - nominatorStash_gt?: Maybe; - /** All values greater than or equal the given value. */ - nominatorStash_gte?: Maybe; - /** All values that are contained in given list. */ - nominatorStash_in?: Maybe>; - /** All values less than the given value. */ - nominatorStash_lt?: Maybe; - /** All values less than or equal the given value. */ - nominatorStash_lte?: Maybe; - /** All values that are not equal to given value. */ - nominatorStash_not?: Maybe; - /** All values not containing the given string. */ - nominatorStash_not_contains?: Maybe; - /** All values not ending with the given string. */ - nominatorStash_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - nominatorStash_not_in?: Maybe>; - /** All values not starting with the given string. */ - nominatorStash_not_starts_with?: Maybe; - /** All values starting with the given string. */ - nominatorStash_starts_with?: Maybe; - session?: Maybe; - stakedAmount?: Maybe; - /** All values containing the given string. */ - stakedAmount_contains?: Maybe; - /** All values ending with the given string. */ - stakedAmount_ends_with?: Maybe; - /** All values greater than the given value. */ - stakedAmount_gt?: Maybe; - /** All values greater than or equal the given value. */ - stakedAmount_gte?: Maybe; - /** All values that are contained in given list. */ - stakedAmount_in?: Maybe>; - /** All values less than the given value. */ - stakedAmount_lt?: Maybe; - /** All values less than or equal the given value. */ - stakedAmount_lte?: Maybe; - /** All values that are not equal to given value. */ - stakedAmount_not?: Maybe; - /** All values not containing the given string. */ - stakedAmount_not_contains?: Maybe; - /** All values not ending with the given string. */ - stakedAmount_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - stakedAmount_not_in?: Maybe>; - /** All values not starting with the given string. */ - stakedAmount_not_starts_with?: Maybe; - /** All values starting with the given string. */ - stakedAmount_starts_with?: Maybe; - validatorController?: Maybe; - /** All values containing the given string. */ - validatorController_contains?: Maybe; - /** All values ending with the given string. */ - validatorController_ends_with?: Maybe; - /** All values greater than the given value. */ - validatorController_gt?: Maybe; - /** All values greater than or equal the given value. */ - validatorController_gte?: Maybe; - /** All values that are contained in given list. */ - validatorController_in?: Maybe>; - /** All values less than the given value. */ - validatorController_lt?: Maybe; - /** All values less than or equal the given value. */ - validatorController_lte?: Maybe; - /** All values that are not equal to given value. */ - validatorController_not?: Maybe; - /** All values not containing the given string. */ - validatorController_not_contains?: Maybe; - /** All values not ending with the given string. */ - validatorController_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - validatorController_not_in?: Maybe>; - /** All values not starting with the given string. */ - validatorController_not_starts_with?: Maybe; - /** All values starting with the given string. */ - validatorController_starts_with?: Maybe; - validatorStash?: Maybe; - /** All values containing the given string. */ - validatorStash_contains?: Maybe; - /** All values ending with the given string. */ - validatorStash_ends_with?: Maybe; - /** All values greater than the given value. */ - validatorStash_gt?: Maybe; - /** All values greater than or equal the given value. */ - validatorStash_gte?: Maybe; - /** All values that are contained in given list. */ - validatorStash_in?: Maybe>; - /** All values less than the given value. */ - validatorStash_lt?: Maybe; - /** All values less than or equal the given value. */ - validatorStash_lte?: Maybe; - /** All values that are not equal to given value. */ - validatorStash_not?: Maybe; - /** All values not containing the given string. */ - validatorStash_not_contains?: Maybe; - /** All values not ending with the given string. */ - validatorStash_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - validatorStash_not_in?: Maybe>; - /** All values not starting with the given string. */ - validatorStash_not_starts_with?: Maybe; - /** All values starting with the given string. */ - validatorStash_starts_with?: Maybe; +/** Boolean expression to filter rows from the table "poll". All fields are combined with a logical 'AND'. */ +export type Poll_Bool_Exp = { + _and?: Maybe>>; + _not?: Maybe; + _or?: Maybe>>; + block_end?: Maybe; + created_at?: Maybe; + id?: Maybe; + poll_votes?: Maybe; + post?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; }; -export type NominationWhereUniqueInput = { - id?: Maybe; +/** unique or primary key constraints on table "poll" */ +export enum Poll_Constraint { + /** unique or primary key constraint */ + PollPkey = 'poll_pkey' +} + +/** input type for incrementing integer column in table "poll" */ +export type Poll_Inc_Input = { + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; -export type NotificationPreferences = { - __typename?: 'NotificationPreferences'; - newProposal?: Maybe; - ownProposal?: Maybe; - postCreated?: Maybe; - postParticipated?: Maybe; +/** input type for inserting data into table "poll" */ +export type Poll_Insert_Input = { + block_end?: Maybe; + created_at?: Maybe; + id?: Maybe; + poll_votes?: Maybe; + post?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; }; -export type NotificationPreferencesInput = { - newProposal?: Maybe; - ownProposal?: Maybe; - postCreated?: Maybe; - postParticipated?: Maybe; +/** aggregate max on columns */ +export type Poll_Max_Fields = { + __typename?: 'poll_max_fields'; + block_end?: Maybe; + created_at?: Maybe; + id?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; }; -export type OfflineValidator = Node & { - __typename?: 'OfflineValidator'; - id: Scalars['ID']; - others: Array; - own: Scalars['String']; - sessionIndex: Session; - total: Scalars['String']; - validatorId: Scalars['String']; +/** order by max() on columns of table "poll" */ +export type Poll_Max_Order_By = { + block_end?: Maybe; + created_at?: Maybe; + id?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; }; -/** A connection to a list of items. */ -export type OfflineValidatorConnection = { - __typename?: 'OfflineValidatorConnection'; - aggregate: AggregateOfflineValidator; - /** A list of edges. */ - edges: Array>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; +/** aggregate min on columns */ +export type Poll_Min_Fields = { + __typename?: 'poll_min_fields'; + block_end?: Maybe; + created_at?: Maybe; + id?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; }; -export type OfflineValidatorCreateInput = { - id?: Maybe; - others?: Maybe; - own: Scalars['String']; - sessionIndex: SessionCreateOneInput; - total: Scalars['String']; - validatorId: Scalars['String']; +/** order by min() on columns of table "poll" */ +export type Poll_Min_Order_By = { + block_end?: Maybe; + created_at?: Maybe; + id?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; }; -export type OfflineValidatorCreateothersInput = { - set?: Maybe>; +/** response of any mutation on the table "poll" */ +export type Poll_Mutation_Response = { + __typename?: 'poll_mutation_response'; + /** number of affected rows by the mutation */ + affected_rows: Scalars['Int']; + /** data of the affected rows by the mutation */ + returning: Array; }; -/** An edge in a connection. */ -export type OfflineValidatorEdge = { - __typename?: 'OfflineValidatorEdge'; - /** A cursor for use in pagination. */ - cursor: Scalars['String']; - /** The item at the end of the edge. */ - node: OfflineValidator; +/** input type for inserting object relation for remote table "poll" */ +export type Poll_Obj_Rel_Insert_Input = { + data: Poll_Insert_Input; + on_conflict?: Maybe; }; -export enum OfflineValidatorOrderByInput { - IdAsc = 'id_ASC', - IdDesc = 'id_DESC', - OwnAsc = 'own_ASC', - OwnDesc = 'own_DESC', - TotalAsc = 'total_ASC', - TotalDesc = 'total_DESC', - ValidatorIdAsc = 'validatorId_ASC', - ValidatorIdDesc = 'validatorId_DESC' -} - -export type OfflineValidatorPreviousValues = { - __typename?: 'OfflineValidatorPreviousValues'; - id: Scalars['ID']; - others: Array; - own: Scalars['String']; - total: Scalars['String']; - validatorId: Scalars['String']; +/** on conflict condition type for table "poll" */ +export type Poll_On_Conflict = { + constraint: Poll_Constraint; + update_columns: Array; + where?: Maybe; }; -export type OfflineValidatorSubscriptionPayload = { - __typename?: 'OfflineValidatorSubscriptionPayload'; - mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; - updatedFields?: Maybe>; +/** ordering options when selecting data from "poll" */ +export type Poll_Order_By = { + block_end?: Maybe; + created_at?: Maybe; + id?: Maybe; + poll_votes_aggregate?: Maybe; + post?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; }; -export type OfflineValidatorSubscriptionWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - /** The subscription event gets dispatched when it's listed in mutation_in */ - mutation_in?: Maybe>; - node?: Maybe; - /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ - updatedFields_contains?: Maybe; - /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ - updatedFields_contains_every?: Maybe>; - /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ - updatedFields_contains_some?: Maybe>; +/** primary key columns input for table: "poll" */ +export type Poll_Pk_Columns_Input = { + id: Scalars['Int']; }; -export type OfflineValidatorUpdateInput = { - others?: Maybe; - own?: Maybe; - sessionIndex?: Maybe; - total?: Maybe; - validatorId?: Maybe; +/** select columns of table "poll" */ +export enum Poll_Select_Column { + /** column name */ + BlockEnd = 'block_end', + /** column name */ + CreatedAt = 'created_at', + /** column name */ + Id = 'id', + /** column name */ + PostId = 'post_id', + /** column name */ + UpdatedAt = 'updated_at' +} + +/** input type for updating data in table "poll" */ +export type Poll_Set_Input = { + block_end?: Maybe; + created_at?: Maybe; + id?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; }; -export type OfflineValidatorUpdateManyMutationInput = { - others?: Maybe; - own?: Maybe; - total?: Maybe; - validatorId?: Maybe; +/** aggregate stddev on columns */ +export type Poll_Stddev_Fields = { + __typename?: 'poll_stddev_fields'; + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; -export type OfflineValidatorUpdateothersInput = { - set?: Maybe>; +/** order by stddev() on columns of table "poll" */ +export type Poll_Stddev_Order_By = { + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; -export type OfflineValidatorWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - id?: Maybe; - /** All values containing the given string. */ - id_contains?: Maybe; - /** All values ending with the given string. */ - id_ends_with?: Maybe; - /** All values greater than the given value. */ - id_gt?: Maybe; - /** All values greater than or equal the given value. */ - id_gte?: Maybe; - /** All values that are contained in given list. */ - id_in?: Maybe>; - /** All values less than the given value. */ - id_lt?: Maybe; - /** All values less than or equal the given value. */ - id_lte?: Maybe; - /** All values that are not equal to given value. */ - id_not?: Maybe; - /** All values not containing the given string. */ - id_not_contains?: Maybe; - /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - id_not_in?: Maybe>; - /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; - /** All values starting with the given string. */ - id_starts_with?: Maybe; - own?: Maybe; - /** All values containing the given string. */ - own_contains?: Maybe; - /** All values ending with the given string. */ - own_ends_with?: Maybe; - /** All values greater than the given value. */ - own_gt?: Maybe; - /** All values greater than or equal the given value. */ - own_gte?: Maybe; - /** All values that are contained in given list. */ - own_in?: Maybe>; - /** All values less than the given value. */ - own_lt?: Maybe; - /** All values less than or equal the given value. */ - own_lte?: Maybe; - /** All values that are not equal to given value. */ - own_not?: Maybe; - /** All values not containing the given string. */ - own_not_contains?: Maybe; - /** All values not ending with the given string. */ - own_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - own_not_in?: Maybe>; - /** All values not starting with the given string. */ - own_not_starts_with?: Maybe; - /** All values starting with the given string. */ - own_starts_with?: Maybe; - sessionIndex?: Maybe; - total?: Maybe; - /** All values containing the given string. */ - total_contains?: Maybe; - /** All values ending with the given string. */ - total_ends_with?: Maybe; - /** All values greater than the given value. */ - total_gt?: Maybe; - /** All values greater than or equal the given value. */ - total_gte?: Maybe; - /** All values that are contained in given list. */ - total_in?: Maybe>; - /** All values less than the given value. */ - total_lt?: Maybe; - /** All values less than or equal the given value. */ - total_lte?: Maybe; - /** All values that are not equal to given value. */ - total_not?: Maybe; - /** All values not containing the given string. */ - total_not_contains?: Maybe; - /** All values not ending with the given string. */ - total_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - total_not_in?: Maybe>; - /** All values not starting with the given string. */ - total_not_starts_with?: Maybe; - /** All values starting with the given string. */ - total_starts_with?: Maybe; - validatorId?: Maybe; - /** All values containing the given string. */ - validatorId_contains?: Maybe; - /** All values ending with the given string. */ - validatorId_ends_with?: Maybe; - /** All values greater than the given value. */ - validatorId_gt?: Maybe; - /** All values greater than or equal the given value. */ - validatorId_gte?: Maybe; - /** All values that are contained in given list. */ - validatorId_in?: Maybe>; - /** All values less than the given value. */ - validatorId_lt?: Maybe; - /** All values less than or equal the given value. */ - validatorId_lte?: Maybe; - /** All values that are not equal to given value. */ - validatorId_not?: Maybe; - /** All values not containing the given string. */ - validatorId_not_contains?: Maybe; - /** All values not ending with the given string. */ - validatorId_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - validatorId_not_in?: Maybe>; - /** All values not starting with the given string. */ - validatorId_not_starts_with?: Maybe; - /** All values starting with the given string. */ - validatorId_starts_with?: Maybe; +/** aggregate stddev_pop on columns */ +export type Poll_Stddev_Pop_Fields = { + __typename?: 'poll_stddev_pop_fields'; + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; -export type OfflineValidatorWhereUniqueInput = { - id?: Maybe; +/** order by stddev_pop() on columns of table "poll" */ +export type Poll_Stddev_Pop_Order_By = { + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; -/** - * on chain proposal created automatically by chain-db-watcher - * - * - * columns and relationships of "onchain_links" - */ -export type Onchain_Links = { - __typename?: 'onchain_links'; - created_at: Scalars['timestamptz']; - id: Scalars['Int']; - /** Remote relationship field */ - onchain_motion: Array>; - onchain_motion_id?: Maybe; - /** Remote relationship field */ - onchain_proposal: Array>; - onchain_proposal_id?: Maybe; - /** Remote relationship field */ - onchain_referendum: Array>; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - /** Remote relationship field */ - onchain_treasury_spend_proposal: Array>; - /** An object relationship */ - post: Posts; - post_id: Scalars['Int']; - proposer_address: Scalars['String']; +/** aggregate stddev_samp on columns */ +export type Poll_Stddev_Samp_Fields = { + __typename?: 'poll_stddev_samp_fields'; + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; +}; + +/** order by stddev_samp() on columns of table "poll" */ +export type Poll_Stddev_Samp_Order_By = { + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; +/** aggregate sum on columns */ +export type Poll_Sum_Fields = { + __typename?: 'poll_sum_fields'; + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; +}; -/** - * on chain proposal created automatically by chain-db-watcher - * - * - * columns and relationships of "onchain_links" - */ -export type Onchain_LinksOnchain_MotionArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; - orderBy?: Maybe; - skip?: Maybe; - where?: Maybe; +/** order by sum() on columns of table "poll" */ +export type Poll_Sum_Order_By = { + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; +/** update columns of table "poll" */ +export enum Poll_Update_Column { + /** column name */ + BlockEnd = 'block_end', + /** column name */ + CreatedAt = 'created_at', + /** column name */ + Id = 'id', + /** column name */ + PostId = 'post_id', + /** column name */ + UpdatedAt = 'updated_at' +} -/** - * on chain proposal created automatically by chain-db-watcher - * - * - * columns and relationships of "onchain_links" - */ -export type Onchain_LinksOnchain_ProposalArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; - orderBy?: Maybe; - skip?: Maybe; - where?: Maybe; +/** aggregate var_pop on columns */ +export type Poll_Var_Pop_Fields = { + __typename?: 'poll_var_pop_fields'; + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; +/** order by var_pop() on columns of table "poll" */ +export type Poll_Var_Pop_Order_By = { + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; +}; -/** - * on chain proposal created automatically by chain-db-watcher - * - * - * columns and relationships of "onchain_links" - */ -export type Onchain_LinksOnchain_ReferendumArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; - orderBy?: Maybe; - skip?: Maybe; - where?: Maybe; +/** aggregate var_samp on columns */ +export type Poll_Var_Samp_Fields = { + __typename?: 'poll_var_samp_fields'; + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; +/** order by var_samp() on columns of table "poll" */ +export type Poll_Var_Samp_Order_By = { + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; +}; -/** - * on chain proposal created automatically by chain-db-watcher - * - * - * columns and relationships of "onchain_links" - */ -export type Onchain_LinksOnchain_Treasury_Spend_ProposalArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; - orderBy?: Maybe; - skip?: Maybe; - where?: Maybe; +/** aggregate variance on columns */ +export type Poll_Variance_Fields = { + __typename?: 'poll_variance_fields'; + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; -/** aggregated selection of "onchain_links" */ -export type Onchain_Links_Aggregate = { - __typename?: 'onchain_links_aggregate'; - aggregate?: Maybe; - nodes: Array; +/** order by variance() on columns of table "poll" */ +export type Poll_Variance_Order_By = { + block_end?: Maybe; + id?: Maybe; + post_id?: Maybe; }; -/** aggregate fields of "onchain_links" */ -export type Onchain_Links_Aggregate_Fields = { - __typename?: 'onchain_links_aggregate_fields'; - avg?: Maybe; +/** columns and relationships of "poll_votes" */ +export type Poll_Votes = { + __typename?: 'poll_votes'; + created_at: Scalars['timestamp']; + id: Scalars['Int']; + /** An object relationship */ + poll: Poll; + poll_id: Scalars['Int']; + updated_at?: Maybe; + user_id: Scalars['Int']; + vote: Scalars['bpchar']; + /** Remote relationship field */ + voter?: Maybe; +}; + +/** aggregated selection of "poll_votes" */ +export type Poll_Votes_Aggregate = { + __typename?: 'poll_votes_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "poll_votes" */ +export type Poll_Votes_Aggregate_Fields = { + __typename?: 'poll_votes_aggregate_fields'; + avg?: Maybe; count?: Maybe; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; }; -/** aggregate fields of "onchain_links" */ -export type Onchain_Links_Aggregate_FieldsCountArgs = { - columns?: Maybe>; +/** aggregate fields of "poll_votes" */ +export type Poll_Votes_Aggregate_FieldsCountArgs = { + columns?: Maybe>; distinct?: Maybe; }; -/** order by aggregate values of table "onchain_links" */ -export type Onchain_Links_Aggregate_Order_By = { - avg?: Maybe; +/** order by aggregate values of table "poll_votes" */ +export type Poll_Votes_Aggregate_Order_By = { + avg?: Maybe; count?: Maybe; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; }; -/** input type for inserting array relation for remote table "onchain_links" */ -export type Onchain_Links_Arr_Rel_Insert_Input = { - data: Array; - on_conflict?: Maybe; +/** input type for inserting array relation for remote table "poll_votes" */ +export type Poll_Votes_Arr_Rel_Insert_Input = { + data: Array; + on_conflict?: Maybe; }; /** aggregate avg on columns */ -export type Onchain_Links_Avg_Fields = { - __typename?: 'onchain_links_avg_fields'; +export type Poll_Votes_Avg_Fields = { + __typename?: 'poll_votes_avg_fields'; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; -/** order by avg() on columns of table "onchain_links" */ -export type Onchain_Links_Avg_Order_By = { +/** order by avg() on columns of table "poll_votes" */ +export type Poll_Votes_Avg_Order_By = { id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; -/** Boolean expression to filter rows from the table "onchain_links". All fields are combined with a logical 'AND'. */ -export type Onchain_Links_Bool_Exp = { - _and?: Maybe>>; - _not?: Maybe; - _or?: Maybe>>; - created_at?: Maybe; +/** Boolean expression to filter rows from the table "poll_votes". All fields are combined with a logical 'AND'. */ +export type Poll_Votes_Bool_Exp = { + _and?: Maybe>>; + _not?: Maybe; + _or?: Maybe>>; + created_at?: Maybe; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post?: Maybe; - post_id?: Maybe; - proposer_address?: Maybe; + poll?: Maybe; + poll_id?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; + vote?: Maybe; }; -/** unique or primary key constraints on table "onchain_links" */ -export enum Onchain_Links_Constraint { - /** unique or primary key constraint */ - OnchainLinksOnchainMotionIdKey = 'onchain_links_onchain_motion_id_key', - /** unique or primary key constraint */ - OnchainLinksOnchainReferendumIdKey = 'onchain_links_onchain_referendum_id_key', - /** unique or primary key constraint */ - OnchainProposalsChainDbIdKey = 'onchain_proposals_chain_db_id_key', +/** unique or primary key constraints on table "poll_votes" */ +export enum Poll_Votes_Constraint { /** unique or primary key constraint */ - ProposalsPkey = 'proposals_pkey', + PollVotesPkey = 'poll_votes_pkey', /** unique or primary key constraint */ - ProposalsPostIdKey = 'proposals_post_id_key' + PollVotesPollIdUserIdKey = 'poll_votes_poll_id_user_id_key' } -/** input type for incrementing integer columne in table "onchain_links" */ -export type Onchain_Links_Inc_Input = { +/** input type for incrementing integer column in table "poll_votes" */ +export type Poll_Votes_Inc_Input = { id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; -/** input type for inserting data into table "onchain_links" */ -export type Onchain_Links_Insert_Input = { - created_at?: Maybe; +/** input type for inserting data into table "poll_votes" */ +export type Poll_Votes_Insert_Input = { + created_at?: Maybe; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post?: Maybe; - post_id?: Maybe; - proposer_address?: Maybe; + poll?: Maybe; + poll_id?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; + vote?: Maybe; }; /** aggregate max on columns */ -export type Onchain_Links_Max_Fields = { - __typename?: 'onchain_links_max_fields'; - created_at?: Maybe; +export type Poll_Votes_Max_Fields = { + __typename?: 'poll_votes_max_fields'; + created_at?: Maybe; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; - proposer_address?: Maybe; + poll_id?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; }; -/** order by max() on columns of table "onchain_links" */ -export type Onchain_Links_Max_Order_By = { +/** order by max() on columns of table "poll_votes" */ +export type Poll_Votes_Max_Order_By = { created_at?: Maybe; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; - proposer_address?: Maybe; + poll_id?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; }; /** aggregate min on columns */ -export type Onchain_Links_Min_Fields = { - __typename?: 'onchain_links_min_fields'; - created_at?: Maybe; +export type Poll_Votes_Min_Fields = { + __typename?: 'poll_votes_min_fields'; + created_at?: Maybe; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; - proposer_address?: Maybe; + poll_id?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; }; -/** order by min() on columns of table "onchain_links" */ -export type Onchain_Links_Min_Order_By = { +/** order by min() on columns of table "poll_votes" */ +export type Poll_Votes_Min_Order_By = { created_at?: Maybe; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; - proposer_address?: Maybe; + poll_id?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; }; -/** response of any mutation on the table "onchain_links" */ -export type Onchain_Links_Mutation_Response = { - __typename?: 'onchain_links_mutation_response'; +/** response of any mutation on the table "poll_votes" */ +export type Poll_Votes_Mutation_Response = { + __typename?: 'poll_votes_mutation_response'; /** number of affected rows by the mutation */ affected_rows: Scalars['Int']; - /** data of the affected rows by the mutation */ - returning: Array; -}; - -/** input type for inserting object relation for remote table "onchain_links" */ -export type Onchain_Links_Obj_Rel_Insert_Input = { - data: Onchain_Links_Insert_Input; - on_conflict?: Maybe; + /** data of the affected rows by the mutation */ + returning: Array; }; -/** on conflict condition type for table "onchain_links" */ -export type Onchain_Links_On_Conflict = { - constraint: Onchain_Links_Constraint; - update_columns: Array; - where?: Maybe; +/** input type for inserting object relation for remote table "poll_votes" */ +export type Poll_Votes_Obj_Rel_Insert_Input = { + data: Poll_Votes_Insert_Input; + on_conflict?: Maybe; }; -/** ordering options when selecting data from "onchain_links" */ -export type Onchain_Links_Order_By = { +/** on conflict condition type for table "poll_votes" */ +export type Poll_Votes_On_Conflict = { + constraint: Poll_Votes_Constraint; + update_columns: Array; + where?: Maybe; +}; + +/** ordering options when selecting data from "poll_votes" */ +export type Poll_Votes_Order_By = { created_at?: Maybe; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post?: Maybe; - post_id?: Maybe; - proposer_address?: Maybe; + poll?: Maybe; + poll_id?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; + vote?: Maybe; }; -/** primary key columns input for table: "onchain_links" */ -export type Onchain_Links_Pk_Columns_Input = { +/** primary key columns input for table: "poll_votes" */ +export type Poll_Votes_Pk_Columns_Input = { id: Scalars['Int']; }; -/** select columns of table "onchain_links" */ -export enum Onchain_Links_Select_Column { +/** select columns of table "poll_votes" */ +export enum Poll_Votes_Select_Column { /** column name */ CreatedAt = 'created_at', /** column name */ Id = 'id', /** column name */ - OnchainMotionId = 'onchain_motion_id', - /** column name */ - OnchainProposalId = 'onchain_proposal_id', - /** column name */ - OnchainReferendumId = 'onchain_referendum_id', + PollId = 'poll_id', /** column name */ - OnchainTreasuryProposalId = 'onchain_treasury_proposal_id', + UpdatedAt = 'updated_at', /** column name */ - PostId = 'post_id', + UserId = 'user_id', /** column name */ - ProposerAddress = 'proposer_address' + Vote = 'vote' } -/** input type for updating data in table "onchain_links" */ -export type Onchain_Links_Set_Input = { - created_at?: Maybe; +/** input type for updating data in table "poll_votes" */ +export type Poll_Votes_Set_Input = { + created_at?: Maybe; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; - proposer_address?: Maybe; + poll_id?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; + vote?: Maybe; }; /** aggregate stddev on columns */ -export type Onchain_Links_Stddev_Fields = { - __typename?: 'onchain_links_stddev_fields'; +export type Poll_Votes_Stddev_Fields = { + __typename?: 'poll_votes_stddev_fields'; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; -/** order by stddev() on columns of table "onchain_links" */ -export type Onchain_Links_Stddev_Order_By = { +/** order by stddev() on columns of table "poll_votes" */ +export type Poll_Votes_Stddev_Order_By = { id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; /** aggregate stddev_pop on columns */ -export type Onchain_Links_Stddev_Pop_Fields = { - __typename?: 'onchain_links_stddev_pop_fields'; +export type Poll_Votes_Stddev_Pop_Fields = { + __typename?: 'poll_votes_stddev_pop_fields'; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; -/** order by stddev_pop() on columns of table "onchain_links" */ -export type Onchain_Links_Stddev_Pop_Order_By = { +/** order by stddev_pop() on columns of table "poll_votes" */ +export type Poll_Votes_Stddev_Pop_Order_By = { id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; /** aggregate stddev_samp on columns */ -export type Onchain_Links_Stddev_Samp_Fields = { - __typename?: 'onchain_links_stddev_samp_fields'; +export type Poll_Votes_Stddev_Samp_Fields = { + __typename?: 'poll_votes_stddev_samp_fields'; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; -/** order by stddev_samp() on columns of table "onchain_links" */ -export type Onchain_Links_Stddev_Samp_Order_By = { +/** order by stddev_samp() on columns of table "poll_votes" */ +export type Poll_Votes_Stddev_Samp_Order_By = { id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; /** aggregate sum on columns */ -export type Onchain_Links_Sum_Fields = { - __typename?: 'onchain_links_sum_fields'; +export type Poll_Votes_Sum_Fields = { + __typename?: 'poll_votes_sum_fields'; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; -/** order by sum() on columns of table "onchain_links" */ -export type Onchain_Links_Sum_Order_By = { +/** order by sum() on columns of table "poll_votes" */ +export type Poll_Votes_Sum_Order_By = { id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; -/** update columns of table "onchain_links" */ -export enum Onchain_Links_Update_Column { +/** update columns of table "poll_votes" */ +export enum Poll_Votes_Update_Column { /** column name */ CreatedAt = 'created_at', /** column name */ Id = 'id', /** column name */ - OnchainMotionId = 'onchain_motion_id', - /** column name */ - OnchainProposalId = 'onchain_proposal_id', - /** column name */ - OnchainReferendumId = 'onchain_referendum_id', + PollId = 'poll_id', /** column name */ - OnchainTreasuryProposalId = 'onchain_treasury_proposal_id', + UpdatedAt = 'updated_at', /** column name */ - PostId = 'post_id', + UserId = 'user_id', /** column name */ - ProposerAddress = 'proposer_address' + Vote = 'vote' } /** aggregate var_pop on columns */ -export type Onchain_Links_Var_Pop_Fields = { - __typename?: 'onchain_links_var_pop_fields'; +export type Poll_Votes_Var_Pop_Fields = { + __typename?: 'poll_votes_var_pop_fields'; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; -/** order by var_pop() on columns of table "onchain_links" */ -export type Onchain_Links_Var_Pop_Order_By = { +/** order by var_pop() on columns of table "poll_votes" */ +export type Poll_Votes_Var_Pop_Order_By = { id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; /** aggregate var_samp on columns */ -export type Onchain_Links_Var_Samp_Fields = { - __typename?: 'onchain_links_var_samp_fields'; +export type Poll_Votes_Var_Samp_Fields = { + __typename?: 'poll_votes_var_samp_fields'; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; -/** order by var_samp() on columns of table "onchain_links" */ -export type Onchain_Links_Var_Samp_Order_By = { +/** order by var_samp() on columns of table "poll_votes" */ +export type Poll_Votes_Var_Samp_Order_By = { id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; /** aggregate variance on columns */ -export type Onchain_Links_Variance_Fields = { - __typename?: 'onchain_links_variance_fields'; +export type Poll_Votes_Variance_Fields = { + __typename?: 'poll_votes_variance_fields'; id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; - post_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; }; -/** order by variance() on columns of table "onchain_links" */ -export type Onchain_Links_Variance_Order_By = { +/** order by variance() on columns of table "poll_votes" */ +export type Poll_Votes_Variance_Order_By = { id?: Maybe; - onchain_motion_id?: Maybe; - onchain_proposal_id?: Maybe; - onchain_referendum_id?: Maybe; - onchain_treasury_proposal_id?: Maybe; + poll_id?: Maybe; + user_id?: Maybe; +}; + +/** columns and relationships of "post_last_update" */ +export type Post_Last_Update = { + __typename?: 'post_last_update'; + comment_id?: Maybe; + last_update?: Maybe; + post_id?: Maybe; +}; + +/** aggregated selection of "post_last_update" */ +export type Post_Last_Update_Aggregate = { + __typename?: 'post_last_update_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "post_last_update" */ +export type Post_Last_Update_Aggregate_Fields = { + __typename?: 'post_last_update_aggregate_fields'; + avg?: Maybe; + count?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "post_last_update" */ +export type Post_Last_Update_Aggregate_FieldsCountArgs = { + columns?: Maybe>; + distinct?: Maybe; +}; + +/** order by aggregate values of table "post_last_update" */ +export type Post_Last_Update_Aggregate_Order_By = { + avg?: Maybe; + count?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + +/** aggregate avg on columns */ +export type Post_Last_Update_Avg_Fields = { + __typename?: 'post_last_update_avg_fields'; + post_id?: Maybe; +}; + +/** order by avg() on columns of table "post_last_update" */ +export type Post_Last_Update_Avg_Order_By = { + post_id?: Maybe; +}; + +/** Boolean expression to filter rows from the table "post_last_update". All fields are combined with a logical 'AND'. */ +export type Post_Last_Update_Bool_Exp = { + _and?: Maybe>>; + _not?: Maybe; + _or?: Maybe>>; + comment_id?: Maybe; + last_update?: Maybe; + post_id?: Maybe; +}; + +/** aggregate max on columns */ +export type Post_Last_Update_Max_Fields = { + __typename?: 'post_last_update_max_fields'; + comment_id?: Maybe; + last_update?: Maybe; + post_id?: Maybe; +}; + +/** order by max() on columns of table "post_last_update" */ +export type Post_Last_Update_Max_Order_By = { + comment_id?: Maybe; + last_update?: Maybe; + post_id?: Maybe; +}; + +/** aggregate min on columns */ +export type Post_Last_Update_Min_Fields = { + __typename?: 'post_last_update_min_fields'; + comment_id?: Maybe; + last_update?: Maybe; + post_id?: Maybe; +}; + +/** order by min() on columns of table "post_last_update" */ +export type Post_Last_Update_Min_Order_By = { + comment_id?: Maybe; + last_update?: Maybe; + post_id?: Maybe; +}; + +/** ordering options when selecting data from "post_last_update" */ +export type Post_Last_Update_Order_By = { + comment_id?: Maybe; + last_update?: Maybe; + post_id?: Maybe; +}; + +/** select columns of table "post_last_update" */ +export enum Post_Last_Update_Select_Column { + /** column name */ + CommentId = 'comment_id', + /** column name */ + LastUpdate = 'last_update', + /** column name */ + PostId = 'post_id' +} + +/** aggregate stddev on columns */ +export type Post_Last_Update_Stddev_Fields = { + __typename?: 'post_last_update_stddev_fields'; + post_id?: Maybe; +}; + +/** order by stddev() on columns of table "post_last_update" */ +export type Post_Last_Update_Stddev_Order_By = { + post_id?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Post_Last_Update_Stddev_Pop_Fields = { + __typename?: 'post_last_update_stddev_pop_fields'; + post_id?: Maybe; +}; + +/** order by stddev_pop() on columns of table "post_last_update" */ +export type Post_Last_Update_Stddev_Pop_Order_By = { + post_id?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Post_Last_Update_Stddev_Samp_Fields = { + __typename?: 'post_last_update_stddev_samp_fields'; + post_id?: Maybe; +}; + +/** order by stddev_samp() on columns of table "post_last_update" */ +export type Post_Last_Update_Stddev_Samp_Order_By = { + post_id?: Maybe; +}; + +/** aggregate sum on columns */ +export type Post_Last_Update_Sum_Fields = { + __typename?: 'post_last_update_sum_fields'; + post_id?: Maybe; +}; + +/** order by sum() on columns of table "post_last_update" */ +export type Post_Last_Update_Sum_Order_By = { + post_id?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Post_Last_Update_Var_Pop_Fields = { + __typename?: 'post_last_update_var_pop_fields'; + post_id?: Maybe; +}; + +/** order by var_pop() on columns of table "post_last_update" */ +export type Post_Last_Update_Var_Pop_Order_By = { + post_id?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Post_Last_Update_Var_Samp_Fields = { + __typename?: 'post_last_update_var_samp_fields'; + post_id?: Maybe; +}; + +/** order by var_samp() on columns of table "post_last_update" */ +export type Post_Last_Update_Var_Samp_Order_By = { post_id?: Maybe; }; -/** column ordering options */ -export enum Order_By { - /** in the ascending order, nulls last */ - Asc = 'asc', - /** in the ascending order, nulls first */ - AscNullsFirst = 'asc_nulls_first', - /** in the ascending order, nulls last */ - AscNullsLast = 'asc_nulls_last', - /** in the descending order, nulls first */ - Desc = 'desc', - /** in the descending order, nulls first */ - DescNullsFirst = 'desc_nulls_first', - /** in the descending order, nulls last */ - DescNullsLast = 'desc_nulls_last' -} +/** aggregate variance on columns */ +export type Post_Last_Update_Variance_Fields = { + __typename?: 'post_last_update_variance_fields'; + post_id?: Maybe; +}; -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; +/** order by variance() on columns of table "post_last_update" */ +export type Post_Last_Update_Variance_Order_By = { + post_id?: Maybe; }; /** columns and relationships of "post_reactions" */ @@ -6711,10 +5648,12 @@ export type Post_Reactions_Bool_Exp = { /** unique or primary key constraints on table "post_reactions" */ export enum Post_Reactions_Constraint { /** unique or primary key constraint */ - PostReactionsPkey = 'post_reactions_pkey' + PostReactionsPkey = 'post_reactions_pkey', + /** unique or primary key constraint */ + PostReactionsPostIdUserIdReactionKey = 'post_reactions_post_id_user_id_reaction_key' } -/** input type for incrementing integer columne in table "post_reactions" */ +/** input type for incrementing integer column in table "post_reactions" */ export type Post_Reactions_Inc_Input = { id?: Maybe; post_id?: Maybe; @@ -6735,30 +5674,38 @@ export type Post_Reactions_Insert_Input = { /** aggregate max on columns */ export type Post_Reactions_Max_Fields = { __typename?: 'post_reactions_max_fields'; + created_at?: Maybe; id?: Maybe; post_id?: Maybe; + updated_at?: Maybe; user_id?: Maybe; }; /** order by max() on columns of table "post_reactions" */ export type Post_Reactions_Max_Order_By = { + created_at?: Maybe; id?: Maybe; post_id?: Maybe; + updated_at?: Maybe; user_id?: Maybe; }; /** aggregate min on columns */ export type Post_Reactions_Min_Fields = { __typename?: 'post_reactions_min_fields'; + created_at?: Maybe; id?: Maybe; post_id?: Maybe; + updated_at?: Maybe; user_id?: Maybe; }; /** order by min() on columns of table "post_reactions" */ export type Post_Reactions_Min_Order_By = { + created_at?: Maybe; id?: Maybe; post_id?: Maybe; + updated_at?: Maybe; user_id?: Maybe; }; @@ -7058,7 +6005,7 @@ export enum Post_Topics_Constraint { CategoriesPkey = 'categories_pkey' } -/** input type for incrementing integer columne in table "post_topics" */ +/** input type for incrementing integer column in table "post_topics" */ export type Post_Topics_Inc_Input = { id?: Maybe; }; @@ -7340,7 +6287,7 @@ export enum Post_Types_Constraint { PostTypesPkey = 'post_types_pkey' } -/** input type for incrementing integer columne in table "post_types" */ +/** input type for incrementing integer column in table "post_types" */ export type Post_Types_Inc_Input = { id?: Maybe; }; @@ -7525,8 +6472,14 @@ export type Posts = { created_at: Scalars['timestamptz']; id: Scalars['Int']; /** An object relationship */ + last_update?: Maybe; + /** An object relationship */ onchain_link?: Maybe; /** An array relationship */ + polls: Array; + /** An aggregated array relationship */ + polls_aggregate: Poll_Aggregate; + /** An array relationship */ post_reactions: Array; /** An aggregated array relationship */ post_reactions_aggregate: Post_Reactions_Aggregate; @@ -7562,6 +6515,26 @@ export type PostsComments_AggregateArgs = { }; +/** columns and relationships of "posts" */ +export type PostsPollsArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** columns and relationships of "posts" */ +export type PostsPolls_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + /** columns and relationships of "posts" */ export type PostsPost_ReactionsArgs = { distinct_on?: Maybe>; @@ -7659,7 +6632,9 @@ export type Posts_Bool_Exp = { content?: Maybe; created_at?: Maybe; id?: Maybe; + last_update?: Maybe; onchain_link?: Maybe; + polls?: Maybe; post_reactions?: Maybe; title?: Maybe; topic?: Maybe; @@ -7675,7 +6650,7 @@ export enum Posts_Constraint { MessagesPkey = 'messages_pkey' } -/** input type for incrementing integer columne in table "posts" */ +/** input type for incrementing integer column in table "posts" */ export type Posts_Inc_Input = { author_id?: Maybe; id?: Maybe; @@ -7691,6 +6666,7 @@ export type Posts_Insert_Input = { created_at?: Maybe; id?: Maybe; onchain_link?: Maybe; + polls?: Maybe; post_reactions?: Maybe; title?: Maybe; topic?: Maybe; @@ -7779,7 +6755,9 @@ export type Posts_Order_By = { content?: Maybe; created_at?: Maybe; id?: Maybe; + last_update?: Maybe; onchain_link?: Maybe; + polls_aggregate?: Maybe; post_reactions_aggregate?: Maybe; title?: Maybe; topic?: Maybe; @@ -8021,24 +6999,6 @@ export type PreimageArgumentConnection = { pageInfo: PageInfo; }; -export type PreimageArgumentCreateInput = { - id?: Maybe; - name: Scalars['String']; - preimage: PreimageCreateOneWithoutPreimageArgumentsInput; - value: Scalars['String']; -}; - -export type PreimageArgumentCreateManyWithoutPreimageInput = { - connect?: Maybe>; - create?: Maybe>; -}; - -export type PreimageArgumentCreateWithoutPreimageInput = { - id?: Maybe; - name: Scalars['String']; - value: Scalars['String']; -}; - /** An edge in a connection. */ export type PreimageArgumentEdge = { __typename?: 'PreimageArgumentEdge'; @@ -8064,96 +7024,6 @@ export type PreimageArgumentPreviousValues = { value: Scalars['String']; }; -export type PreimageArgumentScalarWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - id?: Maybe; - /** All values containing the given string. */ - id_contains?: Maybe; - /** All values ending with the given string. */ - id_ends_with?: Maybe; - /** All values greater than the given value. */ - id_gt?: Maybe; - /** All values greater than or equal the given value. */ - id_gte?: Maybe; - /** All values that are contained in given list. */ - id_in?: Maybe>; - /** All values less than the given value. */ - id_lt?: Maybe; - /** All values less than or equal the given value. */ - id_lte?: Maybe; - /** All values that are not equal to given value. */ - id_not?: Maybe; - /** All values not containing the given string. */ - id_not_contains?: Maybe; - /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - id_not_in?: Maybe>; - /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; - /** All values starting with the given string. */ - id_starts_with?: Maybe; - name?: Maybe; - /** All values containing the given string. */ - name_contains?: Maybe; - /** All values ending with the given string. */ - name_ends_with?: Maybe; - /** All values greater than the given value. */ - name_gt?: Maybe; - /** All values greater than or equal the given value. */ - name_gte?: Maybe; - /** All values that are contained in given list. */ - name_in?: Maybe>; - /** All values less than the given value. */ - name_lt?: Maybe; - /** All values less than or equal the given value. */ - name_lte?: Maybe; - /** All values that are not equal to given value. */ - name_not?: Maybe; - /** All values not containing the given string. */ - name_not_contains?: Maybe; - /** All values not ending with the given string. */ - name_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - name_not_in?: Maybe>; - /** All values not starting with the given string. */ - name_not_starts_with?: Maybe; - /** All values starting with the given string. */ - name_starts_with?: Maybe; - value?: Maybe; - /** All values containing the given string. */ - value_contains?: Maybe; - /** All values ending with the given string. */ - value_ends_with?: Maybe; - /** All values greater than the given value. */ - value_gt?: Maybe; - /** All values greater than or equal the given value. */ - value_gte?: Maybe; - /** All values that are contained in given list. */ - value_in?: Maybe>; - /** All values less than the given value. */ - value_lt?: Maybe; - /** All values less than or equal the given value. */ - value_lte?: Maybe; - /** All values that are not equal to given value. */ - value_not?: Maybe; - /** All values not containing the given string. */ - value_not_contains?: Maybe; - /** All values not ending with the given string. */ - value_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - value_not_in?: Maybe>; - /** All values not starting with the given string. */ - value_not_starts_with?: Maybe; - /** All values starting with the given string. */ - value_starts_with?: Maybe; -}; - export type PreimageArgumentSubscriptionPayload = { __typename?: 'PreimageArgumentSubscriptionPayload'; mutation: MutationType; @@ -8180,55 +7050,6 @@ export type PreimageArgumentSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type PreimageArgumentUpdateInput = { - name?: Maybe; - preimage?: Maybe; - value?: Maybe; -}; - -export type PreimageArgumentUpdateManyDataInput = { - name?: Maybe; - value?: Maybe; -}; - -export type PreimageArgumentUpdateManyMutationInput = { - name?: Maybe; - value?: Maybe; -}; - -export type PreimageArgumentUpdateManyWithoutPreimageInput = { - connect?: Maybe>; - create?: Maybe>; - delete?: Maybe>; - deleteMany?: Maybe>; - disconnect?: Maybe>; - set?: Maybe>; - update?: Maybe>; - updateMany?: Maybe>; - upsert?: Maybe>; -}; - -export type PreimageArgumentUpdateManyWithWhereNestedInput = { - data: PreimageArgumentUpdateManyDataInput; - where: PreimageArgumentScalarWhereInput; -}; - -export type PreimageArgumentUpdateWithoutPreimageDataInput = { - name?: Maybe; - value?: Maybe; -}; - -export type PreimageArgumentUpdateWithWhereUniqueWithoutPreimageInput = { - data: PreimageArgumentUpdateWithoutPreimageDataInput; - where: PreimageArgumentWhereUniqueInput; -}; - -export type PreimageArgumentUpsertWithWhereUniqueWithoutPreimageInput = { - create: PreimageArgumentCreateWithoutPreimageInput; - update: PreimageArgumentUpdateWithoutPreimageDataInput; - where: PreimageArgumentWhereUniqueInput; -}; - export type PreimageArgumentWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -8320,128 +7141,18 @@ export type PreimageArgumentWhereInput = { value_starts_with?: Maybe; }; -export type PreimageArgumentWhereUniqueInput = { - id?: Maybe; -}; - -/** A connection to a list of items. */ -export type PreimageConnection = { - __typename?: 'PreimageConnection'; - aggregate: AggregatePreimage; - /** A list of edges. */ - edges: Array>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; -}; - -export type PreimageCreateInput = { - author: Scalars['String']; - depositAmount: Scalars['String']; - hash: Scalars['String']; - id?: Maybe; - metaDescription: Scalars['String']; - method: Scalars['String']; - motion?: Maybe; - preimageArguments?: Maybe; - preimageStatus?: Maybe; - proposal?: Maybe; - referendum?: Maybe; - section: Scalars['String']; -}; - -export type PreimageCreateOneWithoutMotionInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type PreimageCreateOneWithoutPreimageArgumentsInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type PreimageCreateOneWithoutPreimageStatusInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type PreimageCreateOneWithoutProposalInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type PreimageCreateOneWithoutReferendumInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type PreimageCreateWithoutMotionInput = { - author: Scalars['String']; - depositAmount: Scalars['String']; - hash: Scalars['String']; - id?: Maybe; - metaDescription: Scalars['String']; - method: Scalars['String']; - preimageArguments?: Maybe; - preimageStatus?: Maybe; - proposal?: Maybe; - referendum?: Maybe; - section: Scalars['String']; -}; - -export type PreimageCreateWithoutPreimageArgumentsInput = { - author: Scalars['String']; - depositAmount: Scalars['String']; - hash: Scalars['String']; - id?: Maybe; - metaDescription: Scalars['String']; - method: Scalars['String']; - motion?: Maybe; - preimageStatus?: Maybe; - proposal?: Maybe; - referendum?: Maybe; - section: Scalars['String']; -}; - -export type PreimageCreateWithoutPreimageStatusInput = { - author: Scalars['String']; - depositAmount: Scalars['String']; - hash: Scalars['String']; - id?: Maybe; - metaDescription: Scalars['String']; - method: Scalars['String']; - motion?: Maybe; - preimageArguments?: Maybe; - proposal?: Maybe; - referendum?: Maybe; - section: Scalars['String']; -}; - -export type PreimageCreateWithoutProposalInput = { - author: Scalars['String']; - depositAmount: Scalars['String']; - hash: Scalars['String']; - id?: Maybe; - metaDescription: Scalars['String']; - method: Scalars['String']; - motion?: Maybe; - preimageArguments?: Maybe; - preimageStatus?: Maybe; - referendum?: Maybe; - section: Scalars['String']; -}; - -export type PreimageCreateWithoutReferendumInput = { - author: Scalars['String']; - depositAmount: Scalars['String']; - hash: Scalars['String']; +export type PreimageArgumentWhereUniqueInput = { id?: Maybe; - metaDescription: Scalars['String']; - method: Scalars['String']; - motion?: Maybe; - preimageArguments?: Maybe; - preimageStatus?: Maybe; - proposal?: Maybe; - section: Scalars['String']; +}; + +/** A connection to a list of items. */ +export type PreimageConnection = { + __typename?: 'PreimageConnection'; + aggregate: AggregatePreimage; + /** A list of edges. */ + edges: Array>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; }; /** An edge in a connection. */ @@ -8499,24 +7210,6 @@ export type PreimageStatusConnection = { pageInfo: PageInfo; }; -export type PreimageStatusCreateInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - preimage: PreimageCreateOneWithoutPreimageStatusInput; - status: Scalars['String']; -}; - -export type PreimageStatusCreateManyWithoutPreimageInput = { - connect?: Maybe>; - create?: Maybe>; -}; - -export type PreimageStatusCreateWithoutPreimageInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - status: Scalars['String']; -}; - /** An edge in a connection. */ export type PreimageStatusEdge = { __typename?: 'PreimageStatusEdge'; @@ -8539,69 +7232,6 @@ export type PreimageStatusPreviousValues = { status: Scalars['String']; }; -export type PreimageStatusScalarWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - id?: Maybe; - /** All values containing the given string. */ - id_contains?: Maybe; - /** All values ending with the given string. */ - id_ends_with?: Maybe; - /** All values greater than the given value. */ - id_gt?: Maybe; - /** All values greater than or equal the given value. */ - id_gte?: Maybe; - /** All values that are contained in given list. */ - id_in?: Maybe>; - /** All values less than the given value. */ - id_lt?: Maybe; - /** All values less than or equal the given value. */ - id_lte?: Maybe; - /** All values that are not equal to given value. */ - id_not?: Maybe; - /** All values not containing the given string. */ - id_not_contains?: Maybe; - /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - id_not_in?: Maybe>; - /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; - /** All values starting with the given string. */ - id_starts_with?: Maybe; - status?: Maybe; - /** All values containing the given string. */ - status_contains?: Maybe; - /** All values ending with the given string. */ - status_ends_with?: Maybe; - /** All values greater than the given value. */ - status_gt?: Maybe; - /** All values greater than or equal the given value. */ - status_gte?: Maybe; - /** All values that are contained in given list. */ - status_in?: Maybe>; - /** All values less than the given value. */ - status_lt?: Maybe; - /** All values less than or equal the given value. */ - status_lte?: Maybe; - /** All values that are not equal to given value. */ - status_not?: Maybe; - /** All values not containing the given string. */ - status_not_contains?: Maybe; - /** All values not ending with the given string. */ - status_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - status_not_in?: Maybe>; - /** All values not starting with the given string. */ - status_not_starts_with?: Maybe; - /** All values starting with the given string. */ - status_starts_with?: Maybe; -}; - export type PreimageStatusSubscriptionPayload = { __typename?: 'PreimageStatusSubscriptionPayload'; mutation: MutationType; @@ -8628,53 +7258,6 @@ export type PreimageStatusSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type PreimageStatusUpdateInput = { - blockNumber?: Maybe; - preimage?: Maybe; - status?: Maybe; -}; - -export type PreimageStatusUpdateManyDataInput = { - status?: Maybe; -}; - -export type PreimageStatusUpdateManyMutationInput = { - status?: Maybe; -}; - -export type PreimageStatusUpdateManyWithoutPreimageInput = { - connect?: Maybe>; - create?: Maybe>; - delete?: Maybe>; - deleteMany?: Maybe>; - disconnect?: Maybe>; - set?: Maybe>; - update?: Maybe>; - updateMany?: Maybe>; - upsert?: Maybe>; -}; - -export type PreimageStatusUpdateManyWithWhereNestedInput = { - data: PreimageStatusUpdateManyDataInput; - where: PreimageStatusScalarWhereInput; -}; - -export type PreimageStatusUpdateWithoutPreimageDataInput = { - blockNumber?: Maybe; - status?: Maybe; -}; - -export type PreimageStatusUpdateWithWhereUniqueWithoutPreimageInput = { - data: PreimageStatusUpdateWithoutPreimageDataInput; - where: PreimageStatusWhereUniqueInput; -}; - -export type PreimageStatusUpsertWithWhereUniqueWithoutPreimageInput = { - create: PreimageStatusCreateWithoutPreimageInput; - update: PreimageStatusUpdateWithoutPreimageDataInput; - where: PreimageStatusWhereUniqueInput; -}; - export type PreimageStatusWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -8687,241 +7270,87 @@ export type PreimageStatusWhereInput = { /** All values containing the given string. */ id_contains?: Maybe; /** All values ending with the given string. */ - id_ends_with?: Maybe; - /** All values greater than the given value. */ - id_gt?: Maybe; - /** All values greater than or equal the given value. */ - id_gte?: Maybe; - /** All values that are contained in given list. */ - id_in?: Maybe>; - /** All values less than the given value. */ - id_lt?: Maybe; - /** All values less than or equal the given value. */ - id_lte?: Maybe; - /** All values that are not equal to given value. */ - id_not?: Maybe; - /** All values not containing the given string. */ - id_not_contains?: Maybe; - /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - id_not_in?: Maybe>; - /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; - /** All values starting with the given string. */ - id_starts_with?: Maybe; - preimage?: Maybe; - status?: Maybe; - /** All values containing the given string. */ - status_contains?: Maybe; - /** All values ending with the given string. */ - status_ends_with?: Maybe; - /** All values greater than the given value. */ - status_gt?: Maybe; - /** All values greater than or equal the given value. */ - status_gte?: Maybe; - /** All values that are contained in given list. */ - status_in?: Maybe>; - /** All values less than the given value. */ - status_lt?: Maybe; - /** All values less than or equal the given value. */ - status_lte?: Maybe; - /** All values that are not equal to given value. */ - status_not?: Maybe; - /** All values not containing the given string. */ - status_not_contains?: Maybe; - /** All values not ending with the given string. */ - status_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - status_not_in?: Maybe>; - /** All values not starting with the given string. */ - status_not_starts_with?: Maybe; - /** All values starting with the given string. */ - status_starts_with?: Maybe; -}; - -export type PreimageStatusWhereUniqueInput = { - id?: Maybe; -}; - -export type PreimageSubscriptionPayload = { - __typename?: 'PreimageSubscriptionPayload'; - mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; - updatedFields?: Maybe>; -}; - -export type PreimageSubscriptionWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - /** The subscription event gets dispatched when it's listed in mutation_in */ - mutation_in?: Maybe>; - node?: Maybe; - /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ - updatedFields_contains?: Maybe; - /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ - updatedFields_contains_every?: Maybe>; - /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ - updatedFields_contains_some?: Maybe>; -}; - -export type PreimageUpdateInput = { - author?: Maybe; - depositAmount?: Maybe; - hash?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - motion?: Maybe; - preimageArguments?: Maybe; - preimageStatus?: Maybe; - proposal?: Maybe; - referendum?: Maybe; - section?: Maybe; -}; - -export type PreimageUpdateManyMutationInput = { - author?: Maybe; - depositAmount?: Maybe; - hash?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - section?: Maybe; -}; - -export type PreimageUpdateOneRequiredWithoutPreimageArgumentsInput = { - connect?: Maybe; - create?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type PreimageUpdateOneRequiredWithoutPreimageStatusInput = { - connect?: Maybe; - create?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type PreimageUpdateOneWithoutMotionInput = { - connect?: Maybe; - create?: Maybe; - delete?: Maybe; - disconnect?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type PreimageUpdateOneWithoutProposalInput = { - connect?: Maybe; - create?: Maybe; - delete?: Maybe; - disconnect?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type PreimageUpdateOneWithoutReferendumInput = { - connect?: Maybe; - create?: Maybe; - delete?: Maybe; - disconnect?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type PreimageUpdateWithoutMotionDataInput = { - author?: Maybe; - depositAmount?: Maybe; - hash?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - preimageArguments?: Maybe; - preimageStatus?: Maybe; - proposal?: Maybe; - referendum?: Maybe; - section?: Maybe; -}; - -export type PreimageUpdateWithoutPreimageArgumentsDataInput = { - author?: Maybe; - depositAmount?: Maybe; - hash?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - motion?: Maybe; - preimageStatus?: Maybe; - proposal?: Maybe; - referendum?: Maybe; - section?: Maybe; -}; - -export type PreimageUpdateWithoutPreimageStatusDataInput = { - author?: Maybe; - depositAmount?: Maybe; - hash?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - motion?: Maybe; - preimageArguments?: Maybe; - proposal?: Maybe; - referendum?: Maybe; - section?: Maybe; -}; - -export type PreimageUpdateWithoutProposalDataInput = { - author?: Maybe; - depositAmount?: Maybe; - hash?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - motion?: Maybe; - preimageArguments?: Maybe; - preimageStatus?: Maybe; - referendum?: Maybe; - section?: Maybe; -}; - -export type PreimageUpdateWithoutReferendumDataInput = { - author?: Maybe; - depositAmount?: Maybe; - hash?: Maybe; - metaDescription?: Maybe; - method?: Maybe; - motion?: Maybe; - preimageArguments?: Maybe; - preimageStatus?: Maybe; - proposal?: Maybe; - section?: Maybe; -}; - -export type PreimageUpsertWithoutMotionInput = { - create: PreimageCreateWithoutMotionInput; - update: PreimageUpdateWithoutMotionDataInput; -}; - -export type PreimageUpsertWithoutPreimageArgumentsInput = { - create: PreimageCreateWithoutPreimageArgumentsInput; - update: PreimageUpdateWithoutPreimageArgumentsDataInput; + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + preimage?: Maybe; + status?: Maybe; + /** All values containing the given string. */ + status_contains?: Maybe; + /** All values ending with the given string. */ + status_ends_with?: Maybe; + /** All values greater than the given value. */ + status_gt?: Maybe; + /** All values greater than or equal the given value. */ + status_gte?: Maybe; + /** All values that are contained in given list. */ + status_in?: Maybe>; + /** All values less than the given value. */ + status_lt?: Maybe; + /** All values less than or equal the given value. */ + status_lte?: Maybe; + /** All values that are not equal to given value. */ + status_not?: Maybe; + /** All values not containing the given string. */ + status_not_contains?: Maybe; + /** All values not ending with the given string. */ + status_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + status_not_in?: Maybe>; + /** All values not starting with the given string. */ + status_not_starts_with?: Maybe; + /** All values starting with the given string. */ + status_starts_with?: Maybe; }; -export type PreimageUpsertWithoutPreimageStatusInput = { - create: PreimageCreateWithoutPreimageStatusInput; - update: PreimageUpdateWithoutPreimageStatusDataInput; +export type PreimageStatusWhereUniqueInput = { + id?: Maybe; }; -export type PreimageUpsertWithoutProposalInput = { - create: PreimageCreateWithoutProposalInput; - update: PreimageUpdateWithoutProposalDataInput; +export type PreimageSubscriptionPayload = { + __typename?: 'PreimageSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; }; -export type PreimageUpsertWithoutReferendumInput = { - create: PreimageCreateWithoutReferendumInput; - update: PreimageUpdateWithoutReferendumDataInput; +export type PreimageSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; }; export type PreimageWhereInput = { @@ -9135,10 +7564,6 @@ export type PreimageWhereUniqueInput = { id?: Maybe; }; -export enum PrismaDatabase { - Default = 'default' -} - export type Proposal = { __typename?: 'Proposal'; author: Scalars['String']; @@ -9171,41 +7596,6 @@ export type ProposalConnection = { pageInfo: PageInfo; }; -export type ProposalCreateInput = { - author: Scalars['String']; - depositAmount: Scalars['String']; - preimage?: Maybe; - preimageHash: Scalars['String']; - proposalId: Scalars['Int']; - proposalStatus?: Maybe; -}; - -export type ProposalCreateOneWithoutPreimageInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type ProposalCreateOneWithoutProposalStatusInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type ProposalCreateWithoutPreimageInput = { - author: Scalars['String']; - depositAmount: Scalars['String']; - preimageHash: Scalars['String']; - proposalId: Scalars['Int']; - proposalStatus?: Maybe; -}; - -export type ProposalCreateWithoutProposalStatusInput = { - author: Scalars['String']; - depositAmount: Scalars['String']; - preimage?: Maybe; - preimageHash: Scalars['String']; - proposalId: Scalars['Int']; -}; - /** An edge in a connection. */ export type ProposalEdge = { __typename?: 'ProposalEdge'; @@ -9256,26 +7646,6 @@ export type ProposalStatusConnection = { pageInfo: PageInfo; }; -export type ProposalStatusCreateInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - proposal: ProposalCreateOneWithoutProposalStatusInput; - status: Scalars['String']; - uniqueStatus: Scalars['String']; -}; - -export type ProposalStatusCreateManyWithoutProposalInput = { - connect?: Maybe>; - create?: Maybe>; -}; - -export type ProposalStatusCreateWithoutProposalInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - status: Scalars['String']; - uniqueStatus: Scalars['String']; -}; - /** An edge in a connection. */ export type ProposalStatusEdge = { __typename?: 'ProposalStatusEdge'; @@ -9301,96 +7671,6 @@ export type ProposalStatusPreviousValues = { uniqueStatus: Scalars['String']; }; -export type ProposalStatusScalarWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - id?: Maybe; - /** All values containing the given string. */ - id_contains?: Maybe; - /** All values ending with the given string. */ - id_ends_with?: Maybe; - /** All values greater than the given value. */ - id_gt?: Maybe; - /** All values greater than or equal the given value. */ - id_gte?: Maybe; - /** All values that are contained in given list. */ - id_in?: Maybe>; - /** All values less than the given value. */ - id_lt?: Maybe; - /** All values less than or equal the given value. */ - id_lte?: Maybe; - /** All values that are not equal to given value. */ - id_not?: Maybe; - /** All values not containing the given string. */ - id_not_contains?: Maybe; - /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - id_not_in?: Maybe>; - /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; - /** All values starting with the given string. */ - id_starts_with?: Maybe; - status?: Maybe; - /** All values containing the given string. */ - status_contains?: Maybe; - /** All values ending with the given string. */ - status_ends_with?: Maybe; - /** All values greater than the given value. */ - status_gt?: Maybe; - /** All values greater than or equal the given value. */ - status_gte?: Maybe; - /** All values that are contained in given list. */ - status_in?: Maybe>; - /** All values less than the given value. */ - status_lt?: Maybe; - /** All values less than or equal the given value. */ - status_lte?: Maybe; - /** All values that are not equal to given value. */ - status_not?: Maybe; - /** All values not containing the given string. */ - status_not_contains?: Maybe; - /** All values not ending with the given string. */ - status_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - status_not_in?: Maybe>; - /** All values not starting with the given string. */ - status_not_starts_with?: Maybe; - /** All values starting with the given string. */ - status_starts_with?: Maybe; - uniqueStatus?: Maybe; - /** All values containing the given string. */ - uniqueStatus_contains?: Maybe; - /** All values ending with the given string. */ - uniqueStatus_ends_with?: Maybe; - /** All values greater than the given value. */ - uniqueStatus_gt?: Maybe; - /** All values greater than or equal the given value. */ - uniqueStatus_gte?: Maybe; - /** All values that are contained in given list. */ - uniqueStatus_in?: Maybe>; - /** All values less than the given value. */ - uniqueStatus_lt?: Maybe; - /** All values less than or equal the given value. */ - uniqueStatus_lte?: Maybe; - /** All values that are not equal to given value. */ - uniqueStatus_not?: Maybe; - /** All values not containing the given string. */ - uniqueStatus_not_contains?: Maybe; - /** All values not ending with the given string. */ - uniqueStatus_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - uniqueStatus_not_in?: Maybe>; - /** All values not starting with the given string. */ - uniqueStatus_not_starts_with?: Maybe; - /** All values starting with the given string. */ - uniqueStatus_starts_with?: Maybe; -}; - export type ProposalStatusSubscriptionPayload = { __typename?: 'ProposalStatusSubscriptionPayload'; mutation: MutationType; @@ -9417,57 +7697,6 @@ export type ProposalStatusSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type ProposalStatusUpdateInput = { - blockNumber?: Maybe; - proposal?: Maybe; - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type ProposalStatusUpdateManyDataInput = { - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type ProposalStatusUpdateManyMutationInput = { - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type ProposalStatusUpdateManyWithoutProposalInput = { - connect?: Maybe>; - create?: Maybe>; - delete?: Maybe>; - deleteMany?: Maybe>; - disconnect?: Maybe>; - set?: Maybe>; - update?: Maybe>; - updateMany?: Maybe>; - upsert?: Maybe>; -}; - -export type ProposalStatusUpdateManyWithWhereNestedInput = { - data: ProposalStatusUpdateManyDataInput; - where: ProposalStatusScalarWhereInput; -}; - -export type ProposalStatusUpdateWithoutProposalDataInput = { - blockNumber?: Maybe; - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type ProposalStatusUpdateWithWhereUniqueWithoutProposalInput = { - data: ProposalStatusUpdateWithoutProposalDataInput; - where: ProposalStatusWhereUniqueInput; -}; - -export type ProposalStatusUpsertWithWhereUniqueWithoutProposalInput = { - create: ProposalStatusCreateWithoutProposalInput; - update: ProposalStatusUpdateWithoutProposalDataInput; - where: ProposalStatusWhereUniqueInput; -}; - export type ProposalStatusWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -9591,64 +7820,6 @@ export type ProposalSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type ProposalUpdateInput = { - author?: Maybe; - depositAmount?: Maybe; - preimage?: Maybe; - preimageHash?: Maybe; - proposalId?: Maybe; - proposalStatus?: Maybe; -}; - -export type ProposalUpdateManyMutationInput = { - author?: Maybe; - depositAmount?: Maybe; - preimageHash?: Maybe; - proposalId?: Maybe; -}; - -export type ProposalUpdateOneRequiredWithoutProposalStatusInput = { - connect?: Maybe; - create?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type ProposalUpdateOneWithoutPreimageInput = { - connect?: Maybe; - create?: Maybe; - delete?: Maybe; - disconnect?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type ProposalUpdateWithoutPreimageDataInput = { - author?: Maybe; - depositAmount?: Maybe; - preimageHash?: Maybe; - proposalId?: Maybe; - proposalStatus?: Maybe; -}; - -export type ProposalUpdateWithoutProposalStatusDataInput = { - author?: Maybe; - depositAmount?: Maybe; - preimage?: Maybe; - preimageHash?: Maybe; - proposalId?: Maybe; -}; - -export type ProposalUpsertWithoutPreimageInput = { - create: ProposalCreateWithoutPreimageInput; - update: ProposalUpdateWithoutPreimageDataInput; -}; - -export type ProposalUpsertWithoutProposalStatusInput = { - create: ProposalCreateWithoutProposalStatusInput; - update: ProposalUpdateWithoutProposalStatusDataInput; -}; - export type ProposalWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -9904,13 +8075,11 @@ export type ProposalWhereUniqueInput = { export type PublicUser = { __typename?: 'PublicUser'; id?: Maybe; - name?: Maybe; username?: Maybe; }; export type Query = { __typename?: 'Query'; - notification?: Maybe; subscription?: Maybe; token?: Maybe; user?: Maybe; @@ -9968,12 +8137,10 @@ export type Query_Root = { motionStatusesConnection: MotionStatusConnection; motions: Array>; motionsConnection: MotionConnection; - /** Fetches an object given its ID */ node?: Maybe; nomination?: Maybe; nominations: Array>; nominationsConnection: NominationConnection; - notification?: Maybe; offlineValidator?: Maybe; offlineValidators: Array>; offlineValidatorsConnection: OfflineValidatorConnection; @@ -9983,6 +8150,22 @@ export type Query_Root = { onchain_links_aggregate: Onchain_Links_Aggregate; /** fetch data from the table: "onchain_links" using primary key columns */ onchain_links_by_pk?: Maybe; + /** fetch data from the table: "poll" */ + poll: Array; + /** fetch aggregated fields from the table: "poll" */ + poll_aggregate: Poll_Aggregate; + /** fetch data from the table: "poll" using primary key columns */ + poll_by_pk?: Maybe; + /** fetch data from the table: "poll_votes" */ + poll_votes: Array; + /** fetch aggregated fields from the table: "poll_votes" */ + poll_votes_aggregate: Poll_Votes_Aggregate; + /** fetch data from the table: "poll_votes" using primary key columns */ + poll_votes_by_pk?: Maybe; + /** fetch data from the table: "post_last_update" */ + post_last_update: Array; + /** fetch aggregated fields from the table: "post_last_update" */ + post_last_update_aggregate: Post_Last_Update_Aggregate; /** fetch data from the table: "post_reactions" */ post_reactions: Array; /** fetch aggregated fields from the table: "post_reactions" */ @@ -10041,6 +8224,12 @@ export type Query_Root = { stakes: Array>; stakesConnection: StakeConnection; subscription?: Maybe; + tip?: Maybe; + tipStatus?: Maybe; + tipStatuses: Array>; + tipStatusesConnection: TipStatusConnection; + tips: Array>; + tipsConnection: TipConnection; token?: Maybe; totalIssuance?: Maybe; totalIssuances: Array>; @@ -10472,6 +8661,78 @@ export type Query_RootOnchain_Links_By_PkArgs = { }; +/** query root */ +export type Query_RootPollArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** query root */ +export type Query_RootPoll_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** query root */ +export type Query_RootPoll_By_PkArgs = { + id: Scalars['Int']; +}; + + +/** query root */ +export type Query_RootPoll_VotesArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** query root */ +export type Query_RootPoll_Votes_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** query root */ +export type Query_RootPoll_Votes_By_PkArgs = { + id: Scalars['Int']; +}; + + +/** query root */ +export type Query_RootPost_Last_UpdateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** query root */ +export type Query_RootPost_Last_Update_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + /** query root */ export type Query_RootPost_ReactionsArgs = { distinct_on?: Maybe>; @@ -10912,6 +9173,66 @@ export type Query_RootSubscriptionArgs = { }; +/** query root */ +export type Query_RootTipArgs = { + where: TipWhereUniqueInput; +}; + + +/** query root */ +export type Query_RootTipStatusArgs = { + where: TipStatusWhereUniqueInput; +}; + + +/** query root */ +export type Query_RootTipStatusesArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; +}; + + +/** query root */ +export type Query_RootTipStatusesConnectionArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; +}; + + +/** query root */ +export type Query_RootTipsArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; +}; + + +/** query root */ +export type Query_RootTipsConnectionArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; +}; + + /** query root */ export type Query_RootTotalIssuanceArgs = { where: TotalIssuanceWhereUniqueInput; @@ -11070,44 +9391,6 @@ export type ReferendumConnection = { pageInfo: PageInfo; }; -export type ReferendumCreateInput = { - delay: Scalars['Int']; - end: Scalars['Int']; - preimage?: Maybe; - preimageHash: Scalars['String']; - referendumId: Scalars['Int']; - referendumStatus?: Maybe; - voteThreshold: Scalars['String']; -}; - -export type ReferendumCreateOneWithoutPreimageInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type ReferendumCreateOneWithoutReferendumStatusInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type ReferendumCreateWithoutPreimageInput = { - delay: Scalars['Int']; - end: Scalars['Int']; - preimageHash: Scalars['String']; - referendumId: Scalars['Int']; - referendumStatus?: Maybe; - voteThreshold: Scalars['String']; -}; - -export type ReferendumCreateWithoutReferendumStatusInput = { - delay: Scalars['Int']; - end: Scalars['Int']; - preimage?: Maybe; - preimageHash: Scalars['String']; - referendumId: Scalars['Int']; - voteThreshold: Scalars['String']; -}; - /** An edge in a connection. */ export type ReferendumEdge = { __typename?: 'ReferendumEdge'; @@ -11141,159 +9424,49 @@ export type ReferendumPreviousValues = { referendumId: Scalars['Int']; voteThreshold: Scalars['String']; }; - -export type ReferendumStatus = Node & { - __typename?: 'ReferendumStatus'; - blockNumber: BlockNumber; - id: Scalars['ID']; - referendum: Referendum; - status: Scalars['String']; - uniqueStatus: Scalars['String']; -}; - -/** A connection to a list of items. */ -export type ReferendumStatusConnection = { - __typename?: 'ReferendumStatusConnection'; - aggregate: AggregateReferendumStatus; - /** A list of edges. */ - edges: Array>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; -}; - -export type ReferendumStatusCreateInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - referendum: ReferendumCreateOneWithoutReferendumStatusInput; - status: Scalars['String']; - uniqueStatus: Scalars['String']; -}; - -export type ReferendumStatusCreateManyWithoutReferendumInput = { - connect?: Maybe>; - create?: Maybe>; -}; - -export type ReferendumStatusCreateWithoutReferendumInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - status: Scalars['String']; - uniqueStatus: Scalars['String']; -}; - -/** An edge in a connection. */ -export type ReferendumStatusEdge = { - __typename?: 'ReferendumStatusEdge'; - /** A cursor for use in pagination. */ - cursor: Scalars['String']; - /** The item at the end of the edge. */ - node: ReferendumStatus; -}; - -export enum ReferendumStatusOrderByInput { - IdAsc = 'id_ASC', - IdDesc = 'id_DESC', - StatusAsc = 'status_ASC', - StatusDesc = 'status_DESC', - UniqueStatusAsc = 'uniqueStatus_ASC', - UniqueStatusDesc = 'uniqueStatus_DESC' -} - -export type ReferendumStatusPreviousValues = { - __typename?: 'ReferendumStatusPreviousValues'; - id: Scalars['ID']; - status: Scalars['String']; - uniqueStatus: Scalars['String']; -}; - -export type ReferendumStatusScalarWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - id?: Maybe; - /** All values containing the given string. */ - id_contains?: Maybe; - /** All values ending with the given string. */ - id_ends_with?: Maybe; - /** All values greater than the given value. */ - id_gt?: Maybe; - /** All values greater than or equal the given value. */ - id_gte?: Maybe; - /** All values that are contained in given list. */ - id_in?: Maybe>; - /** All values less than the given value. */ - id_lt?: Maybe; - /** All values less than or equal the given value. */ - id_lte?: Maybe; - /** All values that are not equal to given value. */ - id_not?: Maybe; - /** All values not containing the given string. */ - id_not_contains?: Maybe; - /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - id_not_in?: Maybe>; - /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; - /** All values starting with the given string. */ - id_starts_with?: Maybe; - status?: Maybe; - /** All values containing the given string. */ - status_contains?: Maybe; - /** All values ending with the given string. */ - status_ends_with?: Maybe; - /** All values greater than the given value. */ - status_gt?: Maybe; - /** All values greater than or equal the given value. */ - status_gte?: Maybe; - /** All values that are contained in given list. */ - status_in?: Maybe>; - /** All values less than the given value. */ - status_lt?: Maybe; - /** All values less than or equal the given value. */ - status_lte?: Maybe; - /** All values that are not equal to given value. */ - status_not?: Maybe; - /** All values not containing the given string. */ - status_not_contains?: Maybe; - /** All values not ending with the given string. */ - status_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - status_not_in?: Maybe>; - /** All values not starting with the given string. */ - status_not_starts_with?: Maybe; - /** All values starting with the given string. */ - status_starts_with?: Maybe; - uniqueStatus?: Maybe; - /** All values containing the given string. */ - uniqueStatus_contains?: Maybe; - /** All values ending with the given string. */ - uniqueStatus_ends_with?: Maybe; - /** All values greater than the given value. */ - uniqueStatus_gt?: Maybe; - /** All values greater than or equal the given value. */ - uniqueStatus_gte?: Maybe; - /** All values that are contained in given list. */ - uniqueStatus_in?: Maybe>; - /** All values less than the given value. */ - uniqueStatus_lt?: Maybe; - /** All values less than or equal the given value. */ - uniqueStatus_lte?: Maybe; - /** All values that are not equal to given value. */ - uniqueStatus_not?: Maybe; - /** All values not containing the given string. */ - uniqueStatus_not_contains?: Maybe; - /** All values not ending with the given string. */ - uniqueStatus_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - uniqueStatus_not_in?: Maybe>; - /** All values not starting with the given string. */ - uniqueStatus_not_starts_with?: Maybe; - /** All values starting with the given string. */ - uniqueStatus_starts_with?: Maybe; + +export type ReferendumStatus = Node & { + __typename?: 'ReferendumStatus'; + blockNumber: BlockNumber; + id: Scalars['ID']; + referendum: Referendum; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + +/** A connection to a list of items. */ +export type ReferendumStatusConnection = { + __typename?: 'ReferendumStatusConnection'; + aggregate: AggregateReferendumStatus; + /** A list of edges. */ + edges: Array>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; +}; + +/** An edge in a connection. */ +export type ReferendumStatusEdge = { + __typename?: 'ReferendumStatusEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; + /** The item at the end of the edge. */ + node: ReferendumStatus; +}; + +export enum ReferendumStatusOrderByInput { + IdAsc = 'id_ASC', + IdDesc = 'id_DESC', + StatusAsc = 'status_ASC', + StatusDesc = 'status_DESC', + UniqueStatusAsc = 'uniqueStatus_ASC', + UniqueStatusDesc = 'uniqueStatus_DESC' +} + +export type ReferendumStatusPreviousValues = { + __typename?: 'ReferendumStatusPreviousValues'; + id: Scalars['ID']; + status: Scalars['String']; + uniqueStatus: Scalars['String']; }; export type ReferendumStatusSubscriptionPayload = { @@ -11322,57 +9495,6 @@ export type ReferendumStatusSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type ReferendumStatusUpdateInput = { - blockNumber?: Maybe; - referendum?: Maybe; - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type ReferendumStatusUpdateManyDataInput = { - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type ReferendumStatusUpdateManyMutationInput = { - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type ReferendumStatusUpdateManyWithoutReferendumInput = { - connect?: Maybe>; - create?: Maybe>; - delete?: Maybe>; - deleteMany?: Maybe>; - disconnect?: Maybe>; - set?: Maybe>; - update?: Maybe>; - updateMany?: Maybe>; - upsert?: Maybe>; -}; - -export type ReferendumStatusUpdateManyWithWhereNestedInput = { - data: ReferendumStatusUpdateManyDataInput; - where: ReferendumStatusScalarWhereInput; -}; - -export type ReferendumStatusUpdateWithoutReferendumDataInput = { - blockNumber?: Maybe; - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type ReferendumStatusUpdateWithWhereUniqueWithoutReferendumInput = { - data: ReferendumStatusUpdateWithoutReferendumDataInput; - where: ReferendumStatusWhereUniqueInput; -}; - -export type ReferendumStatusUpsertWithWhereUniqueWithoutReferendumInput = { - create: ReferendumStatusCreateWithoutReferendumInput; - update: ReferendumStatusUpdateWithoutReferendumDataInput; - where: ReferendumStatusWhereUniqueInput; -}; - export type ReferendumStatusWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -11496,68 +9618,6 @@ export type ReferendumSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type ReferendumUpdateInput = { - delay?: Maybe; - end?: Maybe; - preimage?: Maybe; - preimageHash?: Maybe; - referendumId?: Maybe; - referendumStatus?: Maybe; - voteThreshold?: Maybe; -}; - -export type ReferendumUpdateManyMutationInput = { - delay?: Maybe; - end?: Maybe; - preimageHash?: Maybe; - referendumId?: Maybe; - voteThreshold?: Maybe; -}; - -export type ReferendumUpdateOneRequiredWithoutReferendumStatusInput = { - connect?: Maybe; - create?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type ReferendumUpdateOneWithoutPreimageInput = { - connect?: Maybe; - create?: Maybe; - delete?: Maybe; - disconnect?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type ReferendumUpdateWithoutPreimageDataInput = { - delay?: Maybe; - end?: Maybe; - preimageHash?: Maybe; - referendumId?: Maybe; - referendumStatus?: Maybe; - voteThreshold?: Maybe; -}; - -export type ReferendumUpdateWithoutReferendumStatusDataInput = { - delay?: Maybe; - end?: Maybe; - preimage?: Maybe; - preimageHash?: Maybe; - referendumId?: Maybe; - voteThreshold?: Maybe; -}; - -export type ReferendumUpsertWithoutPreimageInput = { - create: ReferendumCreateWithoutPreimageInput; - update: ReferendumUpdateWithoutPreimageDataInput; -}; - -export type ReferendumUpsertWithoutReferendumStatusInput = { - create: ReferendumCreateWithoutReferendumStatusInput; - update: ReferendumUpdateWithoutReferendumStatusDataInput; -}; - export type ReferendumWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -11835,14 +9895,6 @@ export type RewardConnection = { pageInfo: PageInfo; }; -export type RewardCreateInput = { - authoredBlock: BlockNumberCreateOneInput; - id?: Maybe; - sessionIndex: SessionCreateOneInput; - treasuryReward: Scalars['String']; - validatorReward: Scalars['String']; -}; - /** An edge in a connection. */ export type RewardEdge = { __typename?: 'RewardEdge'; @@ -11894,18 +9946,6 @@ export type RewardSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type RewardUpdateInput = { - authoredBlock?: Maybe; - sessionIndex?: Maybe; - treasuryReward?: Maybe; - validatorReward?: Maybe; -}; - -export type RewardUpdateManyMutationInput = { - treasuryReward?: Maybe; - validatorReward?: Maybe; -}; - export type RewardWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -12019,17 +10059,6 @@ export type SessionConnection = { pageInfo: PageInfo; }; -export type SessionCreateInput = { - id?: Maybe; - index: Scalars['Int']; - start: BlockNumberCreateOneInput; -}; - -export type SessionCreateOneInput = { - connect?: Maybe; - create?: Maybe; -}; - /** An edge in a connection. */ export type SessionEdge = { __typename?: 'SessionEdge'; @@ -12078,32 +10107,6 @@ export type SessionSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type SessionUpdateDataInput = { - index?: Maybe; - start?: Maybe; -}; - -export type SessionUpdateInput = { - index?: Maybe; - start?: Maybe; -}; - -export type SessionUpdateManyMutationInput = { - index?: Maybe; -}; - -export type SessionUpdateOneRequiredInput = { - connect?: Maybe; - create?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type SessionUpsertNestedInput = { - create: SessionCreateInput; - update: SessionUpdateDataInput; -}; - export type SessionWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -12179,13 +10182,6 @@ export type SlashingConnection = { pageInfo: PageInfo; }; -export type SlashingCreateInput = { - amount: Scalars['String']; - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - who: Scalars['String']; -}; - /** An edge in a connection. */ export type SlashingEdge = { __typename?: 'SlashingEdge'; @@ -12237,17 +10233,6 @@ export type SlashingSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type SlashingUpdateInput = { - amount?: Maybe; - blockNumber?: Maybe; - who?: Maybe; -}; - -export type SlashingUpdateManyMutationInput = { - amount?: Maybe; - who?: Maybe; -}; - export type SlashingWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -12361,12 +10346,6 @@ export type StakeConnection = { pageInfo: PageInfo; }; -export type StakeCreateInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - totalStake: Scalars['String']; -}; - /** An edge in a connection. */ export type StakeEdge = { __typename?: 'StakeEdge'; @@ -12415,15 +10394,6 @@ export type StakeSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type StakeUpdateInput = { - blockNumber?: Maybe; - totalStake?: Maybe; -}; - -export type StakeUpdateManyMutationInput = { - totalStake?: Maybe; -}; - export type StakeWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -12519,6 +10489,8 @@ export type Subscription = { /** subscription root */ export type Subscription_Root = { __typename?: 'subscription_root'; + blockIndex?: Maybe; + blockNumber?: Maybe; /** fetch data from the table: "comment_reactions" */ comment_reactions: Array; /** fetch aggregated fields from the table: "comment_reactions" */ @@ -12531,12 +10503,37 @@ export type Subscription_Root = { comments_aggregate: Comments_Aggregate; /** fetch data from the table: "comments" using primary key columns */ comments_by_pk?: Maybe; + council?: Maybe; + councilMember?: Maybe; + era?: Maybe; + heartBeat?: Maybe; + motion?: Maybe; + motionProposalArgument?: Maybe; + motionStatus?: Maybe; + nomination?: Maybe; + offlineValidator?: Maybe; /** fetch data from the table: "onchain_links" */ onchain_links: Array; /** fetch aggregated fields from the table: "onchain_links" */ onchain_links_aggregate: Onchain_Links_Aggregate; /** fetch data from the table: "onchain_links" using primary key columns */ onchain_links_by_pk?: Maybe; + /** fetch data from the table: "poll" */ + poll: Array; + /** fetch aggregated fields from the table: "poll" */ + poll_aggregate: Poll_Aggregate; + /** fetch data from the table: "poll" using primary key columns */ + poll_by_pk?: Maybe; + /** fetch data from the table: "poll_votes" */ + poll_votes: Array; + /** fetch aggregated fields from the table: "poll_votes" */ + poll_votes_aggregate: Poll_Votes_Aggregate; + /** fetch data from the table: "poll_votes" using primary key columns */ + poll_votes_by_pk?: Maybe; + /** fetch data from the table: "post_last_update" */ + post_last_update: Array; + /** fetch aggregated fields from the table: "post_last_update" */ + post_last_update_aggregate: Post_Last_Update_Aggregate; /** fetch data from the table: "post_reactions" */ post_reactions: Array; /** fetch aggregated fields from the table: "post_reactions" */ @@ -12561,87 +10558,243 @@ export type Subscription_Root = { posts_aggregate: Posts_Aggregate; /** fetch data from the table: "posts" using primary key columns */ posts_by_pk?: Maybe; + preimage?: Maybe; + preimageArgument?: Maybe; + preimageStatus?: Maybe; + proposal?: Maybe; + proposalStatus?: Maybe; + referendum?: Maybe; + referendumStatus?: Maybe; + reward?: Maybe; + session?: Maybe; + slashing?: Maybe; + stake?: Maybe; + subscribed?: Maybe; + tip?: Maybe; + tipStatus?: Maybe; + totalIssuance?: Maybe; + treasurySpendProposal?: Maybe; + treasuryStatus?: Maybe; + validator?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootBlockIndexArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootBlockNumberArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootComment_ReactionsArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootComment_Reactions_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootComment_Reactions_By_PkArgs = { + id: Scalars['Int']; +}; + + +/** subscription root */ +export type Subscription_RootCommentsArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootComments_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootComments_By_PkArgs = { + id: Scalars['uuid']; +}; + + +/** subscription root */ +export type Subscription_RootCouncilArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootCouncilMemberArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootEraArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootHeartBeatArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootMotionArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootMotionProposalArgumentArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootMotionStatusArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootNominationArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootOfflineValidatorArgs = { + where?: Maybe; }; /** subscription root */ -export type Subscription_RootComment_ReactionsArgs = { - distinct_on?: Maybe>; +export type Subscription_RootOnchain_LinksArgs = { + distinct_on?: Maybe>; limit?: Maybe; offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; + order_by?: Maybe>; + where?: Maybe; }; /** subscription root */ -export type Subscription_RootComment_Reactions_AggregateArgs = { - distinct_on?: Maybe>; +export type Subscription_RootOnchain_Links_AggregateArgs = { + distinct_on?: Maybe>; limit?: Maybe; offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; + order_by?: Maybe>; + where?: Maybe; }; /** subscription root */ -export type Subscription_RootComment_Reactions_By_PkArgs = { +export type Subscription_RootOnchain_Links_By_PkArgs = { id: Scalars['Int']; }; /** subscription root */ -export type Subscription_RootCommentsArgs = { - distinct_on?: Maybe>; +export type Subscription_RootPollArgs = { + distinct_on?: Maybe>; limit?: Maybe; offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; + order_by?: Maybe>; + where?: Maybe; }; /** subscription root */ -export type Subscription_RootComments_AggregateArgs = { - distinct_on?: Maybe>; +export type Subscription_RootPoll_AggregateArgs = { + distinct_on?: Maybe>; limit?: Maybe; offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; + order_by?: Maybe>; + where?: Maybe; }; /** subscription root */ -export type Subscription_RootComments_By_PkArgs = { - id: Scalars['uuid']; +export type Subscription_RootPoll_By_PkArgs = { + id: Scalars['Int']; }; /** subscription root */ -export type Subscription_RootOnchain_LinksArgs = { - distinct_on?: Maybe>; +export type Subscription_RootPoll_VotesArgs = { + distinct_on?: Maybe>; limit?: Maybe; offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; + order_by?: Maybe>; + where?: Maybe; }; /** subscription root */ -export type Subscription_RootOnchain_Links_AggregateArgs = { - distinct_on?: Maybe>; +export type Subscription_RootPoll_Votes_AggregateArgs = { + distinct_on?: Maybe>; limit?: Maybe; offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; + order_by?: Maybe>; + where?: Maybe; }; /** subscription root */ -export type Subscription_RootOnchain_Links_By_PkArgs = { +export type Subscription_RootPoll_Votes_By_PkArgs = { id: Scalars['Int']; }; +/** subscription root */ +export type Subscription_RootPost_Last_UpdateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootPost_Last_Update_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + /** subscription root */ export type Subscription_RootPost_ReactionsArgs = { distinct_on?: Maybe>; @@ -12662,115 +10815,837 @@ export type Subscription_RootPost_Reactions_AggregateArgs = { }; -/** subscription root */ -export type Subscription_RootPost_Reactions_By_PkArgs = { +/** subscription root */ +export type Subscription_RootPost_Reactions_By_PkArgs = { + id: Scalars['Int']; +}; + + +/** subscription root */ +export type Subscription_RootPost_TopicsArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootPost_Topics_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootPost_Topics_By_PkArgs = { + id: Scalars['Int']; +}; + + +/** subscription root */ +export type Subscription_RootPost_TypesArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootPost_Types_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootPost_Types_By_PkArgs = { + id: Scalars['Int']; +}; + + +/** subscription root */ +export type Subscription_RootPostsArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootPosts_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootPosts_By_PkArgs = { + id: Scalars['Int']; +}; + + +/** subscription root */ +export type Subscription_RootPreimageArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootPreimageArgumentArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootPreimageStatusArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootProposalArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootProposalStatusArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootReferendumArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootReferendumStatusArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootRewardArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootSessionArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootSlashingArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootStakeArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootTipArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootTipStatusArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootTotalIssuanceArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootTreasurySpendProposalArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootTreasuryStatusArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootValidatorArgs = { + where?: Maybe; +}; + + +/** expression to compare columns of type timestamp. All fields are combined with logical 'AND'. */ +export type Timestamp_Comparison_Exp = { + _eq?: Maybe; + _gt?: Maybe; + _gte?: Maybe; + _in?: Maybe>; + _is_null?: Maybe; + _lt?: Maybe; + _lte?: Maybe; + _neq?: Maybe; + _nin?: Maybe>; +}; + + +/** expression to compare columns of type timestamptz. All fields are combined with logical 'AND'. */ +export type Timestamptz_Comparison_Exp = { + _eq?: Maybe; + _gt?: Maybe; + _gte?: Maybe; + _in?: Maybe>; + _is_null?: Maybe; + _lt?: Maybe; + _lte?: Maybe; + _neq?: Maybe; + _nin?: Maybe>; +}; + +export type Tip = { + __typename?: 'Tip'; + closes?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + hash: Scalars['String']; + id: Scalars['Int']; + reason: Scalars['String']; + tipStatus?: Maybe>; + who: Scalars['String']; +}; + + +export type TipTipStatusArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; +}; + +/** A connection to a list of items. */ +export type TipConnection = { + __typename?: 'TipConnection'; + aggregate: AggregateTip; + /** A list of edges. */ + edges: Array>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; +}; + +/** An edge in a connection. */ +export type TipEdge = { + __typename?: 'TipEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; + /** The item at the end of the edge. */ + node: Tip; +}; + +export enum TipOrderByInput { + ClosesAsc = 'closes_ASC', + ClosesDesc = 'closes_DESC', + FinderFeeAsc = 'finderFee_ASC', + FinderFeeDesc = 'finderFee_DESC', + FinderAsc = 'finder_ASC', + FinderDesc = 'finder_DESC', + HashAsc = 'hash_ASC', + HashDesc = 'hash_DESC', + IdAsc = 'id_ASC', + IdDesc = 'id_DESC', + ReasonAsc = 'reason_ASC', + ReasonDesc = 'reason_DESC', + WhoAsc = 'who_ASC', + WhoDesc = 'who_DESC' +} + +export type TipPreviousValues = { + __typename?: 'TipPreviousValues'; + closes?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + hash: Scalars['String']; id: Scalars['Int']; + reason: Scalars['String']; + who: Scalars['String']; }; - -/** subscription root */ -export type Subscription_RootPost_TopicsArgs = { - distinct_on?: Maybe>; - limit?: Maybe; - offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; +export type TipStatus = Node & { + __typename?: 'TipStatus'; + blockNumber: BlockNumber; + id: Scalars['ID']; + status: Scalars['String']; + tip: Tip; + uniqueStatus: Scalars['String']; }; - -/** subscription root */ -export type Subscription_RootPost_Topics_AggregateArgs = { - distinct_on?: Maybe>; - limit?: Maybe; - offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; +/** A connection to a list of items. */ +export type TipStatusConnection = { + __typename?: 'TipStatusConnection'; + aggregate: AggregateTipStatus; + /** A list of edges. */ + edges: Array>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; }; - -/** subscription root */ -export type Subscription_RootPost_Topics_By_PkArgs = { - id: Scalars['Int']; +/** An edge in a connection. */ +export type TipStatusEdge = { + __typename?: 'TipStatusEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; + /** The item at the end of the edge. */ + node: TipStatus; }; +export enum TipStatusOrderByInput { + IdAsc = 'id_ASC', + IdDesc = 'id_DESC', + StatusAsc = 'status_ASC', + StatusDesc = 'status_DESC', + UniqueStatusAsc = 'uniqueStatus_ASC', + UniqueStatusDesc = 'uniqueStatus_DESC' +} -/** subscription root */ -export type Subscription_RootPost_TypesArgs = { - distinct_on?: Maybe>; - limit?: Maybe; - offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; +export type TipStatusPreviousValues = { + __typename?: 'TipStatusPreviousValues'; + id: Scalars['ID']; + status: Scalars['String']; + uniqueStatus: Scalars['String']; }; - -/** subscription root */ -export type Subscription_RootPost_Types_AggregateArgs = { - distinct_on?: Maybe>; - limit?: Maybe; - offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; +export type TipStatusSubscriptionPayload = { + __typename?: 'TipStatusSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; }; - -/** subscription root */ -export type Subscription_RootPost_Types_By_PkArgs = { - id: Scalars['Int']; +export type TipStatusSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; }; - -/** subscription root */ -export type Subscription_RootPostsArgs = { - distinct_on?: Maybe>; - limit?: Maybe; - offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; +export type TipStatusWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + blockNumber?: Maybe; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + status?: Maybe; + /** All values containing the given string. */ + status_contains?: Maybe; + /** All values ending with the given string. */ + status_ends_with?: Maybe; + /** All values greater than the given value. */ + status_gt?: Maybe; + /** All values greater than or equal the given value. */ + status_gte?: Maybe; + /** All values that are contained in given list. */ + status_in?: Maybe>; + /** All values less than the given value. */ + status_lt?: Maybe; + /** All values less than or equal the given value. */ + status_lte?: Maybe; + /** All values that are not equal to given value. */ + status_not?: Maybe; + /** All values not containing the given string. */ + status_not_contains?: Maybe; + /** All values not ending with the given string. */ + status_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + status_not_in?: Maybe>; + /** All values not starting with the given string. */ + status_not_starts_with?: Maybe; + /** All values starting with the given string. */ + status_starts_with?: Maybe; + tip?: Maybe; + uniqueStatus?: Maybe; + /** All values containing the given string. */ + uniqueStatus_contains?: Maybe; + /** All values ending with the given string. */ + uniqueStatus_ends_with?: Maybe; + /** All values greater than the given value. */ + uniqueStatus_gt?: Maybe; + /** All values greater than or equal the given value. */ + uniqueStatus_gte?: Maybe; + /** All values that are contained in given list. */ + uniqueStatus_in?: Maybe>; + /** All values less than the given value. */ + uniqueStatus_lt?: Maybe; + /** All values less than or equal the given value. */ + uniqueStatus_lte?: Maybe; + /** All values that are not equal to given value. */ + uniqueStatus_not?: Maybe; + /** All values not containing the given string. */ + uniqueStatus_not_contains?: Maybe; + /** All values not ending with the given string. */ + uniqueStatus_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + uniqueStatus_not_in?: Maybe>; + /** All values not starting with the given string. */ + uniqueStatus_not_starts_with?: Maybe; + /** All values starting with the given string. */ + uniqueStatus_starts_with?: Maybe; }; +export type TipStatusWhereUniqueInput = { + id?: Maybe; + uniqueStatus?: Maybe; +}; -/** subscription root */ -export type Subscription_RootPosts_AggregateArgs = { - distinct_on?: Maybe>; - limit?: Maybe; - offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; +export type TipSubscriptionPayload = { + __typename?: 'TipSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; }; +export type TipSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; +}; -/** subscription root */ -export type Subscription_RootPosts_By_PkArgs = { - id: Scalars['Int']; +export type TipWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + closes?: Maybe; + /** All values greater than the given value. */ + closes_gt?: Maybe; + /** All values greater than or equal the given value. */ + closes_gte?: Maybe; + /** All values that are contained in given list. */ + closes_in?: Maybe>; + /** All values less than the given value. */ + closes_lt?: Maybe; + /** All values less than or equal the given value. */ + closes_lte?: Maybe; + /** All values that are not equal to given value. */ + closes_not?: Maybe; + /** All values that are not contained in given list. */ + closes_not_in?: Maybe>; + finder?: Maybe; + finderFee?: Maybe; + /** All values containing the given string. */ + finderFee_contains?: Maybe; + /** All values ending with the given string. */ + finderFee_ends_with?: Maybe; + /** All values greater than the given value. */ + finderFee_gt?: Maybe; + /** All values greater than or equal the given value. */ + finderFee_gte?: Maybe; + /** All values that are contained in given list. */ + finderFee_in?: Maybe>; + /** All values less than the given value. */ + finderFee_lt?: Maybe; + /** All values less than or equal the given value. */ + finderFee_lte?: Maybe; + /** All values that are not equal to given value. */ + finderFee_not?: Maybe; + /** All values not containing the given string. */ + finderFee_not_contains?: Maybe; + /** All values not ending with the given string. */ + finderFee_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + finderFee_not_in?: Maybe>; + /** All values not starting with the given string. */ + finderFee_not_starts_with?: Maybe; + /** All values starting with the given string. */ + finderFee_starts_with?: Maybe; + /** All values containing the given string. */ + finder_contains?: Maybe; + /** All values ending with the given string. */ + finder_ends_with?: Maybe; + /** All values greater than the given value. */ + finder_gt?: Maybe; + /** All values greater than or equal the given value. */ + finder_gte?: Maybe; + /** All values that are contained in given list. */ + finder_in?: Maybe>; + /** All values less than the given value. */ + finder_lt?: Maybe; + /** All values less than or equal the given value. */ + finder_lte?: Maybe; + /** All values that are not equal to given value. */ + finder_not?: Maybe; + /** All values not containing the given string. */ + finder_not_contains?: Maybe; + /** All values not ending with the given string. */ + finder_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + finder_not_in?: Maybe>; + /** All values not starting with the given string. */ + finder_not_starts_with?: Maybe; + /** All values starting with the given string. */ + finder_starts_with?: Maybe; + hash?: Maybe; + /** All values containing the given string. */ + hash_contains?: Maybe; + /** All values ending with the given string. */ + hash_ends_with?: Maybe; + /** All values greater than the given value. */ + hash_gt?: Maybe; + /** All values greater than or equal the given value. */ + hash_gte?: Maybe; + /** All values that are contained in given list. */ + hash_in?: Maybe>; + /** All values less than the given value. */ + hash_lt?: Maybe; + /** All values less than or equal the given value. */ + hash_lte?: Maybe; + /** All values that are not equal to given value. */ + hash_not?: Maybe; + /** All values not containing the given string. */ + hash_not_contains?: Maybe; + /** All values not ending with the given string. */ + hash_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + hash_not_in?: Maybe>; + /** All values not starting with the given string. */ + hash_not_starts_with?: Maybe; + /** All values starting with the given string. */ + hash_starts_with?: Maybe; + id?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + reason?: Maybe; + /** All values containing the given string. */ + reason_contains?: Maybe; + /** All values ending with the given string. */ + reason_ends_with?: Maybe; + /** All values greater than the given value. */ + reason_gt?: Maybe; + /** All values greater than or equal the given value. */ + reason_gte?: Maybe; + /** All values that are contained in given list. */ + reason_in?: Maybe>; + /** All values less than the given value. */ + reason_lt?: Maybe; + /** All values less than or equal the given value. */ + reason_lte?: Maybe; + /** All values that are not equal to given value. */ + reason_not?: Maybe; + /** All values not containing the given string. */ + reason_not_contains?: Maybe; + /** All values not ending with the given string. */ + reason_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + reason_not_in?: Maybe>; + /** All values not starting with the given string. */ + reason_not_starts_with?: Maybe; + /** All values starting with the given string. */ + reason_starts_with?: Maybe; + tipStatus_every?: Maybe; + tipStatus_none?: Maybe; + tipStatus_some?: Maybe; + who?: Maybe; + /** All values containing the given string. */ + who_contains?: Maybe; + /** All values ending with the given string. */ + who_ends_with?: Maybe; + /** All values greater than the given value. */ + who_gt?: Maybe; + /** All values greater than or equal the given value. */ + who_gte?: Maybe; + /** All values that are contained in given list. */ + who_in?: Maybe>; + /** All values less than the given value. */ + who_lt?: Maybe; + /** All values less than or equal the given value. */ + who_lte?: Maybe; + /** All values that are not equal to given value. */ + who_not?: Maybe; + /** All values not containing the given string. */ + who_not_contains?: Maybe; + /** All values not ending with the given string. */ + who_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + who_not_in?: Maybe>; + /** All values not starting with the given string. */ + who_not_starts_with?: Maybe; + /** All values starting with the given string. */ + who_starts_with?: Maybe; }; - -/** expression to compare columns of type timestamp. All fields are combined with logical 'AND'. */ -export type Timestamp_Comparison_Exp = { - _eq?: Maybe; - _gt?: Maybe; - _gte?: Maybe; - _in?: Maybe>; - _is_null?: Maybe; - _lt?: Maybe; - _lte?: Maybe; - _neq?: Maybe; - _nin?: Maybe>; +export type TipWhereInput_Remote_Rel_Public_Onchain_Linksonchain_Tip = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + closes?: Maybe; + /** All values greater than the given value. */ + closes_gt?: Maybe; + /** All values greater than or equal the given value. */ + closes_gte?: Maybe; + /** All values that are contained in given list. */ + closes_in?: Maybe>; + /** All values less than the given value. */ + closes_lt?: Maybe; + /** All values less than or equal the given value. */ + closes_lte?: Maybe; + /** All values that are not equal to given value. */ + closes_not?: Maybe; + /** All values that are not contained in given list. */ + closes_not_in?: Maybe>; + finder?: Maybe; + finderFee?: Maybe; + /** All values containing the given string. */ + finderFee_contains?: Maybe; + /** All values ending with the given string. */ + finderFee_ends_with?: Maybe; + /** All values greater than the given value. */ + finderFee_gt?: Maybe; + /** All values greater than or equal the given value. */ + finderFee_gte?: Maybe; + /** All values that are contained in given list. */ + finderFee_in?: Maybe>; + /** All values less than the given value. */ + finderFee_lt?: Maybe; + /** All values less than or equal the given value. */ + finderFee_lte?: Maybe; + /** All values that are not equal to given value. */ + finderFee_not?: Maybe; + /** All values not containing the given string. */ + finderFee_not_contains?: Maybe; + /** All values not ending with the given string. */ + finderFee_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + finderFee_not_in?: Maybe>; + /** All values not starting with the given string. */ + finderFee_not_starts_with?: Maybe; + /** All values starting with the given string. */ + finderFee_starts_with?: Maybe; + /** All values containing the given string. */ + finder_contains?: Maybe; + /** All values ending with the given string. */ + finder_ends_with?: Maybe; + /** All values greater than the given value. */ + finder_gt?: Maybe; + /** All values greater than or equal the given value. */ + finder_gte?: Maybe; + /** All values that are contained in given list. */ + finder_in?: Maybe>; + /** All values less than the given value. */ + finder_lt?: Maybe; + /** All values less than or equal the given value. */ + finder_lte?: Maybe; + /** All values that are not equal to given value. */ + finder_not?: Maybe; + /** All values not containing the given string. */ + finder_not_contains?: Maybe; + /** All values not ending with the given string. */ + finder_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + finder_not_in?: Maybe>; + /** All values not starting with the given string. */ + finder_not_starts_with?: Maybe; + /** All values starting with the given string. */ + finder_starts_with?: Maybe; + hash?: Maybe; + /** All values containing the given string. */ + hash_contains?: Maybe; + /** All values ending with the given string. */ + hash_ends_with?: Maybe; + /** All values greater than the given value. */ + hash_gt?: Maybe; + /** All values greater than or equal the given value. */ + hash_gte?: Maybe; + /** All values that are contained in given list. */ + hash_in?: Maybe>; + /** All values less than the given value. */ + hash_lt?: Maybe; + /** All values less than or equal the given value. */ + hash_lte?: Maybe; + /** All values that are not equal to given value. */ + hash_not?: Maybe; + /** All values not containing the given string. */ + hash_not_contains?: Maybe; + /** All values not ending with the given string. */ + hash_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + hash_not_in?: Maybe>; + /** All values not starting with the given string. */ + hash_not_starts_with?: Maybe; + /** All values starting with the given string. */ + hash_starts_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + reason?: Maybe; + /** All values containing the given string. */ + reason_contains?: Maybe; + /** All values ending with the given string. */ + reason_ends_with?: Maybe; + /** All values greater than the given value. */ + reason_gt?: Maybe; + /** All values greater than or equal the given value. */ + reason_gte?: Maybe; + /** All values that are contained in given list. */ + reason_in?: Maybe>; + /** All values less than the given value. */ + reason_lt?: Maybe; + /** All values less than or equal the given value. */ + reason_lte?: Maybe; + /** All values that are not equal to given value. */ + reason_not?: Maybe; + /** All values not containing the given string. */ + reason_not_contains?: Maybe; + /** All values not ending with the given string. */ + reason_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + reason_not_in?: Maybe>; + /** All values not starting with the given string. */ + reason_not_starts_with?: Maybe; + /** All values starting with the given string. */ + reason_starts_with?: Maybe; + tipStatus_every?: Maybe; + tipStatus_none?: Maybe; + tipStatus_some?: Maybe; + who?: Maybe; + /** All values containing the given string. */ + who_contains?: Maybe; + /** All values ending with the given string. */ + who_ends_with?: Maybe; + /** All values greater than the given value. */ + who_gt?: Maybe; + /** All values greater than or equal the given value. */ + who_gte?: Maybe; + /** All values that are contained in given list. */ + who_in?: Maybe>; + /** All values less than the given value. */ + who_lt?: Maybe; + /** All values less than or equal the given value. */ + who_lte?: Maybe; + /** All values that are not equal to given value. */ + who_not?: Maybe; + /** All values not containing the given string. */ + who_not_contains?: Maybe; + /** All values not ending with the given string. */ + who_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + who_not_in?: Maybe>; + /** All values not starting with the given string. */ + who_not_starts_with?: Maybe; + /** All values starting with the given string. */ + who_starts_with?: Maybe; }; - -/** expression to compare columns of type timestamptz. All fields are combined with logical 'AND'. */ -export type Timestamptz_Comparison_Exp = { - _eq?: Maybe; - _gt?: Maybe; - _gte?: Maybe; - _in?: Maybe>; - _is_null?: Maybe; - _lt?: Maybe; - _lte?: Maybe; - _neq?: Maybe; - _nin?: Maybe>; +export type TipWhereUniqueInput = { + id?: Maybe; }; export type Token = { @@ -12795,12 +11670,6 @@ export type TotalIssuanceConnection = { pageInfo: PageInfo; }; -export type TotalIssuanceCreateInput = { - amount: Scalars['String']; - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; -}; - /** An edge in a connection. */ export type TotalIssuanceEdge = { __typename?: 'TotalIssuanceEdge'; @@ -12849,15 +11718,6 @@ export type TotalIssuanceSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type TotalIssuanceUpdateInput = { - amount?: Maybe; - blockNumber?: Maybe; -}; - -export type TotalIssuanceUpdateManyMutationInput = { - amount?: Maybe; -}; - export type TotalIssuanceWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -12940,61 +11800,23 @@ export type TreasurySpendProposal = { export type TreasurySpendProposalTreasuryStatusArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; - orderBy?: Maybe; - skip?: Maybe; - where?: Maybe; -}; - -/** A connection to a list of items. */ -export type TreasurySpendProposalConnection = { - __typename?: 'TreasurySpendProposalConnection'; - aggregate: AggregateTreasurySpendProposal; - /** A list of edges. */ - edges: Array>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; -}; - -export type TreasurySpendProposalCreateInput = { - beneficiary: Scalars['String']; - bond: Scalars['String']; - motion?: Maybe; - proposer: Scalars['String']; - treasuryProposalId: Scalars['Int']; - treasuryStatus?: Maybe; - value: Scalars['String']; -}; - -export type TreasurySpendProposalCreateOneWithoutMotionInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type TreasurySpendProposalCreateOneWithoutTreasuryStatusInput = { - connect?: Maybe; - create?: Maybe; -}; - -export type TreasurySpendProposalCreateWithoutMotionInput = { - beneficiary: Scalars['String']; - bond: Scalars['String']; - proposer: Scalars['String']; - treasuryProposalId: Scalars['Int']; - treasuryStatus?: Maybe; - value: Scalars['String']; + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; }; -export type TreasurySpendProposalCreateWithoutTreasuryStatusInput = { - beneficiary: Scalars['String']; - bond: Scalars['String']; - motion?: Maybe; - proposer: Scalars['String']; - treasuryProposalId: Scalars['Int']; - value: Scalars['String']; +/** A connection to a list of items. */ +export type TreasurySpendProposalConnection = { + __typename?: 'TreasurySpendProposalConnection'; + aggregate: AggregateTreasurySpendProposal; + /** A list of edges. */ + edges: Array>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; }; /** An edge in a connection. */ @@ -13057,68 +11879,6 @@ export type TreasurySpendProposalSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type TreasurySpendProposalUpdateInput = { - beneficiary?: Maybe; - bond?: Maybe; - motion?: Maybe; - proposer?: Maybe; - treasuryProposalId?: Maybe; - treasuryStatus?: Maybe; - value?: Maybe; -}; - -export type TreasurySpendProposalUpdateManyMutationInput = { - beneficiary?: Maybe; - bond?: Maybe; - proposer?: Maybe; - treasuryProposalId?: Maybe; - value?: Maybe; -}; - -export type TreasurySpendProposalUpdateOneRequiredWithoutTreasuryStatusInput = { - connect?: Maybe; - create?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type TreasurySpendProposalUpdateOneWithoutMotionInput = { - connect?: Maybe; - create?: Maybe; - delete?: Maybe; - disconnect?: Maybe; - update?: Maybe; - upsert?: Maybe; -}; - -export type TreasurySpendProposalUpdateWithoutMotionDataInput = { - beneficiary?: Maybe; - bond?: Maybe; - proposer?: Maybe; - treasuryProposalId?: Maybe; - treasuryStatus?: Maybe; - value?: Maybe; -}; - -export type TreasurySpendProposalUpdateWithoutTreasuryStatusDataInput = { - beneficiary?: Maybe; - bond?: Maybe; - motion?: Maybe; - proposer?: Maybe; - treasuryProposalId?: Maybe; - value?: Maybe; -}; - -export type TreasurySpendProposalUpsertWithoutMotionInput = { - create: TreasurySpendProposalCreateWithoutMotionInput; - update: TreasurySpendProposalUpdateWithoutMotionDataInput; -}; - -export type TreasurySpendProposalUpsertWithoutTreasuryStatusInput = { - create: TreasurySpendProposalCreateWithoutTreasuryStatusInput; - update: TreasurySpendProposalUpdateWithoutTreasuryStatusDataInput; -}; - export type TreasurySpendProposalWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -13444,26 +12204,6 @@ export type TreasuryStatusConnection = { pageInfo: PageInfo; }; -export type TreasuryStatusCreateInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - status: Scalars['String']; - treasurySpendProposal: TreasurySpendProposalCreateOneWithoutTreasuryStatusInput; - uniqueStatus: Scalars['String']; -}; - -export type TreasuryStatusCreateManyWithoutTreasurySpendProposalInput = { - connect?: Maybe>; - create?: Maybe>; -}; - -export type TreasuryStatusCreateWithoutTreasurySpendProposalInput = { - blockNumber: BlockNumberCreateOneInput; - id?: Maybe; - status: Scalars['String']; - uniqueStatus: Scalars['String']; -}; - /** An edge in a connection. */ export type TreasuryStatusEdge = { __typename?: 'TreasuryStatusEdge'; @@ -13489,96 +12229,6 @@ export type TreasuryStatusPreviousValues = { uniqueStatus: Scalars['String']; }; -export type TreasuryStatusScalarWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - id?: Maybe; - /** All values containing the given string. */ - id_contains?: Maybe; - /** All values ending with the given string. */ - id_ends_with?: Maybe; - /** All values greater than the given value. */ - id_gt?: Maybe; - /** All values greater than or equal the given value. */ - id_gte?: Maybe; - /** All values that are contained in given list. */ - id_in?: Maybe>; - /** All values less than the given value. */ - id_lt?: Maybe; - /** All values less than or equal the given value. */ - id_lte?: Maybe; - /** All values that are not equal to given value. */ - id_not?: Maybe; - /** All values not containing the given string. */ - id_not_contains?: Maybe; - /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - id_not_in?: Maybe>; - /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; - /** All values starting with the given string. */ - id_starts_with?: Maybe; - status?: Maybe; - /** All values containing the given string. */ - status_contains?: Maybe; - /** All values ending with the given string. */ - status_ends_with?: Maybe; - /** All values greater than the given value. */ - status_gt?: Maybe; - /** All values greater than or equal the given value. */ - status_gte?: Maybe; - /** All values that are contained in given list. */ - status_in?: Maybe>; - /** All values less than the given value. */ - status_lt?: Maybe; - /** All values less than or equal the given value. */ - status_lte?: Maybe; - /** All values that are not equal to given value. */ - status_not?: Maybe; - /** All values not containing the given string. */ - status_not_contains?: Maybe; - /** All values not ending with the given string. */ - status_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - status_not_in?: Maybe>; - /** All values not starting with the given string. */ - status_not_starts_with?: Maybe; - /** All values starting with the given string. */ - status_starts_with?: Maybe; - uniqueStatus?: Maybe; - /** All values containing the given string. */ - uniqueStatus_contains?: Maybe; - /** All values ending with the given string. */ - uniqueStatus_ends_with?: Maybe; - /** All values greater than the given value. */ - uniqueStatus_gt?: Maybe; - /** All values greater than or equal the given value. */ - uniqueStatus_gte?: Maybe; - /** All values that are contained in given list. */ - uniqueStatus_in?: Maybe>; - /** All values less than the given value. */ - uniqueStatus_lt?: Maybe; - /** All values less than or equal the given value. */ - uniqueStatus_lte?: Maybe; - /** All values that are not equal to given value. */ - uniqueStatus_not?: Maybe; - /** All values not containing the given string. */ - uniqueStatus_not_contains?: Maybe; - /** All values not ending with the given string. */ - uniqueStatus_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - uniqueStatus_not_in?: Maybe>; - /** All values not starting with the given string. */ - uniqueStatus_not_starts_with?: Maybe; - /** All values starting with the given string. */ - uniqueStatus_starts_with?: Maybe; -}; - export type TreasuryStatusSubscriptionPayload = { __typename?: 'TreasuryStatusSubscriptionPayload'; mutation: MutationType; @@ -13605,57 +12255,6 @@ export type TreasuryStatusSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type TreasuryStatusUpdateInput = { - blockNumber?: Maybe; - status?: Maybe; - treasurySpendProposal?: Maybe; - uniqueStatus?: Maybe; -}; - -export type TreasuryStatusUpdateManyDataInput = { - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type TreasuryStatusUpdateManyMutationInput = { - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type TreasuryStatusUpdateManyWithoutTreasurySpendProposalInput = { - connect?: Maybe>; - create?: Maybe>; - delete?: Maybe>; - deleteMany?: Maybe>; - disconnect?: Maybe>; - set?: Maybe>; - update?: Maybe>; - updateMany?: Maybe>; - upsert?: Maybe>; -}; - -export type TreasuryStatusUpdateManyWithWhereNestedInput = { - data: TreasuryStatusUpdateManyDataInput; - where: TreasuryStatusScalarWhereInput; -}; - -export type TreasuryStatusUpdateWithoutTreasurySpendProposalDataInput = { - blockNumber?: Maybe; - status?: Maybe; - uniqueStatus?: Maybe; -}; - -export type TreasuryStatusUpdateWithWhereUniqueWithoutTreasurySpendProposalInput = { - data: TreasuryStatusUpdateWithoutTreasurySpendProposalDataInput; - where: TreasuryStatusWhereUniqueInput; -}; - -export type TreasuryStatusUpsertWithWhereUniqueWithoutTreasurySpendProposalInput = { - create: TreasuryStatusCreateWithoutTreasurySpendProposalInput; - update: TreasuryStatusUpdateWithoutTreasurySpendProposalDataInput; - where: TreasuryStatusWhereUniqueInput; -}; - export type TreasuryStatusWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -13767,7 +12366,6 @@ export type User = { email_verified?: Maybe; id?: Maybe; kusama_default_address?: Maybe; - name?: Maybe; polkadot_default_address?: Maybe; username?: Maybe; web3signup?: Maybe; @@ -13806,14 +12404,6 @@ export type ValidatorConnection = { pageInfo: PageInfo; }; -export type ValidatorCreateInput = { - controller: Scalars['String']; - id?: Maybe; - preferences: Scalars['String']; - session: SessionCreateOneInput; - stash: Scalars['String']; -}; - /** An edge in a connection. */ export type ValidatorEdge = { __typename?: 'ValidatorEdge'; @@ -13868,19 +12458,6 @@ export type ValidatorSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type ValidatorUpdateInput = { - controller?: Maybe; - preferences?: Maybe; - session?: Maybe; - stash?: Maybe; -}; - -export type ValidatorUpdateManyMutationInput = { - controller?: Maybe; - preferences?: Maybe; - stash?: Maybe; -}; - export type ValidatorWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -14045,6 +12622,27 @@ export type AddPostAndTreasurySpendProposalMutationMutation = ( )> } ); +export type AddPostAndTipMutationMutationVariables = { + onchainTipId: Scalars['Int']; + authorId: Scalars['Int']; + proposerAddress: Scalars['String']; + content: Scalars['String']; + topicId: Scalars['Int']; + typeId: Scalars['Int']; +}; + + +export type AddPostAndTipMutationMutation = ( + { __typename: 'mutation_root' } + & { insert_onchain_links?: Maybe<( + { __typename?: 'onchain_links_mutation_response' } + & { returning: Array<( + { __typename?: 'onchain_links' } + & Pick + )> } + )> } +); + export type AddPostAndMotionMutationMutationVariables = { onchainMotionProposalId: Scalars['Int']; authorId: Scalars['Int']; @@ -14187,6 +12785,19 @@ export type GetDiscussionTreasurySpendProposalByIdQuery = ( )> } ); +export type GetDiscussionTipByIdQueryVariables = { + onchainTipId: Scalars['Int']; +}; + + +export type GetDiscussionTipByIdQuery = ( + { __typename?: 'query_root' } + & { onchain_links: Array<( + { __typename?: 'onchain_links' } + & Pick + )> } +); + export type GetDiscussionMotionsQueryVariables = {}; @@ -14251,6 +12862,22 @@ export type DiscussionTreasuryProposalFragment = ( & Pick ); +export type GetDiscussionTipsQueryVariables = {}; + + +export type GetDiscussionTipsQuery = ( + { __typename?: 'query_root' } + & { onchain_links: Array<( + { __typename?: 'onchain_links' } + & DiscussionTipFragment + )> } +); + +export type DiscussionTipFragment = ( + { __typename?: 'onchain_links' } + & Pick +); + export const DiscussionMotionFragmentDoc = gql` fragment discussionMotion on onchain_links { id @@ -14278,6 +12905,13 @@ export const DiscussionTreasuryProposalFragmentDoc = gql` proposer_address } `; +export const DiscussionTipFragmentDoc = gql` + fragment discussionTip on onchain_links { + id + onchain_tip_id + proposer_address +} + `; export const AddPostAndProposalMutationDocument = gql` mutation addPostAndProposalMutation($onchainProposalId: Int!, $authorId: Int!, $proposerAddress: String!, $content: String!, $topicId: Int!, $typeId: Int!) { __typename @@ -14298,6 +12932,16 @@ export const AddPostAndTreasurySpendProposalMutationDocument = gql` } } `; +export const AddPostAndTipMutationDocument = gql` + mutation addPostAndTipMutation($onchainTipId: Int!, $authorId: Int!, $proposerAddress: String!, $content: String!, $topicId: Int!, $typeId: Int!) { + __typename + insert_onchain_links(objects: {onchain_tip_id: $onchainTipId, proposer_address: $proposerAddress, post: {data: {author_id: $authorId, content: $content, topic_id: $topicId, type_id: $typeId}}}) { + returning { + id + } + } +} + `; export const AddPostAndMotionMutationDocument = gql` mutation addPostAndMotionMutation($onchainMotionProposalId: Int!, $authorId: Int!, $proposerAddress: String!, $content: String!, $topicId: Int!, $typeId: Int!) { __typename @@ -14371,6 +13015,13 @@ export const GetDiscussionTreasurySpendProposalByIdDocument = gql` } } `; +export const GetDiscussionTipByIdDocument = gql` + query getDiscussionTipById($onchainTipId: Int!) { + onchain_links(where: {onchain_tip_id: {_eq: $onchainTipId}}) { + id + } +} + `; export const GetDiscussionMotionsDocument = gql` query getDiscussionMotions { onchain_links(where: {onchain_motion_id: {_is_null: false}}) { @@ -14399,6 +13050,13 @@ export const GetDiscussionTreasuryProposalsDocument = gql` } } ${DiscussionTreasuryProposalFragmentDoc}`; +export const GetDiscussionTipsDocument = gql` + query getDiscussionTips { + onchain_links(where: {onchain_tip_id: {_is_null: false}}) { + ...discussionTip + } +} + ${DiscussionTipFragmentDoc}`; export type SdkFunctionWrapper = (action: () => Promise) => Promise; @@ -14412,6 +13070,9 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = addPostAndTreasurySpendProposalMutation(variables: AddPostAndTreasurySpendProposalMutationMutationVariables): Promise { return withWrapper(() => client.request(print(AddPostAndTreasurySpendProposalMutationDocument), variables)); }, + addPostAndTipMutation(variables: AddPostAndTipMutationMutationVariables): Promise { + return withWrapper(() => client.request(print(AddPostAndTipMutationDocument), variables)); + }, addPostAndMotionMutation(variables: AddPostAndMotionMutationMutationVariables): Promise { return withWrapper(() => client.request(print(AddPostAndMotionMutationDocument), variables)); }, @@ -14442,6 +13103,9 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = getDiscussionTreasurySpendProposalById(variables: GetDiscussionTreasurySpendProposalByIdQueryVariables): Promise { return withWrapper(() => client.request(print(GetDiscussionTreasurySpendProposalByIdDocument), variables)); }, + getDiscussionTipById(variables: GetDiscussionTipByIdQueryVariables): Promise { + return withWrapper(() => client.request(print(GetDiscussionTipByIdDocument), variables)); + }, getDiscussionMotions(variables?: GetDiscussionMotionsQueryVariables): Promise { return withWrapper(() => client.request(print(GetDiscussionMotionsDocument), variables)); }, @@ -14453,6 +13117,9 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = }, getDiscussionTreasuryProposals(variables?: GetDiscussionTreasuryProposalsQueryVariables): Promise { return withWrapper(() => client.request(print(GetDiscussionTreasuryProposalsDocument), variables)); + }, + getDiscussionTips(variables?: GetDiscussionTipsQueryVariables): Promise { + return withWrapper(() => client.request(print(GetDiscussionTipsDocument), variables)); } }; } diff --git a/chain-db-watcher/src/graphql_helpers.ts b/chain-db-watcher/src/graphql_helpers.ts index 7ed157748..c82f8c8b3 100644 --- a/chain-db-watcher/src/graphql_helpers.ts +++ b/chain-db-watcher/src/graphql_helpers.ts @@ -133,6 +133,39 @@ export const treasuryProposalDiscussionExists = async ( } }; +/** + * Tells if there is already a tip in the discussion DB matching the + * onchain tip id passed as argument + * + * @param onchainTipId the prisma db id of tip + */ +export const tipDiscussionExists = async ( + onchainTipId: number +): Promise => { + if (!discussionGraphqlUrl) { + throw new Error( + 'Environment variable for the REACT_APP_HASURA_GRAPHQL_URL not set' + ); + } + + try { + const client = new GraphQLClient(discussionGraphqlUrl, { + headers: {} + }); + + const discussionSdk = getDiscussionSdk(client); + const data = await discussionSdk.getDiscussionTipById({ onchainTipId }); + + return !!data.onchain_links?.length; + } catch (err) { + console.error(chalk.red(`tipDiscussionExists execution error with id: ${onchainTipId}`), err); + err.response?.errors && + console.error(chalk.red('GraphQL response errors\n'), err.response.errors); + err.response?.data && + console.error(chalk.red('Response data if available\n'), err.response.data); + } +}; + /** * Tells if there is already a motion in the discussion DB matching the * onchain motion proposal id passed as argument @@ -374,6 +407,81 @@ export const addDiscussionPostAndTreasuryProposal = async ({ } }; +/** + * Creates a generic post and the linked tip in hasura discussion DB + * + * @param proposer address of the proposer of the tip + * @param onchainTreasuryProposalId the tip id that is the Prisma db id + */ + +export const addDiscussionPostAndTip = async ({ + proposer, + onchainTipId +}: { + proposer: string; + onchainTipId: number; +}): Promise => { + if (!treasuryTopicId) { + throw new Error( + 'Please specify an environment variable for the TREASURY_TOPIC_ID.' + ); + } + if (!proposalPostTypeId) { + throw new Error( + 'Please specify an environment variable for the HASURA_PROPOSAL_POST_TYPE_ID.' + ); + } + if (!proposalBotUserId) { + throw new Error( + 'Please specify an environment variable for the PROPOSAL_BOT_USER_ID.' + ); + } + + const tipAndPostVariables = { + authorId: Number(proposalBotUserId), + content: getDescription('tip', proposer), + onchainTipId, + proposerAddress: proposer, + topicId: Number(treasuryTopicId), + typeId: Number(proposalPostTypeId) + }; + + try { + const token = await getToken(); + + if (!token) { + throw new Error( + 'No authorization token found for the chain-db-watcher.' + ); + } + if (!discussionGraphqlUrl) { + throw new Error( + 'Please specify an environment variable for the REACT_APP_SERVER_URL.' + ); + } + + const client = new GraphQLClient(discussionGraphqlUrl, { + headers: { + Authorization: `Bearer ${token}` + } + }); + + const discussionSdk = getDiscussionSdk(client); + const data = await discussionSdk.addPostAndTipMutation(tipAndPostVariables); + const addedId = data?.insert_onchain_links?.returning[0]?.id; + + if (addedId || addedId === 0) { + console.log(`${chalk.green('✔︎')} Tip ${onchainTipId} added to the database.`); + } + } catch (err) { + console.error(chalk.red(`addPostAndTipMutation execution error, tip id ${onchainTipId}\n`), err); + err.response?.errors && + console.error(chalk.red('GraphQL response errors\n'), err.response.errors); + err.response?.data && + console.error(chalk.red('Response data if available\n'), err.response.data); + } +}; + interface TreasuryProposalUpdate { onchainMotionProposalId: number; onchainTreasuryProposalId: number; diff --git a/chain-db-watcher/src/index.ts b/chain-db-watcher/src/index.ts index c1ec19d12..3ac01bc91 100644 --- a/chain-db-watcher/src/index.ts +++ b/chain-db-watcher/src/index.ts @@ -13,14 +13,16 @@ import ws from 'ws'; import { addDiscussionPostAndMotion, addDiscussionPostAndProposal, + addDiscussionPostAndTip, addDiscussionPostAndTreasuryProposal, addDiscussionReferendum, motionDiscussionExists, proposalDiscussionExists, + tipDiscussionExists, treasuryProposalDiscussionExists, updateTreasuryProposalWithMotion } from './graphql_helpers'; -import { motionSubscription, proposalSubscription, referendumSubscription, treasurySpendProposalSubscription } from './queries'; +import { motionSubscription, proposalSubscription, referendumSubscription, tipSubscription, treasurySpendProposalSubscription } from './queries'; import { syncDBs } from './sync'; import { getMotionTreasuryProposalId } from './sync/utils'; @@ -75,6 +77,31 @@ async function main (): Promise { console.log(`🚀 Chain-db watcher listening to ${graphQLEndpoint} from block ${startBlock}`); + execute(link, { + query: tipSubscription, + variables: { startBlock } + }).subscribe({ + next: ({ data }): void => { + console.log('Tip data received', JSON.stringify(data, null, 2)); + + if (data?.tip.mutation === subscriptionMutation.Created) { + const { id, finder } = data.tip.node; + tipDiscussionExists(id).then(alreadyExist => { + if (!alreadyExist) { + addDiscussionPostAndTip({ onchainTipId: Number(id), proposer: finder }); + } else { + console.error(chalk.red(`✖︎ Tip id ${id.toString()} already exists in the discsussion db. Not inserted.`)); + } + }).catch(error => console.error(chalk.red(error))); + } + }, + error: error => { throw new Error(`Subscription (tip) error: ${error}`); }, + complete: () => { + console.log('Subscription (tip) completed'); + process.exit(1); + } + }); + execute(link, { query: treasurySpendProposalSubscription, variables: { startBlock } diff --git a/chain-db-watcher/src/queries.ts b/chain-db-watcher/src/queries.ts index 84174c037..29839fec6 100644 --- a/chain-db-watcher/src/queries.ts +++ b/chain-db-watcher/src/queries.ts @@ -125,3 +125,37 @@ export const treasurySpendProposalSubscription = gql` } } `; + +export const tipSubscription = gql` + subscription tipSubscription($startBlock: Int!) { + tip ( + where: { + node: { + tipStatus_some: { + AND: [ + { status: "TipOpened" }, + { blockNumber: { number_gte: $startBlock } } + ] + } + } + } + ){ + mutation + node { + id + hash + reason + who + finder + finderFee + closes + tipStatus(orderBy: id_DESC) { + blockNumber { + number + } + status + } + } + } + } +`; diff --git a/chain-db-watcher/src/queries/discussions-db.queries.ts b/chain-db-watcher/src/queries/discussions-db.queries.ts index eb3e7fd23..877518105 100644 --- a/chain-db-watcher/src/queries/discussions-db.queries.ts +++ b/chain-db-watcher/src/queries/discussions-db.queries.ts @@ -58,6 +58,33 @@ export const addPostAndTreasurySpendProposalMutation = gql` } `; +export const addPostAndTipMutation = gql` + mutation addPostAndTipMutation ( + $onchainTipId:Int!, + $authorId: Int!, + $proposerAddress: String!, + $content: String!, + $topicId: Int!, + $typeId: Int! + ){ + __typename + insert_onchain_links(objects: { + onchain_tip_id: $onchainTipId, + proposer_address: $proposerAddress, + post: {data: { + author_id: $authorId, + content: $content, + topic_id: $topicId, + type_id: $typeId + } + }}) { + returning { + id + } + } + } +`; + export const addPostAndMotionMutation = gql` mutation addPostAndMotionMutation ( $onchainMotionProposalId:Int!, @@ -184,3 +211,11 @@ export const getDiscussionTreasurySpendProposalById = gql` } `; +export const getDiscussionTipById = gql` + query getDiscussionTipById($onchainTipId: Int!) { + onchain_links(where: {onchain_tip_id: {_eq: $onchainTipId}}) { + id + } + } +`; + diff --git a/chain-db-watcher/src/sync/getter.ts b/chain-db-watcher/src/sync/getter.ts index 550a54e07..87e7faf16 100644 --- a/chain-db-watcher/src/sync/getter.ts +++ b/chain-db-watcher/src/sync/getter.ts @@ -12,12 +12,14 @@ import { OnchainMotionFragment, OnchainProposalFragment, OnchainReferendumFragment, + OnchainTipFragment, OnchainTreasuryProposalFragment } from '../generated/chain-db-graphql'; import { DiscussionMotionFragment, DiscussionProposalFragment, DiscussionReferendumFragment, + DiscussionTipFragment, DiscussionTreasuryProposalFragment, getSdk as getDiscussionSdk } from '../generated/discussion-db-graphql'; @@ -120,6 +122,29 @@ export const getDiscussionTreasuryProposals = async (): Promise | null | undefined> => { + if (!discussionGraphqlUrl) { + throw new Error( + 'Environment variable for the REACT_APP_HASURA_GRAPHQL_URL not set' + ); + } + + try { + const client = new GraphQLClient(discussionGraphqlUrl, { headers: {} }); + + const discussionSdk = getDiscussionSdk(client); + const data = await discussionSdk.getDiscussionTips(); + + return data?.onchain_links; + } catch (err) { + console.error(chalk.red('getDiscussionTips execution'), err); + err.response?.errors && + console.error(chalk.red('GraphQL response errors', err.response.errors)); + err.response?.data && + console.error(chalk.red('Response data if available', err.response.data)); + } +}; + export const getOnChainMotions = async (): Promise | undefined> => { if (!onchainGraphqlServerUrl) { throw new Error( @@ -211,3 +236,26 @@ export const getOnChainTreasuryProposals = async (): Promise | undefined> => { + if (!onchainGraphqlServerUrl) { + throw new Error( + 'Environment variable for the CHAIN_DB_GRAPHQL_URL not set' + ); + } + + try { + const client = new GraphQLClient(onchainGraphqlServerUrl, { headers: {} }); + + const onchainSdk = getOnchainSdk(client); + const data = await onchainSdk.getOnchainTips({ startBlock }); + + return data?.tips; + } catch (err) { + console.error(chalk.red('getOnchainTips execution'), err); + err.response?.errors && + console.error(chalk.red('GraphQL response errors', err.response.errors)); + err.response?.data && + console.error(chalk.red('Response data if available', err.response.data)); + } +}; diff --git a/chain-db-watcher/src/sync/index.ts b/chain-db-watcher/src/sync/index.ts index e38950f96..f3b3ff955 100644 --- a/chain-db-watcher/src/sync/index.ts +++ b/chain-db-watcher/src/sync/index.ts @@ -7,6 +7,7 @@ import chalk from 'chalk'; import { addDiscussionPostAndMotion, addDiscussionPostAndProposal, + addDiscussionPostAndTip, addDiscussionPostAndTreasuryProposal, addDiscussionReferendum, updateTreasuryProposalWithMotion @@ -16,10 +17,12 @@ import { getDiscussionMotions, getDiscussionProposals, getDiscussionReferenda, + getDiscussionTips, getDiscussionTreasuryProposals, getOnChainMotions, getOnChainProposals, getOnchainReferenda, + getOnChainTips, getOnChainTreasuryProposals } from './getter'; import { getMaps } from './utils'; @@ -30,23 +33,27 @@ const getSyncData = async (): Promise => { const discussionProposals = await getDiscussionProposals(); const discussionReferenda = await getDiscussionReferenda(); const discussionTreasuryProposals = await getDiscussionTreasuryProposals(); + const discussionTips = await getDiscussionTips(); const onChainMotions = await getOnChainMotions(); const onChainProposals = await getOnChainProposals(); const onchainReferenda = await getOnchainReferenda(); const onChainTreasuryProposals = await getOnChainTreasuryProposals(); + const onChainTips = await getOnChainTips(); return { discussion: { motions: discussionMotions, proposals: discussionProposals, referenda: discussionReferenda, + tips: discussionTips, treasuryProposals: discussionTreasuryProposals }, onchain: { motions: onChainMotions, proposals: onChainProposals, referenda: onchainReferenda, + tips: onChainTips, treasuryProposals: onChainTreasuryProposals } }; @@ -55,6 +62,15 @@ const getSyncData = async (): Promise => { } }; +const syncTips = async (onChainTips: ObjectMap, discussionTips: ObjectMap): Promise => { + return Promise.all(Object.entries(onChainTips).map(async ([key, author]) => { + // if this tip doesn't exist in the discussion DB + if (!discussionTips[key]) { + await addDiscussionPostAndTip({ onchainTipId: Number(key), proposer: author }); + } + })); +}; + const syncTreasuryProposals = async (onchainTreasuryProposals: ObjectMap, discussionTreasuryProposals: ObjectMap): Promise => { return Promise.all(Object.entries(onchainTreasuryProposals).map(async ([key, author]) => { // if this treasuryproposal doesn't exist in the discussion DB @@ -152,6 +168,10 @@ export const syncDBs = async (): Promise => { syncMaps?.discussion?.treasuryProposals && await syncTreasuryProposals(syncMaps.onchain.treasuryProposals, syncMaps.discussion.treasuryProposals); + syncMaps?.onchain?.tips && + syncMaps?.discussion?.tips && + await syncTips(syncMaps.onchain.tips, syncMaps.discussion.tips); + if (syncMaps?.onchain?.motions && syncMaps?.discussion?.motions) { const treasuryDeduplicatedMotionsMap = getTreasuryDeduplicatedMotionsMap(syncMaps.onchain.motions); await syncMotions(syncMaps.onchain.motions, syncMaps.discussion.motions, treasuryDeduplicatedMotionsMap); diff --git a/chain-db-watcher/src/sync/queries/chain-db.queries.ts b/chain-db-watcher/src/sync/queries/chain-db.queries.ts index 129db9710..7f5f8e8ac 100644 --- a/chain-db-watcher/src/sync/queries/chain-db.queries.ts +++ b/chain-db-watcher/src/sync/queries/chain-db.queries.ts @@ -107,3 +107,25 @@ export const getOnchainTreasuryProposals = gql` treasuryProposalId } `; + +export const getOnchainTips = gql` + query getOnchainTips($startBlock: Int!) { + tips ( + where: { + tipStatus_some: { + AND: [ + { status: "TipOpened" } + { blockNumber: { number_gte: $startBlock } } + ] + } + } + ){ + ...onchainTip + } + } + fragment onchainTip on Tip { + finder + id + hash + } +`; diff --git a/chain-db-watcher/src/sync/queries/discussions-db.queries.ts b/chain-db-watcher/src/sync/queries/discussions-db.queries.ts index 6dbeadd3b..4ceedba14 100644 --- a/chain-db-watcher/src/sync/queries/discussions-db.queries.ts +++ b/chain-db-watcher/src/sync/queries/discussions-db.queries.ts @@ -55,3 +55,16 @@ export const getDiscussionTreasuryProposals = gql` } `; +export const getDiscussionTips = gql` + query getDiscussionTips { + onchain_links(where: {onchain_tip_id: {_is_null: false}}){ + ...discussionTip + } + } + fragment discussionTip on onchain_links { + id + onchain_tip_id + proposer_address + } +`; + diff --git a/chain-db-watcher/src/sync/utils.ts b/chain-db-watcher/src/sync/utils.ts index 9011bcbd6..69152ece6 100644 --- a/chain-db-watcher/src/sync/utils.ts +++ b/chain-db-watcher/src/sync/utils.ts @@ -129,17 +129,44 @@ export const getMaps = (syncData: SyncData): SyncMap => { } }, {}); + const discussionTipMap = syncData?.discussion.tips?.reduce( + (prev, curr) => { + // edgecase those id can be 0 + if ((curr?.onchain_tip_id || curr?.onchain_tip_id === 0) && (curr?.id || curr?.id === 0)) { + return { + ...prev, + [curr.onchain_tip_id]: curr.proposer_address + }; + } else { + return prev || {}; + } + }, {}); + + const onchainTipMap = syncData?.onchain.tips?.reduce( + (prev, curr) => { + if ((curr?.id || curr?.id === 0)) { + return { + ...prev, + [curr.id]: curr.finder + }; + } else { + return prev || {}; + } + }, {}); + return { discussion: { motions: discussionMotionMap, proposals: discussionProposalMap, referenda: discussionReferendaMap, + tips: discussionTipMap, treasuryProposals: discussionTreasuryProposalMap }, onchain: { motions: onchainMotionMap, proposals: onchainProposalMap, referenda: onchainReferendaMap, + tips: onchainTipMap, treasuryProposals: onchainTreasuryProposalMap } }; diff --git a/chain-db-watcher/src/types.ts b/chain-db-watcher/src/types.ts index 3fbd7a8ab..7f925667a 100644 --- a/chain-db-watcher/src/types.ts +++ b/chain-db-watcher/src/types.ts @@ -2,13 +2,14 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { OnchainMotionFragment, OnchainProposalFragment, OnchainReferendumFragment, OnchainTreasuryProposalFragment } from './generated/chain-db-graphql'; -import { DiscussionMotionFragment, DiscussionProposalFragment, DiscussionReferendumFragment, DiscussionTreasuryProposalFragment } from './generated/discussion-db-graphql'; +import { OnchainMotionFragment, OnchainProposalFragment, OnchainReferendumFragment, OnchainTipFragment, OnchainTreasuryProposalFragment } from './generated/chain-db-graphql'; +import { DiscussionMotionFragment, DiscussionProposalFragment, DiscussionReferendumFragment, DiscussionTipFragment, DiscussionTreasuryProposalFragment } from './generated/discussion-db-graphql'; export interface OnchainSyncData { motions?: Array | null; proposals?: Array | null; referenda?: Array | null; + tips?: Array | null; treasuryProposals?: Array | null; } @@ -16,6 +17,7 @@ export interface DiscussionSyncData { motions?: Array | null; proposals?: Array | null; referenda?: Array | null; + tips?: Array | null; treasuryProposals?: Array | null; } @@ -33,6 +35,7 @@ export interface OnchainSyncMap { motions?: MotionObjectMap; proposals?: ObjectMap; referenda?: ReferendumObjectMap; + tips?: ObjectMap; treasuryProposals?: ObjectMap; } @@ -51,6 +54,7 @@ export interface DiscussionSyncMap { motions?: ObjectMap; proposals?: ObjectMap; referenda?: ObjectMap; + tips?: ObjectMap; treasuryProposals?: ObjectMap; } diff --git a/front-end/src/App.tsx b/front-end/src/App.tsx index 129c7b7ea..600602169 100644 --- a/front-end/src/App.tsx +++ b/front-end/src/App.tsx @@ -38,6 +38,8 @@ import RequestResetPassword from './screens/RequestResetPassword'; import ResetPassword from './screens/ResetPassword'; import Settings from './screens/Settings'; import SignupForm from './screens/SignupForm'; +import PostTip from './screens/TipPost'; +import Tips from './screens/Tips'; import Treasury from './screens/Treasury'; import PostTreasury from './screens/TreasuryPost'; import UndoEmailChange from './screens/UndoEmailChange'; @@ -83,39 +85,45 @@ const App = () => { - + - + - + - + - + + + + - + - + - + - + - + + + + diff --git a/front-end/src/components/BlockCountdown.tsx b/front-end/src/components/BlockCountdown.tsx index 10f905911..70502acc5 100644 --- a/front-end/src/components/BlockCountdown.tsx +++ b/front-end/src/components/BlockCountdown.tsx @@ -27,13 +27,17 @@ const BlockCountdown = ({ className, endBlock }:Props ) => { const { blocktime } = useBlockTime(); return ( - {blocksRemaining !== endBlock ? blockToTime(blocksRemaining, blocktime) : `#${endBlock}`}} - content={{`#${endBlock}`}} - hoverable={true} - position='top left' - /> + blocksRemaining !== endBlock && blocksRemaining > 0 + ?( + { blockToTime(blocksRemaining, blocktime)}} + content={{`#${endBlock}`}} + hoverable={true} + position='top left' + /> + ) + : <>#{endBlock} ); }; diff --git a/front-end/src/components/Comment/Comment.tsx b/front-end/src/components/Comment/Comment.tsx index 6af1ba089..3a0d59f7b 100644 --- a/front-end/src/components/Comment/Comment.tsx +++ b/front-end/src/components/Comment/Comment.tsx @@ -18,6 +18,8 @@ import { ProposalPostAndCommentsQueryVariables, ReferendumPostAndCommentsQuery, ReferendumPostAndCommentsQueryVariables, + TipPostAndCommentsQuery, + TipPostAndCommentsQueryVariables, TreasuryProposalPostAndCommentsQuery, TreasuryProposalPostAndCommentsQueryVariables } from '../../generated/graphql'; import Avatar from '../../ui-components/Avatar'; @@ -33,8 +35,10 @@ interface Props{ DiscussionPostAndCommentsQueryVariables | ProposalPostAndCommentsQueryVariables | MotionPostAndCommentsQueryVariables | + TipPostAndCommentsQueryVariables | TreasuryProposalPostAndCommentsQueryVariables | undefined) => + Promise> | Promise> | Promise> | Promise> | diff --git a/front-end/src/components/Comment/Comments.tsx b/front-end/src/components/Comment/Comments.tsx index 99dbd834b..fbdfbb5b4 100644 --- a/front-end/src/components/Comment/Comments.tsx +++ b/front-end/src/components/Comment/Comments.tsx @@ -16,6 +16,8 @@ import { ProposalPostAndCommentsQueryVariables, ReferendumPostAndCommentsQuery, ReferendumPostAndCommentsQueryVariables, + TipPostAndCommentsQuery, + TipPostAndCommentsQueryVariables, TreasuryProposalPostAndCommentsQuery, TreasuryProposalPostAndCommentsQueryVariables } from '../../generated/graphql'; @@ -29,8 +31,10 @@ interface Props{ DiscussionPostAndCommentsQueryVariables | ProposalPostAndCommentsQueryVariables | MotionPostAndCommentsQueryVariables | + TipPostAndCommentsQueryVariables | TreasuryProposalPostAndCommentsQueryVariables | undefined) => + Promise> | Promise> | Promise> | Promise> | diff --git a/front-end/src/components/Comment/EditableCommentContent.tsx b/front-end/src/components/Comment/EditableCommentContent.tsx index 92e754bc6..3ef2c87e3 100644 --- a/front-end/src/components/Comment/EditableCommentContent.tsx +++ b/front-end/src/components/Comment/EditableCommentContent.tsx @@ -23,6 +23,8 @@ import { ProposalPostAndCommentsQueryVariables, ReferendumPostAndCommentsQuery, ReferendumPostAndCommentsQueryVariables, + TipPostAndCommentsQuery, + TipPostAndCommentsQueryVariables, TreasuryProposalPostAndCommentsQuery, TreasuryProposalPostAndCommentsQueryVariables, useEditCommentMutation } from '../../generated/graphql'; @@ -46,9 +48,11 @@ interface Props { ProposalPostAndCommentsQueryVariables | ReferendumPostAndCommentsQueryVariables | MotionPostAndCommentsQueryVariables | + TipPostAndCommentsQueryVariables | TreasuryProposalPostAndCommentsQueryVariables | undefined ) => + Promise> | Promise> | Promise> | Promise> | diff --git a/front-end/src/components/EditablePostContent.tsx b/front-end/src/components/EditablePostContent.tsx index 0f519afc6..6e39e6e56 100644 --- a/front-end/src/components/EditablePostContent.tsx +++ b/front-end/src/components/EditablePostContent.tsx @@ -21,6 +21,9 @@ import { DiscussionPostAndCommentsQuery, ReferendumPostAndCommentsQuery, ReferendumPostAndCommentsQueryVariables, ReferendumPostFragment, + TipPostAndCommentsQuery, + TipPostAndCommentsQueryVariables, + TipPostFragment, TreasuryProposalPostAndCommentsQuery, TreasuryProposalPostAndCommentsQueryVariables, TreasuryProposalPostFragment, @@ -38,18 +41,20 @@ interface Props { className?: string isEditing: boolean onchainId?: number | null - post: DiscussionPostFragment | ProposalPostFragment | ReferendumPostFragment| TreasuryProposalPostFragment| MotionPostFragment + post: DiscussionPostFragment | ProposalPostFragment | ReferendumPostFragment | TipPostFragment | TreasuryProposalPostFragment| MotionPostFragment postStatus?: string refetch: ( variables?: ReferendumPostAndCommentsQueryVariables | DiscussionPostAndCommentsQueryVariables | ProposalPostAndCommentsQueryVariables | MotionPostAndCommentsQueryVariables + | TipPostAndCommentsQueryVariables | TreasuryProposalPostAndCommentsQueryVariables | undefined ) => Promise> | Promise> | Promise> + | Promise> | Promise> | Promise> toggleEdit: () => void diff --git a/front-end/src/components/Listings/TipListing.tsx b/front-end/src/components/Listings/TipListing.tsx new file mode 100644 index 000000000..3ef40bf0e --- /dev/null +++ b/front-end/src/components/Listings/TipListing.tsx @@ -0,0 +1,64 @@ +// Copyright 2019-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import styled from '@xstyled/styled-components'; +import React from 'react'; +import { Link } from 'react-router-dom'; +import NothingFoundCard from 'src/ui-components/NothingFoundCard'; + +import { LatestTipPostsQuery } from '../../generated/graphql'; +import GovernanceCard from '../GovernanceCard'; + +interface Props { + className?: string + data: LatestTipPostsQuery +} + +const TipProposals = ({ className, data }: Props) => { + + if (!data.posts || !data.posts.length) return ; + + return ( +
    + {data.posts.map( + (post) => { + const onchainId = post.onchain_link?.onchain_tip_id; + + return !!post?.author?.username && !!post?.onchain_link?.onchain_tip.length && +
  • + { + + } +
  • + ; + } + )} +
+ ); +}; + +export default styled(TipProposals)` + margin-block-start: 0; + margin-block-end: 0; + + li { + list-style-type: none; + } + + .proposals__item { + margin: 0 0 1rem 0; + a:hover { + text-decoration: none; + } + } +`; diff --git a/front-end/src/components/MenuBar/index.tsx b/front-end/src/components/MenuBar/index.tsx index 98d0dcad1..05278ae9b 100644 --- a/front-end/src/components/MenuBar/index.tsx +++ b/front-end/src/components/MenuBar/index.tsx @@ -52,7 +52,8 @@ const MenuBar = ({ className } : Props): JSX.Element => { { content: 'Referenda', to:'/referenda' }, { content: 'Proposals', to:'/proposals' }, { content: 'Motions', to:'/motions' }, - { content: 'Treasury proposals', to:'/treasury-proposals' } + { content: 'Treasury proposals', to:'/treasury-proposals' }, + { content: 'Tips', to: '/tips' } ]; const loggedOutItems = [ diff --git a/front-end/src/components/NoPostFound.tsx b/front-end/src/components/NoPostFound.tsx index 38f570cbd..d77f9d028 100644 --- a/front-end/src/components/NoPostFound.tsx +++ b/front-end/src/components/NoPostFound.tsx @@ -8,9 +8,10 @@ interface Props{ isMotion: boolean isProposal: boolean isReferendum: boolean - isTreasuryProposal: boolean + isTreasuryProposal: boolean + isTipProposal: boolean } -const NoPostFound = ({ isMotion = false, isProposal = false, isReferendum = false, isTreasuryProposal = false }: Props) => { +const NoPostFound = ({ isMotion = false, isProposal = false, isReferendum = false, isTreasuryProposal = false, isTipProposal = false }: Props) => { const postType = isMotion ? 'motion' : isProposal @@ -19,8 +20,10 @@ const NoPostFound = ({ isMotion = false, isProposal = false, isReferendum = fals ? 'referendum' : isTreasuryProposal ? 'treasury proposal' - : 'post'; + : isTipProposal + ? 'Tip proposal' + : 'post'; return
Sorry, we couldn't find any {postType} with this id
; }; -export default NoPostFound; \ No newline at end of file +export default NoPostFound; diff --git a/front-end/src/components/Post/GovernanceSideBar/EndorseTip.tsx b/front-end/src/components/Post/GovernanceSideBar/EndorseTip.tsx new file mode 100644 index 000000000..9a6652b23 --- /dev/null +++ b/front-end/src/components/Post/GovernanceSideBar/EndorseTip.tsx @@ -0,0 +1,174 @@ +// Copyright 2019-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { InjectedAccountWithMeta } from '@polkadot/extension-inject/types'; +import { ApiPromiseContext } from '@substrate/context'; +import styled from '@xstyled/styled-components'; +import BN from 'bn.js'; +import React, { useContext, useEffect,useState } from 'react'; +import { DropdownProps } from 'semantic-ui-react'; +import { NotificationContext } from 'src/context/NotificationContext'; +import { useGetCouncilMembersQuery } from 'src/generated/graphql'; +import { LoadingStatusType, NotificationStatus } from 'src/types'; +import AccountSelectionForm from 'src/ui-components/AccountSelectionForm'; +import BalanceInput from 'src/ui-components/BalanceInput'; +import Button from 'src/ui-components/Button'; +import ButtonLink from 'src/ui-components/ButtonLink'; +import Card from 'src/ui-components/Card'; +import { Form } from 'src/ui-components/Form'; +import Loader from 'src/ui-components/Loader'; + +interface Props { + accounts: InjectedAccountWithMeta[] + address: string + className?: string + getAccounts: () => Promise + tipId?: number | null + tipHash?: string + onAccountChange: (event: React.SyntheticEvent, data: DropdownProps) => void +} + +const EndorseTip = ({ + accounts, + address, + className, + getAccounts, + tipId, + tipHash, + onAccountChange +}: Props) => { + const ZERO = new BN(0); + const { queueNotification } = useContext(NotificationContext); + const [loadingStatus, setLoadingStatus] = useState({ isLoading: false, message:'' }); + const [endorseValue, setEndorseValue] = useState(ZERO); + const [isCouncil, setIsCouncil] = useState(false); + const [forceEndorse, setForceEndorse] = useState(false); + const councilQueryresult = useGetCouncilMembersQuery(); + const currentCouncil: string[] = []; + const { api, isApiReady } = useContext(ApiPromiseContext); + + councilQueryresult.data?.councils?.[0]?.members?.forEach( member => {currentCouncil.push(member?.address);}); + + useEffect( () => { + // it will iterate through all accounts + accounts.some(account => { + if (currentCouncil.includes(account.address)){ + setIsCouncil(true); + // this breaks the loop as soon as we find a matching address + return true; + } + return false; + }); + }, [accounts, currentCouncil]); + + const onValueChange = (balance: BN) => setEndorseValue(balance); + + const handleEndorse = async () => { + if (!tipId && tipId !== 0) { + console.error('tipId not set'); + return; + } + + if (!tipHash) { + console.error('tipHash not set'); + return; + } + + setLoadingStatus({ isLoading: true, message: 'Waiting for signature' }); + const endorse = api.tx.treasury.tip(tipHash, endorseValue); + + endorse.signAndSend(address, ({ status }) => { + if (status.isInBlock) { + queueNotification({ + header: 'Success!', + message: `Endorse tip #${tipId} successful.`, + status: NotificationStatus.SUCCESS + }); + setLoadingStatus({ isLoading: false, message: '' }); + console.log(`Completed at block hash #${status.asInBlock.toString()}`); + } else { + if (status.isBroadcast){ + setLoadingStatus({ isLoading: true, message: 'Broadcasting the endorsement' }); + } + console.log(`Current status: ${status.type}`); + } + }).catch((error) => { + setLoadingStatus({ isLoading: false, message: '' }); + console.log(':( transaction failed'); + console.error('ERROR:', error); + queueNotification({ + header: 'Failed!', + message: error.message, + status: NotificationStatus.ERROR + }); + }); + }; + + const GetAccountsButton = () => + + +
Only council members can endorse tips.

+ +
+
; + + const noAccount = accounts.length === 0; + + const endorse = noAccount + ? + : loadingStatus.isLoading + ? + + + : + + + + ; + + const NotCouncil = () => + <> +
No account found from the council :(
+ setForceEndorse(true)}>Let me try still. + ; + + return ( +
+ {isCouncil || forceEndorse + ? endorse + : + } +
+ ); +}; + +export default styled(EndorseTip)` + .LoaderWrapper { + height: 15rem; + position: absolute; + width: 100%; + } +`; diff --git a/front-end/src/components/Post/GovernanceSideBar/index.tsx b/front-end/src/components/Post/GovernanceSideBar/index.tsx index c59ee04ae..d18574848 100644 --- a/front-end/src/components/Post/GovernanceSideBar/index.tsx +++ b/front-end/src/components/Post/GovernanceSideBar/index.tsx @@ -8,13 +8,14 @@ import { ApiPromiseContext } from '@substrate/context'; import styled from '@xstyled/styled-components'; import React, { useContext, useState } from 'react'; import { DropdownProps } from 'semantic-ui-react'; -import { OnchainLinkMotionFragment, OnchainLinkProposalFragment, OnchainLinkReferendumFragment, OnchainLinkTreasuryProposalFragment } from 'src/generated/graphql'; +import { OnchainLinkMotionFragment, OnchainLinkProposalFragment, OnchainLinkReferendumFragment, OnchainLinkTipFragment, OnchainLinkTreasuryProposalFragment } from 'src/generated/graphql'; import { APPNAME } from 'src/global/appName'; -import { motionStatus,proposalStatus, referendumStatus } from 'src/global/statuses'; +import { motionStatus, proposalStatus, referendumStatus, tipStatus } from 'src/global/statuses'; import { VoteThreshold } from 'src/types'; import { Form } from 'src/ui-components/Form'; import ExtensionNotDetected from '../../ExtensionNotDetected'; +import EndorseTip from './EndorseTip'; import ProposalDisplay from './Proposals'; import ReferendumVoteInfo from './Referenda/ReferendumVoteInfo'; import VoteReferendum from './Referenda/VoteReferendum'; @@ -26,19 +27,20 @@ interface Props { isProposal?: boolean isReferendum?: boolean isTreasuryProposal?: boolean + isTipProposal?: boolean onchainId?: number | null - onchainLink?: OnchainLinkMotionFragment | OnchainLinkProposalFragment | OnchainLinkReferendumFragment | OnchainLinkTreasuryProposalFragment + onchainLink?: OnchainLinkMotionFragment | OnchainLinkProposalFragment | OnchainLinkReferendumFragment | OnchainLinkTreasuryProposalFragment | OnchainLinkTipFragment status?: string } -const GovenanceSideBar = ({ className, isMotion, isProposal, isReferendum, onchainId, onchainLink, status }: Props) => { +const GovenanceSideBar = ({ className, isMotion, isProposal, isReferendum, isTipProposal, onchainId, onchainLink, status }: Props) => { const [address, setAddress] = useState(''); const [accounts, setAccounts] = useState([]); const [extensionNotFound, setExtensionNotFound] = useState(false); const [accountsNotFound, setAccountsNotFound] = useState(false); const { api } = useContext(ApiPromiseContext); - const canVote = !!status && !![proposalStatus.PROPOSED, referendumStatus.STARTED, motionStatus.PROPOSED].includes(status); + const canVote = !!status && !![proposalStatus.PROPOSED, referendumStatus.STARTED, motionStatus.PROPOSED, tipStatus.OPENED].includes(status); const onAccountChange = (event: React.SyntheticEvent, data: DropdownProps) => { const addressValue = data.value as string; @@ -103,14 +105,14 @@ const GovenanceSideBar = ({ className, isMotion, isProposal, isReferendum, oncha ?
{isMotion && canVote && - + } {isProposal && } + {isTipProposal && canVote && + + }
: null @@ -149,7 +161,7 @@ const GovenanceSideBar = ({ className, isMotion, isProposal, isReferendum, oncha }; export default styled(GovenanceSideBar)` - + @media only screen and (max-width: 768px) { .ui.form { padding: 0rem; diff --git a/front-end/src/components/Post/Post.tsx b/front-end/src/components/Post/Post.tsx index e80a0cc69..f1bf2b8ae 100644 --- a/front-end/src/components/Post/Post.tsx +++ b/front-end/src/components/Post/Post.tsx @@ -21,6 +21,7 @@ import { OnchainLinkMotionFragment, OnchainLinkProposalFragment, OnchainLinkReferendumFragment, + OnchainLinkTipFragment, OnchainLinkTreasuryProposalFragment, ProposalPostAndCommentsQuery, ProposalPostAndCommentsQueryHookResult, @@ -30,6 +31,10 @@ import { ReferendumPostAndCommentsQueryHookResult, ReferendumPostAndCommentsQueryVariables, ReferendumPostFragment, + TipPostAndCommentsQuery, + TipPostAndCommentsQueryHookResult, + TipPostAndCommentsQueryVariables, + TipPostFragment, TreasuryProposalPostAndCommentsQuery, TreasuryProposalPostAndCommentsQueryHookResult, TreasuryProposalPostAndCommentsQueryVariables, @@ -48,6 +53,7 @@ import CreatePostComment from './PostCommentForm'; import PostMotionInfo from './PostGovernanceInfo/PostMotionInfo'; import PostProposalInfo from './PostGovernanceInfo/PostProposalInfo'; import PostReferendumInfo from './PostGovernanceInfo/PostReferendumInfo'; +import PostTipInfo from './PostGovernanceInfo/PostTipInfo'; import PostTreasuryInfo from './PostGovernanceInfo/PostTreasuryInfo'; interface Props { @@ -57,16 +63,32 @@ interface Props { ProposalPostAndCommentsQueryHookResult['data'] | ReferendumPostAndCommentsQueryHookResult['data'] | MotionPostAndCommentsQueryHookResult['data'] | - TreasuryProposalPostAndCommentsQueryHookResult['data'] + TreasuryProposalPostAndCommentsQueryHookResult['data'] | + TipPostAndCommentsQueryHookResult['data' ] ) isMotion?: boolean isProposal?: boolean isReferendum?: boolean isTreasuryProposal?: boolean - refetch: (variables?: ReferendumPostAndCommentsQueryVariables | DiscussionPostAndCommentsQueryVariables | ProposalPostAndCommentsQueryVariables | MotionPostAndCommentsQueryVariables | TreasuryProposalPostAndCommentsQueryVariables | undefined) => Promise> | Promise> | Promise> | Promise> | Promise> + isTipProposal?: boolean + refetch: (variables?: + ReferendumPostAndCommentsQueryVariables | + DiscussionPostAndCommentsQueryVariables | + ProposalPostAndCommentsQueryVariables | + MotionPostAndCommentsQueryVariables | + TreasuryProposalPostAndCommentsQueryVariables | + TipPostAndCommentsQueryVariables | + undefined + ) => + Promise> | + Promise> | + Promise> | + Promise> | + Promise> | + Promise> } -const Post = ( { className, data, isMotion = false, isProposal = false, isReferendum = false, isTreasuryProposal = false, refetch }: Props ) => { +const Post = ( { className, data, isMotion = false, isProposal = false, isReferendum = false, isTipProposal = false, isTreasuryProposal = false, refetch }: Props ) => { const post = data && data.posts && data.posts[0]; const { id, addresses } = useContext(UserDetailsContext); const [isEditing, setIsEditing] = useState(false); @@ -80,7 +102,8 @@ const Post = ( { className, data, isMotion = false, isProposal = false, isRefere let proposalPost: ProposalPostFragment | undefined; let motionPost: MotionPostFragment | undefined; let treasuryPost: TreasuryProposalPostFragment | undefined; - let definedOnchainLink : OnchainLinkMotionFragment | OnchainLinkReferendumFragment | OnchainLinkProposalFragment | OnchainLinkTreasuryProposalFragment | undefined; + let tipPost: TipPostFragment | undefined; + let definedOnchainLink : OnchainLinkMotionFragment | OnchainLinkReferendumFragment | OnchainLinkProposalFragment | OnchainLinkTipFragment | OnchainLinkTreasuryProposalFragment | undefined; let postStatus: string | undefined; if (isReferendum){ @@ -115,6 +138,14 @@ const Post = ( { className, data, isMotion = false, isProposal = false, isRefere metaTitle = `Treasury #${onchainId}`; } + if (isTipProposal) { + tipPost = post as TipPostFragment; + definedOnchainLink = tipPost.onchain_link as OnchainLinkTipFragment; + onchainId = definedOnchainLink.onchain_tip_id; + postStatus = tipPost?.onchain_link?.onchain_tip?.[0]?.tipStatus?.[0].status; + metaTitle = `Tip #${onchainId}`; + } + metaTitle = `${metaTitle} | ${post?.title ? post?.title : 'Polkassembly' }`; useEffect(() => { @@ -127,8 +158,8 @@ const Post = ( { className, data, isMotion = false, isProposal = false, isRefere }); }, [post, setMetaContextState, metaTitle]); - const isDiscussion = (post: TreasuryProposalPostFragment | MotionPostFragment | ProposalPostFragment | DiscussionPostFragment | ReferendumPostFragment): post is DiscussionPostFragment => { - if (!isReferendum && !isProposal && !isMotion && !isTreasuryProposal) { + const isDiscussion = (post: TipPostFragment | TreasuryProposalPostFragment | MotionPostFragment | ProposalPostFragment | DiscussionPostFragment | ReferendumPostFragment): post is DiscussionPostFragment => { + if (!isReferendum && !isProposal && !isMotion && !isTreasuryProposal && !isTipProposal) { return (post as DiscussionPostFragment) !== undefined; } @@ -140,20 +171,37 @@ const Post = ( { className, data, isMotion = false, isProposal = false, isRefere isProposal={isProposal} isReferendum={isReferendum} isTreasuryProposal={isTreasuryProposal} + isTipProposal={isTipProposal} />; const isProposalProposer = isProposal && proposalPost?.onchain_link?.proposer_address && addresses?.includes(proposalPost.onchain_link.proposer_address); const isReferendumProposer = isReferendum && referendumPost?.onchain_link?.proposer_address && addresses?.includes(referendumPost.onchain_link.proposer_address); const isMotionProposer = isMotion && motionPost?.onchain_link?.proposer_address && addresses?.includes(motionPost.onchain_link.proposer_address); const isTreasuryProposer = isTreasuryProposal && treasuryPost?.onchain_link?.proposer_address && addresses?.includes(treasuryPost.onchain_link.proposer_address); + const isTipProposer = isTipProposal && tipPost?.onchain_link?.proposer_address && addresses?.includes(tipPost.onchain_link.proposer_address); const canEdit = !isEditing && ( post.author?.id === id || isProposalProposer || isReferendumProposer || isMotionProposer || - isTreasuryProposer + isTreasuryProposer || + isTipProposer ); + const Sidebar = () => <> + + {isDiscussion(post) && } + ; + return ( @@ -194,17 +242,13 @@ const Post = ( { className, data, isMotion = false, isProposal = false, isRefere onchainLink={definedOnchainLink as OnchainLinkTreasuryProposalFragment} /> } - - - {isDiscussion(post) && } + } + + { !!post.comments?.length && - - {isDiscussion(post) && } + diff --git a/front-end/src/components/Post/PostCommentForm.tsx b/front-end/src/components/Post/PostCommentForm.tsx index 2b29bef6f..9fcdbb6c3 100644 --- a/front-end/src/components/Post/PostCommentForm.tsx +++ b/front-end/src/components/Post/PostCommentForm.tsx @@ -18,6 +18,8 @@ import { ProposalPostAndCommentsQueryVariables, ReferendumPostAndCommentsQuery, ReferendumPostAndCommentsQueryVariables, + TipPostAndCommentsQuery, + TipPostAndCommentsQueryVariables, TreasuryProposalPostAndCommentsQuery, TreasuryProposalPostAndCommentsQueryVariables, useAddPostCommentMutation, @@ -30,7 +32,21 @@ import ContentForm from '../ContentForm'; interface Props { className?: string postId: number - refetch: (variables?: DiscussionPostAndCommentsQueryVariables | ProposalPostAndCommentsQueryVariables | ReferendumPostAndCommentsQueryVariables | MotionPostAndCommentsQueryVariables | TreasuryProposalPostAndCommentsQueryVariables | undefined) => Promise> | Promise> | Promise> | Promise> | Promise> + refetch: (variables?: + DiscussionPostAndCommentsQueryVariables | + ProposalPostAndCommentsQueryVariables | + ReferendumPostAndCommentsQueryVariables | + MotionPostAndCommentsQueryVariables | + TreasuryProposalPostAndCommentsQueryVariables | + TipPostAndCommentsQueryVariables | + undefined + ) => + Promise> | + Promise> | + Promise> | + Promise> | + Promise> | + Promise> } const PostCommentForm = ({ className, postId, refetch }: Props) => { @@ -137,4 +153,4 @@ export default styled(PostCommentForm)` display: flex; justify-content: flex-end; } -`; \ No newline at end of file +`; diff --git a/front-end/src/components/Post/PostGovernanceInfo/PostTipInfo.tsx b/front-end/src/components/Post/PostGovernanceInfo/PostTipInfo.tsx new file mode 100644 index 000000000..76e170c62 --- /dev/null +++ b/front-end/src/components/Post/PostGovernanceInfo/PostTipInfo.tsx @@ -0,0 +1,80 @@ +// Copyright 2019-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import * as moment from 'moment'; +import React from 'react'; +import { Grid } from 'semantic-ui-react'; +import BlockCountdown from 'src/components/BlockCountdown'; +import { tipStatus as tipStatuses } from 'src/global/statuses'; + +import { OnchainLinkTipFragment } from '../../../generated/graphql'; +import AddressComponent from '../../../ui-components/Address'; +import OnchainInfoWrapper from '../../../ui-components/OnchainInfoWrapper'; + +interface Props{ + onchainLink: OnchainLinkTipFragment +} + +const PostTipInfo = ({ onchainLink }: Props) => { + if (!onchainLink) return null; + + const { + onchain_tip: onchainTipProposal, + proposer_address: proposerAddress + } = onchainLink; + + const { closes, finder, hash, reason, who, tipStatus } = onchainTipProposal?.[0] || { }; + const { blockNumber, status } = tipStatus?.[0] || {}; + + return ( + +

On-chain info

+ + +
Proposer
+ +
+ {hash && + +
Hash
+ {hash} +
} + {reason && + +
Reason
+ {reason} +
} + {who && + +
Receiver
+ +
} + {finder && + +
Finder
+ +
} + {closes && + + {status === tipStatuses.CLOSING + ? + <> +
Closing
+ + + : status === tipStatuses.CLOSED + ? + <> +
Closed
+
{moment.utc(blockNumber?.startDateTime).format('DD MMM YYYY, HH:mm:ss')}
+ + : #{closes} + } +
} +
+
+ ); +}; + +export default PostTipInfo; diff --git a/front-end/src/generated/graphql.tsx b/front-end/src/generated/graphql.tsx index b25ef19cd..c02b10937 100644 --- a/front-end/src/generated/graphql.tsx +++ b/front-end/src/generated/graphql.tsx @@ -12,6 +12,8 @@ export type Scalars = { DateTime: any; /** Raw JSON value */ Json: any; + /** The `Long` scalar type represents non-fractional signed whole numeric values. Long can represent values between -(2^63) and 2^63 - 1. */ + Long: any; /** The `Upload` scalar type represents a file upload. */ Upload: any; bpchar: any; @@ -151,6 +153,16 @@ export type AggregateStake = { count: Scalars['Int']; }; +export type AggregateTip = { + __typename?: 'AggregateTip'; + count: Scalars['Int']; +}; + +export type AggregateTipStatus = { + __typename?: 'AggregateTipStatus'; + count: Scalars['Int']; +}; + export type AggregateTotalIssuance = { __typename?: 'AggregateTotalIssuance'; count: Scalars['Int']; @@ -171,6 +183,12 @@ export type AggregateValidator = { count: Scalars['Int']; }; +export type BatchPayload = { + __typename?: 'BatchPayload'; + /** The number of nodes that have been affected by the Batch operation. */ + count: Scalars['Long']; +}; + export type BlockIndex = Node & { __typename?: 'BlockIndex'; id: Scalars['ID']; @@ -189,6 +207,13 @@ export type BlockIndexConnection = { pageInfo: PageInfo; }; +export type BlockIndexCreateInput = { + id?: Maybe; + identifier: Scalars['String']; + index: Scalars['Int']; + startFrom: Scalars['Int']; +}; + /** An edge in a connection. */ export type BlockIndexEdge = { __typename?: 'BlockIndexEdge'; @@ -243,6 +268,18 @@ export type BlockIndexSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type BlockIndexUpdateInput = { + identifier?: Maybe; + index?: Maybe; + startFrom?: Maybe; +}; + +export type BlockIndexUpdateManyMutationInput = { + identifier?: Maybe; + index?: Maybe; + startFrom?: Maybe; +}; + export type BlockIndexWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -360,6 +397,19 @@ export type BlockNumberConnection = { pageInfo: PageInfo; }; +export type BlockNumberCreateInput = { + authoredBy: Scalars['String']; + hash: Scalars['String']; + id?: Maybe; + number: Scalars['Int']; + startDateTime: Scalars['DateTime']; +}; + +export type BlockNumberCreateOneInput = { + connect?: Maybe; + create?: Maybe; +}; + /** An edge in a connection. */ export type BlockNumberEdge = { __typename?: 'BlockNumberEdge'; @@ -417,6 +467,39 @@ export type BlockNumberSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type BlockNumberUpdateDataInput = { + authoredBy?: Maybe; + hash?: Maybe; + number?: Maybe; + startDateTime?: Maybe; +}; + +export type BlockNumberUpdateInput = { + authoredBy?: Maybe; + hash?: Maybe; + number?: Maybe; + startDateTime?: Maybe; +}; + +export type BlockNumberUpdateManyMutationInput = { + authoredBy?: Maybe; + hash?: Maybe; + number?: Maybe; + startDateTime?: Maybe; +}; + +export type BlockNumberUpdateOneRequiredInput = { + connect?: Maybe; + create?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type BlockNumberUpsertNestedInput = { + create: BlockNumberCreateInput; + update: BlockNumberUpdateDataInput; +}; + export type BlockNumberWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -582,6 +665,22 @@ export type CouncilConnection = { pageInfo: PageInfo; }; +export type CouncilCreateInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + members?: Maybe; +}; + +export type CouncilCreateManyWithoutMembersInput = { + connect?: Maybe>; + create?: Maybe>; +}; + +export type CouncilCreateWithoutMembersInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; +}; + /** An edge in a connection. */ export type CouncilEdge = { __typename?: 'CouncilEdge'; @@ -619,6 +718,22 @@ export type CouncilMemberConnection = { pageInfo: PageInfo; }; +export type CouncilMemberCreateInput = { + address: Scalars['String']; + councils?: Maybe; + id?: Maybe; +}; + +export type CouncilMemberCreateManyWithoutCouncilsInput = { + connect?: Maybe>; + create?: Maybe>; +}; + +export type CouncilMemberCreateWithoutCouncilsInput = { + address: Scalars['String']; + id?: Maybe; +}; + /** An edge in a connection. */ export type CouncilMemberEdge = { __typename?: 'CouncilMemberEdge'; @@ -641,6 +756,69 @@ export type CouncilMemberPreviousValues = { id: Scalars['ID']; }; +export type CouncilMemberScalarWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + address?: Maybe; + /** All values containing the given string. */ + address_contains?: Maybe; + /** All values ending with the given string. */ + address_ends_with?: Maybe; + /** All values greater than the given value. */ + address_gt?: Maybe; + /** All values greater than or equal the given value. */ + address_gte?: Maybe; + /** All values that are contained in given list. */ + address_in?: Maybe>; + /** All values less than the given value. */ + address_lt?: Maybe; + /** All values less than or equal the given value. */ + address_lte?: Maybe; + /** All values that are not equal to given value. */ + address_not?: Maybe; + /** All values not containing the given string. */ + address_not_contains?: Maybe; + /** All values not ending with the given string. */ + address_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + address_not_in?: Maybe>; + /** All values not starting with the given string. */ + address_not_starts_with?: Maybe; + /** All values starting with the given string. */ + address_starts_with?: Maybe; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; +}; + export type CouncilMemberSubscriptionPayload = { __typename?: 'CouncilMemberSubscriptionPayload'; mutation: MutationType; @@ -667,6 +845,51 @@ export type CouncilMemberSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type CouncilMemberUpdateInput = { + address?: Maybe; + councils?: Maybe; +}; + +export type CouncilMemberUpdateManyDataInput = { + address?: Maybe; +}; + +export type CouncilMemberUpdateManyMutationInput = { + address?: Maybe; +}; + +export type CouncilMemberUpdateManyWithWhereNestedInput = { + data: CouncilMemberUpdateManyDataInput; + where: CouncilMemberScalarWhereInput; +}; + +export type CouncilMemberUpdateManyWithoutCouncilsInput = { + connect?: Maybe>; + create?: Maybe>; + delete?: Maybe>; + deleteMany?: Maybe>; + disconnect?: Maybe>; + set?: Maybe>; + update?: Maybe>; + updateMany?: Maybe>; + upsert?: Maybe>; +}; + +export type CouncilMemberUpdateWithWhereUniqueWithoutCouncilsInput = { + data: CouncilMemberUpdateWithoutCouncilsDataInput; + where: CouncilMemberWhereUniqueInput; +}; + +export type CouncilMemberUpdateWithoutCouncilsDataInput = { + address?: Maybe; +}; + +export type CouncilMemberUpsertWithWhereUniqueWithoutCouncilsInput = { + create: CouncilMemberCreateWithoutCouncilsInput; + update: CouncilMemberUpdateWithoutCouncilsDataInput; + where: CouncilMemberWhereUniqueInput; +}; + export type CouncilMemberWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -748,6 +971,42 @@ export type CouncilPreviousValues = { id: Scalars['ID']; }; +export type CouncilScalarWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; +}; + export type CouncilSubscriptionPayload = { __typename?: 'CouncilSubscriptionPayload'; mutation: MutationType; @@ -774,6 +1033,37 @@ export type CouncilSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type CouncilUpdateInput = { + blockNumber?: Maybe; + members?: Maybe; +}; + +export type CouncilUpdateManyWithoutMembersInput = { + connect?: Maybe>; + create?: Maybe>; + delete?: Maybe>; + deleteMany?: Maybe>; + disconnect?: Maybe>; + set?: Maybe>; + update?: Maybe>; + upsert?: Maybe>; +}; + +export type CouncilUpdateWithWhereUniqueWithoutMembersInput = { + data: CouncilUpdateWithoutMembersDataInput; + where: CouncilWhereUniqueInput; +}; + +export type CouncilUpdateWithoutMembersDataInput = { + blockNumber?: Maybe; +}; + +export type CouncilUpsertWithWhereUniqueWithoutMembersInput = { + create: CouncilCreateWithoutMembersInput; + update: CouncilUpdateWithoutMembersDataInput; + where: CouncilWhereUniqueInput; +}; + export type CouncilWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -838,6 +1128,18 @@ export type EraConnection = { pageInfo: PageInfo; }; +export type EraCreateInput = { + eraStartSessionIndex: SessionCreateOneInput; + id?: Maybe; + index: Scalars['Int']; + individualPoints?: Maybe; + totalPoints: Scalars['String']; +}; + +export type EraCreateindividualPointsInput = { + set?: Maybe>; +}; + /** An edge in a connection. */ export type EraEdge = { __typename?: 'EraEdge'; @@ -890,6 +1192,23 @@ export type EraSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type EraUpdateInput = { + eraStartSessionIndex?: Maybe; + index?: Maybe; + individualPoints?: Maybe; + totalPoints?: Maybe; +}; + +export type EraUpdateManyMutationInput = { + index?: Maybe; + individualPoints?: Maybe; + totalPoints?: Maybe; +}; + +export type EraUpdateindividualPointsInput = { + set?: Maybe>; +}; + export type EraWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -991,6 +1310,12 @@ export type HeartBeatConnection = { pageInfo: PageInfo; }; +export type HeartBeatCreateInput = { + authorityId: Scalars['String']; + id?: Maybe; + sessionIndex: SessionCreateOneInput; +}; + /** An edge in a connection. */ export type HeartBeatEdge = { __typename?: 'HeartBeatEdge'; @@ -1039,6 +1364,15 @@ export type HeartBeatSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type HeartBeatUpdateInput = { + authorityId?: Maybe; + sessionIndex?: Maybe; +}; + +export type HeartBeatUpdateManyMutationInput = { + authorityId?: Maybe; +}; + export type HeartBeatWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -1126,6 +1460,7 @@ export type LoginResponse = { token?: Maybe; }; + export type Message = { __typename?: 'Message'; message?: Maybe; @@ -1180,30 +1515,121 @@ export type MotionConnection = { pageInfo: PageInfo; }; -/** An edge in a connection. */ -export type MotionEdge = { - __typename?: 'MotionEdge'; - /** A cursor for use in pagination. */ - cursor: Scalars['String']; - /** The item at the end of the edge. */ - node: Motion; +export type MotionCreateInput = { + author: Scalars['String']; + memberCount: Scalars['Int']; + metaDescription: Scalars['String']; + method: Scalars['String']; + motionProposalArguments?: Maybe; + motionProposalHash: Scalars['String']; + motionProposalId: Scalars['Int']; + motionStatus?: Maybe; + preimage?: Maybe; + preimageHash?: Maybe; + section: Scalars['String']; + treasurySpendProposal?: Maybe; }; -export enum MotionOrderByInput { - AuthorAsc = 'author_ASC', - AuthorDesc = 'author_DESC', - IdAsc = 'id_ASC', - IdDesc = 'id_DESC', - MemberCountAsc = 'memberCount_ASC', - MemberCountDesc = 'memberCount_DESC', - MetaDescriptionAsc = 'metaDescription_ASC', - MetaDescriptionDesc = 'metaDescription_DESC', - MethodAsc = 'method_ASC', - MethodDesc = 'method_DESC', - MotionProposalHashAsc = 'motionProposalHash_ASC', - MotionProposalHashDesc = 'motionProposalHash_DESC', - MotionProposalIdAsc = 'motionProposalId_ASC', - MotionProposalIdDesc = 'motionProposalId_DESC', +export type MotionCreateOneWithoutMotionProposalArgumentsInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type MotionCreateOneWithoutMotionStatusInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type MotionCreateOneWithoutPreimageInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type MotionCreateOneWithoutTreasurySpendProposalInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type MotionCreateWithoutMotionProposalArgumentsInput = { + author: Scalars['String']; + memberCount: Scalars['Int']; + metaDescription: Scalars['String']; + method: Scalars['String']; + motionProposalHash: Scalars['String']; + motionProposalId: Scalars['Int']; + motionStatus?: Maybe; + preimage?: Maybe; + preimageHash?: Maybe; + section: Scalars['String']; + treasurySpendProposal?: Maybe; +}; + +export type MotionCreateWithoutMotionStatusInput = { + author: Scalars['String']; + memberCount: Scalars['Int']; + metaDescription: Scalars['String']; + method: Scalars['String']; + motionProposalArguments?: Maybe; + motionProposalHash: Scalars['String']; + motionProposalId: Scalars['Int']; + preimage?: Maybe; + preimageHash?: Maybe; + section: Scalars['String']; + treasurySpendProposal?: Maybe; +}; + +export type MotionCreateWithoutPreimageInput = { + author: Scalars['String']; + memberCount: Scalars['Int']; + metaDescription: Scalars['String']; + method: Scalars['String']; + motionProposalArguments?: Maybe; + motionProposalHash: Scalars['String']; + motionProposalId: Scalars['Int']; + motionStatus?: Maybe; + preimageHash?: Maybe; + section: Scalars['String']; + treasurySpendProposal?: Maybe; +}; + +export type MotionCreateWithoutTreasurySpendProposalInput = { + author: Scalars['String']; + memberCount: Scalars['Int']; + metaDescription: Scalars['String']; + method: Scalars['String']; + motionProposalArguments?: Maybe; + motionProposalHash: Scalars['String']; + motionProposalId: Scalars['Int']; + motionStatus?: Maybe; + preimage?: Maybe; + preimageHash?: Maybe; + section: Scalars['String']; +}; + +/** An edge in a connection. */ +export type MotionEdge = { + __typename?: 'MotionEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; + /** The item at the end of the edge. */ + node: Motion; +}; + +export enum MotionOrderByInput { + AuthorAsc = 'author_ASC', + AuthorDesc = 'author_DESC', + IdAsc = 'id_ASC', + IdDesc = 'id_DESC', + MemberCountAsc = 'memberCount_ASC', + MemberCountDesc = 'memberCount_DESC', + MetaDescriptionAsc = 'metaDescription_ASC', + MetaDescriptionDesc = 'metaDescription_DESC', + MethodAsc = 'method_ASC', + MethodDesc = 'method_DESC', + MotionProposalHashAsc = 'motionProposalHash_ASC', + MotionProposalHashDesc = 'motionProposalHash_DESC', + MotionProposalIdAsc = 'motionProposalId_ASC', + MotionProposalIdDesc = 'motionProposalId_DESC', PreimageHashAsc = 'preimageHash_ASC', PreimageHashDesc = 'preimageHash_DESC', SectionAsc = 'section_ASC', @@ -1241,6 +1667,24 @@ export type MotionProposalArgumentConnection = { pageInfo: PageInfo; }; +export type MotionProposalArgumentCreateInput = { + id?: Maybe; + motion: MotionCreateOneWithoutMotionProposalArgumentsInput; + name: Scalars['String']; + value: Scalars['String']; +}; + +export type MotionProposalArgumentCreateManyWithoutMotionInput = { + connect?: Maybe>; + create?: Maybe>; +}; + +export type MotionProposalArgumentCreateWithoutMotionInput = { + id?: Maybe; + name: Scalars['String']; + value: Scalars['String']; +}; + /** An edge in a connection. */ export type MotionProposalArgumentEdge = { __typename?: 'MotionProposalArgumentEdge'; @@ -1266,6 +1710,96 @@ export type MotionProposalArgumentPreviousValues = { value: Scalars['String']; }; +export type MotionProposalArgumentScalarWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + name?: Maybe; + /** All values containing the given string. */ + name_contains?: Maybe; + /** All values ending with the given string. */ + name_ends_with?: Maybe; + /** All values greater than the given value. */ + name_gt?: Maybe; + /** All values greater than or equal the given value. */ + name_gte?: Maybe; + /** All values that are contained in given list. */ + name_in?: Maybe>; + /** All values less than the given value. */ + name_lt?: Maybe; + /** All values less than or equal the given value. */ + name_lte?: Maybe; + /** All values that are not equal to given value. */ + name_not?: Maybe; + /** All values not containing the given string. */ + name_not_contains?: Maybe; + /** All values not ending with the given string. */ + name_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + name_not_in?: Maybe>; + /** All values not starting with the given string. */ + name_not_starts_with?: Maybe; + /** All values starting with the given string. */ + name_starts_with?: Maybe; + value?: Maybe; + /** All values containing the given string. */ + value_contains?: Maybe; + /** All values ending with the given string. */ + value_ends_with?: Maybe; + /** All values greater than the given value. */ + value_gt?: Maybe; + /** All values greater than or equal the given value. */ + value_gte?: Maybe; + /** All values that are contained in given list. */ + value_in?: Maybe>; + /** All values less than the given value. */ + value_lt?: Maybe; + /** All values less than or equal the given value. */ + value_lte?: Maybe; + /** All values that are not equal to given value. */ + value_not?: Maybe; + /** All values not containing the given string. */ + value_not_contains?: Maybe; + /** All values not ending with the given string. */ + value_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + value_not_in?: Maybe>; + /** All values not starting with the given string. */ + value_not_starts_with?: Maybe; + /** All values starting with the given string. */ + value_starts_with?: Maybe; +}; + export type MotionProposalArgumentSubscriptionPayload = { __typename?: 'MotionProposalArgumentSubscriptionPayload'; mutation: MutationType; @@ -1292,6 +1826,55 @@ export type MotionProposalArgumentSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type MotionProposalArgumentUpdateInput = { + motion?: Maybe; + name?: Maybe; + value?: Maybe; +}; + +export type MotionProposalArgumentUpdateManyDataInput = { + name?: Maybe; + value?: Maybe; +}; + +export type MotionProposalArgumentUpdateManyMutationInput = { + name?: Maybe; + value?: Maybe; +}; + +export type MotionProposalArgumentUpdateManyWithWhereNestedInput = { + data: MotionProposalArgumentUpdateManyDataInput; + where: MotionProposalArgumentScalarWhereInput; +}; + +export type MotionProposalArgumentUpdateManyWithoutMotionInput = { + connect?: Maybe>; + create?: Maybe>; + delete?: Maybe>; + deleteMany?: Maybe>; + disconnect?: Maybe>; + set?: Maybe>; + update?: Maybe>; + updateMany?: Maybe>; + upsert?: Maybe>; +}; + +export type MotionProposalArgumentUpdateWithWhereUniqueWithoutMotionInput = { + data: MotionProposalArgumentUpdateWithoutMotionDataInput; + where: MotionProposalArgumentWhereUniqueInput; +}; + +export type MotionProposalArgumentUpdateWithoutMotionDataInput = { + name?: Maybe; + value?: Maybe; +}; + +export type MotionProposalArgumentUpsertWithWhereUniqueWithoutMotionInput = { + create: MotionProposalArgumentCreateWithoutMotionInput; + update: MotionProposalArgumentUpdateWithoutMotionDataInput; + where: MotionProposalArgumentWhereUniqueInput; +}; + export type MotionProposalArgumentWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -1406,6 +1989,26 @@ export type MotionStatusConnection = { pageInfo: PageInfo; }; +export type MotionStatusCreateInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + motion: MotionCreateOneWithoutMotionStatusInput; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + +export type MotionStatusCreateManyWithoutMotionInput = { + connect?: Maybe>; + create?: Maybe>; +}; + +export type MotionStatusCreateWithoutMotionInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + /** An edge in a connection. */ export type MotionStatusEdge = { __typename?: 'MotionStatusEdge'; @@ -1431,40 +2034,13 @@ export type MotionStatusPreviousValues = { uniqueStatus: Scalars['String']; }; -export type MotionStatusSubscriptionPayload = { - __typename?: 'MotionStatusSubscriptionPayload'; - mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; - updatedFields?: Maybe>; -}; - -export type MotionStatusSubscriptionWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - /** The subscription event gets dispatched when it's listed in mutation_in */ - mutation_in?: Maybe>; - node?: Maybe; - /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ - updatedFields_contains?: Maybe; - /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ - updatedFields_contains_every?: Maybe>; - /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ - updatedFields_contains_some?: Maybe>; -}; - -export type MotionStatusWhereInput = { +export type MotionStatusScalarWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; - blockNumber?: Maybe; + OR?: Maybe>; id?: Maybe; /** All values containing the given string. */ id_contains?: Maybe; @@ -1492,7 +2068,6 @@ export type MotionStatusWhereInput = { id_not_starts_with?: Maybe; /** All values starting with the given string. */ id_starts_with?: Maybe; - motion?: Maybe; status?: Maybe; /** All values containing the given string. */ status_contains?: Maybe; @@ -1549,22 +2124,191 @@ export type MotionStatusWhereInput = { uniqueStatus_starts_with?: Maybe; }; -export type MotionStatusWhereUniqueInput = { - id?: Maybe; - uniqueStatus?: Maybe; -}; - -export type MotionSubscriptionPayload = { - __typename?: 'MotionSubscriptionPayload'; +export type MotionStatusSubscriptionPayload = { + __typename?: 'MotionStatusSubscriptionPayload'; mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; + node?: Maybe; + previousValues?: Maybe; updatedFields?: Maybe>; }; -export type MotionSubscriptionWhereInput = { +export type MotionStatusSubscriptionWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; +}; + +export type MotionStatusUpdateInput = { + blockNumber?: Maybe; + motion?: Maybe; + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type MotionStatusUpdateManyDataInput = { + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type MotionStatusUpdateManyMutationInput = { + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type MotionStatusUpdateManyWithWhereNestedInput = { + data: MotionStatusUpdateManyDataInput; + where: MotionStatusScalarWhereInput; +}; + +export type MotionStatusUpdateManyWithoutMotionInput = { + connect?: Maybe>; + create?: Maybe>; + delete?: Maybe>; + deleteMany?: Maybe>; + disconnect?: Maybe>; + set?: Maybe>; + update?: Maybe>; + updateMany?: Maybe>; + upsert?: Maybe>; +}; + +export type MotionStatusUpdateWithWhereUniqueWithoutMotionInput = { + data: MotionStatusUpdateWithoutMotionDataInput; + where: MotionStatusWhereUniqueInput; +}; + +export type MotionStatusUpdateWithoutMotionDataInput = { + blockNumber?: Maybe; + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type MotionStatusUpsertWithWhereUniqueWithoutMotionInput = { + create: MotionStatusCreateWithoutMotionInput; + update: MotionStatusUpdateWithoutMotionDataInput; + where: MotionStatusWhereUniqueInput; +}; + +export type MotionStatusWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + blockNumber?: Maybe; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + motion?: Maybe; + status?: Maybe; + /** All values containing the given string. */ + status_contains?: Maybe; + /** All values ending with the given string. */ + status_ends_with?: Maybe; + /** All values greater than the given value. */ + status_gt?: Maybe; + /** All values greater than or equal the given value. */ + status_gte?: Maybe; + /** All values that are contained in given list. */ + status_in?: Maybe>; + /** All values less than the given value. */ + status_lt?: Maybe; + /** All values less than or equal the given value. */ + status_lte?: Maybe; + /** All values that are not equal to given value. */ + status_not?: Maybe; + /** All values not containing the given string. */ + status_not_contains?: Maybe; + /** All values not ending with the given string. */ + status_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + status_not_in?: Maybe>; + /** All values not starting with the given string. */ + status_not_starts_with?: Maybe; + /** All values starting with the given string. */ + status_starts_with?: Maybe; + uniqueStatus?: Maybe; + /** All values containing the given string. */ + uniqueStatus_contains?: Maybe; + /** All values ending with the given string. */ + uniqueStatus_ends_with?: Maybe; + /** All values greater than the given value. */ + uniqueStatus_gt?: Maybe; + /** All values greater than or equal the given value. */ + uniqueStatus_gte?: Maybe; + /** All values that are contained in given list. */ + uniqueStatus_in?: Maybe>; + /** All values less than the given value. */ + uniqueStatus_lt?: Maybe; + /** All values less than or equal the given value. */ + uniqueStatus_lte?: Maybe; + /** All values that are not equal to given value. */ + uniqueStatus_not?: Maybe; + /** All values not containing the given string. */ + uniqueStatus_not_contains?: Maybe; + /** All values not ending with the given string. */ + uniqueStatus_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + uniqueStatus_not_in?: Maybe>; + /** All values not starting with the given string. */ + uniqueStatus_not_starts_with?: Maybe; + /** All values starting with the given string. */ + uniqueStatus_starts_with?: Maybe; +}; + +export type MotionStatusWhereUniqueInput = { + id?: Maybe; + uniqueStatus?: Maybe; +}; + +export type MotionSubscriptionPayload = { + __typename?: 'MotionSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; +}; + +export type MotionSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ NOT?: Maybe>; /** Logical OR on all given filters. */ @@ -1580,6 +2324,140 @@ export type MotionSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type MotionUpdateInput = { + author?: Maybe; + memberCount?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + motionProposalArguments?: Maybe; + motionProposalHash?: Maybe; + motionProposalId?: Maybe; + motionStatus?: Maybe; + preimage?: Maybe; + preimageHash?: Maybe; + section?: Maybe; + treasurySpendProposal?: Maybe; +}; + +export type MotionUpdateManyMutationInput = { + author?: Maybe; + memberCount?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + motionProposalHash?: Maybe; + motionProposalId?: Maybe; + preimageHash?: Maybe; + section?: Maybe; +}; + +export type MotionUpdateOneRequiredWithoutMotionProposalArgumentsInput = { + connect?: Maybe; + create?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type MotionUpdateOneRequiredWithoutMotionStatusInput = { + connect?: Maybe; + create?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type MotionUpdateOneWithoutPreimageInput = { + connect?: Maybe; + create?: Maybe; + delete?: Maybe; + disconnect?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type MotionUpdateOneWithoutTreasurySpendProposalInput = { + connect?: Maybe; + create?: Maybe; + delete?: Maybe; + disconnect?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type MotionUpdateWithoutMotionProposalArgumentsDataInput = { + author?: Maybe; + memberCount?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + motionProposalHash?: Maybe; + motionProposalId?: Maybe; + motionStatus?: Maybe; + preimage?: Maybe; + preimageHash?: Maybe; + section?: Maybe; + treasurySpendProposal?: Maybe; +}; + +export type MotionUpdateWithoutMotionStatusDataInput = { + author?: Maybe; + memberCount?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + motionProposalArguments?: Maybe; + motionProposalHash?: Maybe; + motionProposalId?: Maybe; + preimage?: Maybe; + preimageHash?: Maybe; + section?: Maybe; + treasurySpendProposal?: Maybe; +}; + +export type MotionUpdateWithoutPreimageDataInput = { + author?: Maybe; + memberCount?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + motionProposalArguments?: Maybe; + motionProposalHash?: Maybe; + motionProposalId?: Maybe; + motionStatus?: Maybe; + preimageHash?: Maybe; + section?: Maybe; + treasurySpendProposal?: Maybe; +}; + +export type MotionUpdateWithoutTreasurySpendProposalDataInput = { + author?: Maybe; + memberCount?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + motionProposalArguments?: Maybe; + motionProposalHash?: Maybe; + motionProposalId?: Maybe; + motionStatus?: Maybe; + preimage?: Maybe; + preimageHash?: Maybe; + section?: Maybe; +}; + +export type MotionUpsertWithoutMotionProposalArgumentsInput = { + create: MotionCreateWithoutMotionProposalArgumentsInput; + update: MotionUpdateWithoutMotionProposalArgumentsDataInput; +}; + +export type MotionUpsertWithoutMotionStatusInput = { + create: MotionCreateWithoutMotionStatusInput; + update: MotionUpdateWithoutMotionStatusDataInput; +}; + +export type MotionUpsertWithoutPreimageInput = { + create: MotionCreateWithoutPreimageInput; + update: MotionUpdateWithoutPreimageDataInput; +}; + +export type MotionUpsertWithoutTreasurySpendProposalInput = { + create: MotionCreateWithoutTreasurySpendProposalInput; + update: MotionUpdateWithoutTreasurySpendProposalDataInput; +}; + export type MotionWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -2230,6 +3108,16 @@ export type NominationConnection = { pageInfo: PageInfo; }; +export type NominationCreateInput = { + id?: Maybe; + nominatorController: Scalars['String']; + nominatorStash: Scalars['String']; + session: SessionCreateOneInput; + stakedAmount: Scalars['String']; + validatorController: Scalars['String']; + validatorStash: Scalars['String']; +}; + /** An edge in a connection. */ export type NominationEdge = { __typename?: 'NominationEdge'; @@ -2290,6 +3178,23 @@ export type NominationSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type NominationUpdateInput = { + nominatorController?: Maybe; + nominatorStash?: Maybe; + session?: Maybe; + stakedAmount?: Maybe; + validatorController?: Maybe; + validatorStash?: Maybe; +}; + +export type NominationUpdateManyMutationInput = { + nominatorController?: Maybe; + nominatorStash?: Maybe; + stakedAmount?: Maybe; + validatorController?: Maybe; + validatorStash?: Maybe; +}; + export type NominationWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -2501,6 +3406,19 @@ export type OfflineValidatorConnection = { pageInfo: PageInfo; }; +export type OfflineValidatorCreateInput = { + id?: Maybe; + others?: Maybe; + own: Scalars['String']; + sessionIndex: SessionCreateOneInput; + total: Scalars['String']; + validatorId: Scalars['String']; +}; + +export type OfflineValidatorCreateothersInput = { + set?: Maybe>; +}; + /** An edge in a connection. */ export type OfflineValidatorEdge = { __typename?: 'OfflineValidatorEdge'; @@ -2556,6 +3474,25 @@ export type OfflineValidatorSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type OfflineValidatorUpdateInput = { + others?: Maybe; + own?: Maybe; + sessionIndex?: Maybe; + total?: Maybe; + validatorId?: Maybe; +}; + +export type OfflineValidatorUpdateManyMutationInput = { + others?: Maybe; + own?: Maybe; + total?: Maybe; + validatorId?: Maybe; +}; + +export type OfflineValidatorUpdateothersInput = { + set?: Maybe>; +}; + export type OfflineValidatorWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -2747,6 +3684,24 @@ export type PreimageArgumentConnection = { pageInfo: PageInfo; }; +export type PreimageArgumentCreateInput = { + id?: Maybe; + name: Scalars['String']; + preimage: PreimageCreateOneWithoutPreimageArgumentsInput; + value: Scalars['String']; +}; + +export type PreimageArgumentCreateManyWithoutPreimageInput = { + connect?: Maybe>; + create?: Maybe>; +}; + +export type PreimageArgumentCreateWithoutPreimageInput = { + id?: Maybe; + name: Scalars['String']; + value: Scalars['String']; +}; + /** An edge in a connection. */ export type PreimageArgumentEdge = { __typename?: 'PreimageArgumentEdge'; @@ -2772,6 +3727,96 @@ export type PreimageArgumentPreviousValues = { value: Scalars['String']; }; +export type PreimageArgumentScalarWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + name?: Maybe; + /** All values containing the given string. */ + name_contains?: Maybe; + /** All values ending with the given string. */ + name_ends_with?: Maybe; + /** All values greater than the given value. */ + name_gt?: Maybe; + /** All values greater than or equal the given value. */ + name_gte?: Maybe; + /** All values that are contained in given list. */ + name_in?: Maybe>; + /** All values less than the given value. */ + name_lt?: Maybe; + /** All values less than or equal the given value. */ + name_lte?: Maybe; + /** All values that are not equal to given value. */ + name_not?: Maybe; + /** All values not containing the given string. */ + name_not_contains?: Maybe; + /** All values not ending with the given string. */ + name_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + name_not_in?: Maybe>; + /** All values not starting with the given string. */ + name_not_starts_with?: Maybe; + /** All values starting with the given string. */ + name_starts_with?: Maybe; + value?: Maybe; + /** All values containing the given string. */ + value_contains?: Maybe; + /** All values ending with the given string. */ + value_ends_with?: Maybe; + /** All values greater than the given value. */ + value_gt?: Maybe; + /** All values greater than or equal the given value. */ + value_gte?: Maybe; + /** All values that are contained in given list. */ + value_in?: Maybe>; + /** All values less than the given value. */ + value_lt?: Maybe; + /** All values less than or equal the given value. */ + value_lte?: Maybe; + /** All values that are not equal to given value. */ + value_not?: Maybe; + /** All values not containing the given string. */ + value_not_contains?: Maybe; + /** All values not ending with the given string. */ + value_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + value_not_in?: Maybe>; + /** All values not starting with the given string. */ + value_not_starts_with?: Maybe; + /** All values starting with the given string. */ + value_starts_with?: Maybe; +}; + export type PreimageArgumentSubscriptionPayload = { __typename?: 'PreimageArgumentSubscriptionPayload'; mutation: MutationType; @@ -2798,6 +3843,55 @@ export type PreimageArgumentSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type PreimageArgumentUpdateInput = { + name?: Maybe; + preimage?: Maybe; + value?: Maybe; +}; + +export type PreimageArgumentUpdateManyDataInput = { + name?: Maybe; + value?: Maybe; +}; + +export type PreimageArgumentUpdateManyMutationInput = { + name?: Maybe; + value?: Maybe; +}; + +export type PreimageArgumentUpdateManyWithWhereNestedInput = { + data: PreimageArgumentUpdateManyDataInput; + where: PreimageArgumentScalarWhereInput; +}; + +export type PreimageArgumentUpdateManyWithoutPreimageInput = { + connect?: Maybe>; + create?: Maybe>; + delete?: Maybe>; + deleteMany?: Maybe>; + disconnect?: Maybe>; + set?: Maybe>; + update?: Maybe>; + updateMany?: Maybe>; + upsert?: Maybe>; +}; + +export type PreimageArgumentUpdateWithWhereUniqueWithoutPreimageInput = { + data: PreimageArgumentUpdateWithoutPreimageDataInput; + where: PreimageArgumentWhereUniqueInput; +}; + +export type PreimageArgumentUpdateWithoutPreimageDataInput = { + name?: Maybe; + value?: Maybe; +}; + +export type PreimageArgumentUpsertWithWhereUniqueWithoutPreimageInput = { + create: PreimageArgumentCreateWithoutPreimageInput; + update: PreimageArgumentUpdateWithoutPreimageDataInput; + where: PreimageArgumentWhereUniqueInput; +}; + export type PreimageArgumentWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -2903,6 +3997,116 @@ export type PreimageConnection = { pageInfo: PageInfo; }; +export type PreimageCreateInput = { + author: Scalars['String']; + depositAmount: Scalars['String']; + hash: Scalars['String']; + id?: Maybe; + metaDescription: Scalars['String']; + method: Scalars['String']; + motion?: Maybe; + preimageArguments?: Maybe; + preimageStatus?: Maybe; + proposal?: Maybe; + referendum?: Maybe; + section: Scalars['String']; +}; + +export type PreimageCreateOneWithoutMotionInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type PreimageCreateOneWithoutPreimageArgumentsInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type PreimageCreateOneWithoutPreimageStatusInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type PreimageCreateOneWithoutProposalInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type PreimageCreateOneWithoutReferendumInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type PreimageCreateWithoutMotionInput = { + author: Scalars['String']; + depositAmount: Scalars['String']; + hash: Scalars['String']; + id?: Maybe; + metaDescription: Scalars['String']; + method: Scalars['String']; + preimageArguments?: Maybe; + preimageStatus?: Maybe; + proposal?: Maybe; + referendum?: Maybe; + section: Scalars['String']; +}; + +export type PreimageCreateWithoutPreimageArgumentsInput = { + author: Scalars['String']; + depositAmount: Scalars['String']; + hash: Scalars['String']; + id?: Maybe; + metaDescription: Scalars['String']; + method: Scalars['String']; + motion?: Maybe; + preimageStatus?: Maybe; + proposal?: Maybe; + referendum?: Maybe; + section: Scalars['String']; +}; + +export type PreimageCreateWithoutPreimageStatusInput = { + author: Scalars['String']; + depositAmount: Scalars['String']; + hash: Scalars['String']; + id?: Maybe; + metaDescription: Scalars['String']; + method: Scalars['String']; + motion?: Maybe; + preimageArguments?: Maybe; + proposal?: Maybe; + referendum?: Maybe; + section: Scalars['String']; +}; + +export type PreimageCreateWithoutProposalInput = { + author: Scalars['String']; + depositAmount: Scalars['String']; + hash: Scalars['String']; + id?: Maybe; + metaDescription: Scalars['String']; + method: Scalars['String']; + motion?: Maybe; + preimageArguments?: Maybe; + preimageStatus?: Maybe; + referendum?: Maybe; + section: Scalars['String']; +}; + +export type PreimageCreateWithoutReferendumInput = { + author: Scalars['String']; + depositAmount: Scalars['String']; + hash: Scalars['String']; + id?: Maybe; + metaDescription: Scalars['String']; + method: Scalars['String']; + motion?: Maybe; + preimageArguments?: Maybe; + preimageStatus?: Maybe; + proposal?: Maybe; + section: Scalars['String']; +}; + /** An edge in a connection. */ export type PreimageEdge = { __typename?: 'PreimageEdge'; @@ -2958,6 +4162,24 @@ export type PreimageStatusConnection = { pageInfo: PageInfo; }; +export type PreimageStatusCreateInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + preimage: PreimageCreateOneWithoutPreimageStatusInput; + status: Scalars['String']; +}; + +export type PreimageStatusCreateManyWithoutPreimageInput = { + connect?: Maybe>; + create?: Maybe>; +}; + +export type PreimageStatusCreateWithoutPreimageInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + status: Scalars['String']; +}; + /** An edge in a connection. */ export type PreimageStatusEdge = { __typename?: 'PreimageStatusEdge'; @@ -2980,40 +4202,13 @@ export type PreimageStatusPreviousValues = { status: Scalars['String']; }; -export type PreimageStatusSubscriptionPayload = { - __typename?: 'PreimageStatusSubscriptionPayload'; - mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; - updatedFields?: Maybe>; -}; - -export type PreimageStatusSubscriptionWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - /** The subscription event gets dispatched when it's listed in mutation_in */ - mutation_in?: Maybe>; - node?: Maybe; - /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ - updatedFields_contains?: Maybe; - /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ - updatedFields_contains_every?: Maybe>; - /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ - updatedFields_contains_some?: Maybe>; -}; - -export type PreimageStatusWhereInput = { +export type PreimageStatusScalarWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; - blockNumber?: Maybe; + OR?: Maybe>; id?: Maybe; /** All values containing the given string. */ id_contains?: Maybe; @@ -3041,7 +4236,6 @@ export type PreimageStatusWhereInput = { id_not_starts_with?: Maybe; /** All values starting with the given string. */ id_starts_with?: Maybe; - preimage?: Maybe; status?: Maybe; /** All values containing the given string. */ status_contains?: Maybe; @@ -3071,19 +4265,157 @@ export type PreimageStatusWhereInput = { status_starts_with?: Maybe; }; -export type PreimageStatusWhereUniqueInput = { - id?: Maybe; -}; - -export type PreimageSubscriptionPayload = { - __typename?: 'PreimageSubscriptionPayload'; +export type PreimageStatusSubscriptionPayload = { + __typename?: 'PreimageStatusSubscriptionPayload'; mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; + node?: Maybe; + previousValues?: Maybe; updatedFields?: Maybe>; }; -export type PreimageSubscriptionWhereInput = { +export type PreimageStatusSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; +}; + +export type PreimageStatusUpdateInput = { + blockNumber?: Maybe; + preimage?: Maybe; + status?: Maybe; +}; + +export type PreimageStatusUpdateManyDataInput = { + status?: Maybe; +}; + +export type PreimageStatusUpdateManyMutationInput = { + status?: Maybe; +}; + +export type PreimageStatusUpdateManyWithWhereNestedInput = { + data: PreimageStatusUpdateManyDataInput; + where: PreimageStatusScalarWhereInput; +}; + +export type PreimageStatusUpdateManyWithoutPreimageInput = { + connect?: Maybe>; + create?: Maybe>; + delete?: Maybe>; + deleteMany?: Maybe>; + disconnect?: Maybe>; + set?: Maybe>; + update?: Maybe>; + updateMany?: Maybe>; + upsert?: Maybe>; +}; + +export type PreimageStatusUpdateWithWhereUniqueWithoutPreimageInput = { + data: PreimageStatusUpdateWithoutPreimageDataInput; + where: PreimageStatusWhereUniqueInput; +}; + +export type PreimageStatusUpdateWithoutPreimageDataInput = { + blockNumber?: Maybe; + status?: Maybe; +}; + +export type PreimageStatusUpsertWithWhereUniqueWithoutPreimageInput = { + create: PreimageStatusCreateWithoutPreimageInput; + update: PreimageStatusUpdateWithoutPreimageDataInput; + where: PreimageStatusWhereUniqueInput; +}; + +export type PreimageStatusWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + blockNumber?: Maybe; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + preimage?: Maybe; + status?: Maybe; + /** All values containing the given string. */ + status_contains?: Maybe; + /** All values ending with the given string. */ + status_ends_with?: Maybe; + /** All values greater than the given value. */ + status_gt?: Maybe; + /** All values greater than or equal the given value. */ + status_gte?: Maybe; + /** All values that are contained in given list. */ + status_in?: Maybe>; + /** All values less than the given value. */ + status_lt?: Maybe; + /** All values less than or equal the given value. */ + status_lte?: Maybe; + /** All values that are not equal to given value. */ + status_not?: Maybe; + /** All values not containing the given string. */ + status_not_contains?: Maybe; + /** All values not ending with the given string. */ + status_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + status_not_in?: Maybe>; + /** All values not starting with the given string. */ + status_not_starts_with?: Maybe; + /** All values starting with the given string. */ + status_starts_with?: Maybe; +}; + +export type PreimageStatusWhereUniqueInput = { + id?: Maybe; +}; + +export type PreimageSubscriptionPayload = { + __typename?: 'PreimageSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; +}; + +export type PreimageSubscriptionWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ @@ -3101,6 +4433,160 @@ export type PreimageSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type PreimageUpdateInput = { + author?: Maybe; + depositAmount?: Maybe; + hash?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + motion?: Maybe; + preimageArguments?: Maybe; + preimageStatus?: Maybe; + proposal?: Maybe; + referendum?: Maybe; + section?: Maybe; +}; + +export type PreimageUpdateManyMutationInput = { + author?: Maybe; + depositAmount?: Maybe; + hash?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + section?: Maybe; +}; + +export type PreimageUpdateOneRequiredWithoutPreimageArgumentsInput = { + connect?: Maybe; + create?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type PreimageUpdateOneRequiredWithoutPreimageStatusInput = { + connect?: Maybe; + create?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type PreimageUpdateOneWithoutMotionInput = { + connect?: Maybe; + create?: Maybe; + delete?: Maybe; + disconnect?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type PreimageUpdateOneWithoutProposalInput = { + connect?: Maybe; + create?: Maybe; + delete?: Maybe; + disconnect?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type PreimageUpdateOneWithoutReferendumInput = { + connect?: Maybe; + create?: Maybe; + delete?: Maybe; + disconnect?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type PreimageUpdateWithoutMotionDataInput = { + author?: Maybe; + depositAmount?: Maybe; + hash?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + preimageArguments?: Maybe; + preimageStatus?: Maybe; + proposal?: Maybe; + referendum?: Maybe; + section?: Maybe; +}; + +export type PreimageUpdateWithoutPreimageArgumentsDataInput = { + author?: Maybe; + depositAmount?: Maybe; + hash?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + motion?: Maybe; + preimageStatus?: Maybe; + proposal?: Maybe; + referendum?: Maybe; + section?: Maybe; +}; + +export type PreimageUpdateWithoutPreimageStatusDataInput = { + author?: Maybe; + depositAmount?: Maybe; + hash?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + motion?: Maybe; + preimageArguments?: Maybe; + proposal?: Maybe; + referendum?: Maybe; + section?: Maybe; +}; + +export type PreimageUpdateWithoutProposalDataInput = { + author?: Maybe; + depositAmount?: Maybe; + hash?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + motion?: Maybe; + preimageArguments?: Maybe; + preimageStatus?: Maybe; + referendum?: Maybe; + section?: Maybe; +}; + +export type PreimageUpdateWithoutReferendumDataInput = { + author?: Maybe; + depositAmount?: Maybe; + hash?: Maybe; + metaDescription?: Maybe; + method?: Maybe; + motion?: Maybe; + preimageArguments?: Maybe; + preimageStatus?: Maybe; + proposal?: Maybe; + section?: Maybe; +}; + +export type PreimageUpsertWithoutMotionInput = { + create: PreimageCreateWithoutMotionInput; + update: PreimageUpdateWithoutMotionDataInput; +}; + +export type PreimageUpsertWithoutPreimageArgumentsInput = { + create: PreimageCreateWithoutPreimageArgumentsInput; + update: PreimageUpdateWithoutPreimageArgumentsDataInput; +}; + +export type PreimageUpsertWithoutPreimageStatusInput = { + create: PreimageCreateWithoutPreimageStatusInput; + update: PreimageUpdateWithoutPreimageStatusDataInput; +}; + +export type PreimageUpsertWithoutProposalInput = { + create: PreimageCreateWithoutProposalInput; + update: PreimageUpdateWithoutProposalDataInput; +}; + +export type PreimageUpsertWithoutReferendumInput = { + create: PreimageCreateWithoutReferendumInput; + update: PreimageUpdateWithoutReferendumDataInput; +}; + export type PreimageWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -3312,6 +4798,10 @@ export type PreimageWhereUniqueInput = { id?: Maybe; }; +export enum PrismaDatabase { + Default = 'default' +} + export type Proposal = { __typename?: 'Proposal'; author: Scalars['String']; @@ -3344,6 +4834,41 @@ export type ProposalConnection = { pageInfo: PageInfo; }; +export type ProposalCreateInput = { + author: Scalars['String']; + depositAmount: Scalars['String']; + preimage?: Maybe; + preimageHash: Scalars['String']; + proposalId: Scalars['Int']; + proposalStatus?: Maybe; +}; + +export type ProposalCreateOneWithoutPreimageInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type ProposalCreateOneWithoutProposalStatusInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type ProposalCreateWithoutPreimageInput = { + author: Scalars['String']; + depositAmount: Scalars['String']; + preimageHash: Scalars['String']; + proposalId: Scalars['Int']; + proposalStatus?: Maybe; +}; + +export type ProposalCreateWithoutProposalStatusInput = { + author: Scalars['String']; + depositAmount: Scalars['String']; + preimage?: Maybe; + preimageHash: Scalars['String']; + proposalId: Scalars['Int']; +}; + /** An edge in a connection. */ export type ProposalEdge = { __typename?: 'ProposalEdge'; @@ -3394,6 +4919,26 @@ export type ProposalStatusConnection = { pageInfo: PageInfo; }; +export type ProposalStatusCreateInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + proposal: ProposalCreateOneWithoutProposalStatusInput; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + +export type ProposalStatusCreateManyWithoutProposalInput = { + connect?: Maybe>; + create?: Maybe>; +}; + +export type ProposalStatusCreateWithoutProposalInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + /** An edge in a connection. */ export type ProposalStatusEdge = { __typename?: 'ProposalStatusEdge'; @@ -3419,36 +4964,177 @@ export type ProposalStatusPreviousValues = { uniqueStatus: Scalars['String']; }; -export type ProposalStatusSubscriptionPayload = { - __typename?: 'ProposalStatusSubscriptionPayload'; - mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; - updatedFields?: Maybe>; -}; - -export type ProposalStatusSubscriptionWhereInput = { +export type ProposalStatusScalarWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; - /** The subscription event gets dispatched when it's listed in mutation_in */ - mutation_in?: Maybe>; - node?: Maybe; - /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ - updatedFields_contains?: Maybe; - /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ - updatedFields_contains_every?: Maybe>; - /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ - updatedFields_contains_some?: Maybe>; -}; - -export type ProposalStatusWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ + OR?: Maybe>; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + status?: Maybe; + /** All values containing the given string. */ + status_contains?: Maybe; + /** All values ending with the given string. */ + status_ends_with?: Maybe; + /** All values greater than the given value. */ + status_gt?: Maybe; + /** All values greater than or equal the given value. */ + status_gte?: Maybe; + /** All values that are contained in given list. */ + status_in?: Maybe>; + /** All values less than the given value. */ + status_lt?: Maybe; + /** All values less than or equal the given value. */ + status_lte?: Maybe; + /** All values that are not equal to given value. */ + status_not?: Maybe; + /** All values not containing the given string. */ + status_not_contains?: Maybe; + /** All values not ending with the given string. */ + status_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + status_not_in?: Maybe>; + /** All values not starting with the given string. */ + status_not_starts_with?: Maybe; + /** All values starting with the given string. */ + status_starts_with?: Maybe; + uniqueStatus?: Maybe; + /** All values containing the given string. */ + uniqueStatus_contains?: Maybe; + /** All values ending with the given string. */ + uniqueStatus_ends_with?: Maybe; + /** All values greater than the given value. */ + uniqueStatus_gt?: Maybe; + /** All values greater than or equal the given value. */ + uniqueStatus_gte?: Maybe; + /** All values that are contained in given list. */ + uniqueStatus_in?: Maybe>; + /** All values less than the given value. */ + uniqueStatus_lt?: Maybe; + /** All values less than or equal the given value. */ + uniqueStatus_lte?: Maybe; + /** All values that are not equal to given value. */ + uniqueStatus_not?: Maybe; + /** All values not containing the given string. */ + uniqueStatus_not_contains?: Maybe; + /** All values not ending with the given string. */ + uniqueStatus_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + uniqueStatus_not_in?: Maybe>; + /** All values not starting with the given string. */ + uniqueStatus_not_starts_with?: Maybe; + /** All values starting with the given string. */ + uniqueStatus_starts_with?: Maybe; +}; + +export type ProposalStatusSubscriptionPayload = { + __typename?: 'ProposalStatusSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; +}; + +export type ProposalStatusSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; +}; + +export type ProposalStatusUpdateInput = { + blockNumber?: Maybe; + proposal?: Maybe; + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type ProposalStatusUpdateManyDataInput = { + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type ProposalStatusUpdateManyMutationInput = { + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type ProposalStatusUpdateManyWithWhereNestedInput = { + data: ProposalStatusUpdateManyDataInput; + where: ProposalStatusScalarWhereInput; +}; + +export type ProposalStatusUpdateManyWithoutProposalInput = { + connect?: Maybe>; + create?: Maybe>; + delete?: Maybe>; + deleteMany?: Maybe>; + disconnect?: Maybe>; + set?: Maybe>; + update?: Maybe>; + updateMany?: Maybe>; + upsert?: Maybe>; +}; + +export type ProposalStatusUpdateWithWhereUniqueWithoutProposalInput = { + data: ProposalStatusUpdateWithoutProposalDataInput; + where: ProposalStatusWhereUniqueInput; +}; + +export type ProposalStatusUpdateWithoutProposalDataInput = { + blockNumber?: Maybe; + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type ProposalStatusUpsertWithWhereUniqueWithoutProposalInput = { + create: ProposalStatusCreateWithoutProposalInput; + update: ProposalStatusUpdateWithoutProposalDataInput; + where: ProposalStatusWhereUniqueInput; +}; + +export type ProposalStatusWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ NOT?: Maybe>; /** Logical OR on all given filters. */ OR?: Maybe>; @@ -3568,6 +5254,64 @@ export type ProposalSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type ProposalUpdateInput = { + author?: Maybe; + depositAmount?: Maybe; + preimage?: Maybe; + preimageHash?: Maybe; + proposalId?: Maybe; + proposalStatus?: Maybe; +}; + +export type ProposalUpdateManyMutationInput = { + author?: Maybe; + depositAmount?: Maybe; + preimageHash?: Maybe; + proposalId?: Maybe; +}; + +export type ProposalUpdateOneRequiredWithoutProposalStatusInput = { + connect?: Maybe; + create?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type ProposalUpdateOneWithoutPreimageInput = { + connect?: Maybe; + create?: Maybe; + delete?: Maybe; + disconnect?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type ProposalUpdateWithoutPreimageDataInput = { + author?: Maybe; + depositAmount?: Maybe; + preimageHash?: Maybe; + proposalId?: Maybe; + proposalStatus?: Maybe; +}; + +export type ProposalUpdateWithoutProposalStatusDataInput = { + author?: Maybe; + depositAmount?: Maybe; + preimage?: Maybe; + preimageHash?: Maybe; + proposalId?: Maybe; +}; + +export type ProposalUpsertWithoutPreimageInput = { + create: ProposalCreateWithoutPreimageInput; + update: ProposalUpdateWithoutPreimageDataInput; +}; + +export type ProposalUpsertWithoutProposalStatusInput = { + create: ProposalCreateWithoutProposalStatusInput; + update: ProposalUpdateWithoutProposalStatusDataInput; +}; + export type ProposalWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -3876,6 +5620,44 @@ export type ReferendumConnection = { pageInfo: PageInfo; }; +export type ReferendumCreateInput = { + delay: Scalars['Int']; + end: Scalars['Int']; + preimage?: Maybe; + preimageHash: Scalars['String']; + referendumId: Scalars['Int']; + referendumStatus?: Maybe; + voteThreshold: Scalars['String']; +}; + +export type ReferendumCreateOneWithoutPreimageInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type ReferendumCreateOneWithoutReferendumStatusInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type ReferendumCreateWithoutPreimageInput = { + delay: Scalars['Int']; + end: Scalars['Int']; + preimageHash: Scalars['String']; + referendumId: Scalars['Int']; + referendumStatus?: Maybe; + voteThreshold: Scalars['String']; +}; + +export type ReferendumCreateWithoutReferendumStatusInput = { + delay: Scalars['Int']; + end: Scalars['Int']; + preimage?: Maybe; + preimageHash: Scalars['String']; + referendumId: Scalars['Int']; + voteThreshold: Scalars['String']; +}; + /** An edge in a connection. */ export type ReferendumEdge = { __typename?: 'ReferendumEdge'; @@ -3929,6 +5711,26 @@ export type ReferendumStatusConnection = { pageInfo: PageInfo; }; +export type ReferendumStatusCreateInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + referendum: ReferendumCreateOneWithoutReferendumStatusInput; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + +export type ReferendumStatusCreateManyWithoutReferendumInput = { + connect?: Maybe>; + create?: Maybe>; +}; + +export type ReferendumStatusCreateWithoutReferendumInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + /** An edge in a connection. */ export type ReferendumStatusEdge = { __typename?: 'ReferendumStatusEdge'; @@ -3954,40 +5756,13 @@ export type ReferendumStatusPreviousValues = { uniqueStatus: Scalars['String']; }; -export type ReferendumStatusSubscriptionPayload = { - __typename?: 'ReferendumStatusSubscriptionPayload'; - mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; - updatedFields?: Maybe>; -}; - -export type ReferendumStatusSubscriptionWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - /** The subscription event gets dispatched when it's listed in mutation_in */ - mutation_in?: Maybe>; - node?: Maybe; - /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ - updatedFields_contains?: Maybe; - /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ - updatedFields_contains_every?: Maybe>; - /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ - updatedFields_contains_some?: Maybe>; -}; - -export type ReferendumStatusWhereInput = { +export type ReferendumStatusScalarWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; - blockNumber?: Maybe; + OR?: Maybe>; id?: Maybe; /** All values containing the given string. */ id_contains?: Maybe; @@ -4015,7 +5790,6 @@ export type ReferendumStatusWhereInput = { id_not_starts_with?: Maybe; /** All values starting with the given string. */ id_starts_with?: Maybe; - referendum?: Maybe; status?: Maybe; /** All values containing the given string. */ status_contains?: Maybe; @@ -4072,22 +5846,191 @@ export type ReferendumStatusWhereInput = { uniqueStatus_starts_with?: Maybe; }; -export type ReferendumStatusWhereUniqueInput = { - id?: Maybe; - uniqueStatus?: Maybe; -}; - -export type ReferendumSubscriptionPayload = { - __typename?: 'ReferendumSubscriptionPayload'; +export type ReferendumStatusSubscriptionPayload = { + __typename?: 'ReferendumStatusSubscriptionPayload'; mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; + node?: Maybe; + previousValues?: Maybe; updatedFields?: Maybe>; }; -export type ReferendumSubscriptionWhereInput = { +export type ReferendumStatusSubscriptionWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; +}; + +export type ReferendumStatusUpdateInput = { + blockNumber?: Maybe; + referendum?: Maybe; + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type ReferendumStatusUpdateManyDataInput = { + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type ReferendumStatusUpdateManyMutationInput = { + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type ReferendumStatusUpdateManyWithWhereNestedInput = { + data: ReferendumStatusUpdateManyDataInput; + where: ReferendumStatusScalarWhereInput; +}; + +export type ReferendumStatusUpdateManyWithoutReferendumInput = { + connect?: Maybe>; + create?: Maybe>; + delete?: Maybe>; + deleteMany?: Maybe>; + disconnect?: Maybe>; + set?: Maybe>; + update?: Maybe>; + updateMany?: Maybe>; + upsert?: Maybe>; +}; + +export type ReferendumStatusUpdateWithWhereUniqueWithoutReferendumInput = { + data: ReferendumStatusUpdateWithoutReferendumDataInput; + where: ReferendumStatusWhereUniqueInput; +}; + +export type ReferendumStatusUpdateWithoutReferendumDataInput = { + blockNumber?: Maybe; + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type ReferendumStatusUpsertWithWhereUniqueWithoutReferendumInput = { + create: ReferendumStatusCreateWithoutReferendumInput; + update: ReferendumStatusUpdateWithoutReferendumDataInput; + where: ReferendumStatusWhereUniqueInput; +}; + +export type ReferendumStatusWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + blockNumber?: Maybe; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + referendum?: Maybe; + status?: Maybe; + /** All values containing the given string. */ + status_contains?: Maybe; + /** All values ending with the given string. */ + status_ends_with?: Maybe; + /** All values greater than the given value. */ + status_gt?: Maybe; + /** All values greater than or equal the given value. */ + status_gte?: Maybe; + /** All values that are contained in given list. */ + status_in?: Maybe>; + /** All values less than the given value. */ + status_lt?: Maybe; + /** All values less than or equal the given value. */ + status_lte?: Maybe; + /** All values that are not equal to given value. */ + status_not?: Maybe; + /** All values not containing the given string. */ + status_not_contains?: Maybe; + /** All values not ending with the given string. */ + status_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + status_not_in?: Maybe>; + /** All values not starting with the given string. */ + status_not_starts_with?: Maybe; + /** All values starting with the given string. */ + status_starts_with?: Maybe; + uniqueStatus?: Maybe; + /** All values containing the given string. */ + uniqueStatus_contains?: Maybe; + /** All values ending with the given string. */ + uniqueStatus_ends_with?: Maybe; + /** All values greater than the given value. */ + uniqueStatus_gt?: Maybe; + /** All values greater than or equal the given value. */ + uniqueStatus_gte?: Maybe; + /** All values that are contained in given list. */ + uniqueStatus_in?: Maybe>; + /** All values less than the given value. */ + uniqueStatus_lt?: Maybe; + /** All values less than or equal the given value. */ + uniqueStatus_lte?: Maybe; + /** All values that are not equal to given value. */ + uniqueStatus_not?: Maybe; + /** All values not containing the given string. */ + uniqueStatus_not_contains?: Maybe; + /** All values not ending with the given string. */ + uniqueStatus_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + uniqueStatus_not_in?: Maybe>; + /** All values not starting with the given string. */ + uniqueStatus_not_starts_with?: Maybe; + /** All values starting with the given string. */ + uniqueStatus_starts_with?: Maybe; +}; + +export type ReferendumStatusWhereUniqueInput = { + id?: Maybe; + uniqueStatus?: Maybe; +}; + +export type ReferendumSubscriptionPayload = { + __typename?: 'ReferendumSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; +}; + +export type ReferendumSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ NOT?: Maybe>; /** Logical OR on all given filters. */ @@ -4103,6 +6046,68 @@ export type ReferendumSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type ReferendumUpdateInput = { + delay?: Maybe; + end?: Maybe; + preimage?: Maybe; + preimageHash?: Maybe; + referendumId?: Maybe; + referendumStatus?: Maybe; + voteThreshold?: Maybe; +}; + +export type ReferendumUpdateManyMutationInput = { + delay?: Maybe; + end?: Maybe; + preimageHash?: Maybe; + referendumId?: Maybe; + voteThreshold?: Maybe; +}; + +export type ReferendumUpdateOneRequiredWithoutReferendumStatusInput = { + connect?: Maybe; + create?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type ReferendumUpdateOneWithoutPreimageInput = { + connect?: Maybe; + create?: Maybe; + delete?: Maybe; + disconnect?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type ReferendumUpdateWithoutPreimageDataInput = { + delay?: Maybe; + end?: Maybe; + preimageHash?: Maybe; + referendumId?: Maybe; + referendumStatus?: Maybe; + voteThreshold?: Maybe; +}; + +export type ReferendumUpdateWithoutReferendumStatusDataInput = { + delay?: Maybe; + end?: Maybe; + preimage?: Maybe; + preimageHash?: Maybe; + referendumId?: Maybe; + voteThreshold?: Maybe; +}; + +export type ReferendumUpsertWithoutPreimageInput = { + create: ReferendumCreateWithoutPreimageInput; + update: ReferendumUpdateWithoutPreimageDataInput; +}; + +export type ReferendumUpsertWithoutReferendumStatusInput = { + create: ReferendumCreateWithoutReferendumStatusInput; + update: ReferendumUpdateWithoutReferendumStatusDataInput; +}; + export type ReferendumWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -4380,6 +6385,14 @@ export type RewardConnection = { pageInfo: PageInfo; }; +export type RewardCreateInput = { + authoredBlock: BlockNumberCreateOneInput; + id?: Maybe; + sessionIndex: SessionCreateOneInput; + treasuryReward: Scalars['String']; + validatorReward: Scalars['String']; +}; + /** An edge in a connection. */ export type RewardEdge = { __typename?: 'RewardEdge'; @@ -4431,6 +6444,18 @@ export type RewardSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type RewardUpdateInput = { + authoredBlock?: Maybe; + sessionIndex?: Maybe; + treasuryReward?: Maybe; + validatorReward?: Maybe; +}; + +export type RewardUpdateManyMutationInput = { + treasuryReward?: Maybe; + validatorReward?: Maybe; +}; + export type RewardWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -4544,6 +6569,17 @@ export type SessionConnection = { pageInfo: PageInfo; }; +export type SessionCreateInput = { + id?: Maybe; + index: Scalars['Int']; + start: BlockNumberCreateOneInput; +}; + +export type SessionCreateOneInput = { + connect?: Maybe; + create?: Maybe; +}; + /** An edge in a connection. */ export type SessionEdge = { __typename?: 'SessionEdge'; @@ -4592,6 +6628,32 @@ export type SessionSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type SessionUpdateDataInput = { + index?: Maybe; + start?: Maybe; +}; + +export type SessionUpdateInput = { + index?: Maybe; + start?: Maybe; +}; + +export type SessionUpdateManyMutationInput = { + index?: Maybe; +}; + +export type SessionUpdateOneRequiredInput = { + connect?: Maybe; + create?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type SessionUpsertNestedInput = { + create: SessionCreateInput; + update: SessionUpdateDataInput; +}; + export type SessionWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -4667,6 +6729,13 @@ export type SlashingConnection = { pageInfo: PageInfo; }; +export type SlashingCreateInput = { + amount: Scalars['String']; + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + who: Scalars['String']; +}; + /** An edge in a connection. */ export type SlashingEdge = { __typename?: 'SlashingEdge'; @@ -4718,6 +6787,17 @@ export type SlashingSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type SlashingUpdateInput = { + amount?: Maybe; + blockNumber?: Maybe; + who?: Maybe; +}; + +export type SlashingUpdateManyMutationInput = { + amount?: Maybe; + who?: Maybe; +}; + export type SlashingWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -4831,6 +6911,12 @@ export type StakeConnection = { pageInfo: PageInfo; }; +export type StakeCreateInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + totalStake: Scalars['String']; +}; + /** An edge in a connection. */ export type StakeEdge = { __typename?: 'StakeEdge'; @@ -4879,6 +6965,15 @@ export type StakeSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; +export type StakeUpdateInput = { + blockNumber?: Maybe; + totalStake?: Maybe; +}; + +export type StakeUpdateManyMutationInput = { + totalStake?: Maybe; +}; + export type StakeWhereInput = { /** Logical AND on all given filters. */ AND?: Maybe>; @@ -4971,110 +7066,338 @@ export type Subscription = { subscribed?: Maybe; }; -export type Token = { - __typename?: 'Token'; - token?: Maybe; +export type Tip = { + __typename?: 'Tip'; + closes?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + hash: Scalars['String']; + id: Scalars['Int']; + reason: Scalars['String']; + tipStatus?: Maybe>; + who: Scalars['String']; }; -export type TotalIssuance = Node & { - __typename?: 'TotalIssuance'; - amount: Scalars['String']; - blockNumber: BlockNumber; - id: Scalars['ID']; -}; -/** A connection to a list of items. */ -export type TotalIssuanceConnection = { - __typename?: 'TotalIssuanceConnection'; - aggregate: AggregateTotalIssuance; +export type TipTipStatusArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; +}; + +/** A connection to a list of items. */ +export type TipConnection = { + __typename?: 'TipConnection'; + aggregate: AggregateTip; /** A list of edges. */ - edges: Array>; + edges: Array>; /** Information to aid in pagination. */ pageInfo: PageInfo; }; +export type TipCreateInput = { + closes?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + hash: Scalars['String']; + reason: Scalars['String']; + tipStatus?: Maybe; + who: Scalars['String']; +}; + +export type TipCreateOneWithoutTipStatusInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type TipCreateWithoutTipStatusInput = { + closes?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + hash: Scalars['String']; + reason: Scalars['String']; + who: Scalars['String']; +}; + /** An edge in a connection. */ -export type TotalIssuanceEdge = { - __typename?: 'TotalIssuanceEdge'; +export type TipEdge = { + __typename?: 'TipEdge'; /** A cursor for use in pagination. */ cursor: Scalars['String']; /** The item at the end of the edge. */ - node: TotalIssuance; + node: Tip; }; -export enum TotalIssuanceOrderByInput { - AmountAsc = 'amount_ASC', - AmountDesc = 'amount_DESC', +export enum TipOrderByInput { + ClosesAsc = 'closes_ASC', + ClosesDesc = 'closes_DESC', + FinderFeeAsc = 'finderFee_ASC', + FinderFeeDesc = 'finderFee_DESC', + FinderAsc = 'finder_ASC', + FinderDesc = 'finder_DESC', + HashAsc = 'hash_ASC', + HashDesc = 'hash_DESC', IdAsc = 'id_ASC', - IdDesc = 'id_DESC' + IdDesc = 'id_DESC', + ReasonAsc = 'reason_ASC', + ReasonDesc = 'reason_DESC', + WhoAsc = 'who_ASC', + WhoDesc = 'who_DESC' } -export type TotalIssuancePreviousValues = { - __typename?: 'TotalIssuancePreviousValues'; - amount: Scalars['String']; +export type TipPreviousValues = { + __typename?: 'TipPreviousValues'; + closes?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + hash: Scalars['String']; + id: Scalars['Int']; + reason: Scalars['String']; + who: Scalars['String']; +}; + +export type TipStatus = Node & { + __typename?: 'TipStatus'; + blockNumber: BlockNumber; id: Scalars['ID']; + status: Scalars['String']; + tip: Tip; + uniqueStatus: Scalars['String']; }; -export type TotalIssuanceSubscriptionPayload = { - __typename?: 'TotalIssuanceSubscriptionPayload'; - mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; - updatedFields?: Maybe>; +/** A connection to a list of items. */ +export type TipStatusConnection = { + __typename?: 'TipStatusConnection'; + aggregate: AggregateTipStatus; + /** A list of edges. */ + edges: Array>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; }; -export type TotalIssuanceSubscriptionWhereInput = { - /** Logical AND on all given filters. */ - AND?: Maybe>; - /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; - /** Logical OR on all given filters. */ - OR?: Maybe>; - /** The subscription event gets dispatched when it's listed in mutation_in */ - mutation_in?: Maybe>; - node?: Maybe; - /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ - updatedFields_contains?: Maybe; - /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ - updatedFields_contains_every?: Maybe>; - /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ - updatedFields_contains_some?: Maybe>; +export type TipStatusCreateInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + status: Scalars['String']; + tip: TipCreateOneWithoutTipStatusInput; + uniqueStatus: Scalars['String']; }; -export type TotalIssuanceWhereInput = { +export type TipStatusCreateManyWithoutTipInput = { + connect?: Maybe>; + create?: Maybe>; +}; + +export type TipStatusCreateWithoutTipInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + +/** An edge in a connection. */ +export type TipStatusEdge = { + __typename?: 'TipStatusEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; + /** The item at the end of the edge. */ + node: TipStatus; +}; + +export enum TipStatusOrderByInput { + IdAsc = 'id_ASC', + IdDesc = 'id_DESC', + StatusAsc = 'status_ASC', + StatusDesc = 'status_DESC', + UniqueStatusAsc = 'uniqueStatus_ASC', + UniqueStatusDesc = 'uniqueStatus_DESC' +} + +export type TipStatusPreviousValues = { + __typename?: 'TipStatusPreviousValues'; + id: Scalars['ID']; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + +export type TipStatusScalarWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; - amount?: Maybe; + OR?: Maybe>; + id?: Maybe; /** All values containing the given string. */ - amount_contains?: Maybe; + id_contains?: Maybe; /** All values ending with the given string. */ - amount_ends_with?: Maybe; + id_ends_with?: Maybe; /** All values greater than the given value. */ - amount_gt?: Maybe; + id_gt?: Maybe; /** All values greater than or equal the given value. */ - amount_gte?: Maybe; + id_gte?: Maybe; /** All values that are contained in given list. */ - amount_in?: Maybe>; + id_in?: Maybe>; /** All values less than the given value. */ - amount_lt?: Maybe; + id_lt?: Maybe; /** All values less than or equal the given value. */ - amount_lte?: Maybe; + id_lte?: Maybe; /** All values that are not equal to given value. */ - amount_not?: Maybe; + id_not?: Maybe; /** All values not containing the given string. */ - amount_not_contains?: Maybe; + id_not_contains?: Maybe; /** All values not ending with the given string. */ - amount_not_ends_with?: Maybe; + id_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - amount_not_in?: Maybe>; + id_not_in?: Maybe>; /** All values not starting with the given string. */ - amount_not_starts_with?: Maybe; + id_not_starts_with?: Maybe; /** All values starting with the given string. */ - amount_starts_with?: Maybe; + id_starts_with?: Maybe; + status?: Maybe; + /** All values containing the given string. */ + status_contains?: Maybe; + /** All values ending with the given string. */ + status_ends_with?: Maybe; + /** All values greater than the given value. */ + status_gt?: Maybe; + /** All values greater than or equal the given value. */ + status_gte?: Maybe; + /** All values that are contained in given list. */ + status_in?: Maybe>; + /** All values less than the given value. */ + status_lt?: Maybe; + /** All values less than or equal the given value. */ + status_lte?: Maybe; + /** All values that are not equal to given value. */ + status_not?: Maybe; + /** All values not containing the given string. */ + status_not_contains?: Maybe; + /** All values not ending with the given string. */ + status_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + status_not_in?: Maybe>; + /** All values not starting with the given string. */ + status_not_starts_with?: Maybe; + /** All values starting with the given string. */ + status_starts_with?: Maybe; + uniqueStatus?: Maybe; + /** All values containing the given string. */ + uniqueStatus_contains?: Maybe; + /** All values ending with the given string. */ + uniqueStatus_ends_with?: Maybe; + /** All values greater than the given value. */ + uniqueStatus_gt?: Maybe; + /** All values greater than or equal the given value. */ + uniqueStatus_gte?: Maybe; + /** All values that are contained in given list. */ + uniqueStatus_in?: Maybe>; + /** All values less than the given value. */ + uniqueStatus_lt?: Maybe; + /** All values less than or equal the given value. */ + uniqueStatus_lte?: Maybe; + /** All values that are not equal to given value. */ + uniqueStatus_not?: Maybe; + /** All values not containing the given string. */ + uniqueStatus_not_contains?: Maybe; + /** All values not ending with the given string. */ + uniqueStatus_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + uniqueStatus_not_in?: Maybe>; + /** All values not starting with the given string. */ + uniqueStatus_not_starts_with?: Maybe; + /** All values starting with the given string. */ + uniqueStatus_starts_with?: Maybe; +}; + +export type TipStatusSubscriptionPayload = { + __typename?: 'TipStatusSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; +}; + +export type TipStatusSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; +}; + +export type TipStatusUpdateInput = { + blockNumber?: Maybe; + status?: Maybe; + tip?: Maybe; + uniqueStatus?: Maybe; +}; + +export type TipStatusUpdateManyDataInput = { + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type TipStatusUpdateManyMutationInput = { + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type TipStatusUpdateManyWithWhereNestedInput = { + data: TipStatusUpdateManyDataInput; + where: TipStatusScalarWhereInput; +}; + +export type TipStatusUpdateManyWithoutTipInput = { + connect?: Maybe>; + create?: Maybe>; + delete?: Maybe>; + deleteMany?: Maybe>; + disconnect?: Maybe>; + set?: Maybe>; + update?: Maybe>; + updateMany?: Maybe>; + upsert?: Maybe>; +}; + +export type TipStatusUpdateWithWhereUniqueWithoutTipInput = { + data: TipStatusUpdateWithoutTipDataInput; + where: TipStatusWhereUniqueInput; +}; + +export type TipStatusUpdateWithoutTipDataInput = { + blockNumber?: Maybe; + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type TipStatusUpsertWithWhereUniqueWithoutTipInput = { + create: TipStatusCreateWithoutTipInput; + update: TipStatusUpdateWithoutTipDataInput; + where: TipStatusWhereUniqueInput; +}; + +export type TipStatusWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; blockNumber?: Maybe; id?: Maybe; /** All values containing the given string. */ @@ -5103,97 +7426,86 @@ export type TotalIssuanceWhereInput = { id_not_starts_with?: Maybe; /** All values starting with the given string. */ id_starts_with?: Maybe; + status?: Maybe; + /** All values containing the given string. */ + status_contains?: Maybe; + /** All values ending with the given string. */ + status_ends_with?: Maybe; + /** All values greater than the given value. */ + status_gt?: Maybe; + /** All values greater than or equal the given value. */ + status_gte?: Maybe; + /** All values that are contained in given list. */ + status_in?: Maybe>; + /** All values less than the given value. */ + status_lt?: Maybe; + /** All values less than or equal the given value. */ + status_lte?: Maybe; + /** All values that are not equal to given value. */ + status_not?: Maybe; + /** All values not containing the given string. */ + status_not_contains?: Maybe; + /** All values not ending with the given string. */ + status_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + status_not_in?: Maybe>; + /** All values not starting with the given string. */ + status_not_starts_with?: Maybe; + /** All values starting with the given string. */ + status_starts_with?: Maybe; + tip?: Maybe; + uniqueStatus?: Maybe; + /** All values containing the given string. */ + uniqueStatus_contains?: Maybe; + /** All values ending with the given string. */ + uniqueStatus_ends_with?: Maybe; + /** All values greater than the given value. */ + uniqueStatus_gt?: Maybe; + /** All values greater than or equal the given value. */ + uniqueStatus_gte?: Maybe; + /** All values that are contained in given list. */ + uniqueStatus_in?: Maybe>; + /** All values less than the given value. */ + uniqueStatus_lt?: Maybe; + /** All values less than or equal the given value. */ + uniqueStatus_lte?: Maybe; + /** All values that are not equal to given value. */ + uniqueStatus_not?: Maybe; + /** All values not containing the given string. */ + uniqueStatus_not_contains?: Maybe; + /** All values not ending with the given string. */ + uniqueStatus_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + uniqueStatus_not_in?: Maybe>; + /** All values not starting with the given string. */ + uniqueStatus_not_starts_with?: Maybe; + /** All values starting with the given string. */ + uniqueStatus_starts_with?: Maybe; }; -export type TotalIssuanceWhereUniqueInput = { - id?: Maybe; -}; - -export type TreasurySpendProposal = { - __typename?: 'TreasurySpendProposal'; - beneficiary: Scalars['String']; - bond: Scalars['String']; - id: Scalars['Int']; - motion?: Maybe; - proposer: Scalars['String']; - treasuryProposalId: Scalars['Int']; - treasuryStatus?: Maybe>; - value: Scalars['String']; -}; - - -export type TreasurySpendProposalTreasuryStatusArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; - orderBy?: Maybe; - skip?: Maybe; - where?: Maybe; -}; - -/** A connection to a list of items. */ -export type TreasurySpendProposalConnection = { - __typename?: 'TreasurySpendProposalConnection'; - aggregate: AggregateTreasurySpendProposal; - /** A list of edges. */ - edges: Array>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; -}; - -/** An edge in a connection. */ -export type TreasurySpendProposalEdge = { - __typename?: 'TreasurySpendProposalEdge'; - /** A cursor for use in pagination. */ - cursor: Scalars['String']; - /** The item at the end of the edge. */ - node: TreasurySpendProposal; -}; - -export enum TreasurySpendProposalOrderByInput { - BeneficiaryAsc = 'beneficiary_ASC', - BeneficiaryDesc = 'beneficiary_DESC', - BondAsc = 'bond_ASC', - BondDesc = 'bond_DESC', - IdAsc = 'id_ASC', - IdDesc = 'id_DESC', - ProposerAsc = 'proposer_ASC', - ProposerDesc = 'proposer_DESC', - TreasuryProposalIdAsc = 'treasuryProposalId_ASC', - TreasuryProposalIdDesc = 'treasuryProposalId_DESC', - ValueAsc = 'value_ASC', - ValueDesc = 'value_DESC' -} - -export type TreasurySpendProposalPreviousValues = { - __typename?: 'TreasurySpendProposalPreviousValues'; - beneficiary: Scalars['String']; - bond: Scalars['String']; - id: Scalars['Int']; - proposer: Scalars['String']; - treasuryProposalId: Scalars['Int']; - value: Scalars['String']; +export type TipStatusWhereUniqueInput = { + id?: Maybe; + uniqueStatus?: Maybe; }; -export type TreasurySpendProposalSubscriptionPayload = { - __typename?: 'TreasurySpendProposalSubscriptionPayload'; +export type TipSubscriptionPayload = { + __typename?: 'TipSubscriptionPayload'; mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; + node?: Maybe; + previousValues?: Maybe; updatedFields?: Maybe>; }; -export type TreasurySpendProposalSubscriptionWhereInput = { +export type TipSubscriptionWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; + OR?: Maybe>; /** The subscription event gets dispatched when it's listed in mutation_in */ mutation_in?: Maybe>; - node?: Maybe; + node?: Maybe; /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ updatedFields_contains?: Maybe; /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ @@ -5202,67 +7514,149 @@ export type TreasurySpendProposalSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type TreasurySpendProposalWhereInput = { +export type TipUpdateInput = { + closes?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + hash?: Maybe; + reason?: Maybe; + tipStatus?: Maybe; + who?: Maybe; +}; + +export type TipUpdateManyMutationInput = { + closes?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + hash?: Maybe; + reason?: Maybe; + who?: Maybe; +}; + +export type TipUpdateOneRequiredWithoutTipStatusInput = { + connect?: Maybe; + create?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type TipUpdateWithoutTipStatusDataInput = { + closes?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + hash?: Maybe; + reason?: Maybe; + who?: Maybe; +}; + +export type TipUpsertWithoutTipStatusInput = { + create: TipCreateWithoutTipStatusInput; + update: TipUpdateWithoutTipStatusDataInput; +}; + +export type TipWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; - beneficiary?: Maybe; + OR?: Maybe>; + closes?: Maybe; + /** All values greater than the given value. */ + closes_gt?: Maybe; + /** All values greater than or equal the given value. */ + closes_gte?: Maybe; + /** All values that are contained in given list. */ + closes_in?: Maybe>; + /** All values less than the given value. */ + closes_lt?: Maybe; + /** All values less than or equal the given value. */ + closes_lte?: Maybe; + /** All values that are not equal to given value. */ + closes_not?: Maybe; + /** All values that are not contained in given list. */ + closes_not_in?: Maybe>; + finder?: Maybe; + finderFee?: Maybe; /** All values containing the given string. */ - beneficiary_contains?: Maybe; + finderFee_contains?: Maybe; /** All values ending with the given string. */ - beneficiary_ends_with?: Maybe; + finderFee_ends_with?: Maybe; /** All values greater than the given value. */ - beneficiary_gt?: Maybe; + finderFee_gt?: Maybe; /** All values greater than or equal the given value. */ - beneficiary_gte?: Maybe; + finderFee_gte?: Maybe; /** All values that are contained in given list. */ - beneficiary_in?: Maybe>; + finderFee_in?: Maybe>; /** All values less than the given value. */ - beneficiary_lt?: Maybe; + finderFee_lt?: Maybe; /** All values less than or equal the given value. */ - beneficiary_lte?: Maybe; + finderFee_lte?: Maybe; /** All values that are not equal to given value. */ - beneficiary_not?: Maybe; + finderFee_not?: Maybe; /** All values not containing the given string. */ - beneficiary_not_contains?: Maybe; + finderFee_not_contains?: Maybe; /** All values not ending with the given string. */ - beneficiary_not_ends_with?: Maybe; + finderFee_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - beneficiary_not_in?: Maybe>; + finderFee_not_in?: Maybe>; /** All values not starting with the given string. */ - beneficiary_not_starts_with?: Maybe; + finderFee_not_starts_with?: Maybe; /** All values starting with the given string. */ - beneficiary_starts_with?: Maybe; - bond?: Maybe; + finderFee_starts_with?: Maybe; /** All values containing the given string. */ - bond_contains?: Maybe; + finder_contains?: Maybe; /** All values ending with the given string. */ - bond_ends_with?: Maybe; + finder_ends_with?: Maybe; /** All values greater than the given value. */ - bond_gt?: Maybe; + finder_gt?: Maybe; /** All values greater than or equal the given value. */ - bond_gte?: Maybe; + finder_gte?: Maybe; /** All values that are contained in given list. */ - bond_in?: Maybe>; + finder_in?: Maybe>; /** All values less than the given value. */ - bond_lt?: Maybe; + finder_lt?: Maybe; /** All values less than or equal the given value. */ - bond_lte?: Maybe; + finder_lte?: Maybe; /** All values that are not equal to given value. */ - bond_not?: Maybe; + finder_not?: Maybe; /** All values not containing the given string. */ - bond_not_contains?: Maybe; + finder_not_contains?: Maybe; /** All values not ending with the given string. */ - bond_not_ends_with?: Maybe; + finder_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - bond_not_in?: Maybe>; + finder_not_in?: Maybe>; /** All values not starting with the given string. */ - bond_not_starts_with?: Maybe; + finder_not_starts_with?: Maybe; /** All values starting with the given string. */ - bond_starts_with?: Maybe; + finder_starts_with?: Maybe; + hash?: Maybe; + /** All values containing the given string. */ + hash_contains?: Maybe; + /** All values ending with the given string. */ + hash_ends_with?: Maybe; + /** All values greater than the given value. */ + hash_gt?: Maybe; + /** All values greater than or equal the given value. */ + hash_gte?: Maybe; + /** All values that are contained in given list. */ + hash_in?: Maybe>; + /** All values less than the given value. */ + hash_lt?: Maybe; + /** All values less than or equal the given value. */ + hash_lte?: Maybe; + /** All values that are not equal to given value. */ + hash_not?: Maybe; + /** All values not containing the given string. */ + hash_not_contains?: Maybe; + /** All values not ending with the given string. */ + hash_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + hash_not_in?: Maybe>; + /** All values not starting with the given string. */ + hash_not_starts_with?: Maybe; + /** All values starting with the given string. */ + hash_starts_with?: Maybe; id?: Maybe; /** All values greater than the given value. */ id_gt?: Maybe; @@ -5278,143 +7672,168 @@ export type TreasurySpendProposalWhereInput = { id_not?: Maybe; /** All values that are not contained in given list. */ id_not_in?: Maybe>; - motion?: Maybe; - proposer?: Maybe; + reason?: Maybe; /** All values containing the given string. */ - proposer_contains?: Maybe; + reason_contains?: Maybe; /** All values ending with the given string. */ - proposer_ends_with?: Maybe; + reason_ends_with?: Maybe; /** All values greater than the given value. */ - proposer_gt?: Maybe; + reason_gt?: Maybe; /** All values greater than or equal the given value. */ - proposer_gte?: Maybe; + reason_gte?: Maybe; /** All values that are contained in given list. */ - proposer_in?: Maybe>; + reason_in?: Maybe>; /** All values less than the given value. */ - proposer_lt?: Maybe; + reason_lt?: Maybe; /** All values less than or equal the given value. */ - proposer_lte?: Maybe; + reason_lte?: Maybe; /** All values that are not equal to given value. */ - proposer_not?: Maybe; + reason_not?: Maybe; /** All values not containing the given string. */ - proposer_not_contains?: Maybe; + reason_not_contains?: Maybe; /** All values not ending with the given string. */ - proposer_not_ends_with?: Maybe; + reason_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - proposer_not_in?: Maybe>; + reason_not_in?: Maybe>; /** All values not starting with the given string. */ - proposer_not_starts_with?: Maybe; + reason_not_starts_with?: Maybe; /** All values starting with the given string. */ - proposer_starts_with?: Maybe; - treasuryProposalId?: Maybe; - /** All values greater than the given value. */ - treasuryProposalId_gt?: Maybe; - /** All values greater than or equal the given value. */ - treasuryProposalId_gte?: Maybe; - /** All values that are contained in given list. */ - treasuryProposalId_in?: Maybe>; - /** All values less than the given value. */ - treasuryProposalId_lt?: Maybe; - /** All values less than or equal the given value. */ - treasuryProposalId_lte?: Maybe; - /** All values that are not equal to given value. */ - treasuryProposalId_not?: Maybe; - /** All values that are not contained in given list. */ - treasuryProposalId_not_in?: Maybe>; - treasuryStatus_every?: Maybe; - treasuryStatus_none?: Maybe; - treasuryStatus_some?: Maybe; - value?: Maybe; + reason_starts_with?: Maybe; + tipStatus_every?: Maybe; + tipStatus_none?: Maybe; + tipStatus_some?: Maybe; + who?: Maybe; /** All values containing the given string. */ - value_contains?: Maybe; + who_contains?: Maybe; /** All values ending with the given string. */ - value_ends_with?: Maybe; + who_ends_with?: Maybe; /** All values greater than the given value. */ - value_gt?: Maybe; + who_gt?: Maybe; /** All values greater than or equal the given value. */ - value_gte?: Maybe; + who_gte?: Maybe; /** All values that are contained in given list. */ - value_in?: Maybe>; + who_in?: Maybe>; /** All values less than the given value. */ - value_lt?: Maybe; + who_lt?: Maybe; /** All values less than or equal the given value. */ - value_lte?: Maybe; + who_lte?: Maybe; /** All values that are not equal to given value. */ - value_not?: Maybe; + who_not?: Maybe; /** All values not containing the given string. */ - value_not_contains?: Maybe; + who_not_contains?: Maybe; /** All values not ending with the given string. */ - value_not_ends_with?: Maybe; + who_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - value_not_in?: Maybe>; + who_not_in?: Maybe>; /** All values not starting with the given string. */ - value_not_starts_with?: Maybe; + who_not_starts_with?: Maybe; /** All values starting with the given string. */ - value_starts_with?: Maybe; + who_starts_with?: Maybe; }; -export type TreasurySpendProposalWhereInput_Remote_Rel_Public_Onchain_Linksonchain_Treasury_Spend_Proposal = { +export type TipWhereInput_Remote_Rel_Public_Onchain_Linksonchain_Tip = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; - beneficiary?: Maybe; + OR?: Maybe>; + closes?: Maybe; + /** All values greater than the given value. */ + closes_gt?: Maybe; + /** All values greater than or equal the given value. */ + closes_gte?: Maybe; + /** All values that are contained in given list. */ + closes_in?: Maybe>; + /** All values less than the given value. */ + closes_lt?: Maybe; + /** All values less than or equal the given value. */ + closes_lte?: Maybe; + /** All values that are not equal to given value. */ + closes_not?: Maybe; + /** All values that are not contained in given list. */ + closes_not_in?: Maybe>; + finder?: Maybe; + finderFee?: Maybe; /** All values containing the given string. */ - beneficiary_contains?: Maybe; + finderFee_contains?: Maybe; /** All values ending with the given string. */ - beneficiary_ends_with?: Maybe; + finderFee_ends_with?: Maybe; /** All values greater than the given value. */ - beneficiary_gt?: Maybe; + finderFee_gt?: Maybe; /** All values greater than or equal the given value. */ - beneficiary_gte?: Maybe; + finderFee_gte?: Maybe; /** All values that are contained in given list. */ - beneficiary_in?: Maybe>; + finderFee_in?: Maybe>; /** All values less than the given value. */ - beneficiary_lt?: Maybe; + finderFee_lt?: Maybe; /** All values less than or equal the given value. */ - beneficiary_lte?: Maybe; + finderFee_lte?: Maybe; /** All values that are not equal to given value. */ - beneficiary_not?: Maybe; + finderFee_not?: Maybe; /** All values not containing the given string. */ - beneficiary_not_contains?: Maybe; + finderFee_not_contains?: Maybe; /** All values not ending with the given string. */ - beneficiary_not_ends_with?: Maybe; + finderFee_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - beneficiary_not_in?: Maybe>; + finderFee_not_in?: Maybe>; /** All values not starting with the given string. */ - beneficiary_not_starts_with?: Maybe; + finderFee_not_starts_with?: Maybe; /** All values starting with the given string. */ - beneficiary_starts_with?: Maybe; - bond?: Maybe; + finderFee_starts_with?: Maybe; /** All values containing the given string. */ - bond_contains?: Maybe; + finder_contains?: Maybe; /** All values ending with the given string. */ - bond_ends_with?: Maybe; + finder_ends_with?: Maybe; /** All values greater than the given value. */ - bond_gt?: Maybe; + finder_gt?: Maybe; /** All values greater than or equal the given value. */ - bond_gte?: Maybe; + finder_gte?: Maybe; /** All values that are contained in given list. */ - bond_in?: Maybe>; + finder_in?: Maybe>; /** All values less than the given value. */ - bond_lt?: Maybe; + finder_lt?: Maybe; /** All values less than or equal the given value. */ - bond_lte?: Maybe; + finder_lte?: Maybe; /** All values that are not equal to given value. */ - bond_not?: Maybe; + finder_not?: Maybe; /** All values not containing the given string. */ - bond_not_contains?: Maybe; + finder_not_contains?: Maybe; /** All values not ending with the given string. */ - bond_not_ends_with?: Maybe; + finder_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - bond_not_in?: Maybe>; + finder_not_in?: Maybe>; /** All values not starting with the given string. */ - bond_not_starts_with?: Maybe; + finder_not_starts_with?: Maybe; /** All values starting with the given string. */ - bond_starts_with?: Maybe; - id?: Maybe; + finder_starts_with?: Maybe; + hash?: Maybe; + /** All values containing the given string. */ + hash_contains?: Maybe; + /** All values ending with the given string. */ + hash_ends_with?: Maybe; + /** All values greater than the given value. */ + hash_gt?: Maybe; + /** All values greater than or equal the given value. */ + hash_gte?: Maybe; + /** All values that are contained in given list. */ + hash_in?: Maybe>; + /** All values less than the given value. */ + hash_lt?: Maybe; + /** All values less than or equal the given value. */ + hash_lte?: Maybe; + /** All values that are not equal to given value. */ + hash_not?: Maybe; + /** All values not containing the given string. */ + hash_not_contains?: Maybe; + /** All values not ending with the given string. */ + hash_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + hash_not_in?: Maybe>; + /** All values not starting with the given string. */ + hash_not_starts_with?: Maybe; + /** All values starting with the given string. */ + hash_starts_with?: Maybe; /** All values greater than the given value. */ id_gt?: Maybe; /** All values greater than or equal the given value. */ @@ -5429,147 +7848,137 @@ export type TreasurySpendProposalWhereInput_Remote_Rel_Public_Onchain_Linksoncha id_not?: Maybe; /** All values that are not contained in given list. */ id_not_in?: Maybe>; - motion?: Maybe; - proposer?: Maybe; + reason?: Maybe; /** All values containing the given string. */ - proposer_contains?: Maybe; + reason_contains?: Maybe; /** All values ending with the given string. */ - proposer_ends_with?: Maybe; + reason_ends_with?: Maybe; /** All values greater than the given value. */ - proposer_gt?: Maybe; + reason_gt?: Maybe; /** All values greater than or equal the given value. */ - proposer_gte?: Maybe; + reason_gte?: Maybe; /** All values that are contained in given list. */ - proposer_in?: Maybe>; + reason_in?: Maybe>; /** All values less than the given value. */ - proposer_lt?: Maybe; + reason_lt?: Maybe; /** All values less than or equal the given value. */ - proposer_lte?: Maybe; + reason_lte?: Maybe; /** All values that are not equal to given value. */ - proposer_not?: Maybe; + reason_not?: Maybe; /** All values not containing the given string. */ - proposer_not_contains?: Maybe; + reason_not_contains?: Maybe; /** All values not ending with the given string. */ - proposer_not_ends_with?: Maybe; + reason_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - proposer_not_in?: Maybe>; + reason_not_in?: Maybe>; /** All values not starting with the given string. */ - proposer_not_starts_with?: Maybe; + reason_not_starts_with?: Maybe; /** All values starting with the given string. */ - proposer_starts_with?: Maybe; - /** All values greater than the given value. */ - treasuryProposalId_gt?: Maybe; - /** All values greater than or equal the given value. */ - treasuryProposalId_gte?: Maybe; - /** All values that are contained in given list. */ - treasuryProposalId_in?: Maybe>; - /** All values less than the given value. */ - treasuryProposalId_lt?: Maybe; - /** All values less than or equal the given value. */ - treasuryProposalId_lte?: Maybe; - /** All values that are not equal to given value. */ - treasuryProposalId_not?: Maybe; - /** All values that are not contained in given list. */ - treasuryProposalId_not_in?: Maybe>; - treasuryStatus_every?: Maybe; - treasuryStatus_none?: Maybe; - treasuryStatus_some?: Maybe; - value?: Maybe; + reason_starts_with?: Maybe; + tipStatus_every?: Maybe; + tipStatus_none?: Maybe; + tipStatus_some?: Maybe; + who?: Maybe; /** All values containing the given string. */ - value_contains?: Maybe; + who_contains?: Maybe; /** All values ending with the given string. */ - value_ends_with?: Maybe; + who_ends_with?: Maybe; /** All values greater than the given value. */ - value_gt?: Maybe; + who_gt?: Maybe; /** All values greater than or equal the given value. */ - value_gte?: Maybe; + who_gte?: Maybe; /** All values that are contained in given list. */ - value_in?: Maybe>; + who_in?: Maybe>; /** All values less than the given value. */ - value_lt?: Maybe; + who_lt?: Maybe; /** All values less than or equal the given value. */ - value_lte?: Maybe; + who_lte?: Maybe; /** All values that are not equal to given value. */ - value_not?: Maybe; + who_not?: Maybe; /** All values not containing the given string. */ - value_not_contains?: Maybe; + who_not_contains?: Maybe; /** All values not ending with the given string. */ - value_not_ends_with?: Maybe; + who_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - value_not_in?: Maybe>; + who_not_in?: Maybe>; /** All values not starting with the given string. */ - value_not_starts_with?: Maybe; + who_not_starts_with?: Maybe; /** All values starting with the given string. */ - value_starts_with?: Maybe; + who_starts_with?: Maybe; }; -export type TreasurySpendProposalWhereUniqueInput = { +export type TipWhereUniqueInput = { id?: Maybe; - treasuryProposalId?: Maybe; }; -export type TreasuryStatus = Node & { - __typename?: 'TreasuryStatus'; +export type Token = { + __typename?: 'Token'; + token?: Maybe; +}; + +export type TotalIssuance = Node & { + __typename?: 'TotalIssuance'; + amount: Scalars['String']; blockNumber: BlockNumber; id: Scalars['ID']; - status: Scalars['String']; - treasurySpendProposal: TreasurySpendProposal; - uniqueStatus: Scalars['String']; }; /** A connection to a list of items. */ -export type TreasuryStatusConnection = { - __typename?: 'TreasuryStatusConnection'; - aggregate: AggregateTreasuryStatus; +export type TotalIssuanceConnection = { + __typename?: 'TotalIssuanceConnection'; + aggregate: AggregateTotalIssuance; /** A list of edges. */ - edges: Array>; + edges: Array>; /** Information to aid in pagination. */ pageInfo: PageInfo; }; +export type TotalIssuanceCreateInput = { + amount: Scalars['String']; + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; +}; + /** An edge in a connection. */ -export type TreasuryStatusEdge = { - __typename?: 'TreasuryStatusEdge'; +export type TotalIssuanceEdge = { + __typename?: 'TotalIssuanceEdge'; /** A cursor for use in pagination. */ cursor: Scalars['String']; /** The item at the end of the edge. */ - node: TreasuryStatus; + node: TotalIssuance; }; -export enum TreasuryStatusOrderByInput { +export enum TotalIssuanceOrderByInput { + AmountAsc = 'amount_ASC', + AmountDesc = 'amount_DESC', IdAsc = 'id_ASC', - IdDesc = 'id_DESC', - StatusAsc = 'status_ASC', - StatusDesc = 'status_DESC', - UniqueStatusAsc = 'uniqueStatus_ASC', - UniqueStatusDesc = 'uniqueStatus_DESC' + IdDesc = 'id_DESC' } -export type TreasuryStatusPreviousValues = { - __typename?: 'TreasuryStatusPreviousValues'; +export type TotalIssuancePreviousValues = { + __typename?: 'TotalIssuancePreviousValues'; + amount: Scalars['String']; id: Scalars['ID']; - status: Scalars['String']; - uniqueStatus: Scalars['String']; }; -export type TreasuryStatusSubscriptionPayload = { - __typename?: 'TreasuryStatusSubscriptionPayload'; +export type TotalIssuanceSubscriptionPayload = { + __typename?: 'TotalIssuanceSubscriptionPayload'; mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; + node?: Maybe; + previousValues?: Maybe; updatedFields?: Maybe>; }; -export type TreasuryStatusSubscriptionWhereInput = { +export type TotalIssuanceSubscriptionWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; + OR?: Maybe>; /** The subscription event gets dispatched when it's listed in mutation_in */ mutation_in?: Maybe>; - node?: Maybe; + node?: Maybe; /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ updatedFields_contains?: Maybe; /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ @@ -5578,13 +7987,49 @@ export type TreasuryStatusSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type TreasuryStatusWhereInput = { +export type TotalIssuanceUpdateInput = { + amount?: Maybe; + blockNumber?: Maybe; +}; + +export type TotalIssuanceUpdateManyMutationInput = { + amount?: Maybe; +}; + +export type TotalIssuanceWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; + OR?: Maybe>; + amount?: Maybe; + /** All values containing the given string. */ + amount_contains?: Maybe; + /** All values ending with the given string. */ + amount_ends_with?: Maybe; + /** All values greater than the given value. */ + amount_gt?: Maybe; + /** All values greater than or equal the given value. */ + amount_gte?: Maybe; + /** All values that are contained in given list. */ + amount_in?: Maybe>; + /** All values less than the given value. */ + amount_lt?: Maybe; + /** All values less than or equal the given value. */ + amount_lte?: Maybe; + /** All values that are not equal to given value. */ + amount_not?: Maybe; + /** All values not containing the given string. */ + amount_not_contains?: Maybe; + /** All values not ending with the given string. */ + amount_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + amount_not_in?: Maybe>; + /** All values not starting with the given string. */ + amount_not_starts_with?: Maybe; + /** All values starting with the given string. */ + amount_starts_with?: Maybe; blockNumber?: Maybe; id?: Maybe; /** All values containing the given string. */ @@ -5613,152 +8058,135 @@ export type TreasuryStatusWhereInput = { id_not_starts_with?: Maybe; /** All values starting with the given string. */ id_starts_with?: Maybe; - status?: Maybe; - /** All values containing the given string. */ - status_contains?: Maybe; - /** All values ending with the given string. */ - status_ends_with?: Maybe; - /** All values greater than the given value. */ - status_gt?: Maybe; - /** All values greater than or equal the given value. */ - status_gte?: Maybe; - /** All values that are contained in given list. */ - status_in?: Maybe>; - /** All values less than the given value. */ - status_lt?: Maybe; - /** All values less than or equal the given value. */ - status_lte?: Maybe; - /** All values that are not equal to given value. */ - status_not?: Maybe; - /** All values not containing the given string. */ - status_not_contains?: Maybe; - /** All values not ending with the given string. */ - status_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - status_not_in?: Maybe>; - /** All values not starting with the given string. */ - status_not_starts_with?: Maybe; - /** All values starting with the given string. */ - status_starts_with?: Maybe; - treasurySpendProposal?: Maybe; - uniqueStatus?: Maybe; - /** All values containing the given string. */ - uniqueStatus_contains?: Maybe; - /** All values ending with the given string. */ - uniqueStatus_ends_with?: Maybe; - /** All values greater than the given value. */ - uniqueStatus_gt?: Maybe; - /** All values greater than or equal the given value. */ - uniqueStatus_gte?: Maybe; - /** All values that are contained in given list. */ - uniqueStatus_in?: Maybe>; - /** All values less than the given value. */ - uniqueStatus_lt?: Maybe; - /** All values less than or equal the given value. */ - uniqueStatus_lte?: Maybe; - /** All values that are not equal to given value. */ - uniqueStatus_not?: Maybe; - /** All values not containing the given string. */ - uniqueStatus_not_contains?: Maybe; - /** All values not ending with the given string. */ - uniqueStatus_not_ends_with?: Maybe; - /** All values that are not contained in given list. */ - uniqueStatus_not_in?: Maybe>; - /** All values not starting with the given string. */ - uniqueStatus_not_starts_with?: Maybe; - /** All values starting with the given string. */ - uniqueStatus_starts_with?: Maybe; }; -export type TreasuryStatusWhereUniqueInput = { +export type TotalIssuanceWhereUniqueInput = { id?: Maybe; - uniqueStatus?: Maybe; }; -export type UndoEmailChangeResponse = { - __typename?: 'UndoEmailChangeResponse'; - email?: Maybe; - message?: Maybe; - token?: Maybe; +export type TreasurySpendProposal = { + __typename?: 'TreasurySpendProposal'; + beneficiary: Scalars['String']; + bond: Scalars['String']; + id: Scalars['Int']; + motion?: Maybe; + proposer: Scalars['String']; + treasuryProposalId: Scalars['Int']; + treasuryStatus?: Maybe>; + value: Scalars['String']; }; -export type User = { - __typename?: 'User'; - email?: Maybe; - email_verified?: Maybe; - id?: Maybe; - kusama_default_address?: Maybe; - polkadot_default_address?: Maybe; - username?: Maybe; - web3signup?: Maybe; -}; - -export type Validator = Node & { - __typename?: 'Validator'; - controller: Scalars['String']; - id: Scalars['ID']; - preferences: Scalars['String']; - session: Session; - stash: Scalars['String']; +export type TreasurySpendProposalTreasuryStatusArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; }; /** A connection to a list of items. */ -export type ValidatorConnection = { - __typename?: 'ValidatorConnection'; - aggregate: AggregateValidator; +export type TreasurySpendProposalConnection = { + __typename?: 'TreasurySpendProposalConnection'; + aggregate: AggregateTreasurySpendProposal; /** A list of edges. */ - edges: Array>; + edges: Array>; /** Information to aid in pagination. */ pageInfo: PageInfo; }; +export type TreasurySpendProposalCreateInput = { + beneficiary: Scalars['String']; + bond: Scalars['String']; + motion?: Maybe; + proposer: Scalars['String']; + treasuryProposalId: Scalars['Int']; + treasuryStatus?: Maybe; + value: Scalars['String']; +}; + +export type TreasurySpendProposalCreateOneWithoutMotionInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type TreasurySpendProposalCreateOneWithoutTreasuryStatusInput = { + connect?: Maybe; + create?: Maybe; +}; + +export type TreasurySpendProposalCreateWithoutMotionInput = { + beneficiary: Scalars['String']; + bond: Scalars['String']; + proposer: Scalars['String']; + treasuryProposalId: Scalars['Int']; + treasuryStatus?: Maybe; + value: Scalars['String']; +}; + +export type TreasurySpendProposalCreateWithoutTreasuryStatusInput = { + beneficiary: Scalars['String']; + bond: Scalars['String']; + motion?: Maybe; + proposer: Scalars['String']; + treasuryProposalId: Scalars['Int']; + value: Scalars['String']; +}; + /** An edge in a connection. */ -export type ValidatorEdge = { - __typename?: 'ValidatorEdge'; +export type TreasurySpendProposalEdge = { + __typename?: 'TreasurySpendProposalEdge'; /** A cursor for use in pagination. */ cursor: Scalars['String']; /** The item at the end of the edge. */ - node: Validator; + node: TreasurySpendProposal; }; -export enum ValidatorOrderByInput { - ControllerAsc = 'controller_ASC', - ControllerDesc = 'controller_DESC', +export enum TreasurySpendProposalOrderByInput { + BeneficiaryAsc = 'beneficiary_ASC', + BeneficiaryDesc = 'beneficiary_DESC', + BondAsc = 'bond_ASC', + BondDesc = 'bond_DESC', IdAsc = 'id_ASC', IdDesc = 'id_DESC', - PreferencesAsc = 'preferences_ASC', - PreferencesDesc = 'preferences_DESC', - StashAsc = 'stash_ASC', - StashDesc = 'stash_DESC' + ProposerAsc = 'proposer_ASC', + ProposerDesc = 'proposer_DESC', + TreasuryProposalIdAsc = 'treasuryProposalId_ASC', + TreasuryProposalIdDesc = 'treasuryProposalId_DESC', + ValueAsc = 'value_ASC', + ValueDesc = 'value_DESC' } -export type ValidatorPreviousValues = { - __typename?: 'ValidatorPreviousValues'; - controller: Scalars['String']; - id: Scalars['ID']; - preferences: Scalars['String']; - stash: Scalars['String']; +export type TreasurySpendProposalPreviousValues = { + __typename?: 'TreasurySpendProposalPreviousValues'; + beneficiary: Scalars['String']; + bond: Scalars['String']; + id: Scalars['Int']; + proposer: Scalars['String']; + treasuryProposalId: Scalars['Int']; + value: Scalars['String']; }; -export type ValidatorSubscriptionPayload = { - __typename?: 'ValidatorSubscriptionPayload'; +export type TreasurySpendProposalSubscriptionPayload = { + __typename?: 'TreasurySpendProposalSubscriptionPayload'; mutation: MutationType; - node?: Maybe; - previousValues?: Maybe; + node?: Maybe; + previousValues?: Maybe; updatedFields?: Maybe>; }; -export type ValidatorSubscriptionWhereInput = { +export type TreasurySpendProposalSubscriptionWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; + OR?: Maybe>; /** The subscription event gets dispatched when it's listed in mutation_in */ mutation_in?: Maybe>; - node?: Maybe; + node?: Maybe; /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ updatedFields_contains?: Maybe; /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ @@ -5767,126 +8195,935 @@ export type ValidatorSubscriptionWhereInput = { updatedFields_contains_some?: Maybe>; }; -export type ValidatorWhereInput = { +export type TreasurySpendProposalUpdateInput = { + beneficiary?: Maybe; + bond?: Maybe; + motion?: Maybe; + proposer?: Maybe; + treasuryProposalId?: Maybe; + treasuryStatus?: Maybe; + value?: Maybe; +}; + +export type TreasurySpendProposalUpdateManyMutationInput = { + beneficiary?: Maybe; + bond?: Maybe; + proposer?: Maybe; + treasuryProposalId?: Maybe; + value?: Maybe; +}; + +export type TreasurySpendProposalUpdateOneRequiredWithoutTreasuryStatusInput = { + connect?: Maybe; + create?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type TreasurySpendProposalUpdateOneWithoutMotionInput = { + connect?: Maybe; + create?: Maybe; + delete?: Maybe; + disconnect?: Maybe; + update?: Maybe; + upsert?: Maybe; +}; + +export type TreasurySpendProposalUpdateWithoutMotionDataInput = { + beneficiary?: Maybe; + bond?: Maybe; + proposer?: Maybe; + treasuryProposalId?: Maybe; + treasuryStatus?: Maybe; + value?: Maybe; +}; + +export type TreasurySpendProposalUpdateWithoutTreasuryStatusDataInput = { + beneficiary?: Maybe; + bond?: Maybe; + motion?: Maybe; + proposer?: Maybe; + treasuryProposalId?: Maybe; + value?: Maybe; +}; + +export type TreasurySpendProposalUpsertWithoutMotionInput = { + create: TreasurySpendProposalCreateWithoutMotionInput; + update: TreasurySpendProposalUpdateWithoutMotionDataInput; +}; + +export type TreasurySpendProposalUpsertWithoutTreasuryStatusInput = { + create: TreasurySpendProposalCreateWithoutTreasuryStatusInput; + update: TreasurySpendProposalUpdateWithoutTreasuryStatusDataInput; +}; + +export type TreasurySpendProposalWhereInput = { /** Logical AND on all given filters. */ - AND?: Maybe>; + AND?: Maybe>; /** Logical NOT on all given filters combined by AND. */ - NOT?: Maybe>; + NOT?: Maybe>; /** Logical OR on all given filters. */ - OR?: Maybe>; - controller?: Maybe; + OR?: Maybe>; + beneficiary?: Maybe; /** All values containing the given string. */ - controller_contains?: Maybe; + beneficiary_contains?: Maybe; /** All values ending with the given string. */ - controller_ends_with?: Maybe; + beneficiary_ends_with?: Maybe; /** All values greater than the given value. */ - controller_gt?: Maybe; + beneficiary_gt?: Maybe; /** All values greater than or equal the given value. */ - controller_gte?: Maybe; + beneficiary_gte?: Maybe; /** All values that are contained in given list. */ - controller_in?: Maybe>; + beneficiary_in?: Maybe>; /** All values less than the given value. */ - controller_lt?: Maybe; + beneficiary_lt?: Maybe; /** All values less than or equal the given value. */ - controller_lte?: Maybe; + beneficiary_lte?: Maybe; /** All values that are not equal to given value. */ - controller_not?: Maybe; + beneficiary_not?: Maybe; /** All values not containing the given string. */ - controller_not_contains?: Maybe; + beneficiary_not_contains?: Maybe; /** All values not ending with the given string. */ - controller_not_ends_with?: Maybe; + beneficiary_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - controller_not_in?: Maybe>; + beneficiary_not_in?: Maybe>; /** All values not starting with the given string. */ - controller_not_starts_with?: Maybe; + beneficiary_not_starts_with?: Maybe; /** All values starting with the given string. */ - controller_starts_with?: Maybe; - id?: Maybe; + beneficiary_starts_with?: Maybe; + bond?: Maybe; /** All values containing the given string. */ - id_contains?: Maybe; + bond_contains?: Maybe; /** All values ending with the given string. */ - id_ends_with?: Maybe; + bond_ends_with?: Maybe; /** All values greater than the given value. */ - id_gt?: Maybe; + bond_gt?: Maybe; /** All values greater than or equal the given value. */ - id_gte?: Maybe; + bond_gte?: Maybe; /** All values that are contained in given list. */ - id_in?: Maybe>; + bond_in?: Maybe>; /** All values less than the given value. */ - id_lt?: Maybe; + bond_lt?: Maybe; /** All values less than or equal the given value. */ - id_lte?: Maybe; + bond_lte?: Maybe; /** All values that are not equal to given value. */ - id_not?: Maybe; + bond_not?: Maybe; /** All values not containing the given string. */ - id_not_contains?: Maybe; + bond_not_contains?: Maybe; /** All values not ending with the given string. */ - id_not_ends_with?: Maybe; + bond_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - id_not_in?: Maybe>; + bond_not_in?: Maybe>; /** All values not starting with the given string. */ - id_not_starts_with?: Maybe; + bond_not_starts_with?: Maybe; /** All values starting with the given string. */ - id_starts_with?: Maybe; - preferences?: Maybe; + bond_starts_with?: Maybe; + id?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + motion?: Maybe; + proposer?: Maybe; /** All values containing the given string. */ - preferences_contains?: Maybe; + proposer_contains?: Maybe; /** All values ending with the given string. */ - preferences_ends_with?: Maybe; + proposer_ends_with?: Maybe; /** All values greater than the given value. */ - preferences_gt?: Maybe; + proposer_gt?: Maybe; /** All values greater than or equal the given value. */ - preferences_gte?: Maybe; + proposer_gte?: Maybe; /** All values that are contained in given list. */ - preferences_in?: Maybe>; + proposer_in?: Maybe>; /** All values less than the given value. */ - preferences_lt?: Maybe; + proposer_lt?: Maybe; /** All values less than or equal the given value. */ - preferences_lte?: Maybe; + proposer_lte?: Maybe; /** All values that are not equal to given value. */ - preferences_not?: Maybe; + proposer_not?: Maybe; /** All values not containing the given string. */ - preferences_not_contains?: Maybe; + proposer_not_contains?: Maybe; /** All values not ending with the given string. */ - preferences_not_ends_with?: Maybe; + proposer_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - preferences_not_in?: Maybe>; + proposer_not_in?: Maybe>; /** All values not starting with the given string. */ - preferences_not_starts_with?: Maybe; + proposer_not_starts_with?: Maybe; /** All values starting with the given string. */ - preferences_starts_with?: Maybe; - session?: Maybe; - stash?: Maybe; + proposer_starts_with?: Maybe; + treasuryProposalId?: Maybe; + /** All values greater than the given value. */ + treasuryProposalId_gt?: Maybe; + /** All values greater than or equal the given value. */ + treasuryProposalId_gte?: Maybe; + /** All values that are contained in given list. */ + treasuryProposalId_in?: Maybe>; + /** All values less than the given value. */ + treasuryProposalId_lt?: Maybe; + /** All values less than or equal the given value. */ + treasuryProposalId_lte?: Maybe; + /** All values that are not equal to given value. */ + treasuryProposalId_not?: Maybe; + /** All values that are not contained in given list. */ + treasuryProposalId_not_in?: Maybe>; + treasuryStatus_every?: Maybe; + treasuryStatus_none?: Maybe; + treasuryStatus_some?: Maybe; + value?: Maybe; /** All values containing the given string. */ - stash_contains?: Maybe; + value_contains?: Maybe; /** All values ending with the given string. */ - stash_ends_with?: Maybe; + value_ends_with?: Maybe; /** All values greater than the given value. */ - stash_gt?: Maybe; + value_gt?: Maybe; /** All values greater than or equal the given value. */ - stash_gte?: Maybe; + value_gte?: Maybe; /** All values that are contained in given list. */ - stash_in?: Maybe>; + value_in?: Maybe>; /** All values less than the given value. */ - stash_lt?: Maybe; + value_lt?: Maybe; /** All values less than or equal the given value. */ - stash_lte?: Maybe; + value_lte?: Maybe; /** All values that are not equal to given value. */ - stash_not?: Maybe; + value_not?: Maybe; /** All values not containing the given string. */ - stash_not_contains?: Maybe; + value_not_contains?: Maybe; /** All values not ending with the given string. */ - stash_not_ends_with?: Maybe; + value_not_ends_with?: Maybe; /** All values that are not contained in given list. */ - stash_not_in?: Maybe>; + value_not_in?: Maybe>; /** All values not starting with the given string. */ - stash_not_starts_with?: Maybe; + value_not_starts_with?: Maybe; /** All values starting with the given string. */ - stash_starts_with?: Maybe; + value_starts_with?: Maybe; }; -export type ValidatorWhereUniqueInput = { - id?: Maybe; +export type TreasurySpendProposalWhereInput_Remote_Rel_Public_Onchain_Linksonchain_Treasury_Spend_Proposal = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + beneficiary?: Maybe; + /** All values containing the given string. */ + beneficiary_contains?: Maybe; + /** All values ending with the given string. */ + beneficiary_ends_with?: Maybe; + /** All values greater than the given value. */ + beneficiary_gt?: Maybe; + /** All values greater than or equal the given value. */ + beneficiary_gte?: Maybe; + /** All values that are contained in given list. */ + beneficiary_in?: Maybe>; + /** All values less than the given value. */ + beneficiary_lt?: Maybe; + /** All values less than or equal the given value. */ + beneficiary_lte?: Maybe; + /** All values that are not equal to given value. */ + beneficiary_not?: Maybe; + /** All values not containing the given string. */ + beneficiary_not_contains?: Maybe; + /** All values not ending with the given string. */ + beneficiary_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + beneficiary_not_in?: Maybe>; + /** All values not starting with the given string. */ + beneficiary_not_starts_with?: Maybe; + /** All values starting with the given string. */ + beneficiary_starts_with?: Maybe; + bond?: Maybe; + /** All values containing the given string. */ + bond_contains?: Maybe; + /** All values ending with the given string. */ + bond_ends_with?: Maybe; + /** All values greater than the given value. */ + bond_gt?: Maybe; + /** All values greater than or equal the given value. */ + bond_gte?: Maybe; + /** All values that are contained in given list. */ + bond_in?: Maybe>; + /** All values less than the given value. */ + bond_lt?: Maybe; + /** All values less than or equal the given value. */ + bond_lte?: Maybe; + /** All values that are not equal to given value. */ + bond_not?: Maybe; + /** All values not containing the given string. */ + bond_not_contains?: Maybe; + /** All values not ending with the given string. */ + bond_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + bond_not_in?: Maybe>; + /** All values not starting with the given string. */ + bond_not_starts_with?: Maybe; + /** All values starting with the given string. */ + bond_starts_with?: Maybe; + id?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + motion?: Maybe; + proposer?: Maybe; + /** All values containing the given string. */ + proposer_contains?: Maybe; + /** All values ending with the given string. */ + proposer_ends_with?: Maybe; + /** All values greater than the given value. */ + proposer_gt?: Maybe; + /** All values greater than or equal the given value. */ + proposer_gte?: Maybe; + /** All values that are contained in given list. */ + proposer_in?: Maybe>; + /** All values less than the given value. */ + proposer_lt?: Maybe; + /** All values less than or equal the given value. */ + proposer_lte?: Maybe; + /** All values that are not equal to given value. */ + proposer_not?: Maybe; + /** All values not containing the given string. */ + proposer_not_contains?: Maybe; + /** All values not ending with the given string. */ + proposer_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + proposer_not_in?: Maybe>; + /** All values not starting with the given string. */ + proposer_not_starts_with?: Maybe; + /** All values starting with the given string. */ + proposer_starts_with?: Maybe; + /** All values greater than the given value. */ + treasuryProposalId_gt?: Maybe; + /** All values greater than or equal the given value. */ + treasuryProposalId_gte?: Maybe; + /** All values that are contained in given list. */ + treasuryProposalId_in?: Maybe>; + /** All values less than the given value. */ + treasuryProposalId_lt?: Maybe; + /** All values less than or equal the given value. */ + treasuryProposalId_lte?: Maybe; + /** All values that are not equal to given value. */ + treasuryProposalId_not?: Maybe; + /** All values that are not contained in given list. */ + treasuryProposalId_not_in?: Maybe>; + treasuryStatus_every?: Maybe; + treasuryStatus_none?: Maybe; + treasuryStatus_some?: Maybe; + value?: Maybe; + /** All values containing the given string. */ + value_contains?: Maybe; + /** All values ending with the given string. */ + value_ends_with?: Maybe; + /** All values greater than the given value. */ + value_gt?: Maybe; + /** All values greater than or equal the given value. */ + value_gte?: Maybe; + /** All values that are contained in given list. */ + value_in?: Maybe>; + /** All values less than the given value. */ + value_lt?: Maybe; + /** All values less than or equal the given value. */ + value_lte?: Maybe; + /** All values that are not equal to given value. */ + value_not?: Maybe; + /** All values not containing the given string. */ + value_not_contains?: Maybe; + /** All values not ending with the given string. */ + value_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + value_not_in?: Maybe>; + /** All values not starting with the given string. */ + value_not_starts_with?: Maybe; + /** All values starting with the given string. */ + value_starts_with?: Maybe; +}; + +export type TreasurySpendProposalWhereUniqueInput = { + id?: Maybe; + treasuryProposalId?: Maybe; +}; + +export type TreasuryStatus = Node & { + __typename?: 'TreasuryStatus'; + blockNumber: BlockNumber; + id: Scalars['ID']; + status: Scalars['String']; + treasurySpendProposal: TreasurySpendProposal; + uniqueStatus: Scalars['String']; +}; + +/** A connection to a list of items. */ +export type TreasuryStatusConnection = { + __typename?: 'TreasuryStatusConnection'; + aggregate: AggregateTreasuryStatus; + /** A list of edges. */ + edges: Array>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; +}; + +export type TreasuryStatusCreateInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + status: Scalars['String']; + treasurySpendProposal: TreasurySpendProposalCreateOneWithoutTreasuryStatusInput; + uniqueStatus: Scalars['String']; +}; + +export type TreasuryStatusCreateManyWithoutTreasurySpendProposalInput = { + connect?: Maybe>; + create?: Maybe>; +}; + +export type TreasuryStatusCreateWithoutTreasurySpendProposalInput = { + blockNumber: BlockNumberCreateOneInput; + id?: Maybe; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + +/** An edge in a connection. */ +export type TreasuryStatusEdge = { + __typename?: 'TreasuryStatusEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; + /** The item at the end of the edge. */ + node: TreasuryStatus; +}; + +export enum TreasuryStatusOrderByInput { + IdAsc = 'id_ASC', + IdDesc = 'id_DESC', + StatusAsc = 'status_ASC', + StatusDesc = 'status_DESC', + UniqueStatusAsc = 'uniqueStatus_ASC', + UniqueStatusDesc = 'uniqueStatus_DESC' +} + +export type TreasuryStatusPreviousValues = { + __typename?: 'TreasuryStatusPreviousValues'; + id: Scalars['ID']; + status: Scalars['String']; + uniqueStatus: Scalars['String']; +}; + +export type TreasuryStatusScalarWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + status?: Maybe; + /** All values containing the given string. */ + status_contains?: Maybe; + /** All values ending with the given string. */ + status_ends_with?: Maybe; + /** All values greater than the given value. */ + status_gt?: Maybe; + /** All values greater than or equal the given value. */ + status_gte?: Maybe; + /** All values that are contained in given list. */ + status_in?: Maybe>; + /** All values less than the given value. */ + status_lt?: Maybe; + /** All values less than or equal the given value. */ + status_lte?: Maybe; + /** All values that are not equal to given value. */ + status_not?: Maybe; + /** All values not containing the given string. */ + status_not_contains?: Maybe; + /** All values not ending with the given string. */ + status_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + status_not_in?: Maybe>; + /** All values not starting with the given string. */ + status_not_starts_with?: Maybe; + /** All values starting with the given string. */ + status_starts_with?: Maybe; + uniqueStatus?: Maybe; + /** All values containing the given string. */ + uniqueStatus_contains?: Maybe; + /** All values ending with the given string. */ + uniqueStatus_ends_with?: Maybe; + /** All values greater than the given value. */ + uniqueStatus_gt?: Maybe; + /** All values greater than or equal the given value. */ + uniqueStatus_gte?: Maybe; + /** All values that are contained in given list. */ + uniqueStatus_in?: Maybe>; + /** All values less than the given value. */ + uniqueStatus_lt?: Maybe; + /** All values less than or equal the given value. */ + uniqueStatus_lte?: Maybe; + /** All values that are not equal to given value. */ + uniqueStatus_not?: Maybe; + /** All values not containing the given string. */ + uniqueStatus_not_contains?: Maybe; + /** All values not ending with the given string. */ + uniqueStatus_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + uniqueStatus_not_in?: Maybe>; + /** All values not starting with the given string. */ + uniqueStatus_not_starts_with?: Maybe; + /** All values starting with the given string. */ + uniqueStatus_starts_with?: Maybe; +}; + +export type TreasuryStatusSubscriptionPayload = { + __typename?: 'TreasuryStatusSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; +}; + +export type TreasuryStatusSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; +}; + +export type TreasuryStatusUpdateInput = { + blockNumber?: Maybe; + status?: Maybe; + treasurySpendProposal?: Maybe; + uniqueStatus?: Maybe; +}; + +export type TreasuryStatusUpdateManyDataInput = { + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type TreasuryStatusUpdateManyMutationInput = { + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type TreasuryStatusUpdateManyWithWhereNestedInput = { + data: TreasuryStatusUpdateManyDataInput; + where: TreasuryStatusScalarWhereInput; +}; + +export type TreasuryStatusUpdateManyWithoutTreasurySpendProposalInput = { + connect?: Maybe>; + create?: Maybe>; + delete?: Maybe>; + deleteMany?: Maybe>; + disconnect?: Maybe>; + set?: Maybe>; + update?: Maybe>; + updateMany?: Maybe>; + upsert?: Maybe>; +}; + +export type TreasuryStatusUpdateWithWhereUniqueWithoutTreasurySpendProposalInput = { + data: TreasuryStatusUpdateWithoutTreasurySpendProposalDataInput; + where: TreasuryStatusWhereUniqueInput; +}; + +export type TreasuryStatusUpdateWithoutTreasurySpendProposalDataInput = { + blockNumber?: Maybe; + status?: Maybe; + uniqueStatus?: Maybe; +}; + +export type TreasuryStatusUpsertWithWhereUniqueWithoutTreasurySpendProposalInput = { + create: TreasuryStatusCreateWithoutTreasurySpendProposalInput; + update: TreasuryStatusUpdateWithoutTreasurySpendProposalDataInput; + where: TreasuryStatusWhereUniqueInput; +}; + +export type TreasuryStatusWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + blockNumber?: Maybe; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + status?: Maybe; + /** All values containing the given string. */ + status_contains?: Maybe; + /** All values ending with the given string. */ + status_ends_with?: Maybe; + /** All values greater than the given value. */ + status_gt?: Maybe; + /** All values greater than or equal the given value. */ + status_gte?: Maybe; + /** All values that are contained in given list. */ + status_in?: Maybe>; + /** All values less than the given value. */ + status_lt?: Maybe; + /** All values less than or equal the given value. */ + status_lte?: Maybe; + /** All values that are not equal to given value. */ + status_not?: Maybe; + /** All values not containing the given string. */ + status_not_contains?: Maybe; + /** All values not ending with the given string. */ + status_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + status_not_in?: Maybe>; + /** All values not starting with the given string. */ + status_not_starts_with?: Maybe; + /** All values starting with the given string. */ + status_starts_with?: Maybe; + treasurySpendProposal?: Maybe; + uniqueStatus?: Maybe; + /** All values containing the given string. */ + uniqueStatus_contains?: Maybe; + /** All values ending with the given string. */ + uniqueStatus_ends_with?: Maybe; + /** All values greater than the given value. */ + uniqueStatus_gt?: Maybe; + /** All values greater than or equal the given value. */ + uniqueStatus_gte?: Maybe; + /** All values that are contained in given list. */ + uniqueStatus_in?: Maybe>; + /** All values less than the given value. */ + uniqueStatus_lt?: Maybe; + /** All values less than or equal the given value. */ + uniqueStatus_lte?: Maybe; + /** All values that are not equal to given value. */ + uniqueStatus_not?: Maybe; + /** All values not containing the given string. */ + uniqueStatus_not_contains?: Maybe; + /** All values not ending with the given string. */ + uniqueStatus_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + uniqueStatus_not_in?: Maybe>; + /** All values not starting with the given string. */ + uniqueStatus_not_starts_with?: Maybe; + /** All values starting with the given string. */ + uniqueStatus_starts_with?: Maybe; +}; + +export type TreasuryStatusWhereUniqueInput = { + id?: Maybe; + uniqueStatus?: Maybe; +}; + +export type UndoEmailChangeResponse = { + __typename?: 'UndoEmailChangeResponse'; + email?: Maybe; + message?: Maybe; + token?: Maybe; +}; + + +export type User = { + __typename?: 'User'; + email?: Maybe; + email_verified?: Maybe; + id?: Maybe; + kusama_default_address?: Maybe; + polkadot_default_address?: Maybe; + username?: Maybe; + web3signup?: Maybe; +}; + +export type Validator = Node & { + __typename?: 'Validator'; + controller: Scalars['String']; + id: Scalars['ID']; + preferences: Scalars['String']; + session: Session; + stash: Scalars['String']; +}; + +/** A connection to a list of items. */ +export type ValidatorConnection = { + __typename?: 'ValidatorConnection'; + aggregate: AggregateValidator; + /** A list of edges. */ + edges: Array>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; +}; + +export type ValidatorCreateInput = { + controller: Scalars['String']; + id?: Maybe; + preferences: Scalars['String']; + session: SessionCreateOneInput; + stash: Scalars['String']; +}; + +/** An edge in a connection. */ +export type ValidatorEdge = { + __typename?: 'ValidatorEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; + /** The item at the end of the edge. */ + node: Validator; +}; + +export enum ValidatorOrderByInput { + ControllerAsc = 'controller_ASC', + ControllerDesc = 'controller_DESC', + IdAsc = 'id_ASC', + IdDesc = 'id_DESC', + PreferencesAsc = 'preferences_ASC', + PreferencesDesc = 'preferences_DESC', + StashAsc = 'stash_ASC', + StashDesc = 'stash_DESC' +} + +export type ValidatorPreviousValues = { + __typename?: 'ValidatorPreviousValues'; + controller: Scalars['String']; + id: Scalars['ID']; + preferences: Scalars['String']; + stash: Scalars['String']; +}; + +export type ValidatorSubscriptionPayload = { + __typename?: 'ValidatorSubscriptionPayload'; + mutation: MutationType; + node?: Maybe; + previousValues?: Maybe; + updatedFields?: Maybe>; +}; + +export type ValidatorSubscriptionWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + /** The subscription event gets dispatched when it's listed in mutation_in */ + mutation_in?: Maybe>; + node?: Maybe; + /** The subscription event gets only dispatched when one of the updated fields names is included in this list */ + updatedFields_contains?: Maybe; + /** The subscription event gets only dispatched when all of the field names included in this list have been updated */ + updatedFields_contains_every?: Maybe>; + /** The subscription event gets only dispatched when some of the field names included in this list have been updated */ + updatedFields_contains_some?: Maybe>; +}; + +export type ValidatorUpdateInput = { + controller?: Maybe; + preferences?: Maybe; + session?: Maybe; + stash?: Maybe; +}; + +export type ValidatorUpdateManyMutationInput = { + controller?: Maybe; + preferences?: Maybe; + stash?: Maybe; +}; + +export type ValidatorWhereInput = { + /** Logical AND on all given filters. */ + AND?: Maybe>; + /** Logical NOT on all given filters combined by AND. */ + NOT?: Maybe>; + /** Logical OR on all given filters. */ + OR?: Maybe>; + controller?: Maybe; + /** All values containing the given string. */ + controller_contains?: Maybe; + /** All values ending with the given string. */ + controller_ends_with?: Maybe; + /** All values greater than the given value. */ + controller_gt?: Maybe; + /** All values greater than or equal the given value. */ + controller_gte?: Maybe; + /** All values that are contained in given list. */ + controller_in?: Maybe>; + /** All values less than the given value. */ + controller_lt?: Maybe; + /** All values less than or equal the given value. */ + controller_lte?: Maybe; + /** All values that are not equal to given value. */ + controller_not?: Maybe; + /** All values not containing the given string. */ + controller_not_contains?: Maybe; + /** All values not ending with the given string. */ + controller_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + controller_not_in?: Maybe>; + /** All values not starting with the given string. */ + controller_not_starts_with?: Maybe; + /** All values starting with the given string. */ + controller_starts_with?: Maybe; + id?: Maybe; + /** All values containing the given string. */ + id_contains?: Maybe; + /** All values ending with the given string. */ + id_ends_with?: Maybe; + /** All values greater than the given value. */ + id_gt?: Maybe; + /** All values greater than or equal the given value. */ + id_gte?: Maybe; + /** All values that are contained in given list. */ + id_in?: Maybe>; + /** All values less than the given value. */ + id_lt?: Maybe; + /** All values less than or equal the given value. */ + id_lte?: Maybe; + /** All values that are not equal to given value. */ + id_not?: Maybe; + /** All values not containing the given string. */ + id_not_contains?: Maybe; + /** All values not ending with the given string. */ + id_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + id_not_in?: Maybe>; + /** All values not starting with the given string. */ + id_not_starts_with?: Maybe; + /** All values starting with the given string. */ + id_starts_with?: Maybe; + preferences?: Maybe; + /** All values containing the given string. */ + preferences_contains?: Maybe; + /** All values ending with the given string. */ + preferences_ends_with?: Maybe; + /** All values greater than the given value. */ + preferences_gt?: Maybe; + /** All values greater than or equal the given value. */ + preferences_gte?: Maybe; + /** All values that are contained in given list. */ + preferences_in?: Maybe>; + /** All values less than the given value. */ + preferences_lt?: Maybe; + /** All values less than or equal the given value. */ + preferences_lte?: Maybe; + /** All values that are not equal to given value. */ + preferences_not?: Maybe; + /** All values not containing the given string. */ + preferences_not_contains?: Maybe; + /** All values not ending with the given string. */ + preferences_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + preferences_not_in?: Maybe>; + /** All values not starting with the given string. */ + preferences_not_starts_with?: Maybe; + /** All values starting with the given string. */ + preferences_starts_with?: Maybe; + session?: Maybe; + stash?: Maybe; + /** All values containing the given string. */ + stash_contains?: Maybe; + /** All values ending with the given string. */ + stash_ends_with?: Maybe; + /** All values greater than the given value. */ + stash_gt?: Maybe; + /** All values greater than or equal the given value. */ + stash_gte?: Maybe; + /** All values that are contained in given list. */ + stash_in?: Maybe>; + /** All values less than the given value. */ + stash_lt?: Maybe; + /** All values less than or equal the given value. */ + stash_lte?: Maybe; + /** All values that are not equal to given value. */ + stash_not?: Maybe; + /** All values not containing the given string. */ + stash_not_contains?: Maybe; + /** All values not ending with the given string. */ + stash_not_ends_with?: Maybe; + /** All values that are not contained in given list. */ + stash_not_in?: Maybe>; + /** All values not starting with the given string. */ + stash_not_starts_with?: Maybe; + /** All values starting with the given string. */ + stash_starts_with?: Maybe; +}; + +export type ValidatorWhereUniqueInput = { + id?: Maybe; }; @@ -5903,1210 +9140,2276 @@ export type Bpchar_Comparison_Exp = { _nin?: Maybe>; }; -/** columns and relationships of "comment_reactions" */ -export type Comment_Reactions = { - __typename?: 'comment_reactions'; - /** An object relationship */ - comment: Comments; - comment_id: Scalars['uuid']; - created_at: Scalars['timestamp']; - id: Scalars['Int']; - /** Remote relationship field */ - reacting_user?: Maybe; - reaction: Scalars['bpchar']; - updated_at: Scalars['timestamp']; - user_id: Scalars['Int']; +/** columns and relationships of "comment_reactions" */ +export type Comment_Reactions = { + __typename?: 'comment_reactions'; + /** An object relationship */ + comment: Comments; + comment_id: Scalars['uuid']; + created_at: Scalars['timestamp']; + id: Scalars['Int']; + /** Remote relationship field */ + reacting_user?: Maybe; + reaction: Scalars['bpchar']; + updated_at: Scalars['timestamp']; + user_id: Scalars['Int']; +}; + +/** aggregated selection of "comment_reactions" */ +export type Comment_Reactions_Aggregate = { + __typename?: 'comment_reactions_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "comment_reactions" */ +export type Comment_Reactions_Aggregate_Fields = { + __typename?: 'comment_reactions_aggregate_fields'; + avg?: Maybe; + count?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "comment_reactions" */ +export type Comment_Reactions_Aggregate_FieldsCountArgs = { + columns?: Maybe>; + distinct?: Maybe; +}; + +/** order by aggregate values of table "comment_reactions" */ +export type Comment_Reactions_Aggregate_Order_By = { + avg?: Maybe; + count?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + +/** input type for inserting array relation for remote table "comment_reactions" */ +export type Comment_Reactions_Arr_Rel_Insert_Input = { + data: Array; + on_conflict?: Maybe; +}; + +/** aggregate avg on columns */ +export type Comment_Reactions_Avg_Fields = { + __typename?: 'comment_reactions_avg_fields'; + id?: Maybe; + user_id?: Maybe; +}; + +/** order by avg() on columns of table "comment_reactions" */ +export type Comment_Reactions_Avg_Order_By = { + id?: Maybe; + user_id?: Maybe; +}; + +/** Boolean expression to filter rows from the table "comment_reactions". All fields are combined with a logical 'AND'. */ +export type Comment_Reactions_Bool_Exp = { + _and?: Maybe>>; + _not?: Maybe; + _or?: Maybe>>; + comment?: Maybe; + comment_id?: Maybe; + created_at?: Maybe; + id?: Maybe; + reaction?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; +}; + +/** unique or primary key constraints on table "comment_reactions" */ +export enum Comment_Reactions_Constraint { + /** unique or primary key constraint */ + CommentReactionsCommentIdUserIdReactionKey = 'comment_reactions_comment_id_user_id_reaction_key', + /** unique or primary key constraint */ + CommentReactionsPkey = 'comment_reactions_pkey' +} + +/** input type for incrementing integer column in table "comment_reactions" */ +export type Comment_Reactions_Inc_Input = { + id?: Maybe; + user_id?: Maybe; +}; + +/** input type for inserting data into table "comment_reactions" */ +export type Comment_Reactions_Insert_Input = { + comment?: Maybe; + comment_id?: Maybe; + created_at?: Maybe; + id?: Maybe; + reaction?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; +}; + +/** aggregate max on columns */ +export type Comment_Reactions_Max_Fields = { + __typename?: 'comment_reactions_max_fields'; + comment_id?: Maybe; + created_at?: Maybe; + id?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; +}; + +/** order by max() on columns of table "comment_reactions" */ +export type Comment_Reactions_Max_Order_By = { + comment_id?: Maybe; + created_at?: Maybe; + id?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; +}; + +/** aggregate min on columns */ +export type Comment_Reactions_Min_Fields = { + __typename?: 'comment_reactions_min_fields'; + comment_id?: Maybe; + created_at?: Maybe; + id?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; +}; + +/** order by min() on columns of table "comment_reactions" */ +export type Comment_Reactions_Min_Order_By = { + comment_id?: Maybe; + created_at?: Maybe; + id?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; +}; + +/** response of any mutation on the table "comment_reactions" */ +export type Comment_Reactions_Mutation_Response = { + __typename?: 'comment_reactions_mutation_response'; + /** number of affected rows by the mutation */ + affected_rows: Scalars['Int']; + /** data of the affected rows by the mutation */ + returning: Array; +}; + +/** input type for inserting object relation for remote table "comment_reactions" */ +export type Comment_Reactions_Obj_Rel_Insert_Input = { + data: Comment_Reactions_Insert_Input; + on_conflict?: Maybe; +}; + +/** on conflict condition type for table "comment_reactions" */ +export type Comment_Reactions_On_Conflict = { + constraint: Comment_Reactions_Constraint; + update_columns: Array; + where?: Maybe; +}; + +/** ordering options when selecting data from "comment_reactions" */ +export type Comment_Reactions_Order_By = { + comment?: Maybe; + comment_id?: Maybe; + created_at?: Maybe; + id?: Maybe; + reaction?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; +}; + +/** primary key columns input for table: "comment_reactions" */ +export type Comment_Reactions_Pk_Columns_Input = { + id: Scalars['Int']; +}; + +/** select columns of table "comment_reactions" */ +export enum Comment_Reactions_Select_Column { + /** column name */ + CommentId = 'comment_id', + /** column name */ + CreatedAt = 'created_at', + /** column name */ + Id = 'id', + /** column name */ + Reaction = 'reaction', + /** column name */ + UpdatedAt = 'updated_at', + /** column name */ + UserId = 'user_id' +} + +/** input type for updating data in table "comment_reactions" */ +export type Comment_Reactions_Set_Input = { + comment_id?: Maybe; + created_at?: Maybe; + id?: Maybe; + reaction?: Maybe; + updated_at?: Maybe; + user_id?: Maybe; +}; + +/** aggregate stddev on columns */ +export type Comment_Reactions_Stddev_Fields = { + __typename?: 'comment_reactions_stddev_fields'; + id?: Maybe; + user_id?: Maybe; +}; + +/** order by stddev() on columns of table "comment_reactions" */ +export type Comment_Reactions_Stddev_Order_By = { + id?: Maybe; + user_id?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Comment_Reactions_Stddev_Pop_Fields = { + __typename?: 'comment_reactions_stddev_pop_fields'; + id?: Maybe; + user_id?: Maybe; +}; + +/** order by stddev_pop() on columns of table "comment_reactions" */ +export type Comment_Reactions_Stddev_Pop_Order_By = { + id?: Maybe; + user_id?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Comment_Reactions_Stddev_Samp_Fields = { + __typename?: 'comment_reactions_stddev_samp_fields'; + id?: Maybe; + user_id?: Maybe; +}; + +/** order by stddev_samp() on columns of table "comment_reactions" */ +export type Comment_Reactions_Stddev_Samp_Order_By = { + id?: Maybe; + user_id?: Maybe; +}; + +/** aggregate sum on columns */ +export type Comment_Reactions_Sum_Fields = { + __typename?: 'comment_reactions_sum_fields'; + id?: Maybe; + user_id?: Maybe; +}; + +/** order by sum() on columns of table "comment_reactions" */ +export type Comment_Reactions_Sum_Order_By = { + id?: Maybe; + user_id?: Maybe; +}; + +/** update columns of table "comment_reactions" */ +export enum Comment_Reactions_Update_Column { + /** column name */ + CommentId = 'comment_id', + /** column name */ + CreatedAt = 'created_at', + /** column name */ + Id = 'id', + /** column name */ + Reaction = 'reaction', + /** column name */ + UpdatedAt = 'updated_at', + /** column name */ + UserId = 'user_id' +} + +/** aggregate var_pop on columns */ +export type Comment_Reactions_Var_Pop_Fields = { + __typename?: 'comment_reactions_var_pop_fields'; + id?: Maybe; + user_id?: Maybe; +}; + +/** order by var_pop() on columns of table "comment_reactions" */ +export type Comment_Reactions_Var_Pop_Order_By = { + id?: Maybe; + user_id?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Comment_Reactions_Var_Samp_Fields = { + __typename?: 'comment_reactions_var_samp_fields'; + id?: Maybe; + user_id?: Maybe; +}; + +/** order by var_samp() on columns of table "comment_reactions" */ +export type Comment_Reactions_Var_Samp_Order_By = { + id?: Maybe; + user_id?: Maybe; +}; + +/** aggregate variance on columns */ +export type Comment_Reactions_Variance_Fields = { + __typename?: 'comment_reactions_variance_fields'; + id?: Maybe; + user_id?: Maybe; +}; + +/** order by variance() on columns of table "comment_reactions" */ +export type Comment_Reactions_Variance_Order_By = { + id?: Maybe; + user_id?: Maybe; +}; + +/** columns and relationships of "comments" */ +export type Comments = { + __typename?: 'comments'; + /** Remote relationship field */ + author?: Maybe; + author_id: Scalars['Int']; + /** An array relationship */ + comment_reactions: Array; + /** An aggregated array relationship */ + comment_reactions_aggregate: Comment_Reactions_Aggregate; + content: Scalars['String']; + created_at: Scalars['timestamptz']; + id: Scalars['uuid']; + /** An object relationship */ + post: Posts; + post_id: Scalars['Int']; + updated_at: Scalars['timestamptz']; +}; + + +/** columns and relationships of "comments" */ +export type CommentsComment_ReactionsArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +/** columns and relationships of "comments" */ +export type CommentsComment_Reactions_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + +/** aggregated selection of "comments" */ +export type Comments_Aggregate = { + __typename?: 'comments_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "comments" */ +export type Comments_Aggregate_Fields = { + __typename?: 'comments_aggregate_fields'; + avg?: Maybe; + count?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "comments" */ +export type Comments_Aggregate_FieldsCountArgs = { + columns?: Maybe>; + distinct?: Maybe; +}; + +/** order by aggregate values of table "comments" */ +export type Comments_Aggregate_Order_By = { + avg?: Maybe; + count?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + +/** input type for inserting array relation for remote table "comments" */ +export type Comments_Arr_Rel_Insert_Input = { + data: Array; + on_conflict?: Maybe; +}; + +/** aggregate avg on columns */ +export type Comments_Avg_Fields = { + __typename?: 'comments_avg_fields'; + author_id?: Maybe; + post_id?: Maybe; +}; + +/** order by avg() on columns of table "comments" */ +export type Comments_Avg_Order_By = { + author_id?: Maybe; + post_id?: Maybe; +}; + +/** Boolean expression to filter rows from the table "comments". All fields are combined with a logical 'AND'. */ +export type Comments_Bool_Exp = { + _and?: Maybe>>; + _not?: Maybe; + _or?: Maybe>>; + author_id?: Maybe; + comment_reactions?: Maybe; + content?: Maybe; + created_at?: Maybe; + id?: Maybe; + post?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; +}; + +/** unique or primary key constraints on table "comments" */ +export enum Comments_Constraint { + /** unique or primary key constraint */ + CommentsPkey = 'comments_pkey' +} + +/** input type for incrementing integer column in table "comments" */ +export type Comments_Inc_Input = { + author_id?: Maybe; + post_id?: Maybe; +}; + +/** input type for inserting data into table "comments" */ +export type Comments_Insert_Input = { + author_id?: Maybe; + comment_reactions?: Maybe; + content?: Maybe; + created_at?: Maybe; + id?: Maybe; + post?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; +}; + +/** aggregate max on columns */ +export type Comments_Max_Fields = { + __typename?: 'comments_max_fields'; + author_id?: Maybe; + content?: Maybe; + created_at?: Maybe; + id?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; +}; + +/** order by max() on columns of table "comments" */ +export type Comments_Max_Order_By = { + author_id?: Maybe; + content?: Maybe; + created_at?: Maybe; + id?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; +}; + +/** aggregate min on columns */ +export type Comments_Min_Fields = { + __typename?: 'comments_min_fields'; + author_id?: Maybe; + content?: Maybe; + created_at?: Maybe; + id?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; +}; + +/** order by min() on columns of table "comments" */ +export type Comments_Min_Order_By = { + author_id?: Maybe; + content?: Maybe; + created_at?: Maybe; + id?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; +}; + +/** response of any mutation on the table "comments" */ +export type Comments_Mutation_Response = { + __typename?: 'comments_mutation_response'; + /** number of affected rows by the mutation */ + affected_rows: Scalars['Int']; + /** data of the affected rows by the mutation */ + returning: Array; +}; + +/** input type for inserting object relation for remote table "comments" */ +export type Comments_Obj_Rel_Insert_Input = { + data: Comments_Insert_Input; + on_conflict?: Maybe; +}; + +/** on conflict condition type for table "comments" */ +export type Comments_On_Conflict = { + constraint: Comments_Constraint; + update_columns: Array; + where?: Maybe; +}; + +/** ordering options when selecting data from "comments" */ +export type Comments_Order_By = { + author_id?: Maybe; + comment_reactions_aggregate?: Maybe; + content?: Maybe; + created_at?: Maybe; + id?: Maybe; + post?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; +}; + +/** primary key columns input for table: "comments" */ +export type Comments_Pk_Columns_Input = { + id: Scalars['uuid']; +}; + +/** select columns of table "comments" */ +export enum Comments_Select_Column { + /** column name */ + AuthorId = 'author_id', + /** column name */ + Content = 'content', + /** column name */ + CreatedAt = 'created_at', + /** column name */ + Id = 'id', + /** column name */ + PostId = 'post_id', + /** column name */ + UpdatedAt = 'updated_at' +} + +/** input type for updating data in table "comments" */ +export type Comments_Set_Input = { + author_id?: Maybe; + content?: Maybe; + created_at?: Maybe; + id?: Maybe; + post_id?: Maybe; + updated_at?: Maybe; +}; + +/** aggregate stddev on columns */ +export type Comments_Stddev_Fields = { + __typename?: 'comments_stddev_fields'; + author_id?: Maybe; + post_id?: Maybe; +}; + +/** order by stddev() on columns of table "comments" */ +export type Comments_Stddev_Order_By = { + author_id?: Maybe; + post_id?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Comments_Stddev_Pop_Fields = { + __typename?: 'comments_stddev_pop_fields'; + author_id?: Maybe; + post_id?: Maybe; +}; + +/** order by stddev_pop() on columns of table "comments" */ +export type Comments_Stddev_Pop_Order_By = { + author_id?: Maybe; + post_id?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Comments_Stddev_Samp_Fields = { + __typename?: 'comments_stddev_samp_fields'; + author_id?: Maybe; + post_id?: Maybe; +}; + +/** order by stddev_samp() on columns of table "comments" */ +export type Comments_Stddev_Samp_Order_By = { + author_id?: Maybe; + post_id?: Maybe; +}; + +/** aggregate sum on columns */ +export type Comments_Sum_Fields = { + __typename?: 'comments_sum_fields'; + author_id?: Maybe; + post_id?: Maybe; +}; + +/** order by sum() on columns of table "comments" */ +export type Comments_Sum_Order_By = { + author_id?: Maybe; + post_id?: Maybe; +}; + +/** update columns of table "comments" */ +export enum Comments_Update_Column { + /** column name */ + AuthorId = 'author_id', + /** column name */ + Content = 'content', + /** column name */ + CreatedAt = 'created_at', + /** column name */ + Id = 'id', + /** column name */ + PostId = 'post_id', + /** column name */ + UpdatedAt = 'updated_at' +} + +/** aggregate var_pop on columns */ +export type Comments_Var_Pop_Fields = { + __typename?: 'comments_var_pop_fields'; + author_id?: Maybe; + post_id?: Maybe; +}; + +/** order by var_pop() on columns of table "comments" */ +export type Comments_Var_Pop_Order_By = { + author_id?: Maybe; + post_id?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Comments_Var_Samp_Fields = { + __typename?: 'comments_var_samp_fields'; + author_id?: Maybe; + post_id?: Maybe; +}; + +/** order by var_samp() on columns of table "comments" */ +export type Comments_Var_Samp_Order_By = { + author_id?: Maybe; + post_id?: Maybe; +}; + +/** aggregate variance on columns */ +export type Comments_Variance_Fields = { + __typename?: 'comments_variance_fields'; + author_id?: Maybe; + post_id?: Maybe; +}; + +/** order by variance() on columns of table "comments" */ +export type Comments_Variance_Order_By = { + author_id?: Maybe; + post_id?: Maybe; +}; + +/** mutation root */ +export type Mutation_Root = { + __typename?: 'mutation_root'; + addressLinkConfirm?: Maybe; + addressLinkStart?: Maybe; + addressLogin?: Maybe; + addressLoginStart?: Maybe; + addressSignupConfirm?: Maybe; + addressSignupStart?: Maybe; + addressUnlink?: Maybe; + changeEmail?: Maybe; + changeNotificationPreference?: Maybe; + changePassword?: Maybe; + changeUsername?: Maybe; + createBlockIndex: BlockIndex; + createBlockNumber: BlockNumber; + createCouncil: Council; + createCouncilMember: CouncilMember; + createEra: Era; + createHeartBeat: HeartBeat; + createMotion: Motion; + createMotionProposalArgument: MotionProposalArgument; + createMotionStatus: MotionStatus; + createNomination: Nomination; + createOfflineValidator: OfflineValidator; + createPreimage: Preimage; + createPreimageArgument: PreimageArgument; + createPreimageStatus: PreimageStatus; + createProposal: Proposal; + createProposalStatus: ProposalStatus; + createReferendum: Referendum; + createReferendumStatus: ReferendumStatus; + createReward: Reward; + createSession: Session; + createSlashing: Slashing; + createStake: Stake; + createTip: Tip; + createTipStatus: TipStatus; + createTotalIssuance: TotalIssuance; + createTreasurySpendProposal: TreasurySpendProposal; + createTreasuryStatus: TreasuryStatus; + createValidator: Validator; + deleteBlockIndex?: Maybe; + deleteBlockNumber?: Maybe; + deleteCouncil?: Maybe; + deleteCouncilMember?: Maybe; + deleteEra?: Maybe; + deleteHeartBeat?: Maybe; + deleteManyBlockIndexes: BatchPayload; + deleteManyBlockNumbers: BatchPayload; + deleteManyCouncilMembers: BatchPayload; + deleteManyCouncils: BatchPayload; + deleteManyEras: BatchPayload; + deleteManyHeartBeats: BatchPayload; + deleteManyMotionProposalArguments: BatchPayload; + deleteManyMotionStatuses: BatchPayload; + deleteManyMotions: BatchPayload; + deleteManyNominations: BatchPayload; + deleteManyOfflineValidators: BatchPayload; + deleteManyPreimageArguments: BatchPayload; + deleteManyPreimageStatuses: BatchPayload; + deleteManyPreimages: BatchPayload; + deleteManyProposalStatuses: BatchPayload; + deleteManyProposals: BatchPayload; + deleteManyReferendumStatuses: BatchPayload; + deleteManyReferendums: BatchPayload; + deleteManyRewards: BatchPayload; + deleteManySessions: BatchPayload; + deleteManySlashings: BatchPayload; + deleteManyStakes: BatchPayload; + deleteManyTipStatuses: BatchPayload; + deleteManyTips: BatchPayload; + deleteManyTotalIssuances: BatchPayload; + deleteManyTreasurySpendProposals: BatchPayload; + deleteManyTreasuryStatuses: BatchPayload; + deleteManyValidators: BatchPayload; + deleteMotion?: Maybe; + deleteMotionProposalArgument?: Maybe; + deleteMotionStatus?: Maybe; + deleteNomination?: Maybe; + deleteOfflineValidator?: Maybe; + deletePreimage?: Maybe; + deletePreimageArgument?: Maybe; + deletePreimageStatus?: Maybe; + deleteProposal?: Maybe; + deleteProposalStatus?: Maybe; + deleteReferendum?: Maybe; + deleteReferendumStatus?: Maybe; + deleteReward?: Maybe; + deleteSession?: Maybe; + deleteSlashing?: Maybe; + deleteStake?: Maybe; + deleteTip?: Maybe; + deleteTipStatus?: Maybe; + deleteTotalIssuance?: Maybe; + deleteTreasurySpendProposal?: Maybe; + deleteTreasuryStatus?: Maybe; + deleteValidator?: Maybe; + /** delete data from the table: "comment_reactions" */ + delete_comment_reactions?: Maybe; + /** delete single row from the table: "comment_reactions" */ + delete_comment_reactions_by_pk?: Maybe; + /** delete data from the table: "comments" */ + delete_comments?: Maybe; + /** delete single row from the table: "comments" */ + delete_comments_by_pk?: Maybe; + /** delete data from the table: "onchain_links" */ + delete_onchain_links?: Maybe; + /** delete single row from the table: "onchain_links" */ + delete_onchain_links_by_pk?: Maybe; + /** delete data from the table: "poll" */ + delete_poll?: Maybe; + /** delete single row from the table: "poll" */ + delete_poll_by_pk?: Maybe; + /** delete data from the table: "poll_votes" */ + delete_poll_votes?: Maybe; + /** delete single row from the table: "poll_votes" */ + delete_poll_votes_by_pk?: Maybe; + /** delete data from the table: "post_reactions" */ + delete_post_reactions?: Maybe; + /** delete single row from the table: "post_reactions" */ + delete_post_reactions_by_pk?: Maybe; + /** delete data from the table: "post_topics" */ + delete_post_topics?: Maybe; + /** delete single row from the table: "post_topics" */ + delete_post_topics_by_pk?: Maybe; + /** delete data from the table: "post_types" */ + delete_post_types?: Maybe; + /** delete single row from the table: "post_types" */ + delete_post_types_by_pk?: Maybe; + /** delete data from the table: "posts" */ + delete_posts?: Maybe; + /** delete single row from the table: "posts" */ + delete_posts_by_pk?: Maybe; + executeRaw: Scalars['Json']; + /** insert data into the table: "comment_reactions" */ + insert_comment_reactions?: Maybe; + /** insert a single row into the table: "comment_reactions" */ + insert_comment_reactions_one?: Maybe; + /** insert data into the table: "comments" */ + insert_comments?: Maybe; + /** insert a single row into the table: "comments" */ + insert_comments_one?: Maybe; + /** insert data into the table: "onchain_links" */ + insert_onchain_links?: Maybe; + /** insert a single row into the table: "onchain_links" */ + insert_onchain_links_one?: Maybe; + /** insert data into the table: "poll" */ + insert_poll?: Maybe; + /** insert a single row into the table: "poll" */ + insert_poll_one?: Maybe; + /** insert data into the table: "poll_votes" */ + insert_poll_votes?: Maybe; + /** insert a single row into the table: "poll_votes" */ + insert_poll_votes_one?: Maybe; + /** insert data into the table: "post_reactions" */ + insert_post_reactions?: Maybe; + /** insert a single row into the table: "post_reactions" */ + insert_post_reactions_one?: Maybe; + /** insert data into the table: "post_topics" */ + insert_post_topics?: Maybe; + /** insert a single row into the table: "post_topics" */ + insert_post_topics_one?: Maybe; + /** insert data into the table: "post_types" */ + insert_post_types?: Maybe; + /** insert a single row into the table: "post_types" */ + insert_post_types_one?: Maybe; + /** insert data into the table: "posts" */ + insert_posts?: Maybe; + /** insert a single row into the table: "posts" */ + insert_posts_one?: Maybe; + login?: Maybe; + logout?: Maybe; + postSubscribe?: Maybe; + postUnsubscribe?: Maybe; + reportContent?: Maybe; + requestResetPassword?: Maybe; + resendVerifyEmailToken?: Maybe; + resetPassword?: Maybe; + setCredentialsConfirm?: Maybe; + setCredentialsStart?: Maybe; + setDefaultAddress?: Maybe; + signup?: Maybe; + undoEmailChange?: Maybe; + updateBlockIndex?: Maybe; + updateBlockNumber?: Maybe; + updateCouncil?: Maybe; + updateCouncilMember?: Maybe; + updateEra?: Maybe; + updateHeartBeat?: Maybe; + updateManyBlockIndexes: BatchPayload; + updateManyBlockNumbers: BatchPayload; + updateManyCouncilMembers: BatchPayload; + updateManyEras: BatchPayload; + updateManyHeartBeats: BatchPayload; + updateManyMotionProposalArguments: BatchPayload; + updateManyMotionStatuses: BatchPayload; + updateManyMotions: BatchPayload; + updateManyNominations: BatchPayload; + updateManyOfflineValidators: BatchPayload; + updateManyPreimageArguments: BatchPayload; + updateManyPreimageStatuses: BatchPayload; + updateManyPreimages: BatchPayload; + updateManyProposalStatuses: BatchPayload; + updateManyProposals: BatchPayload; + updateManyReferendumStatuses: BatchPayload; + updateManyReferendums: BatchPayload; + updateManyRewards: BatchPayload; + updateManySessions: BatchPayload; + updateManySlashings: BatchPayload; + updateManyStakes: BatchPayload; + updateManyTipStatuses: BatchPayload; + updateManyTips: BatchPayload; + updateManyTotalIssuances: BatchPayload; + updateManyTreasurySpendProposals: BatchPayload; + updateManyTreasuryStatuses: BatchPayload; + updateManyValidators: BatchPayload; + updateMotion?: Maybe; + updateMotionProposalArgument?: Maybe; + updateMotionStatus?: Maybe; + updateNomination?: Maybe; + updateOfflineValidator?: Maybe; + updatePreimage?: Maybe; + updatePreimageArgument?: Maybe; + updatePreimageStatus?: Maybe; + updateProposal?: Maybe; + updateProposalStatus?: Maybe; + updateReferendum?: Maybe; + updateReferendumStatus?: Maybe; + updateReward?: Maybe; + updateSession?: Maybe; + updateSlashing?: Maybe; + updateStake?: Maybe; + updateTip?: Maybe; + updateTipStatus?: Maybe; + updateTotalIssuance?: Maybe; + updateTreasurySpendProposal?: Maybe; + updateTreasuryStatus?: Maybe; + updateValidator?: Maybe; + /** update data of the table: "comment_reactions" */ + update_comment_reactions?: Maybe; + /** update single row of the table: "comment_reactions" */ + update_comment_reactions_by_pk?: Maybe; + /** update data of the table: "comments" */ + update_comments?: Maybe; + /** update single row of the table: "comments" */ + update_comments_by_pk?: Maybe; + /** update data of the table: "onchain_links" */ + update_onchain_links?: Maybe; + /** update single row of the table: "onchain_links" */ + update_onchain_links_by_pk?: Maybe; + /** update data of the table: "poll" */ + update_poll?: Maybe; + /** update single row of the table: "poll" */ + update_poll_by_pk?: Maybe; + /** update data of the table: "poll_votes" */ + update_poll_votes?: Maybe; + /** update single row of the table: "poll_votes" */ + update_poll_votes_by_pk?: Maybe; + /** update data of the table: "post_reactions" */ + update_post_reactions?: Maybe; + /** update single row of the table: "post_reactions" */ + update_post_reactions_by_pk?: Maybe; + /** update data of the table: "post_topics" */ + update_post_topics?: Maybe; + /** update single row of the table: "post_topics" */ + update_post_topics_by_pk?: Maybe; + /** update data of the table: "post_types" */ + update_post_types?: Maybe; + /** update single row of the table: "post_types" */ + update_post_types_by_pk?: Maybe; + /** update data of the table: "posts" */ + update_posts?: Maybe; + /** update single row of the table: "posts" */ + update_posts_by_pk?: Maybe; + upsertBlockIndex: BlockIndex; + upsertBlockNumber: BlockNumber; + upsertCouncil: Council; + upsertCouncilMember: CouncilMember; + upsertEra: Era; + upsertHeartBeat: HeartBeat; + upsertMotion: Motion; + upsertMotionProposalArgument: MotionProposalArgument; + upsertMotionStatus: MotionStatus; + upsertNomination: Nomination; + upsertOfflineValidator: OfflineValidator; + upsertPreimage: Preimage; + upsertPreimageArgument: PreimageArgument; + upsertPreimageStatus: PreimageStatus; + upsertProposal: Proposal; + upsertProposalStatus: ProposalStatus; + upsertReferendum: Referendum; + upsertReferendumStatus: ReferendumStatus; + upsertReward: Reward; + upsertSession: Session; + upsertSlashing: Slashing; + upsertStake: Stake; + upsertTip: Tip; + upsertTipStatus: TipStatus; + upsertTotalIssuance: TotalIssuance; + upsertTreasurySpendProposal: TreasurySpendProposal; + upsertTreasuryStatus: TreasuryStatus; + upsertValidator: Validator; + verifyEmail?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootAddressLinkConfirmArgs = { + address_id: Scalars['Int']; + signature: Scalars['String']; +}; + + +/** mutation root */ +export type Mutation_RootAddressLinkStartArgs = { + address: Scalars['String']; + network: Scalars['String']; +}; + + +/** mutation root */ +export type Mutation_RootAddressLoginArgs = { + address: Scalars['String']; + signature: Scalars['String']; +}; + + +/** mutation root */ +export type Mutation_RootAddressLoginStartArgs = { + address: Scalars['String']; +}; + + +/** mutation root */ +export type Mutation_RootAddressSignupConfirmArgs = { + address: Scalars['String']; + network: Scalars['String']; + signature: Scalars['String']; +}; + + +/** mutation root */ +export type Mutation_RootAddressSignupStartArgs = { + address: Scalars['String']; +}; + + +/** mutation root */ +export type Mutation_RootAddressUnlinkArgs = { + address: Scalars['String']; +}; + + +/** mutation root */ +export type Mutation_RootChangeEmailArgs = { + email: Scalars['String']; + password: Scalars['String']; +}; + + +/** mutation root */ +export type Mutation_RootChangeNotificationPreferenceArgs = { + notificationPreferences?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootChangePasswordArgs = { + newPassword: Scalars['String']; + oldPassword: Scalars['String']; +}; + + +/** mutation root */ +export type Mutation_RootChangeUsernameArgs = { + password: Scalars['String']; + username: Scalars['String']; +}; + + +/** mutation root */ +export type Mutation_RootCreateBlockIndexArgs = { + data: BlockIndexCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateBlockNumberArgs = { + data: BlockNumberCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateCouncilArgs = { + data: CouncilCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateCouncilMemberArgs = { + data: CouncilMemberCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateEraArgs = { + data: EraCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateHeartBeatArgs = { + data: HeartBeatCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateMotionArgs = { + data: MotionCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateMotionProposalArgumentArgs = { + data: MotionProposalArgumentCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateMotionStatusArgs = { + data: MotionStatusCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateNominationArgs = { + data: NominationCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateOfflineValidatorArgs = { + data: OfflineValidatorCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreatePreimageArgs = { + data: PreimageCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreatePreimageArgumentArgs = { + data: PreimageArgumentCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreatePreimageStatusArgs = { + data: PreimageStatusCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateProposalArgs = { + data: ProposalCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateProposalStatusArgs = { + data: ProposalStatusCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateReferendumArgs = { + data: ReferendumCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateReferendumStatusArgs = { + data: ReferendumStatusCreateInput; +}; + + +/** mutation root */ +export type Mutation_RootCreateRewardArgs = { + data: RewardCreateInput; }; -/** aggregated selection of "comment_reactions" */ -export type Comment_Reactions_Aggregate = { - __typename?: 'comment_reactions_aggregate'; - aggregate?: Maybe; - nodes: Array; + +/** mutation root */ +export type Mutation_RootCreateSessionArgs = { + data: SessionCreateInput; }; -/** aggregate fields of "comment_reactions" */ -export type Comment_Reactions_Aggregate_Fields = { - __typename?: 'comment_reactions_aggregate_fields'; - avg?: Maybe; - count?: Maybe; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; + +/** mutation root */ +export type Mutation_RootCreateSlashingArgs = { + data: SlashingCreateInput; }; -/** aggregate fields of "comment_reactions" */ -export type Comment_Reactions_Aggregate_FieldsCountArgs = { - columns?: Maybe>; - distinct?: Maybe; +/** mutation root */ +export type Mutation_RootCreateStakeArgs = { + data: StakeCreateInput; }; -/** order by aggregate values of table "comment_reactions" */ -export type Comment_Reactions_Aggregate_Order_By = { - avg?: Maybe; - count?: Maybe; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; + +/** mutation root */ +export type Mutation_RootCreateTipArgs = { + data: TipCreateInput; }; -/** input type for inserting array relation for remote table "comment_reactions" */ -export type Comment_Reactions_Arr_Rel_Insert_Input = { - data: Array; - on_conflict?: Maybe; + +/** mutation root */ +export type Mutation_RootCreateTipStatusArgs = { + data: TipStatusCreateInput; }; -/** aggregate avg on columns */ -export type Comment_Reactions_Avg_Fields = { - __typename?: 'comment_reactions_avg_fields'; - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootCreateTotalIssuanceArgs = { + data: TotalIssuanceCreateInput; }; -/** order by avg() on columns of table "comment_reactions" */ -export type Comment_Reactions_Avg_Order_By = { - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootCreateTreasurySpendProposalArgs = { + data: TreasurySpendProposalCreateInput; }; -/** Boolean expression to filter rows from the table "comment_reactions". All fields are combined with a logical 'AND'. */ -export type Comment_Reactions_Bool_Exp = { - _and?: Maybe>>; - _not?: Maybe; - _or?: Maybe>>; - comment?: Maybe; - comment_id?: Maybe; - created_at?: Maybe; - id?: Maybe; - reaction?: Maybe; - updated_at?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootCreateTreasuryStatusArgs = { + data: TreasuryStatusCreateInput; }; -/** unique or primary key constraints on table "comment_reactions" */ -export enum Comment_Reactions_Constraint { - /** unique or primary key constraint */ - CommentReactionsPkey = 'comment_reactions_pkey' -} -/** input type for incrementing integer column in table "comment_reactions" */ -export type Comment_Reactions_Inc_Input = { - id?: Maybe; - user_id?: Maybe; +/** mutation root */ +export type Mutation_RootCreateValidatorArgs = { + data: ValidatorCreateInput; }; -/** input type for inserting data into table "comment_reactions" */ -export type Comment_Reactions_Insert_Input = { - comment?: Maybe; - comment_id?: Maybe; - created_at?: Maybe; - id?: Maybe; - reaction?: Maybe; - updated_at?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteBlockIndexArgs = { + where: BlockIndexWhereUniqueInput; }; -/** aggregate max on columns */ -export type Comment_Reactions_Max_Fields = { - __typename?: 'comment_reactions_max_fields'; - comment_id?: Maybe; - created_at?: Maybe; - id?: Maybe; - updated_at?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteBlockNumberArgs = { + where: BlockNumberWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootDeleteCouncilArgs = { + where: CouncilWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootDeleteCouncilMemberArgs = { + where: CouncilMemberWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootDeleteEraArgs = { + where: EraWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootDeleteHeartBeatArgs = { + where: HeartBeatWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyBlockIndexesArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyBlockNumbersArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyCouncilMembersArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyCouncilsArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyErasArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyHeartBeatsArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyMotionProposalArgumentsArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyMotionStatusesArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyMotionsArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyNominationsArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyOfflineValidatorsArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyPreimageArgumentsArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyPreimageStatusesArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyPreimagesArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyProposalStatusesArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyProposalsArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyReferendumStatusesArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyReferendumsArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyRewardsArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManySessionsArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManySlashingsArgs = { + where?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootDeleteManyStakesArgs = { + where?: Maybe; }; -/** order by max() on columns of table "comment_reactions" */ -export type Comment_Reactions_Max_Order_By = { - comment_id?: Maybe; - created_at?: Maybe; - id?: Maybe; - updated_at?: Maybe; - user_id?: Maybe; -}; -/** aggregate min on columns */ -export type Comment_Reactions_Min_Fields = { - __typename?: 'comment_reactions_min_fields'; - comment_id?: Maybe; - created_at?: Maybe; - id?: Maybe; - updated_at?: Maybe; - user_id?: Maybe; +/** mutation root */ +export type Mutation_RootDeleteManyTipStatusesArgs = { + where?: Maybe; }; -/** order by min() on columns of table "comment_reactions" */ -export type Comment_Reactions_Min_Order_By = { - comment_id?: Maybe; - created_at?: Maybe; - id?: Maybe; - updated_at?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteManyTipsArgs = { + where?: Maybe; }; -/** response of any mutation on the table "comment_reactions" */ -export type Comment_Reactions_Mutation_Response = { - __typename?: 'comment_reactions_mutation_response'; - /** number of affected rows by the mutation */ - affected_rows: Scalars['Int']; - /** data of the affected rows by the mutation */ - returning: Array; + +/** mutation root */ +export type Mutation_RootDeleteManyTotalIssuancesArgs = { + where?: Maybe; }; -/** input type for inserting object relation for remote table "comment_reactions" */ -export type Comment_Reactions_Obj_Rel_Insert_Input = { - data: Comment_Reactions_Insert_Input; - on_conflict?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteManyTreasurySpendProposalsArgs = { + where?: Maybe; }; -/** on conflict condition type for table "comment_reactions" */ -export type Comment_Reactions_On_Conflict = { - constraint: Comment_Reactions_Constraint; - update_columns: Array; - where?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteManyTreasuryStatusesArgs = { + where?: Maybe; }; -/** ordering options when selecting data from "comment_reactions" */ -export type Comment_Reactions_Order_By = { - comment?: Maybe; - comment_id?: Maybe; - created_at?: Maybe; - id?: Maybe; - reaction?: Maybe; - updated_at?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteManyValidatorsArgs = { + where?: Maybe; }; -/** primary key columns input for table: "comment_reactions" */ -export type Comment_Reactions_Pk_Columns_Input = { - id: Scalars['Int']; + +/** mutation root */ +export type Mutation_RootDeleteMotionArgs = { + where: MotionWhereUniqueInput; }; -/** select columns of table "comment_reactions" */ -export enum Comment_Reactions_Select_Column { - /** column name */ - CommentId = 'comment_id', - /** column name */ - CreatedAt = 'created_at', - /** column name */ - Id = 'id', - /** column name */ - Reaction = 'reaction', - /** column name */ - UpdatedAt = 'updated_at', - /** column name */ - UserId = 'user_id' -} -/** input type for updating data in table "comment_reactions" */ -export type Comment_Reactions_Set_Input = { - comment_id?: Maybe; - created_at?: Maybe; - id?: Maybe; - reaction?: Maybe; - updated_at?: Maybe; - user_id?: Maybe; +/** mutation root */ +export type Mutation_RootDeleteMotionProposalArgumentArgs = { + where: MotionProposalArgumentWhereUniqueInput; }; -/** aggregate stddev on columns */ -export type Comment_Reactions_Stddev_Fields = { - __typename?: 'comment_reactions_stddev_fields'; - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteMotionStatusArgs = { + where: MotionStatusWhereUniqueInput; }; -/** order by stddev() on columns of table "comment_reactions" */ -export type Comment_Reactions_Stddev_Order_By = { - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteNominationArgs = { + where: NominationWhereUniqueInput; }; -/** aggregate stddev_pop on columns */ -export type Comment_Reactions_Stddev_Pop_Fields = { - __typename?: 'comment_reactions_stddev_pop_fields'; - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteOfflineValidatorArgs = { + where: OfflineValidatorWhereUniqueInput; }; -/** order by stddev_pop() on columns of table "comment_reactions" */ -export type Comment_Reactions_Stddev_Pop_Order_By = { - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeletePreimageArgs = { + where: PreimageWhereUniqueInput; }; -/** aggregate stddev_samp on columns */ -export type Comment_Reactions_Stddev_Samp_Fields = { - __typename?: 'comment_reactions_stddev_samp_fields'; - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeletePreimageArgumentArgs = { + where: PreimageArgumentWhereUniqueInput; }; -/** order by stddev_samp() on columns of table "comment_reactions" */ -export type Comment_Reactions_Stddev_Samp_Order_By = { - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeletePreimageStatusArgs = { + where: PreimageStatusWhereUniqueInput; }; -/** aggregate sum on columns */ -export type Comment_Reactions_Sum_Fields = { - __typename?: 'comment_reactions_sum_fields'; - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteProposalArgs = { + where: ProposalWhereUniqueInput; }; -/** order by sum() on columns of table "comment_reactions" */ -export type Comment_Reactions_Sum_Order_By = { - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteProposalStatusArgs = { + where: ProposalStatusWhereUniqueInput; }; -/** update columns of table "comment_reactions" */ -export enum Comment_Reactions_Update_Column { - /** column name */ - CommentId = 'comment_id', - /** column name */ - CreatedAt = 'created_at', - /** column name */ - Id = 'id', - /** column name */ - Reaction = 'reaction', - /** column name */ - UpdatedAt = 'updated_at', - /** column name */ - UserId = 'user_id' -} -/** aggregate var_pop on columns */ -export type Comment_Reactions_Var_Pop_Fields = { - __typename?: 'comment_reactions_var_pop_fields'; - id?: Maybe; - user_id?: Maybe; +/** mutation root */ +export type Mutation_RootDeleteReferendumArgs = { + where: ReferendumWhereUniqueInput; }; -/** order by var_pop() on columns of table "comment_reactions" */ -export type Comment_Reactions_Var_Pop_Order_By = { - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteReferendumStatusArgs = { + where: ReferendumStatusWhereUniqueInput; }; -/** aggregate var_samp on columns */ -export type Comment_Reactions_Var_Samp_Fields = { - __typename?: 'comment_reactions_var_samp_fields'; - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteRewardArgs = { + where: RewardWhereUniqueInput; }; -/** order by var_samp() on columns of table "comment_reactions" */ -export type Comment_Reactions_Var_Samp_Order_By = { - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteSessionArgs = { + where: SessionWhereUniqueInput; }; -/** aggregate variance on columns */ -export type Comment_Reactions_Variance_Fields = { - __typename?: 'comment_reactions_variance_fields'; - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteSlashingArgs = { + where: SlashingWhereUniqueInput; }; -/** order by variance() on columns of table "comment_reactions" */ -export type Comment_Reactions_Variance_Order_By = { - id?: Maybe; - user_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteStakeArgs = { + where: StakeWhereUniqueInput; }; -/** columns and relationships of "comments" */ -export type Comments = { - __typename?: 'comments'; - /** Remote relationship field */ - author?: Maybe; - author_id: Scalars['Int']; - /** An array relationship */ - comment_reactions: Array; - /** An aggregated array relationship */ - comment_reactions_aggregate: Comment_Reactions_Aggregate; - content: Scalars['String']; - created_at: Scalars['timestamptz']; - id: Scalars['uuid']; - /** An object relationship */ - post: Posts; - post_id: Scalars['Int']; - updated_at: Scalars['timestamptz']; + +/** mutation root */ +export type Mutation_RootDeleteTipArgs = { + where: TipWhereUniqueInput; }; -/** columns and relationships of "comments" */ -export type CommentsComment_ReactionsArgs = { - distinct_on?: Maybe>; - limit?: Maybe; - offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; +/** mutation root */ +export type Mutation_RootDeleteTipStatusArgs = { + where: TipStatusWhereUniqueInput; }; -/** columns and relationships of "comments" */ -export type CommentsComment_Reactions_AggregateArgs = { - distinct_on?: Maybe>; - limit?: Maybe; - offset?: Maybe; - order_by?: Maybe>; - where?: Maybe; +/** mutation root */ +export type Mutation_RootDeleteTotalIssuanceArgs = { + where: TotalIssuanceWhereUniqueInput; }; -/** aggregated selection of "comments" */ -export type Comments_Aggregate = { - __typename?: 'comments_aggregate'; - aggregate?: Maybe; - nodes: Array; + +/** mutation root */ +export type Mutation_RootDeleteTreasurySpendProposalArgs = { + where: TreasurySpendProposalWhereUniqueInput; }; -/** aggregate fields of "comments" */ -export type Comments_Aggregate_Fields = { - __typename?: 'comments_aggregate_fields'; - avg?: Maybe; - count?: Maybe; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; + +/** mutation root */ +export type Mutation_RootDeleteTreasuryStatusArgs = { + where: TreasuryStatusWhereUniqueInput; }; -/** aggregate fields of "comments" */ -export type Comments_Aggregate_FieldsCountArgs = { - columns?: Maybe>; - distinct?: Maybe; +/** mutation root */ +export type Mutation_RootDeleteValidatorArgs = { + where: ValidatorWhereUniqueInput; }; -/** order by aggregate values of table "comments" */ -export type Comments_Aggregate_Order_By = { - avg?: Maybe; - count?: Maybe; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_Comment_ReactionsArgs = { + where: Comment_Reactions_Bool_Exp; }; -/** input type for inserting array relation for remote table "comments" */ -export type Comments_Arr_Rel_Insert_Input = { - data: Array; - on_conflict?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_Comment_Reactions_By_PkArgs = { + id: Scalars['Int']; }; -/** aggregate avg on columns */ -export type Comments_Avg_Fields = { - __typename?: 'comments_avg_fields'; - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_CommentsArgs = { + where: Comments_Bool_Exp; }; -/** order by avg() on columns of table "comments" */ -export type Comments_Avg_Order_By = { - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_Comments_By_PkArgs = { + id: Scalars['uuid']; }; -/** Boolean expression to filter rows from the table "comments". All fields are combined with a logical 'AND'. */ -export type Comments_Bool_Exp = { - _and?: Maybe>>; - _not?: Maybe; - _or?: Maybe>>; - author_id?: Maybe; - comment_reactions?: Maybe; - content?: Maybe; - created_at?: Maybe; - id?: Maybe; - post?: Maybe; - post_id?: Maybe; - updated_at?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_Onchain_LinksArgs = { + where: Onchain_Links_Bool_Exp; }; -/** unique or primary key constraints on table "comments" */ -export enum Comments_Constraint { - /** unique or primary key constraint */ - CommentsPkey = 'comments_pkey' -} -/** input type for incrementing integer column in table "comments" */ -export type Comments_Inc_Input = { - author_id?: Maybe; - post_id?: Maybe; +/** mutation root */ +export type Mutation_RootDelete_Onchain_Links_By_PkArgs = { + id: Scalars['Int']; }; -/** input type for inserting data into table "comments" */ -export type Comments_Insert_Input = { - author_id?: Maybe; - comment_reactions?: Maybe; - content?: Maybe; - created_at?: Maybe; - id?: Maybe; - post?: Maybe; - post_id?: Maybe; - updated_at?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_PollArgs = { + where: Poll_Bool_Exp; }; -/** aggregate max on columns */ -export type Comments_Max_Fields = { - __typename?: 'comments_max_fields'; - author_id?: Maybe; - content?: Maybe; - created_at?: Maybe; - id?: Maybe; - post_id?: Maybe; - updated_at?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_Poll_By_PkArgs = { + id: Scalars['Int']; }; -/** order by max() on columns of table "comments" */ -export type Comments_Max_Order_By = { - author_id?: Maybe; - content?: Maybe; - created_at?: Maybe; - id?: Maybe; - post_id?: Maybe; - updated_at?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_Poll_VotesArgs = { + where: Poll_Votes_Bool_Exp; }; -/** aggregate min on columns */ -export type Comments_Min_Fields = { - __typename?: 'comments_min_fields'; - author_id?: Maybe; - content?: Maybe; - created_at?: Maybe; - id?: Maybe; - post_id?: Maybe; - updated_at?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_Poll_Votes_By_PkArgs = { + id: Scalars['Int']; }; -/** order by min() on columns of table "comments" */ -export type Comments_Min_Order_By = { - author_id?: Maybe; - content?: Maybe; - created_at?: Maybe; - id?: Maybe; - post_id?: Maybe; - updated_at?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_Post_ReactionsArgs = { + where: Post_Reactions_Bool_Exp; }; -/** response of any mutation on the table "comments" */ -export type Comments_Mutation_Response = { - __typename?: 'comments_mutation_response'; - /** number of affected rows by the mutation */ - affected_rows: Scalars['Int']; - /** data of the affected rows by the mutation */ - returning: Array; + +/** mutation root */ +export type Mutation_RootDelete_Post_Reactions_By_PkArgs = { + id: Scalars['Int']; }; -/** input type for inserting object relation for remote table "comments" */ -export type Comments_Obj_Rel_Insert_Input = { - data: Comments_Insert_Input; - on_conflict?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_Post_TopicsArgs = { + where: Post_Topics_Bool_Exp; }; -/** on conflict condition type for table "comments" */ -export type Comments_On_Conflict = { - constraint: Comments_Constraint; - update_columns: Array; - where?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_Post_Topics_By_PkArgs = { + id: Scalars['Int']; }; -/** ordering options when selecting data from "comments" */ -export type Comments_Order_By = { - author_id?: Maybe; - comment_reactions_aggregate?: Maybe; - content?: Maybe; - created_at?: Maybe; - id?: Maybe; - post?: Maybe; - post_id?: Maybe; - updated_at?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_Post_TypesArgs = { + where: Post_Types_Bool_Exp; }; -/** primary key columns input for table: "comments" */ -export type Comments_Pk_Columns_Input = { - id: Scalars['uuid']; + +/** mutation root */ +export type Mutation_RootDelete_Post_Types_By_PkArgs = { + id: Scalars['Int']; }; -/** select columns of table "comments" */ -export enum Comments_Select_Column { - /** column name */ - AuthorId = 'author_id', - /** column name */ - Content = 'content', - /** column name */ - CreatedAt = 'created_at', - /** column name */ - Id = 'id', - /** column name */ - PostId = 'post_id', - /** column name */ - UpdatedAt = 'updated_at' -} -/** input type for updating data in table "comments" */ -export type Comments_Set_Input = { - author_id?: Maybe; - content?: Maybe; - created_at?: Maybe; - id?: Maybe; - post_id?: Maybe; - updated_at?: Maybe; +/** mutation root */ +export type Mutation_RootDelete_PostsArgs = { + where: Posts_Bool_Exp; }; -/** aggregate stddev on columns */ -export type Comments_Stddev_Fields = { - __typename?: 'comments_stddev_fields'; - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootDelete_Posts_By_PkArgs = { + id: Scalars['Int']; }; -/** order by stddev() on columns of table "comments" */ -export type Comments_Stddev_Order_By = { - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootExecuteRawArgs = { + database?: Maybe; + query: Scalars['String']; }; -/** aggregate stddev_pop on columns */ -export type Comments_Stddev_Pop_Fields = { - __typename?: 'comments_stddev_pop_fields'; - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootInsert_Comment_ReactionsArgs = { + objects: Array; + on_conflict?: Maybe; }; -/** order by stddev_pop() on columns of table "comments" */ -export type Comments_Stddev_Pop_Order_By = { - author_id?: Maybe; - post_id?: Maybe; -}; -/** aggregate stddev_samp on columns */ -export type Comments_Stddev_Samp_Fields = { - __typename?: 'comments_stddev_samp_fields'; - author_id?: Maybe; - post_id?: Maybe; +/** mutation root */ +export type Mutation_RootInsert_Comment_Reactions_OneArgs = { + object: Comment_Reactions_Insert_Input; + on_conflict?: Maybe; }; -/** order by stddev_samp() on columns of table "comments" */ -export type Comments_Stddev_Samp_Order_By = { - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootInsert_CommentsArgs = { + objects: Array; + on_conflict?: Maybe; }; -/** aggregate sum on columns */ -export type Comments_Sum_Fields = { - __typename?: 'comments_sum_fields'; - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootInsert_Comments_OneArgs = { + object: Comments_Insert_Input; + on_conflict?: Maybe; }; -/** order by sum() on columns of table "comments" */ -export type Comments_Sum_Order_By = { - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootInsert_Onchain_LinksArgs = { + objects: Array; + on_conflict?: Maybe; }; -/** update columns of table "comments" */ -export enum Comments_Update_Column { - /** column name */ - AuthorId = 'author_id', - /** column name */ - Content = 'content', - /** column name */ - CreatedAt = 'created_at', - /** column name */ - Id = 'id', - /** column name */ - PostId = 'post_id', - /** column name */ - UpdatedAt = 'updated_at' -} -/** aggregate var_pop on columns */ -export type Comments_Var_Pop_Fields = { - __typename?: 'comments_var_pop_fields'; - author_id?: Maybe; - post_id?: Maybe; +/** mutation root */ +export type Mutation_RootInsert_Onchain_Links_OneArgs = { + object: Onchain_Links_Insert_Input; + on_conflict?: Maybe; }; -/** order by var_pop() on columns of table "comments" */ -export type Comments_Var_Pop_Order_By = { - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootInsert_PollArgs = { + objects: Array; + on_conflict?: Maybe; }; -/** aggregate var_samp on columns */ -export type Comments_Var_Samp_Fields = { - __typename?: 'comments_var_samp_fields'; - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootInsert_Poll_OneArgs = { + object: Poll_Insert_Input; + on_conflict?: Maybe; }; -/** order by var_samp() on columns of table "comments" */ -export type Comments_Var_Samp_Order_By = { - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootInsert_Poll_VotesArgs = { + objects: Array; + on_conflict?: Maybe; }; -/** aggregate variance on columns */ -export type Comments_Variance_Fields = { - __typename?: 'comments_variance_fields'; - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootInsert_Poll_Votes_OneArgs = { + object: Poll_Votes_Insert_Input; + on_conflict?: Maybe; }; -/** order by variance() on columns of table "comments" */ -export type Comments_Variance_Order_By = { - author_id?: Maybe; - post_id?: Maybe; + +/** mutation root */ +export type Mutation_RootInsert_Post_ReactionsArgs = { + objects: Array; + on_conflict?: Maybe; }; + /** mutation root */ -export type Mutation_Root = { - __typename?: 'mutation_root'; - addressLinkConfirm?: Maybe; - addressLinkStart?: Maybe; - addressLogin?: Maybe; - addressLoginStart?: Maybe; - addressSignupConfirm?: Maybe; - addressSignupStart?: Maybe; - addressUnlink?: Maybe; - changeEmail?: Maybe; - changeNotificationPreference?: Maybe; - changePassword?: Maybe; - changeUsername?: Maybe; - /** delete data from the table: "comment_reactions" */ - delete_comment_reactions?: Maybe; - /** delete single row from the table: "comment_reactions" */ - delete_comment_reactions_by_pk?: Maybe; - /** delete data from the table: "comments" */ - delete_comments?: Maybe; - /** delete single row from the table: "comments" */ - delete_comments_by_pk?: Maybe; - /** delete data from the table: "onchain_links" */ - delete_onchain_links?: Maybe; - /** delete single row from the table: "onchain_links" */ - delete_onchain_links_by_pk?: Maybe; - /** delete data from the table: "poll" */ - delete_poll?: Maybe; - /** delete single row from the table: "poll" */ - delete_poll_by_pk?: Maybe; - /** delete data from the table: "poll_votes" */ - delete_poll_votes?: Maybe; - /** delete single row from the table: "poll_votes" */ - delete_poll_votes_by_pk?: Maybe; - /** delete data from the table: "post_reactions" */ - delete_post_reactions?: Maybe; - /** delete single row from the table: "post_reactions" */ - delete_post_reactions_by_pk?: Maybe; - /** delete data from the table: "post_topics" */ - delete_post_topics?: Maybe; - /** delete single row from the table: "post_topics" */ - delete_post_topics_by_pk?: Maybe; - /** delete data from the table: "post_types" */ - delete_post_types?: Maybe; - /** delete single row from the table: "post_types" */ - delete_post_types_by_pk?: Maybe; - /** delete data from the table: "posts" */ - delete_posts?: Maybe; - /** delete single row from the table: "posts" */ - delete_posts_by_pk?: Maybe; - /** insert data into the table: "comment_reactions" */ - insert_comment_reactions?: Maybe; - /** insert a single row into the table: "comment_reactions" */ - insert_comment_reactions_one?: Maybe; - /** insert data into the table: "comments" */ - insert_comments?: Maybe; - /** insert a single row into the table: "comments" */ - insert_comments_one?: Maybe; - /** insert data into the table: "onchain_links" */ - insert_onchain_links?: Maybe; - /** insert a single row into the table: "onchain_links" */ - insert_onchain_links_one?: Maybe; - /** insert data into the table: "poll" */ - insert_poll?: Maybe; - /** insert a single row into the table: "poll" */ - insert_poll_one?: Maybe; - /** insert data into the table: "poll_votes" */ - insert_poll_votes?: Maybe; - /** insert a single row into the table: "poll_votes" */ - insert_poll_votes_one?: Maybe; - /** insert data into the table: "post_reactions" */ - insert_post_reactions?: Maybe; - /** insert a single row into the table: "post_reactions" */ - insert_post_reactions_one?: Maybe; - /** insert data into the table: "post_topics" */ - insert_post_topics?: Maybe; - /** insert a single row into the table: "post_topics" */ - insert_post_topics_one?: Maybe; - /** insert data into the table: "post_types" */ - insert_post_types?: Maybe; - /** insert a single row into the table: "post_types" */ - insert_post_types_one?: Maybe; - /** insert data into the table: "posts" */ - insert_posts?: Maybe; - /** insert a single row into the table: "posts" */ - insert_posts_one?: Maybe; - login?: Maybe; - logout?: Maybe; - postSubscribe?: Maybe; - postUnsubscribe?: Maybe; - reportContent?: Maybe; - requestResetPassword?: Maybe; - resendVerifyEmailToken?: Maybe; - resetPassword?: Maybe; - setCredentialsConfirm?: Maybe; - setCredentialsStart?: Maybe; - setDefaultAddress?: Maybe; - signup?: Maybe; - undoEmailChange?: Maybe; - /** update data of the table: "comment_reactions" */ - update_comment_reactions?: Maybe; - /** update single row of the table: "comment_reactions" */ - update_comment_reactions_by_pk?: Maybe; - /** update data of the table: "comments" */ - update_comments?: Maybe; - /** update single row of the table: "comments" */ - update_comments_by_pk?: Maybe; - /** update data of the table: "onchain_links" */ - update_onchain_links?: Maybe; - /** update single row of the table: "onchain_links" */ - update_onchain_links_by_pk?: Maybe; - /** update data of the table: "poll" */ - update_poll?: Maybe; - /** update single row of the table: "poll" */ - update_poll_by_pk?: Maybe; - /** update data of the table: "poll_votes" */ - update_poll_votes?: Maybe; - /** update single row of the table: "poll_votes" */ - update_poll_votes_by_pk?: Maybe; - /** update data of the table: "post_reactions" */ - update_post_reactions?: Maybe; - /** update single row of the table: "post_reactions" */ - update_post_reactions_by_pk?: Maybe; - /** update data of the table: "post_topics" */ - update_post_topics?: Maybe; - /** update single row of the table: "post_topics" */ - update_post_topics_by_pk?: Maybe; - /** update data of the table: "post_types" */ - update_post_types?: Maybe; - /** update single row of the table: "post_types" */ - update_post_types_by_pk?: Maybe; - /** update data of the table: "posts" */ - update_posts?: Maybe; - /** update single row of the table: "posts" */ - update_posts_by_pk?: Maybe; - verifyEmail?: Maybe; +export type Mutation_RootInsert_Post_Reactions_OneArgs = { + object: Post_Reactions_Insert_Input; + on_conflict?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootInsert_Post_TopicsArgs = { + objects: Array; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootAddressLinkConfirmArgs = { - address_id: Scalars['Int']; - signature: Scalars['String']; +export type Mutation_RootInsert_Post_Topics_OneArgs = { + object: Post_Topics_Insert_Input; + on_conflict?: Maybe; }; /** mutation root */ -export type Mutation_RootAddressLinkStartArgs = { - address: Scalars['String']; +export type Mutation_RootInsert_Post_TypesArgs = { + objects: Array; + on_conflict?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootInsert_Post_Types_OneArgs = { + object: Post_Types_Insert_Input; + on_conflict?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootInsert_PostsArgs = { + objects: Array; + on_conflict?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootInsert_Posts_OneArgs = { + object: Posts_Insert_Input; + on_conflict?: Maybe; +}; + + +/** mutation root */ +export type Mutation_RootLoginArgs = { + password: Scalars['String']; + username: Scalars['String']; +}; + + +/** mutation root */ +export type Mutation_RootPostSubscribeArgs = { + post_id: Scalars['Int']; +}; + + +/** mutation root */ +export type Mutation_RootPostUnsubscribeArgs = { + post_id: Scalars['Int']; +}; + + +/** mutation root */ +export type Mutation_RootReportContentArgs = { + comments?: Maybe; + content_id: Scalars['String']; network: Scalars['String']; + reason: Scalars['String']; + type: Scalars['String']; }; /** mutation root */ -export type Mutation_RootAddressLoginArgs = { - address: Scalars['String']; - signature: Scalars['String']; +export type Mutation_RootRequestResetPasswordArgs = { + email: Scalars['String']; }; /** mutation root */ -export type Mutation_RootAddressLoginStartArgs = { - address: Scalars['String']; +export type Mutation_RootResetPasswordArgs = { + newPassword: Scalars['String']; + token: Scalars['String']; + userId: Scalars['Int']; }; /** mutation root */ -export type Mutation_RootAddressSignupConfirmArgs = { +export type Mutation_RootSetCredentialsConfirmArgs = { address: Scalars['String']; - network: Scalars['String']; + email?: Maybe; + password: Scalars['String']; signature: Scalars['String']; + username: Scalars['String']; }; /** mutation root */ -export type Mutation_RootAddressSignupStartArgs = { +export type Mutation_RootSetCredentialsStartArgs = { address: Scalars['String']; }; /** mutation root */ -export type Mutation_RootAddressUnlinkArgs = { +export type Mutation_RootSetDefaultAddressArgs = { address: Scalars['String']; }; /** mutation root */ -export type Mutation_RootChangeEmailArgs = { - email: Scalars['String']; +export type Mutation_RootSignupArgs = { + email?: Maybe; password: Scalars['String']; + username: Scalars['String']; }; /** mutation root */ -export type Mutation_RootChangeNotificationPreferenceArgs = { - notificationPreferences?: Maybe; +export type Mutation_RootUndoEmailChangeArgs = { + token: Scalars['String']; }; /** mutation root */ -export type Mutation_RootChangePasswordArgs = { - newPassword: Scalars['String']; - oldPassword: Scalars['String']; +export type Mutation_RootUpdateBlockIndexArgs = { + data: BlockIndexUpdateInput; + where: BlockIndexWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootChangeUsernameArgs = { - password: Scalars['String']; - username: Scalars['String']; +export type Mutation_RootUpdateBlockNumberArgs = { + data: BlockNumberUpdateInput; + where: BlockNumberWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootDelete_Comment_ReactionsArgs = { - where: Comment_Reactions_Bool_Exp; +export type Mutation_RootUpdateCouncilArgs = { + data: CouncilUpdateInput; + where: CouncilWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootDelete_Comment_Reactions_By_PkArgs = { - id: Scalars['Int']; +export type Mutation_RootUpdateCouncilMemberArgs = { + data: CouncilMemberUpdateInput; + where: CouncilMemberWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootDelete_CommentsArgs = { - where: Comments_Bool_Exp; +export type Mutation_RootUpdateEraArgs = { + data: EraUpdateInput; + where: EraWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootDelete_Comments_By_PkArgs = { - id: Scalars['uuid']; +export type Mutation_RootUpdateHeartBeatArgs = { + data: HeartBeatUpdateInput; + where: HeartBeatWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootDelete_Onchain_LinksArgs = { - where: Onchain_Links_Bool_Exp; +export type Mutation_RootUpdateManyBlockIndexesArgs = { + data: BlockIndexUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_Onchain_Links_By_PkArgs = { - id: Scalars['Int']; +export type Mutation_RootUpdateManyBlockNumbersArgs = { + data: BlockNumberUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_PollArgs = { - where: Poll_Bool_Exp; +export type Mutation_RootUpdateManyCouncilMembersArgs = { + data: CouncilMemberUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_Poll_By_PkArgs = { - id: Scalars['Int']; +export type Mutation_RootUpdateManyErasArgs = { + data: EraUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_Poll_VotesArgs = { - where: Poll_Votes_Bool_Exp; +export type Mutation_RootUpdateManyHeartBeatsArgs = { + data: HeartBeatUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_Poll_Votes_By_PkArgs = { - id: Scalars['Int']; +export type Mutation_RootUpdateManyMotionProposalArgumentsArgs = { + data: MotionProposalArgumentUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_Post_ReactionsArgs = { - where: Post_Reactions_Bool_Exp; +export type Mutation_RootUpdateManyMotionStatusesArgs = { + data: MotionStatusUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_Post_Reactions_By_PkArgs = { - id: Scalars['Int']; +export type Mutation_RootUpdateManyMotionsArgs = { + data: MotionUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_Post_TopicsArgs = { - where: Post_Topics_Bool_Exp; +export type Mutation_RootUpdateManyNominationsArgs = { + data: NominationUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_Post_Topics_By_PkArgs = { - id: Scalars['Int']; +export type Mutation_RootUpdateManyOfflineValidatorsArgs = { + data: OfflineValidatorUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_Post_TypesArgs = { - where: Post_Types_Bool_Exp; +export type Mutation_RootUpdateManyPreimageArgumentsArgs = { + data: PreimageArgumentUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_Post_Types_By_PkArgs = { - id: Scalars['Int']; +export type Mutation_RootUpdateManyPreimageStatusesArgs = { + data: PreimageStatusUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_PostsArgs = { - where: Posts_Bool_Exp; +export type Mutation_RootUpdateManyPreimagesArgs = { + data: PreimageUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootDelete_Posts_By_PkArgs = { - id: Scalars['Int']; +export type Mutation_RootUpdateManyProposalStatusesArgs = { + data: ProposalStatusUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_Comment_ReactionsArgs = { - objects: Array; - on_conflict?: Maybe; +export type Mutation_RootUpdateManyProposalsArgs = { + data: ProposalUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_Comment_Reactions_OneArgs = { - object: Comment_Reactions_Insert_Input; - on_conflict?: Maybe; +export type Mutation_RootUpdateManyReferendumStatusesArgs = { + data: ReferendumStatusUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_CommentsArgs = { - objects: Array; - on_conflict?: Maybe; +export type Mutation_RootUpdateManyReferendumsArgs = { + data: ReferendumUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_Comments_OneArgs = { - object: Comments_Insert_Input; - on_conflict?: Maybe; +export type Mutation_RootUpdateManyRewardsArgs = { + data: RewardUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_Onchain_LinksArgs = { - objects: Array; - on_conflict?: Maybe; +export type Mutation_RootUpdateManySessionsArgs = { + data: SessionUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_Onchain_Links_OneArgs = { - object: Onchain_Links_Insert_Input; - on_conflict?: Maybe; +export type Mutation_RootUpdateManySlashingsArgs = { + data: SlashingUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_PollArgs = { - objects: Array; - on_conflict?: Maybe; +export type Mutation_RootUpdateManyStakesArgs = { + data: StakeUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_Poll_OneArgs = { - object: Poll_Insert_Input; - on_conflict?: Maybe; +export type Mutation_RootUpdateManyTipStatusesArgs = { + data: TipStatusUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_Poll_VotesArgs = { - objects: Array; - on_conflict?: Maybe; +export type Mutation_RootUpdateManyTipsArgs = { + data: TipUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_Poll_Votes_OneArgs = { - object: Poll_Votes_Insert_Input; - on_conflict?: Maybe; +export type Mutation_RootUpdateManyTotalIssuancesArgs = { + data: TotalIssuanceUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_Post_ReactionsArgs = { - objects: Array; - on_conflict?: Maybe; +export type Mutation_RootUpdateManyTreasurySpendProposalsArgs = { + data: TreasurySpendProposalUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_Post_Reactions_OneArgs = { - object: Post_Reactions_Insert_Input; - on_conflict?: Maybe; +export type Mutation_RootUpdateManyTreasuryStatusesArgs = { + data: TreasuryStatusUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_Post_TopicsArgs = { - objects: Array; - on_conflict?: Maybe; +export type Mutation_RootUpdateManyValidatorsArgs = { + data: ValidatorUpdateManyMutationInput; + where?: Maybe; }; /** mutation root */ -export type Mutation_RootInsert_Post_Topics_OneArgs = { - object: Post_Topics_Insert_Input; - on_conflict?: Maybe; +export type Mutation_RootUpdateMotionArgs = { + data: MotionUpdateInput; + where: MotionWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootInsert_Post_TypesArgs = { - objects: Array; - on_conflict?: Maybe; +export type Mutation_RootUpdateMotionProposalArgumentArgs = { + data: MotionProposalArgumentUpdateInput; + where: MotionProposalArgumentWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootInsert_Post_Types_OneArgs = { - object: Post_Types_Insert_Input; - on_conflict?: Maybe; +export type Mutation_RootUpdateMotionStatusArgs = { + data: MotionStatusUpdateInput; + where: MotionStatusWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootInsert_PostsArgs = { - objects: Array; - on_conflict?: Maybe; +export type Mutation_RootUpdateNominationArgs = { + data: NominationUpdateInput; + where: NominationWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootInsert_Posts_OneArgs = { - object: Posts_Insert_Input; - on_conflict?: Maybe; +export type Mutation_RootUpdateOfflineValidatorArgs = { + data: OfflineValidatorUpdateInput; + where: OfflineValidatorWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpdatePreimageArgs = { + data: PreimageUpdateInput; + where: PreimageWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpdatePreimageArgumentArgs = { + data: PreimageArgumentUpdateInput; + where: PreimageArgumentWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpdatePreimageStatusArgs = { + data: PreimageStatusUpdateInput; + where: PreimageStatusWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpdateProposalArgs = { + data: ProposalUpdateInput; + where: ProposalWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpdateProposalStatusArgs = { + data: ProposalStatusUpdateInput; + where: ProposalStatusWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpdateReferendumArgs = { + data: ReferendumUpdateInput; + where: ReferendumWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootLoginArgs = { - password: Scalars['String']; - username: Scalars['String']; +export type Mutation_RootUpdateReferendumStatusArgs = { + data: ReferendumStatusUpdateInput; + where: ReferendumStatusWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootPostSubscribeArgs = { - post_id: Scalars['Int']; +export type Mutation_RootUpdateRewardArgs = { + data: RewardUpdateInput; + where: RewardWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootPostUnsubscribeArgs = { - post_id: Scalars['Int']; +export type Mutation_RootUpdateSessionArgs = { + data: SessionUpdateInput; + where: SessionWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootReportContentArgs = { - comments?: Maybe; - content_id: Scalars['String']; - network: Scalars['String']; - reason: Scalars['String']; - type: Scalars['String']; +export type Mutation_RootUpdateSlashingArgs = { + data: SlashingUpdateInput; + where: SlashingWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootRequestResetPasswordArgs = { - email: Scalars['String']; +export type Mutation_RootUpdateStakeArgs = { + data: StakeUpdateInput; + where: StakeWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootResetPasswordArgs = { - newPassword: Scalars['String']; - token: Scalars['String']; - userId: Scalars['Int']; +export type Mutation_RootUpdateTipArgs = { + data: TipUpdateInput; + where: TipWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootSetCredentialsConfirmArgs = { - address: Scalars['String']; - email?: Maybe; - password: Scalars['String']; - signature: Scalars['String']; - username: Scalars['String']; +export type Mutation_RootUpdateTipStatusArgs = { + data: TipStatusUpdateInput; + where: TipStatusWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootSetCredentialsStartArgs = { - address: Scalars['String']; +export type Mutation_RootUpdateTotalIssuanceArgs = { + data: TotalIssuanceUpdateInput; + where: TotalIssuanceWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootSetDefaultAddressArgs = { - address: Scalars['String']; +export type Mutation_RootUpdateTreasurySpendProposalArgs = { + data: TreasurySpendProposalUpdateInput; + where: TreasurySpendProposalWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootSignupArgs = { - email?: Maybe; - password: Scalars['String']; - username: Scalars['String']; +export type Mutation_RootUpdateTreasuryStatusArgs = { + data: TreasuryStatusUpdateInput; + where: TreasuryStatusWhereUniqueInput; }; /** mutation root */ -export type Mutation_RootUndoEmailChangeArgs = { - token: Scalars['String']; +export type Mutation_RootUpdateValidatorArgs = { + data: ValidatorUpdateInput; + where: ValidatorWhereUniqueInput; }; @@ -7254,6 +11557,230 @@ export type Mutation_RootUpdate_Posts_By_PkArgs = { }; +/** mutation root */ +export type Mutation_RootUpsertBlockIndexArgs = { + create: BlockIndexCreateInput; + update: BlockIndexUpdateInput; + where: BlockIndexWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertBlockNumberArgs = { + create: BlockNumberCreateInput; + update: BlockNumberUpdateInput; + where: BlockNumberWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertCouncilArgs = { + create: CouncilCreateInput; + update: CouncilUpdateInput; + where: CouncilWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertCouncilMemberArgs = { + create: CouncilMemberCreateInput; + update: CouncilMemberUpdateInput; + where: CouncilMemberWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertEraArgs = { + create: EraCreateInput; + update: EraUpdateInput; + where: EraWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertHeartBeatArgs = { + create: HeartBeatCreateInput; + update: HeartBeatUpdateInput; + where: HeartBeatWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertMotionArgs = { + create: MotionCreateInput; + update: MotionUpdateInput; + where: MotionWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertMotionProposalArgumentArgs = { + create: MotionProposalArgumentCreateInput; + update: MotionProposalArgumentUpdateInput; + where: MotionProposalArgumentWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertMotionStatusArgs = { + create: MotionStatusCreateInput; + update: MotionStatusUpdateInput; + where: MotionStatusWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertNominationArgs = { + create: NominationCreateInput; + update: NominationUpdateInput; + where: NominationWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertOfflineValidatorArgs = { + create: OfflineValidatorCreateInput; + update: OfflineValidatorUpdateInput; + where: OfflineValidatorWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertPreimageArgs = { + create: PreimageCreateInput; + update: PreimageUpdateInput; + where: PreimageWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertPreimageArgumentArgs = { + create: PreimageArgumentCreateInput; + update: PreimageArgumentUpdateInput; + where: PreimageArgumentWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertPreimageStatusArgs = { + create: PreimageStatusCreateInput; + update: PreimageStatusUpdateInput; + where: PreimageStatusWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertProposalArgs = { + create: ProposalCreateInput; + update: ProposalUpdateInput; + where: ProposalWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertProposalStatusArgs = { + create: ProposalStatusCreateInput; + update: ProposalStatusUpdateInput; + where: ProposalStatusWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertReferendumArgs = { + create: ReferendumCreateInput; + update: ReferendumUpdateInput; + where: ReferendumWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertReferendumStatusArgs = { + create: ReferendumStatusCreateInput; + update: ReferendumStatusUpdateInput; + where: ReferendumStatusWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertRewardArgs = { + create: RewardCreateInput; + update: RewardUpdateInput; + where: RewardWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertSessionArgs = { + create: SessionCreateInput; + update: SessionUpdateInput; + where: SessionWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertSlashingArgs = { + create: SlashingCreateInput; + update: SlashingUpdateInput; + where: SlashingWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertStakeArgs = { + create: StakeCreateInput; + update: StakeUpdateInput; + where: StakeWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertTipArgs = { + create: TipCreateInput; + update: TipUpdateInput; + where: TipWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertTipStatusArgs = { + create: TipStatusCreateInput; + update: TipStatusUpdateInput; + where: TipStatusWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertTotalIssuanceArgs = { + create: TotalIssuanceCreateInput; + update: TotalIssuanceUpdateInput; + where: TotalIssuanceWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertTreasurySpendProposalArgs = { + create: TreasurySpendProposalCreateInput; + update: TreasurySpendProposalUpdateInput; + where: TreasurySpendProposalWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertTreasuryStatusArgs = { + create: TreasuryStatusCreateInput; + update: TreasuryStatusUpdateInput; + where: TreasuryStatusWhereUniqueInput; +}; + + +/** mutation root */ +export type Mutation_RootUpsertValidatorArgs = { + create: ValidatorCreateInput; + update: ValidatorUpdateInput; + where: ValidatorWhereUniqueInput; +}; + + /** mutation root */ export type Mutation_RootVerifyEmailArgs = { token: Scalars['String']; @@ -7278,6 +11805,9 @@ export type Onchain_Links = { /** Remote relationship field */ onchain_referendum: Array>; onchain_referendum_id?: Maybe; + /** Remote relationship field */ + onchain_tip: Array>; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; /** Remote relationship field */ onchain_treasury_spend_proposal: Array>; @@ -7339,6 +11869,23 @@ export type Onchain_LinksOnchain_ReferendumArgs = { }; +/** + * on chain proposal created automatically by chain-db-watcher + * + * + * columns and relationships of "onchain_links" + */ +export type Onchain_LinksOnchain_TipArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; +}; + + /** * on chain proposal created automatically by chain-db-watcher * @@ -7413,6 +11960,7 @@ export type Onchain_Links_Avg_Fields = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7423,6 +11971,7 @@ export type Onchain_Links_Avg_Order_By = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7437,6 +11986,7 @@ export type Onchain_Links_Bool_Exp = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post?: Maybe; post_id?: Maybe; @@ -7450,6 +12000,8 @@ export enum Onchain_Links_Constraint { /** unique or primary key constraint */ OnchainLinksOnchainReferendumIdKey = 'onchain_links_onchain_referendum_id_key', /** unique or primary key constraint */ + OnchainLinksOnchainTipIdKey = 'onchain_links_onchain_tip_id_key', + /** unique or primary key constraint */ OnchainProposalsChainDbIdKey = 'onchain_proposals_chain_db_id_key', /** unique or primary key constraint */ ProposalsPkey = 'proposals_pkey', @@ -7463,6 +12015,7 @@ export type Onchain_Links_Inc_Input = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7474,6 +12027,7 @@ export type Onchain_Links_Insert_Input = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post?: Maybe; post_id?: Maybe; @@ -7488,6 +12042,7 @@ export type Onchain_Links_Max_Fields = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; proposer_address?: Maybe; @@ -7500,6 +12055,7 @@ export type Onchain_Links_Max_Order_By = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; proposer_address?: Maybe; @@ -7513,6 +12069,7 @@ export type Onchain_Links_Min_Fields = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; proposer_address?: Maybe; @@ -7525,6 +12082,7 @@ export type Onchain_Links_Min_Order_By = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; proposer_address?: Maybe; @@ -7559,6 +12117,7 @@ export type Onchain_Links_Order_By = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post?: Maybe; post_id?: Maybe; @@ -7583,6 +12142,8 @@ export enum Onchain_Links_Select_Column { /** column name */ OnchainReferendumId = 'onchain_referendum_id', /** column name */ + OnchainTipId = 'onchain_tip_id', + /** column name */ OnchainTreasuryProposalId = 'onchain_treasury_proposal_id', /** column name */ PostId = 'post_id', @@ -7597,6 +12158,7 @@ export type Onchain_Links_Set_Input = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; proposer_address?: Maybe; @@ -7609,6 +12171,7 @@ export type Onchain_Links_Stddev_Fields = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7619,6 +12182,7 @@ export type Onchain_Links_Stddev_Order_By = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7630,6 +12194,7 @@ export type Onchain_Links_Stddev_Pop_Fields = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7640,6 +12205,7 @@ export type Onchain_Links_Stddev_Pop_Order_By = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7651,6 +12217,7 @@ export type Onchain_Links_Stddev_Samp_Fields = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7661,6 +12228,7 @@ export type Onchain_Links_Stddev_Samp_Order_By = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7672,6 +12240,7 @@ export type Onchain_Links_Sum_Fields = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7682,6 +12251,7 @@ export type Onchain_Links_Sum_Order_By = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7699,6 +12269,8 @@ export enum Onchain_Links_Update_Column { /** column name */ OnchainReferendumId = 'onchain_referendum_id', /** column name */ + OnchainTipId = 'onchain_tip_id', + /** column name */ OnchainTreasuryProposalId = 'onchain_treasury_proposal_id', /** column name */ PostId = 'post_id', @@ -7713,6 +12285,7 @@ export type Onchain_Links_Var_Pop_Fields = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7723,6 +12296,7 @@ export type Onchain_Links_Var_Pop_Order_By = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7734,6 +12308,7 @@ export type Onchain_Links_Var_Samp_Fields = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7744,6 +12319,7 @@ export type Onchain_Links_Var_Samp_Order_By = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7755,6 +12331,7 @@ export type Onchain_Links_Variance_Fields = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -7765,6 +12342,7 @@ export type Onchain_Links_Variance_Order_By = { onchain_motion_id?: Maybe; onchain_proposal_id?: Maybe; onchain_referendum_id?: Maybe; + onchain_tip_id?: Maybe; onchain_treasury_proposal_id?: Maybe; post_id?: Maybe; }; @@ -8241,7 +12819,9 @@ export type Poll_Votes_Bool_Exp = { /** unique or primary key constraints on table "poll_votes" */ export enum Poll_Votes_Constraint { /** unique or primary key constraint */ - PollVotesPkey = 'poll_votes_pkey' + PollVotesPkey = 'poll_votes_pkey', + /** unique or primary key constraint */ + PollVotesPollIdUserIdKey = 'poll_votes_poll_id_user_id_key' } /** input type for incrementing integer column in table "poll_votes" */ @@ -8781,7 +13361,9 @@ export type Post_Reactions_Bool_Exp = { /** unique or primary key constraints on table "post_reactions" */ export enum Post_Reactions_Constraint { /** unique or primary key constraint */ - PostReactionsPkey = 'post_reactions_pkey' + PostReactionsPkey = 'post_reactions_pkey', + /** unique or primary key constraint */ + PostReactionsPostIdUserIdReactionKey = 'post_reactions_post_id_user_id_reaction_key' } /** input type for incrementing integer column in table "post_reactions" */ @@ -10116,6 +14698,7 @@ export type Query_Root = { motionStatusesConnection: MotionStatusConnection; motions: Array>; motionsConnection: MotionConnection; + /** Fetches an object given its ID */ node?: Maybe; nomination?: Maybe; nominations: Array>; @@ -10203,6 +14786,12 @@ export type Query_Root = { stakes: Array>; stakesConnection: StakeConnection; subscription?: Maybe; + tip?: Maybe; + tipStatus?: Maybe; + tipStatuses: Array>; + tipStatusesConnection: TipStatusConnection; + tips: Array>; + tipsConnection: TipConnection; token?: Maybe; totalIssuance?: Maybe; totalIssuances: Array>; @@ -11146,6 +15735,66 @@ export type Query_RootSubscriptionArgs = { }; +/** query root */ +export type Query_RootTipArgs = { + where: TipWhereUniqueInput; +}; + + +/** query root */ +export type Query_RootTipStatusArgs = { + where: TipStatusWhereUniqueInput; +}; + + +/** query root */ +export type Query_RootTipStatusesArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; +}; + + +/** query root */ +export type Query_RootTipStatusesConnectionArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; +}; + + +/** query root */ +export type Query_RootTipsArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; +}; + + +/** query root */ +export type Query_RootTipsConnectionArgs = { + after?: Maybe; + before?: Maybe; + first?: Maybe; + last?: Maybe; + orderBy?: Maybe; + skip?: Maybe; + where?: Maybe; +}; + + /** query root */ export type Query_RootTotalIssuanceArgs = { where: TotalIssuanceWhereUniqueInput; @@ -11355,6 +16004,8 @@ export type Subscription_Root = { slashing?: Maybe; stake?: Maybe; subscribed?: Maybe; + tip?: Maybe; + tipStatus?: Maybe; totalIssuance?: Maybe; treasurySpendProposal?: Maybe; treasuryStatus?: Maybe; @@ -11748,6 +16399,18 @@ export type Subscription_RootStakeArgs = { }; +/** subscription root */ +export type Subscription_RootTipArgs = { + where?: Maybe; +}; + + +/** subscription root */ +export type Subscription_RootTipStatusArgs = { + where?: Maybe; +}; + + /** subscription root */ export type Subscription_RootTotalIssuanceArgs = { where?: Maybe; @@ -12614,6 +17277,48 @@ export type LatestReferendaPostsQuery = ( )> } ); +export type LatestTipPostsQueryVariables = { + postType: Scalars['Int']; + postTopic: Scalars['Int']; + limit?: Scalars['Int']; +}; + + +export type LatestTipPostsQuery = ( + { __typename?: 'query_root' } + & { posts: Array<( + { __typename?: 'posts' } + & Pick + & { author?: Maybe<( + { __typename?: 'User' } + & AuthorFieldsFragment + )>, comments_aggregate: ( + { __typename?: 'comments_aggregate' } + & { aggregate?: Maybe<( + { __typename?: 'comments_aggregate_fields' } + & Pick + )> } + ), type: ( + { __typename?: 'post_types' } + & Pick + ), topic: ( + { __typename?: 'post_topics' } + & Pick + ), onchain_link?: Maybe<( + { __typename?: 'onchain_links' } + & Pick + & { onchain_tip: Array + & { tipStatus?: Maybe + )>> } + )>> } + )> } + )> } +); + export type LatestDemocracyTreasuryProposalPostsQueryVariables = { postType: Scalars['Int']; postTopic: Scalars['Int']; @@ -13022,6 +17727,99 @@ export type SetCredentialsConfirmMutation = ( )> } ); +export type OnchainLinkTipFragment = ( + { __typename?: 'onchain_links' } + & Pick + & { onchain_tip: Array + & { tipStatus?: Maybe + & { blockNumber: ( + { __typename?: 'BlockNumber' } + & Pick + ) } + )>> } + )>> } +); + +export type TipPostFragment = ( + { __typename?: 'posts' } + & Pick + & { author?: Maybe<( + { __typename?: 'User' } + & AuthorFieldsFragment + )>, comments: Array<( + { __typename?: 'comments' } + & CommentFieldsFragment + )>, onchain_link?: Maybe<( + { __typename?: 'onchain_links' } + & OnchainLinkTipFragment + )>, topic: ( + { __typename?: 'post_topics' } + & Pick + ), type: ( + { __typename?: 'post_types' } + & Pick + ) } +); + +export type TipPostAndCommentsQueryVariables = { + id: Scalars['Int']; +}; + + +export type TipPostAndCommentsQuery = ( + { __typename?: 'query_root' } + & { posts: Array<( + { __typename?: 'posts' } + & TipPostFragment + )> } +); + +export type AllTipPostsQueryVariables = { + postType: Scalars['Int']; + postTopic: Scalars['Int']; + limit?: Scalars['Int']; +}; + + +export type AllTipPostsQuery = ( + { __typename?: 'query_root' } + & { posts: Array<( + { __typename?: 'posts' } + & Pick + & { author?: Maybe<( + { __typename?: 'User' } + & AuthorFieldsFragment + )>, comments_aggregate: ( + { __typename?: 'comments_aggregate' } + & { aggregate?: Maybe<( + { __typename?: 'comments_aggregate_fields' } + & Pick + )> } + ), type: ( + { __typename?: 'post_types' } + & Pick + ), topic: ( + { __typename?: 'post_topics' } + & Pick + ), onchain_link?: Maybe<( + { __typename?: 'onchain_links' } + & Pick + & { onchain_tip: Array + & { tipStatus?: Maybe + )>> } + )>> } + )> } + )> } +); + export type AllDemocracyTreasuryProposalPostsQueryVariables = { postType: Scalars['Int']; postTopic: Scalars['Int']; @@ -13437,6 +18235,58 @@ export const ReferendumPostFragmentDoc = gql` ${AuthorFieldsFragmentDoc} ${CommentFieldsFragmentDoc} ${OnchainLinkReferendumFragmentDoc}`; +export const OnchainLinkTipFragmentDoc = gql` + fragment onchainLinkTip on onchain_links { + id + proposer_address + onchain_tip_id + onchain_tip(where: {}) { + id + hash + reason + who + finder + finderFee + closes + tipStatus(last: 1) { + id + status + blockNumber { + startDateTime + number + } + } + } +} + `; +export const TipPostFragmentDoc = gql` + fragment tipPost on posts { + author { + ...authorFields + } + content + created_at + id + updated_at + comments(order_by: {created_at: asc}) { + ...commentFields + } + onchain_link { + ...onchainLinkTip + } + title + topic { + id + name + } + type { + id + name + } +} + ${AuthorFieldsFragmentDoc} +${CommentFieldsFragmentDoc} +${OnchainLinkTipFragmentDoc}`; export const OnchainLinkTreasuryProposalFragmentDoc = gql` fragment onchainLinkTreasuryProposal on onchain_links { id @@ -14921,6 +19771,72 @@ export function useLatestReferendaPostsLazyQuery(baseOptions?: ApolloReactHooks. export type LatestReferendaPostsQueryHookResult = ReturnType; export type LatestReferendaPostsLazyQueryHookResult = ReturnType; export type LatestReferendaPostsQueryResult = ApolloReactCommon.QueryResult; +export const LatestTipPostsDocument = gql` + query LatestTipPosts($postType: Int!, $postTopic: Int!, $limit: Int! = 5) { + posts(limit: $limit, where: {type: {id: {_eq: $postType}}, topic: {id: {_eq: $postTopic}}, onchain_link: {onchain_tip_id: {_is_null: false}}}, order_by: {onchain_link: {onchain_tip_id: desc}}) { + id + title + author { + ...authorFields + } + created_at + updated_at + comments_aggregate { + aggregate { + count + } + } + type { + name + id + } + topic { + id + name + } + onchain_link { + id + onchain_tip_id + onchain_tip(where: {NOT: {tipStatus_some: {OR: [{status: "TipClosed"}, {status: "TipClosing"}, {status: "TipRetracted"}]}}}) { + id + tipStatus(last: 1) { + id + status + } + } + proposer_address + } + } +} + ${AuthorFieldsFragmentDoc}`; + +/** + * __useLatestTipPostsQuery__ + * + * To run a query within a React component, call `useLatestTipPostsQuery` and pass it any options that fit your needs. + * When your component renders, `useLatestTipPostsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useLatestTipPostsQuery({ + * variables: { + * postType: // value for 'postType' + * postTopic: // value for 'postTopic' + * limit: // value for 'limit' + * }, + * }); + */ +export function useLatestTipPostsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + return ApolloReactHooks.useQuery(LatestTipPostsDocument, baseOptions); + } +export function useLatestTipPostsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + return ApolloReactHooks.useLazyQuery(LatestTipPostsDocument, baseOptions); + } +export type LatestTipPostsQueryHookResult = ReturnType; +export type LatestTipPostsLazyQueryHookResult = ReturnType; +export type LatestTipPostsQueryResult = ApolloReactCommon.QueryResult; export const LatestDemocracyTreasuryProposalPostsDocument = gql` query LatestDemocracyTreasuryProposalPosts($postType: Int!, $postTopic: Int!, $limit: Int! = 5) { posts(limit: $limit, where: {type: {id: {_eq: $postType}}, topic: {id: {_eq: $postTopic}}, onchain_link: {onchain_treasury_proposal_id: {_is_null: false}, onchain_motion_id: {_is_null: true}}}, order_by: {onchain_link: {onchain_treasury_proposal_id: desc}}) { @@ -15595,6 +20511,105 @@ export function useSetCredentialsConfirmMutation(baseOptions?: ApolloReactHooks. export type SetCredentialsConfirmMutationHookResult = ReturnType; export type SetCredentialsConfirmMutationResult = ApolloReactCommon.MutationResult; export type SetCredentialsConfirmMutationOptions = ApolloReactCommon.BaseMutationOptions; +export const TipPostAndCommentsDocument = gql` + query TipPostAndComments($id: Int!) { + posts(where: {onchain_link: {onchain_tip_id: {_eq: $id}}}) { + ...tipPost + } +} + ${TipPostFragmentDoc}`; + +/** + * __useTipPostAndCommentsQuery__ + * + * To run a query within a React component, call `useTipPostAndCommentsQuery` and pass it any options that fit your needs. + * When your component renders, `useTipPostAndCommentsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useTipPostAndCommentsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useTipPostAndCommentsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + return ApolloReactHooks.useQuery(TipPostAndCommentsDocument, baseOptions); + } +export function useTipPostAndCommentsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + return ApolloReactHooks.useLazyQuery(TipPostAndCommentsDocument, baseOptions); + } +export type TipPostAndCommentsQueryHookResult = ReturnType; +export type TipPostAndCommentsLazyQueryHookResult = ReturnType; +export type TipPostAndCommentsQueryResult = ApolloReactCommon.QueryResult; +export const AllTipPostsDocument = gql` + query AllTipPosts($postType: Int!, $postTopic: Int!, $limit: Int! = 5) { + posts(limit: $limit, where: {type: {id: {_eq: $postType}}, topic: {id: {_eq: $postTopic}}, onchain_link: {onchain_tip_id: {_is_null: false}}}, order_by: {onchain_link: {onchain_tip_id: desc}}) { + id + title + author { + ...authorFields + } + created_at + updated_at + comments_aggregate { + aggregate { + count + } + } + type { + name + id + } + topic { + id + name + } + onchain_link { + id + onchain_tip_id + onchain_tip(where: {}) { + id + tipStatus(last: 1) { + id + status + } + } + proposer_address + } + } +} + ${AuthorFieldsFragmentDoc}`; + +/** + * __useAllTipPostsQuery__ + * + * To run a query within a React component, call `useAllTipPostsQuery` and pass it any options that fit your needs. + * When your component renders, `useAllTipPostsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAllTipPostsQuery({ + * variables: { + * postType: // value for 'postType' + * postTopic: // value for 'postTopic' + * limit: // value for 'limit' + * }, + * }); + */ +export function useAllTipPostsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + return ApolloReactHooks.useQuery(AllTipPostsDocument, baseOptions); + } +export function useAllTipPostsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + return ApolloReactHooks.useLazyQuery(AllTipPostsDocument, baseOptions); + } +export type AllTipPostsQueryHookResult = ReturnType; +export type AllTipPostsLazyQueryHookResult = ReturnType; +export type AllTipPostsQueryResult = ApolloReactCommon.QueryResult; export const AllDemocracyTreasuryProposalPostsDocument = gql` query AllDemocracyTreasuryProposalPosts($postType: Int!, $postTopic: Int!, $limit: Int! = 5) { posts(limit: $limit, where: {type: {id: {_eq: $postType}}, topic: {id: {_eq: $postTopic}}, onchain_link: {onchain_treasury_proposal_id: {_is_null: false}}}, order_by: {onchain_link: {onchain_treasury_proposal_id: desc}}) { diff --git a/front-end/src/global/statuses.ts b/front-end/src/global/statuses.ts index 3fa0d8ec1..0bdea1a85 100644 --- a/front-end/src/global/statuses.ts +++ b/front-end/src/global/statuses.ts @@ -27,3 +27,10 @@ export const motionStatus = { PROPOSED: 'Proposed', VOTED: 'Voted' }; + +export const tipStatus = { + CLOSED: 'TipClosed', + CLOSING: 'TipClosing', + OPENED: 'TipOpened', + RETRACTED: 'TipRetracted' +}; diff --git a/front-end/src/screens/Home/LatestTips/index.tsx b/front-end/src/screens/Home/LatestTips/index.tsx new file mode 100644 index 000000000..69d222714 --- /dev/null +++ b/front-end/src/screens/Home/LatestTips/index.tsx @@ -0,0 +1,37 @@ +// Copyright 2019-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import React, { useEffect } from 'react'; + +import TipListing from '../../../components/Listings/TipListing'; +import { useLatestTipPostsQuery } from '../../../generated/graphql'; +import { post_topic } from '../../../global/post_topics'; +import { post_type } from '../../../global/post_types'; +import FilteredError from '../../../ui-components/FilteredError'; +import Loader from '../../../ui-components/Loader'; + +interface Props { + className?: string +} + +const TipContainer = ({ className }:Props) => { + + const { data, error, refetch } = useLatestTipPostsQuery({ variables: { + limit: 2, + postTopic: post_topic.TREASURY, + postType: post_type.ON_CHAIN + } }); + + useEffect(() => { + refetch(); + }, [refetch]); + + if (error?.message) return ; + + if (data) return ; + + return ; +}; + +export default TipContainer; diff --git a/front-end/src/screens/Home/index.tsx b/front-end/src/screens/Home/index.tsx index 79421df19..6e044d599 100644 --- a/front-end/src/screens/Home/index.tsx +++ b/front-end/src/screens/Home/index.tsx @@ -14,6 +14,7 @@ import DiscussionContainer from './LatestDiscussions'; import MotionsContainer from './LatestMotions'; import ProposalContainer from './LatestProposals'; import ReferendaContainer from './LatestReferenda'; +import TipContainer from './LatestTips'; import TreasuryContainer from './LatestTreasury'; interface Props { @@ -40,6 +41,8 @@ const Home = ({ className }: Props) => {

Latest treasury proposals

+

Latest tips

+

Latest discussions

@@ -57,7 +60,7 @@ const Home = ({ className }: Props) => { export default styled(Home)` - .referendumContainer, .proposalContainer, .discussionContainer, .motionContainer, .treasuryContainer { + .referendumContainer, .proposalContainer, .discussionContainer, .motionContainer, .treasuryContainer, .tipContainer { margin-bottom: 3rem; } diff --git a/front-end/src/screens/OnChain/Tips/index.tsx b/front-end/src/screens/OnChain/Tips/index.tsx new file mode 100644 index 000000000..84a8764a9 --- /dev/null +++ b/front-end/src/screens/OnChain/Tips/index.tsx @@ -0,0 +1,38 @@ +// Copyright 2019-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import React, { useEffect } from 'react'; + +import TipListing from '../../../components/Listings/TipListing'; +import { useLatestTipPostsQuery } from '../../../generated/graphql'; +import { post_topic } from '../../../global/post_topics'; +import { post_type } from '../../../global/post_types'; +import FilteredError from '../../../ui-components/FilteredError'; +import Loader from '../../../ui-components/Loader'; + +interface Props { + className?: string + limit: number +} + +const TipContainer = ({ className, limit }:Props) => { + + const { data, error, refetch } = useLatestTipPostsQuery({ variables: { + limit, + postTopic: post_topic.TREASURY, + postType: post_type.ON_CHAIN + } }); + + useEffect(() => { + refetch(); + }, [refetch]); + + if (error?.message) return ; + + if (data) return ; + + return ; +}; + +export default TipContainer; diff --git a/front-end/src/screens/OnChain/Tips/query.ts b/front-end/src/screens/OnChain/Tips/query.ts new file mode 100644 index 000000000..2d13e541b --- /dev/null +++ b/front-end/src/screens/OnChain/Tips/query.ts @@ -0,0 +1,66 @@ +// Copyright 2019-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import gql from 'graphql-tag'; +import { authorFields } from 'src/fragments/author'; + +export const QUERY_LATEST_TIP_PROPOSALS = gql` + query LatestTipPosts($postType: Int!, $postTopic: Int!, $limit: Int! = 5 ) { + posts(limit: $limit, where: { + type: { + id: { + _eq: $postType + } + }, + topic: { + id: { + _eq: $postTopic + } + }, + onchain_link: { + onchain_tip_id: { + _is_null: false + } + } + }, order_by: { + onchain_link: { + onchain_tip_id: desc + } + }) { + id + title + author { + ...authorFields + } + created_at + updated_at + comments_aggregate { + aggregate { + count + } + } + type { + name + id + } + topic { + id + name + } + onchain_link { + id + onchain_tip_id + onchain_tip(where: {NOT: {tipStatus_some: {OR: [{status: "TipClosed"}, {status: "TipClosing"}, {status: "TipRetracted"}]}}}) { + id + tipStatus(last: 1) { + id + status + } + } + proposer_address + } + } + } +${authorFields} +`; diff --git a/front-end/src/screens/OnChain/index.tsx b/front-end/src/screens/OnChain/index.tsx index 6a8f5da39..c3ad1fead 100644 --- a/front-end/src/screens/OnChain/index.tsx +++ b/front-end/src/screens/OnChain/index.tsx @@ -11,6 +11,7 @@ import InfoBox from '../../ui-components/InfoBox'; import MotionContainer from './Motions'; import ProposalContainer from './Proposals'; import ReferendaContainer from './Referenda'; +import TipContainer from './Tips'; import TreasuryContainer from './Treasury'; const OnchainPostsContainer = ({ className } : {className?: string}) => { @@ -31,14 +32,17 @@ const OnchainPostsContainer = ({ className } : {className?: string}) => {

Motions

See all motions -

Treasury

+

Treasury proposals

See all treasury proposals +

Tips

+ + See all tips { export default styled(OnchainPostsContainer)` - .referendaContainer, .proposalContainer, .motionContainer, .treasuryContainer { + .referendaContainer, .proposalContainer, .motionContainer, .treasuryContainer, .tipContainer { margin-bottom: 2rem; } diff --git a/front-end/src/screens/TipPost/index.tsx b/front-end/src/screens/TipPost/index.tsx new file mode 100644 index 000000000..24d703929 --- /dev/null +++ b/front-end/src/screens/TipPost/index.tsx @@ -0,0 +1,23 @@ +// Copyright 2019-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import React from 'react'; +import { useParams } from 'react-router-dom'; + +import Post from '../../components/Post/Post'; +import { useTipPostAndCommentsQuery } from '../../generated/graphql'; +import FilteredError from '../../ui-components/FilteredError'; +import Loader from '../../ui-components/Loader'; + +export default () => { + const { id } = useParams(); + const idNumber = Number(id) || 0; + const { data, error, refetch } = useTipPostAndCommentsQuery({ variables: { 'id': idNumber } }); + + if (error?.message) return ; + + if (data) return ; + + return ; +}; diff --git a/front-end/src/screens/TipPost/query.ts b/front-end/src/screens/TipPost/query.ts new file mode 100644 index 000000000..7ad40f6cf --- /dev/null +++ b/front-end/src/screens/TipPost/query.ts @@ -0,0 +1,73 @@ +// Copyright 2019-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import gql from 'graphql-tag'; +import { authorFields } from 'src/fragments/author'; + +import { commentFields } from '../../fragments/comments'; + +const onchainLinkTip = gql` + fragment onchainLinkTip on onchain_links { + id, + proposer_address, + onchain_tip_id, + onchain_tip(where: {}) { + id + hash + reason + who + finder + finderFee + closes + tipStatus(last: 1) { + id + status + blockNumber { + startDateTime + number + } + } + } + } +`; + +const tipPost = gql` + fragment tipPost on posts { + author { + ...authorFields + } + content + created_at + id + updated_at + comments(order_by: {created_at: asc}) { + ...commentFields + } + onchain_link{ + ...onchainLinkTip + } + title + topic { + id + name + } + type { + id + name + } + } + ${authorFields} + ${commentFields} + ${onchainLinkTip} +`; + +export const QUERY_TIP_POST_AND_COMMENTS = gql` + query TipPostAndComments ($id:Int!) { + posts(where: {onchain_link: {onchain_tip_id: {_eq: $id}}}) { + ...tipPost + } + } + ${tipPost} +`; + diff --git a/front-end/src/screens/Tips/TipContainer/index.tsx b/front-end/src/screens/Tips/TipContainer/index.tsx new file mode 100644 index 000000000..56be86b30 --- /dev/null +++ b/front-end/src/screens/Tips/TipContainer/index.tsx @@ -0,0 +1,38 @@ +// Copyright 2019-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import React, { useEffect } from 'react'; + +import TipListing from '../../../components/Listings/TipListing'; +import { useAllTipPostsQuery } from '../../../generated/graphql'; +import { post_topic } from '../../../global/post_topics'; +import { post_type } from '../../../global/post_types'; +import FilteredError from '../../../ui-components/FilteredError'; +import Loader from '../../../ui-components/Loader'; + +interface Props { + className?: string + limit: number +} + +const TipContainer = ({ className, limit }:Props) => { + + const { data, error, refetch } = useAllTipPostsQuery({ variables: { + limit, + postTopic: post_topic.TREASURY, + postType: post_type.ON_CHAIN + } }); + + useEffect(() => { + refetch(); + }, [refetch]); + + if (error?.message) return ; + + if (data) return ; + + return ; +}; + +export default TipContainer; diff --git a/front-end/src/screens/Tips/TipContainer/query.ts b/front-end/src/screens/Tips/TipContainer/query.ts new file mode 100644 index 000000000..b353545d7 --- /dev/null +++ b/front-end/src/screens/Tips/TipContainer/query.ts @@ -0,0 +1,66 @@ +// Copyright 2019-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import gql from 'graphql-tag'; +import { authorFields } from 'src/fragments/author'; + +export const QUERY_LATEST_TIP_PROPOSALS = gql` + query AllTipPosts($postType: Int!, $postTopic: Int!, $limit: Int! = 5 ) { + posts(limit: $limit, where: { + type: { + id: { + _eq: $postType + } + }, + topic: { + id: { + _eq: $postTopic + } + }, + onchain_link: { + onchain_tip_id: { + _is_null: false + } + } + }, order_by: { + onchain_link: { + onchain_tip_id: desc + } + }) { + id + title + author { + ...authorFields + } + created_at + updated_at + comments_aggregate { + aggregate { + count + } + } + type { + name + id + } + topic { + id + name + } + onchain_link { + id + onchain_tip_id + onchain_tip(where: {}) { + id + tipStatus(last: 1) { + id + status + } + } + proposer_address + } + } + } + ${authorFields} +`; diff --git a/front-end/src/screens/Tips/index.tsx b/front-end/src/screens/Tips/index.tsx new file mode 100644 index 000000000..c7e92d296 --- /dev/null +++ b/front-end/src/screens/Tips/index.tsx @@ -0,0 +1,58 @@ +// Copyright 2019-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import styled from '@xstyled/styled-components'; +import React from 'react'; +import Grid from 'semantic-ui-react/dist/commonjs/collections/Grid'; + +import InfoBox from '../../ui-components/InfoBox'; +import TipContainer from './TipContainer'; + +const OnchainTipContainer = ({ className } : {className?: string}) => { + + return ( +
+

On-chain tip

+ + + + + + + + +
+ ); + +}; + +export default styled(OnchainTipContainer)` + + h1 { + @media only screen and (max-width: 576px) { + margin: 3rem 1rem 1rem 1rem; + } + + @media only screen and (max-width: 768px) and (min-width: 576px) { + margin-left: 1rem; + } + + @media only screen and (max-width: 991px) and (min-width: 768px) { + margin-left: 1rem; + } + } + + @media only screen and (max-width: 991px) and (min-width: 768px) { + .ui[class*="tablet reversed"].grid { + flex-direction: column-reverse; + } + } +`; diff --git a/front-end/src/ui-components/StatusTag.tsx b/front-end/src/ui-components/StatusTag.tsx index 2c3689baf..266732665 100644 --- a/front-end/src/ui-components/StatusTag.tsx +++ b/front-end/src/ui-components/StatusTag.tsx @@ -5,7 +5,7 @@ import styled from '@xstyled/styled-components'; import React, { ReactNode } from 'react'; import { Label, SemanticICONS } from 'semantic-ui-react'; -import { motionStatus, proposalStatus, referendumStatus } from 'src/global/statuses'; +import { motionStatus, proposalStatus, referendumStatus, tipStatus } from 'src/global/statuses'; interface Props{ children?: ReactNode, @@ -23,7 +23,9 @@ const StatusTag = ({ children, className, content, status }: Props) => { referendumStatus.STARTED, proposalStatus.PROPOSED, motionStatus.PROPOSED, - motionStatus.APPROVED + motionStatus.APPROVED, + tipStatus.OPENED, + tipStatus.CLOSING ].includes(status)){ icon = 'circle'; } @@ -32,14 +34,16 @@ const StatusTag = ({ children, className, content, status }: Props) => { referendumStatus.CANCELLED, referendumStatus.NOTPASSED, referendumStatus.VETOED, - motionStatus.DISAPPROVED + motionStatus.DISAPPROVED, + tipStatus.RETRACTED ].includes(status)){ icon = 'times'; } if ([proposalStatus.TABLED, referendumStatus.EXECUTED, - motionStatus.EXECUTED + motionStatus.EXECUTED, + tipStatus.CLOSED ].includes(status)){ icon = 'check'; } @@ -74,14 +78,17 @@ export default styled(StatusTag).attrs(( { status }: Props) => ({ padding: 0.5rem 1rem; &.${referendumStatus.STARTED}, &.${proposalStatus.PROPOSED}, - &.${motionStatus.PROPOSED} { + &.${motionStatus.PROPOSED}, + &.${tipStatus.OPENED}, + &.${tipStatus.CLOSING} { border-color: blue_primary; color: blue_primary; } &.${proposalStatus.TABLED}, &.${referendumStatus.PASSED}, &.${referendumStatus.EXECUTED}, - &.${motionStatus.EXECUTED} { + &.${motionStatus.EXECUTED}, + &.${tipStatus.CLOSED} { border-color: green_primary; color: green_primary; } @@ -89,9 +96,10 @@ export default styled(StatusTag).attrs(( { status }: Props) => ({ &.${referendumStatus.CANCELLED}, &.${referendumStatus.NOTPASSED}, &.${referendumStatus.VETOED}, - &.${motionStatus.DISAPPROVED} { + &.${motionStatus.DISAPPROVED}, + &.${tipStatus.RETRACTED} { border-color: red_primary; color: red_primary; } } -`; \ No newline at end of file +`; diff --git a/hasura/README.md b/hasura/README.md index 8742db91d..e5f997324 100644 --- a/hasura/README.md +++ b/hasura/README.md @@ -55,21 +55,11 @@ So add these entries in /etc/hosts As Docker only supports host networking on Linux, Mac users need to replace the host names in the hasura migrations yaml files with `http://host.docker.internal`. ### Migration - -We are using a [preview of hasura](https://github.com/hasura/graphql-engine/pull/2395#issuecomment-547378585), migration must therefore be applied manually with the `hasura-dev` cli. - -In a separate directory, clone the hasura cli and copy it in a directory in your PATH. - -```bash -git clone https://github.com/hasura/preview-remote-joins.git -mv cli/cli-hasura- /usr/local/bin/hasura-dev -chmod +x /usr/local/bin/hasura-dev -``` - -from there you can apply the migration: +Migration must therefore be applied manually with the `hasura` cli. ```bash cd hasura-migrations -hasura-dev migrate apply --admin-secret +hasura migrate apply --admin-secret +hasura metadata apply --admin-secret ``` ### Remote migration @@ -82,12 +72,12 @@ kubectl port-forward svc/hasura-service 7070:8080 -n polkassembly Verify the state of the migration ```bash cd /hasura/hasura-migrations -hasura-dev migrate status --endpoint http://localhost:7070 --admin-secret +hasura migrate status --endpoint http://localhost:7070 --admin-secret ``` Apply the migration ```bash -hasura-dev migrate apply --endpoint http://localhost:7070 --admin-secret +hasura migrate apply --endpoint http://localhost:7070 --admin-secret ``` ### Update the schema, relationships or permissions diff --git a/hasura/docker-compose.yaml.example b/hasura/docker-compose.yaml.example index e34abc17c..c4dd2d653 100644 --- a/hasura/docker-compose.yaml.example +++ b/hasura/docker-compose.yaml.example @@ -15,7 +15,7 @@ services: - /var/polkassembly/hasura/data:/var/lib/postgresql/data graphql-engine: network_mode: "host" - image: hasura/graphql-engine:v1.3.0-beta.2.cli-migrations + image: hasura/graphql-engine:v1.3.0-beta.2 volumes: # migration data - ./hasura-migrations/migrations:/hasura-migrations diff --git a/hasura/hasura-migrations/config.yaml b/hasura/hasura-migrations/config.yaml index ff4d3ad6a..6ddf586e5 100644 --- a/hasura/hasura-migrations/config.yaml +++ b/hasura/hasura-migrations/config.yaml @@ -1 +1,6 @@ +version: 2 endpoint: http://localhost:8080 +metadata_directory: metadata +actions: + kind: synchronous + handler_webhook_baseurl: http://localhost:3000 diff --git a/hasura/hasura-migrations/metadata/actions.graphql b/hasura/hasura-migrations/metadata/actions.graphql new file mode 100644 index 000000000..139597f9c --- /dev/null +++ b/hasura/hasura-migrations/metadata/actions.graphql @@ -0,0 +1,2 @@ + + diff --git a/hasura/hasura-migrations/metadata/actions.yaml b/hasura/hasura-migrations/metadata/actions.yaml new file mode 100644 index 000000000..1edb4c2ff --- /dev/null +++ b/hasura/hasura-migrations/metadata/actions.yaml @@ -0,0 +1,6 @@ +actions: [] +custom_types: + enums: [] + input_objects: [] + objects: [] + scalars: [] diff --git a/hasura/hasura-migrations/migrations/1574246024580_run_sql_migration/down.yaml b/hasura/hasura-migrations/metadata/allow_list.yaml similarity index 100% rename from hasura/hasura-migrations/migrations/1574246024580_run_sql_migration/down.yaml rename to hasura/hasura-migrations/metadata/allow_list.yaml diff --git a/hasura/hasura-migrations/migrations/1574691032527_remove_replies_count/down.yaml b/hasura/hasura-migrations/metadata/cron_triggers.yaml similarity index 100% rename from hasura/hasura-migrations/migrations/1574691032527_remove_replies_count/down.yaml rename to hasura/hasura-migrations/metadata/cron_triggers.yaml diff --git a/hasura/hasura-migrations/migrations/1575741722527_run_sql_migration/down.yaml b/hasura/hasura-migrations/metadata/functions.yaml similarity index 100% rename from hasura/hasura-migrations/migrations/1575741722527_run_sql_migration/down.yaml rename to hasura/hasura-migrations/metadata/functions.yaml diff --git a/hasura/hasura-migrations/migrations/1575912700926_run_sql_migration/down.yaml b/hasura/hasura-migrations/metadata/query_collections.yaml similarity index 100% rename from hasura/hasura-migrations/migrations/1575912700926_run_sql_migration/down.yaml rename to hasura/hasura-migrations/metadata/query_collections.yaml diff --git a/hasura/hasura-migrations/metadata/remote_schemas.yaml b/hasura/hasura-migrations/metadata/remote_schemas.yaml new file mode 100644 index 000000000..1cbf0b66e --- /dev/null +++ b/hasura/hasura-migrations/metadata/remote_schemas.yaml @@ -0,0 +1,10 @@ +- name: auth + definition: + url_from_env: HASURA_AUTH_SERVER_REMOTE_SCHEMA + timeout_seconds: 60 + forward_client_headers: true +- name: chain-db + definition: + url_from_env: HASURA_CHAIN_DB_REMOTE_SCHEMA + timeout_seconds: 60 + forward_client_headers: true diff --git a/hasura/hasura-migrations/metadata/tables.yaml b/hasura/hasura-migrations/metadata/tables.yaml new file mode 100644 index 000000000..f6b5dc8b5 --- /dev/null +++ b/hasura/hasura-migrations/metadata/tables.yaml @@ -0,0 +1,685 @@ +- table: + schema: public + name: comment_reactions + object_relationships: + - name: comment + using: + foreign_key_constraint_on: comment_id + remote_relationships: + - definition: + remote_field: + user: + arguments: + id: $user_id + hasura_fields: + - user_id + remote_schema: auth + name: reacting_user + insert_permissions: + - role: user + permission: + check: + user_id: + _eq: X-Hasura-User-Id + columns: + - comment_id + - reaction + - user_id + select_permissions: + - role: anonymous + permission: + columns: + - comment_id + - created_at + - id + - reaction + - updated_at + - user_id + filter: {} + allow_aggregations: true + - role: user + permission: + columns: + - comment_id + - created_at + - id + - reaction + - updated_at + - user_id + filter: {} + allow_aggregations: true + update_permissions: + - role: user + permission: + columns: + - comment_id + - reaction + - user_id + filter: + user_id: + _eq: X-Hasura-User-Id + check: null + delete_permissions: + - role: user + permission: + filter: + user_id: + _eq: X-Hasura-User-Id +- table: + schema: public + name: comments + object_relationships: + - name: post + using: + foreign_key_constraint_on: post_id + array_relationships: + - name: comment_reactions + using: + foreign_key_constraint_on: + column: comment_id + table: + schema: public + name: comment_reactions + remote_relationships: + - definition: + remote_field: + user: + arguments: + id: $author_id + hasura_fields: + - author_id + remote_schema: auth + name: author + insert_permissions: + - role: user + permission: + check: + author_id: + _eq: X-Hasura-User-Id + columns: + - author_id + - content + - post_id + select_permissions: + - role: anonymous + permission: + columns: + - author_id + - content + - created_at + - id + - post_id + - updated_at + filter: {} + allow_aggregations: true + - role: user + permission: + columns: + - author_id + - content + - created_at + - id + - post_id + - updated_at + filter: {} + allow_aggregations: true + update_permissions: + - role: user + permission: + columns: + - content + filter: + author_id: + _eq: X-Hasura-User-Id + check: null + event_triggers: + - name: comment_create + definition: + enable_manual: false + insert: + columns: '*' + retry_conf: + num_retries: 0 + interval_sec: 10 + timeout_sec: 60 + webhook_from_env: HASURA_COMMENT_CREATE_EVENT_HOOK + headers: + - name: HASURA_EVENT_SECRET + value_from_env: HASURA_EVENT_SECRET +- table: + schema: public + name: onchain_links + object_relationships: + - name: post + using: + foreign_key_constraint_on: post_id + remote_relationships: + - definition: + remote_field: + motions: + arguments: + where: + motionProposalId: $onchain_motion_id + hasura_fields: + - onchain_motion_id + remote_schema: chain-db + name: onchain_motion + - definition: + remote_field: + proposals: + arguments: + where: + proposalId: $onchain_proposal_id + hasura_fields: + - onchain_proposal_id + remote_schema: chain-db + name: onchain_proposal + - definition: + remote_field: + referendums: + arguments: + where: + referendumId: $onchain_referendum_id + hasura_fields: + - onchain_referendum_id + remote_schema: chain-db + name: onchain_referendum + - definition: + remote_field: + treasurySpendProposals: + arguments: + where: + treasuryProposalId: $onchain_treasury_proposal_id + hasura_fields: + - onchain_treasury_proposal_id + remote_schema: chain-db + name: onchain_treasury_spend_proposal + - definition: + remote_field: + tips: + arguments: + where: + id: $onchain_tip_id + hasura_fields: + - onchain_tip_id + remote_schema: chain-db + name: onchain_tip + insert_permissions: + - role: proposal_bot + permission: + check: {} + columns: + - onchain_motion_id + - onchain_proposal_id + - onchain_referendum_id + - onchain_tip_id + - onchain_treasury_proposal_id + - post_id + - proposer_address + select_permissions: + - role: anonymous + permission: + columns: + - created_at + - id + - onchain_motion_id + - onchain_proposal_id + - onchain_referendum_id + - onchain_tip_id + - onchain_treasury_proposal_id + - post_id + - proposer_address + filter: {} + allow_aggregations: true + - role: proposal_bot + permission: + columns: + - created_at + - id + - onchain_motion_id + - onchain_proposal_id + - onchain_referendum_id + - onchain_tip_id + - onchain_treasury_proposal_id + - post_id + - proposer_address + filter: {} + - role: user + permission: + columns: + - created_at + - id + - onchain_motion_id + - onchain_proposal_id + - onchain_referendum_id + - onchain_tip_id + - onchain_treasury_proposal_id + - post_id + - proposer_address + filter: {} + allow_aggregations: true + update_permissions: + - role: proposal_bot + permission: + columns: + - onchain_motion_id + - onchain_referendum_id + filter: {} + check: null + event_triggers: + - name: onchain_link_create + definition: + enable_manual: false + insert: + columns: '*' + update: + columns: + - id + - onchain_motion_id + - onchain_proposal_id + - onchain_referendum_id + - onchain_treasury_proposal_id + - post_id + - proposer_address + - created_at + retry_conf: + num_retries: 0 + interval_sec: 10 + timeout_sec: 60 + webhook_from_env: HASURA_ONCHAIN_LINK_CREATE_HOOK + headers: + - name: HASURA_EVENT_SECRET + value_from_env: HASURA_EVENT_SECRET +- table: + schema: public + name: poll + object_relationships: + - name: post + using: + foreign_key_constraint_on: post_id + array_relationships: + - name: poll_votes + using: + foreign_key_constraint_on: + column: poll_id + table: + schema: public + name: poll_votes + insert_permissions: + - role: user + permission: + check: + post: + author_id: + _eq: X-Hasura-User-Id + columns: + - block_end + - post_id + select_permissions: + - role: anonymous + permission: + columns: + - id + - block_end + - created_at + - post_id + - updated_at + filter: {} + allow_aggregations: true + - role: user + permission: + columns: + - block_end + - id + - post_id + - created_at + - updated_at + filter: {} + allow_aggregations: true + update_permissions: + - role: user + permission: + columns: + - block_end + filter: + post: + author_id: + _eq: X-Hasura-User-Id + check: null +- table: + schema: public + name: poll_votes + object_relationships: + - name: poll + using: + foreign_key_constraint_on: poll_id + remote_relationships: + - definition: + remote_field: + user: + arguments: + id: $user_id + hasura_fields: + - user_id + remote_schema: auth + name: voter + insert_permissions: + - role: user + permission: + check: + user_id: + _eq: X-Hasura-User-Id + columns: + - poll_id + - user_id + - vote + select_permissions: + - role: anonymous + permission: + columns: + - id + - poll_id + - user_id + - vote + - created_at + - updated_at + filter: {} + allow_aggregations: true + - role: user + permission: + columns: + - vote + - id + - poll_id + - user_id + - created_at + - updated_at + filter: {} + allow_aggregations: true + update_permissions: + - role: user + permission: + columns: + - poll_id + - user_id + - vote + filter: + user_id: + _eq: X-Hasura-User-Id + check: + user_id: + _eq: X-Hasura-User-Id + delete_permissions: + - role: user + permission: + filter: + user_id: + _eq: X-Hasura-User-Id +- table: + schema: public + name: post_last_update + select_permissions: + - role: anonymous + permission: + columns: + - comment_id + - post_id + - last_update + filter: {} + - role: user + permission: + columns: + - post_id + - last_update + - comment_id + filter: {} +- table: + schema: public + name: post_reactions + object_relationships: + - name: post + using: + foreign_key_constraint_on: post_id + remote_relationships: + - definition: + remote_field: + user: + arguments: + id: $user_id + hasura_fields: + - user_id + remote_schema: auth + name: reacting_user + insert_permissions: + - role: user + permission: + check: + user_id: + _eq: X-Hasura-User-Id + columns: + - post_id + - reaction + - user_id + select_permissions: + - role: anonymous + permission: + columns: + - created_at + - id + - post_id + - reaction + - updated_at + - user_id + filter: {} + allow_aggregations: true + - role: user + permission: + columns: + - created_at + - id + - post_id + - reaction + - updated_at + - user_id + filter: {} + update_permissions: + - role: user + permission: + columns: + - post_id + - reaction + - user_id + filter: + user_id: + _eq: X-Hasura-User-Id + check: null + delete_permissions: + - role: user + permission: + filter: + user_id: + _eq: X-Hasura-User-Id +- table: + schema: public + name: post_topics + array_relationships: + - name: posts + using: + foreign_key_constraint_on: + column: topic_id + table: + schema: public + name: posts + select_permissions: + - role: anonymous + permission: + columns: + - id + - name + filter: {} + - role: user + permission: + columns: + - id + - name + filter: {} +- table: + schema: public + name: post_types + array_relationships: + - name: posts + using: + foreign_key_constraint_on: + column: type_id + table: + schema: public + name: posts + select_permissions: + - role: anonymous + permission: + columns: + - id + - name + filter: {} + - role: user + permission: + columns: + - id + - name + filter: {} +- table: + schema: public + name: posts + object_relationships: + - name: last_update + using: + manual_configuration: + remote_table: + schema: public + name: post_last_update + column_mapping: + id: post_id + - name: onchain_link + using: + manual_configuration: + remote_table: + schema: public + name: onchain_links + column_mapping: + id: post_id + - name: topic + using: + foreign_key_constraint_on: topic_id + - name: type + using: + foreign_key_constraint_on: type_id + array_relationships: + - name: comments + using: + foreign_key_constraint_on: + column: post_id + table: + schema: public + name: comments + - name: polls + using: + foreign_key_constraint_on: + column: post_id + table: + schema: public + name: poll + - name: post_reactions + using: + foreign_key_constraint_on: + column: post_id + table: + schema: public + name: post_reactions + remote_relationships: + - definition: + remote_field: + user: + arguments: + id: $author_id + hasura_fields: + - author_id + remote_schema: auth + name: author + insert_permissions: + - role: proposal_bot + permission: + check: + author_id: + _eq: X-Hasura-User-Id + columns: + - author_id + - content + - title + - topic_id + - type_id + - role: user + permission: + check: + _and: + - author_id: + _eq: X-Hasura-User-Id + - type_id: + _eq: 1 + columns: + - author_id + - content + - title + - topic_id + - type_id + select_permissions: + - role: anonymous + permission: + columns: + - author_id + - content + - created_at + - id + - title + - topic_id + - type_id + - updated_at + filter: {} + - role: proposal_bot + permission: + columns: + - author_id + - content + - created_at + - id + - title + - topic_id + - type_id + - updated_at + filter: {} + - role: user + permission: + columns: + - author_id + - content + - created_at + - id + - title + - topic_id + - type_id + - updated_at + filter: {} + update_permissions: + - role: user + permission: + columns: + - content + - title + - topic_id + filter: + _or: + - author_id: + _eq: X-Hasura-User-Id + - onchain_link: + proposer_address: + _in: X-Hasura-Kusama + check: null diff --git a/hasura/hasura-migrations/metadata/version.yaml b/hasura/hasura-migrations/metadata/version.yaml new file mode 100644 index 000000000..22817d2a9 --- /dev/null +++ b/hasura/hasura-migrations/metadata/version.yaml @@ -0,0 +1 @@ +version: 2 diff --git a/hasura/hasura-migrations/migrations/1572604593716_add replies/up.sql b/hasura/hasura-migrations/migrations/1572604593716_add replies/up.sql deleted file mode 100644 index 3112bf84d..000000000 --- a/hasura/hasura-migrations/migrations/1572604593716_add replies/up.sql +++ /dev/null @@ -1,100 +0,0 @@ -CREATE FUNCTION public.set_current_timestamp_updated_at() RETURNS trigger - LANGUAGE plpgsql - AS $$ -DECLARE - _new record; -BEGIN - _new := NEW; - _new."updated_at" = NOW(); - RETURN _new; -END; -$$; -CREATE FUNCTION public.truncate_tables(username character varying) RETURNS void - LANGUAGE plpgsql - AS $$ -DECLARE - statements CURSOR FOR - SELECT tablename FROM pg_tables - WHERE tableowner = username AND schemaname = 'public'; -BEGIN - FOR stmt IN statements LOOP - EXECUTE 'TRUNCATE TABLE ' || quote_ident(stmt.tablename) || ' CASCADE;'; - END LOOP; -END; -$$; -CREATE TABLE public.posts ( - id integer NOT NULL, - author_id integer NOT NULL, - content text, - creation_date timestamp without time zone DEFAULT now() NOT NULL, - modification_date time without time zone DEFAULT now() NOT NULL, - title text DEFAULT 'no title'::text NOT NULL, - category_id integer DEFAULT 2 NOT NULL -); -CREATE TABLE public.users ( - id integer NOT NULL, - username text NOT NULL, - email text, - created_at timestamp without time zone DEFAULT now() NOT NULL, - picture text -); -CREATE TABLE public.categories ( - id integer NOT NULL, - name text NOT NULL -); -CREATE SEQUENCE public.categories_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; -ALTER SEQUENCE public.categories_id_seq OWNED BY public.categories.id; -CREATE SEQUENCE public.messages_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; -ALTER SEQUENCE public.messages_id_seq OWNED BY public.posts.id; -CREATE TABLE public.replies ( - id integer NOT NULL, - author_id integer, - content text, - created_at timestamp with time zone DEFAULT now() NOT NULL, - updated_at timestamp with time zone DEFAULT now() NOT NULL, - post_id integer -); -COMMENT ON TABLE public.replies IS 'The replies to any post'; -CREATE SEQUENCE public.replies_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; -ALTER SEQUENCE public.replies_id_seq OWNED BY public.replies.id; -ALTER TABLE ONLY public.categories ALTER COLUMN id SET DEFAULT nextval('public.categories_id_seq'::regclass); -ALTER TABLE ONLY public.posts ALTER COLUMN id SET DEFAULT nextval('public.messages_id_seq'::regclass); -ALTER TABLE ONLY public.replies ALTER COLUMN id SET DEFAULT nextval('public.replies_id_seq'::regclass); -ALTER TABLE ONLY public.categories - ADD CONSTRAINT categories_name_key UNIQUE (name); -ALTER TABLE ONLY public.categories - ADD CONSTRAINT categories_pkey PRIMARY KEY (id); -ALTER TABLE ONLY public.posts - ADD CONSTRAINT messages_pkey PRIMARY KEY (id); -ALTER TABLE ONLY public.replies - ADD CONSTRAINT replies_pkey PRIMARY KEY (id); -ALTER TABLE ONLY public.users - ADD CONSTRAINT users_pkey1 PRIMARY KEY (id); -CREATE TRIGGER set_public_replies_updated_at BEFORE UPDATE ON public.replies FOR EACH ROW EXECUTE FUNCTION public.set_current_timestamp_updated_at(); -COMMENT ON TRIGGER set_public_replies_updated_at ON public.replies IS 'trigger to set value of column "updated_at" to current timestamp on row update'; -ALTER TABLE ONLY public.posts - ADD CONSTRAINT messages_author_id_fkey FOREIGN KEY (author_id) REFERENCES public.users(id) ON UPDATE RESTRICT ON DELETE CASCADE; -ALTER TABLE ONLY public.posts - ADD CONSTRAINT posts_category_id_fkey FOREIGN KEY (category_id) REFERENCES public.categories(id) ON UPDATE RESTRICT ON DELETE RESTRICT; -ALTER TABLE ONLY public.replies - ADD CONSTRAINT replies_author_id_fkey FOREIGN KEY (author_id) REFERENCES public.users(id) ON UPDATE RESTRICT ON DELETE RESTRICT; -ALTER TABLE ONLY public.replies - ADD CONSTRAINT replies_post_id_fkey FOREIGN KEY (post_id) REFERENCES public.posts(id) ON UPDATE RESTRICT ON DELETE RESTRICT; diff --git a/hasura/hasura-migrations/migrations/1572604593716_add replies/up.yaml b/hasura/hasura-migrations/migrations/1572604593716_add replies/up.yaml deleted file mode 100644 index 71c7aa438..000000000 --- a/hasura/hasura-migrations/migrations/1572604593716_add replies/up.yaml +++ /dev/null @@ -1,196 +0,0 @@ -- args: - allowlist: [] - functions: [] - query_collections: [] - remote_schemas: [] - tables: - - array_relationships: - - comment: null - name: posts - using: - foreign_key_constraint_on: - column: category_id - table: posts - configuration: - custom_column_names: {} - custom_root_fields: - delete: null - insert: null - select: null - select_aggregate: null - select_by_pk: null - update: null - delete_permissions: [] - event_triggers: [] - insert_permissions: [] - is_enum: false - object_relationships: [] - select_permissions: [] - table: categories - update_permissions: [] - - array_relationships: - - comment: null - name: user_posts - using: - foreign_key_constraint_on: - column: author_id - table: posts - configuration: - custom_column_names: {} - custom_root_fields: - delete: null - insert: null - select: null - select_aggregate: null - select_by_pk: null - update: null - delete_permissions: - - comment: null - permission: - filter: - id: - _eq: X-Hasura-User-Id - role: user - event_triggers: [] - insert_permissions: - - comment: null - permission: - check: - id: - _eq: X-Hasura-User-Id - columns: - - email - - id - - username - - picture - set: {} - role: user - is_enum: false - object_relationships: [] - select_permissions: - - comment: null - permission: - allow_aggregations: false - columns: - - created_at - - id - - username - - picture - computed_fields: [] - filter: {} - role: anonymous - - comment: null - permission: - allow_aggregations: false - columns: - - created_at - - id - - username - - picture - computed_fields: [] - filter: {} - role: user - table: users - update_permissions: - - comment: null - permission: - columns: - - picture - filter: - id: - _eq: X-Hasura-User-Id - set: {} - role: user - - array_relationships: [] - configuration: - custom_column_names: {} - custom_root_fields: - delete: null - insert: null - select: null - select_aggregate: null - select_by_pk: null - update: null - delete_permissions: - - comment: null - permission: - filter: - id: - _eq: X-Hasura-User-Id - role: user - event_triggers: [] - insert_permissions: - - comment: null - permission: - check: - id: - _eq: X-Hasura-User-Id - columns: - - content - set: {} - role: user - is_enum: false - object_relationships: - - comment: null - name: category - using: - foreign_key_constraint_on: category_id - - comment: null - name: author - using: - foreign_key_constraint_on: author_id - select_permissions: - - comment: null - permission: - allow_aggregations: false - columns: - - author_id - - content - - creation_date - - id - - modification_date - computed_fields: [] - filter: {} - role: user - - comment: null - permission: - allow_aggregations: false - columns: - - id - - author_id - - content - - creation_date - - modification_date - computed_fields: [] - filter: {} - role: anonymous - table: posts - update_permissions: - - comment: null - permission: - columns: - - content - filter: - author_id: - _eq: X-Hasura-User-Id - set: {} - role: user - - array_relationships: [] - configuration: - custom_column_names: {} - custom_root_fields: - delete: null - insert: null - select: null - select_aggregate: null - select_by_pk: null - update: null - delete_permissions: [] - event_triggers: [] - insert_permissions: [] - is_enum: false - object_relationships: [] - select_permissions: [] - table: replies - update_permissions: [] - type: replace_metadata diff --git a/hasura/hasura-migrations/migrations/1572604860695_add_relationship_replies_table_public_undefined/down.yaml b/hasura/hasura-migrations/migrations/1572604860695_add_relationship_replies_table_public_undefined/down.yaml deleted file mode 100644 index 33d0653a3..000000000 --- a/hasura/hasura-migrations/migrations/1572604860695_add_relationship_replies_table_public_undefined/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: replies - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1572604860695_add_relationship_replies_table_public_undefined/up.yaml b/hasura/hasura-migrations/migrations/1572604860695_add_relationship_replies_table_public_undefined/up.yaml deleted file mode 100644 index 697e0c05f..000000000 --- a/hasura/hasura-migrations/migrations/1572604860695_add_relationship_replies_table_public_undefined/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: replies - table: - name: posts - schema: public - using: - foreign_key_constraint_on: - column: post_id - table: - name: replies - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1572604862431_add_relationship_post_table_public_undefined/down.yaml b/hasura/hasura-migrations/migrations/1572604862431_add_relationship_post_table_public_undefined/down.yaml deleted file mode 100644 index 5166b6329..000000000 --- a/hasura/hasura-migrations/migrations/1572604862431_add_relationship_post_table_public_undefined/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post - table: - name: replies - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1572604862431_add_relationship_post_table_public_undefined/up.yaml b/hasura/hasura-migrations/migrations/1572604862431_add_relationship_post_table_public_undefined/up.yaml deleted file mode 100644 index ebc08f211..000000000 --- a/hasura/hasura-migrations/migrations/1572604862431_add_relationship_post_table_public_undefined/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: post - table: - name: replies - schema: public - using: - foreign_key_constraint_on: post_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1572604863208_add_relationship_user_table_public_undefined/down.yaml b/hasura/hasura-migrations/migrations/1572604863208_add_relationship_user_table_public_undefined/down.yaml deleted file mode 100644 index 7ab367664..000000000 --- a/hasura/hasura-migrations/migrations/1572604863208_add_relationship_user_table_public_undefined/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: user - table: - name: replies - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1572604863208_add_relationship_user_table_public_undefined/up.yaml b/hasura/hasura-migrations/migrations/1572604863208_add_relationship_user_table_public_undefined/up.yaml deleted file mode 100644 index 8dcfcd7ac..000000000 --- a/hasura/hasura-migrations/migrations/1572604863208_add_relationship_user_table_public_undefined/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: user - table: - name: replies - schema: public - using: - foreign_key_constraint_on: author_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1572604863959_add_relationship_replies_table_public_undefined/down.yaml b/hasura/hasura-migrations/migrations/1572604863959_add_relationship_replies_table_public_undefined/down.yaml deleted file mode 100644 index 414a93969..000000000 --- a/hasura/hasura-migrations/migrations/1572604863959_add_relationship_replies_table_public_undefined/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: replies - table: - name: users - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1572604863959_add_relationship_replies_table_public_undefined/up.yaml b/hasura/hasura-migrations/migrations/1572604863959_add_relationship_replies_table_public_undefined/up.yaml deleted file mode 100644 index f3baf3761..000000000 --- a/hasura/hasura-migrations/migrations/1572604863959_add_relationship_replies_table_public_undefined/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: replies - table: - name: users - schema: public - using: - foreign_key_constraint_on: - column: author_id - table: - name: replies - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1572604890771_rename_relationship_user_to_author_schema_public_table_replies/down.yaml b/hasura/hasura-migrations/migrations/1572604890771_rename_relationship_user_to_author_schema_public_table_replies/down.yaml deleted file mode 100644 index 0ca91e8e2..000000000 --- a/hasura/hasura-migrations/migrations/1572604890771_rename_relationship_user_to_author_schema_public_table_replies/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: author - new_name: user - table: - name: replies - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1572604890771_rename_relationship_user_to_author_schema_public_table_replies/up.yaml b/hasura/hasura-migrations/migrations/1572604890771_rename_relationship_user_to_author_schema_public_table_replies/up.yaml deleted file mode 100644 index ab625bdff..000000000 --- a/hasura/hasura-migrations/migrations/1572604890771_rename_relationship_user_to_author_schema_public_table_replies/up.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: user - new_name: author - table: - name: replies - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1572605655765_update_permission_anonymous_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1572605655765_update_permission_anonymous_public_table_posts/down.yaml deleted file mode 100644 index 4d18890ff..000000000 --- a/hasura/hasura-migrations/migrations/1572605655765_update_permission_anonymous_public_table_posts/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: anonymous - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - id - - author_id - - content - - creation_date - - modification_date - filter: {} - role: anonymous - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1572605655765_update_permission_anonymous_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1572605655765_update_permission_anonymous_public_table_posts/up.yaml deleted file mode 100644 index d355c9e99..000000000 --- a/hasura/hasura-migrations/migrations/1572605655765_update_permission_anonymous_public_table_posts/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: anonymous - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - category_id - - content - - creation_date - - id - - modification_date - - title - filter: {} - role: anonymous - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1572605677201_update_permission_anonymous_public_table_categories/down.yaml b/hasura/hasura-migrations/migrations/1572605677201_update_permission_anonymous_public_table_categories/down.yaml deleted file mode 100644 index 7190c4713..000000000 --- a/hasura/hasura-migrations/migrations/1572605677201_update_permission_anonymous_public_table_categories/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: categories - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1572605677201_update_permission_anonymous_public_table_categories/up.yaml b/hasura/hasura-migrations/migrations/1572605677201_update_permission_anonymous_public_table_categories/up.yaml deleted file mode 100644 index c86824ada..000000000 --- a/hasura/hasura-migrations/migrations/1572605677201_update_permission_anonymous_public_table_categories/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - id - - name - filter: {} - limit: null - role: anonymous - table: - name: categories - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1572605691608_update_permission_user_public_table_categories/down.yaml b/hasura/hasura-migrations/migrations/1572605691608_update_permission_user_public_table_categories/down.yaml deleted file mode 100644 index cd800d8db..000000000 --- a/hasura/hasura-migrations/migrations/1572605691608_update_permission_user_public_table_categories/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: categories - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1572605691608_update_permission_user_public_table_categories/up.yaml b/hasura/hasura-migrations/migrations/1572605691608_update_permission_user_public_table_categories/up.yaml deleted file mode 100644 index ab5b8894e..000000000 --- a/hasura/hasura-migrations/migrations/1572605691608_update_permission_user_public_table_categories/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - id - - name - filter: {} - limit: null - role: user - table: - name: categories - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1572605712013_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1572605712013_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 86ff20d31..000000000 --- a/hasura/hasura-migrations/migrations/1572605712013_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - content - - creation_date - - id - - modification_date - filter: {} - role: user - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1572605712013_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1572605712013_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index dcf395548..000000000 --- a/hasura/hasura-migrations/migrations/1572605712013_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - category_id - - content - - creation_date - - id - - modification_date - - title - filter: {} - role: user - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1572605771186_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1572605771186_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 94c8800c1..000000000 --- a/hasura/hasura-migrations/migrations/1572605771186_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - id: - _eq: X-Hasura-User-Id - columns: - - content - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1572605771186_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1572605771186_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index aee9606ad..000000000 --- a/hasura/hasura-migrations/migrations/1572605771186_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - id: - _eq: X-Hasura-User-Id - columns: - - category_id - - content - - title - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1572605840804_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1572605840804_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index aee9606ad..000000000 --- a/hasura/hasura-migrations/migrations/1572605840804_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - id: - _eq: X-Hasura-User-Id - columns: - - category_id - - content - - title - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1572605840804_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1572605840804_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 66abad8d4..000000000 --- a/hasura/hasura-migrations/migrations/1572605840804_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - id: - _eq: X-Hasura-User-Id - columns: - - author_id - - category_id - - content - - title - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1572605858206_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1572605858206_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index efaefe708..000000000 --- a/hasura/hasura-migrations/migrations/1572605858206_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_update_permission -- args: - permission: - columns: - - content - filter: - author_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1572605858206_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1572605858206_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 016f3486b..000000000 --- a/hasura/hasura-migrations/migrations/1572605858206_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_update_permission -- args: - permission: - columns: - - category_id - - content - - modification_date - - title - filter: - author_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1572605878180_update_permission_anonymous_public_table_replies/down.yaml b/hasura/hasura-migrations/migrations/1572605878180_update_permission_anonymous_public_table_replies/down.yaml deleted file mode 100644 index 98c9d8531..000000000 --- a/hasura/hasura-migrations/migrations/1572605878180_update_permission_anonymous_public_table_replies/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: replies - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1572605878180_update_permission_anonymous_public_table_replies/up.yaml b/hasura/hasura-migrations/migrations/1572605878180_update_permission_anonymous_public_table_replies/up.yaml deleted file mode 100644 index eec7af9e7..000000000 --- a/hasura/hasura-migrations/migrations/1572605878180_update_permission_anonymous_public_table_replies/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - id - - author_id - - content - - created_at - - updated_at - - post_id - filter: {} - limit: null - role: anonymous - table: - name: replies - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1572605884136_update_permission_user_public_table_replies/down.yaml b/hasura/hasura-migrations/migrations/1572605884136_update_permission_user_public_table_replies/down.yaml deleted file mode 100644 index 54023121d..000000000 --- a/hasura/hasura-migrations/migrations/1572605884136_update_permission_user_public_table_replies/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1572605884136_update_permission_user_public_table_replies/up.yaml b/hasura/hasura-migrations/migrations/1572605884136_update_permission_user_public_table_replies/up.yaml deleted file mode 100644 index 8f6fe86f4..000000000 --- a/hasura/hasura-migrations/migrations/1572605884136_update_permission_user_public_table_replies/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - author_id - - id - - post_id - - content - - created_at - - updated_at - filter: {} - limit: null - role: user - table: - name: replies - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1572605999921_update_permission_user_public_table_replies/down.yaml b/hasura/hasura-migrations/migrations/1572605999921_update_permission_user_public_table_replies/down.yaml deleted file mode 100644 index 4685bfeae..000000000 --- a/hasura/hasura-migrations/migrations/1572605999921_update_permission_user_public_table_replies/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1572605999921_update_permission_user_public_table_replies/up.yaml b/hasura/hasura-migrations/migrations/1572605999921_update_permission_user_public_table_replies/up.yaml deleted file mode 100644 index 916c2bb49..000000000 --- a/hasura/hasura-migrations/migrations/1572605999921_update_permission_user_public_table_replies/up.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - permission: - allow_upsert: true - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - content - - created_at - - post_id - - updated_at - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: replies - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1572606038568_delete_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1572606038568_delete_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 90d2664cd..000000000 --- a/hasura/hasura-migrations/migrations/1572606038568_delete_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - permission: - filter: - id: - _eq: X-Hasura-User-Id - role: user - table: - name: posts - schema: public - type: create_delete_permission diff --git a/hasura/hasura-migrations/migrations/1572606038568_delete_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1572606038568_delete_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 9e2a40110..000000000 --- a/hasura/hasura-migrations/migrations/1572606038568_delete_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_delete_permission diff --git a/hasura/hasura-migrations/migrations/1572606044524_delete_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1572606044524_delete_permission_user_public_table_posts/down.yaml deleted file mode 100644 index f56200dfe..000000000 --- a/hasura/hasura-migrations/migrations/1572606044524_delete_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- args: - permission: - check: - id: - _eq: X-Hasura-User-Id - columns: - - author_id - - category_id - - content - - title - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1572606044524_delete_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1572606044524_delete_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 8a69c835b..000000000 --- a/hasura/hasura-migrations/migrations/1572606044524_delete_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1572606074612_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1572606074612_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 8a69c835b..000000000 --- a/hasura/hasura-migrations/migrations/1572606074612_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1572606074612_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1572606074612_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index b387bfdb3..000000000 --- a/hasura/hasura-migrations/migrations/1572606074612_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - permission: - allow_upsert: true - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - category_id - - content - - creation_date - - modification_date - - title - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1572606082858_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1572606082858_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 9e2a40110..000000000 --- a/hasura/hasura-migrations/migrations/1572606082858_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_delete_permission diff --git a/hasura/hasura-migrations/migrations/1572606082858_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1572606082858_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 3b663f971..000000000 --- a/hasura/hasura-migrations/migrations/1572606082858_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - permission: - filter: - author_id: - _eq: X-Hasura-User-Id - role: user - table: - name: posts - schema: public - type: create_delete_permission diff --git a/hasura/hasura-migrations/migrations/1573657566632_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1573657566632_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 77710fc8f..000000000 --- a/hasura/hasura-migrations/migrations/1573657566632_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - category_id - - content - - creation_date - - modification_date - - title - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1573657566632_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1573657566632_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index fb2fe517c..000000000 --- a/hasura/hasura-migrations/migrations/1573657566632_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,32 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - _and: - - author_id: - _eq: X-Hasura-User-Id - - category_id: - _nin: - - 1 - - 3 - columns: - - author_id - - category_id - - content - - creation_date - - modification_date - - title - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1573657698665_update_permission_proposal_bot_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1573657698665_update_permission_proposal_bot_public_table_posts/down.yaml deleted file mode 100644 index 41556fe0a..000000000 --- a/hasura/hasura-migrations/migrations/1573657698665_update_permission_proposal_bot_public_table_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1573657698665_update_permission_proposal_bot_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1573657698665_update_permission_proposal_bot_public_table_posts/up.yaml deleted file mode 100644 index e11a20d1b..000000000 --- a/hasura/hasura-migrations/migrations/1573657698665_update_permission_proposal_bot_public_table_posts/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - permission: - allow_upsert: true - check: - category_id: - _eq: 3 - columns: - - author_id - - category_id - - content - - creation_date - - modification_date - - title - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1573738463047_create_table_public_proposals/down.yaml b/hasura/hasura-migrations/migrations/1573738463047_create_table_public_proposals/down.yaml deleted file mode 100644 index 73fdc80bc..000000000 --- a/hasura/hasura-migrations/migrations/1573738463047_create_table_public_proposals/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: DROP TABLE "public"."proposals" - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1573738463047_create_table_public_proposals/up.yaml b/hasura/hasura-migrations/migrations/1573738463047_create_table_public_proposals/up.yaml deleted file mode 100644 index cc6c00635..000000000 --- a/hasura/hasura-migrations/migrations/1573738463047_create_table_public_proposals/up.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- args: - sql: "CREATE TABLE \"public\".\"proposals\"(\"id\" serial NOT NULL, \"onchain_id\" - integer NOT NULL, \"post_id\" integer NOT NULL, \"created_at\" timestamptz NOT - NULL DEFAULT now(), \"updated_at\" timestamptz NOT NULL DEFAULT now(), \"method_name\" - text NOT NULL, \"method_arguments\" text, \"deposit\" integer NOT NULL, \"referendum\" - boolean NOT NULL DEFAULT false, PRIMARY KEY (\"id\") , FOREIGN KEY (\"post_id\") - REFERENCES \"public\".\"posts\"(\"id\") ON UPDATE restrict ON DELETE restrict, - UNIQUE (\"id\"), UNIQUE (\"onchain_id\"), UNIQUE (\"post_id\")); COMMENT ON - TABLE \"public\".\"proposals\" IS E'on chain proposal or referendum';\nCREATE - OR REPLACE FUNCTION \"public\".\"set_current_timestamp_updated_at\"()\nRETURNS - TRIGGER AS $$\nDECLARE\n _new record;\nBEGIN\n _new := NEW;\n _new.\"updated_at\" - = NOW();\n RETURN _new;\nEND;\n$$ LANGUAGE plpgsql;\nCREATE TRIGGER \"set_public_proposals_updated_at\"\nBEFORE - UPDATE ON \"public\".\"proposals\"\nFOR EACH ROW\nEXECUTE PROCEDURE \"public\".\"set_current_timestamp_updated_at\"();\nCOMMENT - ON TRIGGER \"set_public_proposals_updated_at\" ON \"public\".\"proposals\" \nIS - 'trigger to set value of column \"updated_at\" to current timestamp on row update';\n" - type: run_sql -- args: - name: proposals - schema: public - type: add_existing_table_or_view diff --git a/hasura/hasura-migrations/migrations/1573738491341_add_relationship__table_public_proposals/down.yaml b/hasura/hasura-migrations/migrations/1573738491341_add_relationship__table_public_proposals/down.yaml deleted file mode 100644 index 07186b24c..000000000 --- a/hasura/hasura-migrations/migrations/1573738491341_add_relationship__table_public_proposals/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post - table: - name: proposals - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1573738491341_add_relationship__table_public_proposals/up.yaml b/hasura/hasura-migrations/migrations/1573738491341_add_relationship__table_public_proposals/up.yaml deleted file mode 100644 index cfb25dbef..000000000 --- a/hasura/hasura-migrations/migrations/1573738491341_add_relationship__table_public_proposals/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: post - table: - name: proposals - schema: public - using: - foreign_key_constraint_on: post_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1573738500415_add_relationship__table_public_posts/down.yaml b/hasura/hasura-migrations/migrations/1573738500415_add_relationship__table_public_posts/down.yaml deleted file mode 100644 index 880e28a9d..000000000 --- a/hasura/hasura-migrations/migrations/1573738500415_add_relationship__table_public_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: proposal - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1573738500415_add_relationship__table_public_posts/up.yaml b/hasura/hasura-migrations/migrations/1573738500415_add_relationship__table_public_posts/up.yaml deleted file mode 100644 index 106ac7c79..000000000 --- a/hasura/hasura-migrations/migrations/1573738500415_add_relationship__table_public_posts/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - name: proposal - table: - name: posts - schema: public - using: - manual_configuration: - column_mapping: - id: post_id - remote_table: - name: proposals - schema: public - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1573738538059_update_permission_proposal_bot_public_table_proposals/down.yaml b/hasura/hasura-migrations/migrations/1573738538059_update_permission_proposal_bot_public_table_proposals/down.yaml deleted file mode 100644 index 4e72366ef..000000000 --- a/hasura/hasura-migrations/migrations/1573738538059_update_permission_proposal_bot_public_table_proposals/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: proposal_bot - table: - name: proposals - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1573738538059_update_permission_proposal_bot_public_table_proposals/up.yaml b/hasura/hasura-migrations/migrations/1573738538059_update_permission_proposal_bot_public_table_proposals/up.yaml deleted file mode 100644 index 6e07c9794..000000000 --- a/hasura/hasura-migrations/migrations/1573738538059_update_permission_proposal_bot_public_table_proposals/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - permission: - allow_upsert: true - check: {} - columns: - - created_at - - deposit - - method_arguments - - method_name - - onchain_id - - post_id - - referendum - - updated_at - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: proposals - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1573738549835_update_permission_anonymous_public_table_proposals/down.yaml b/hasura/hasura-migrations/migrations/1573738549835_update_permission_anonymous_public_table_proposals/down.yaml deleted file mode 100644 index 1438407e5..000000000 --- a/hasura/hasura-migrations/migrations/1573738549835_update_permission_anonymous_public_table_proposals/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: proposals - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1573738549835_update_permission_anonymous_public_table_proposals/up.yaml b/hasura/hasura-migrations/migrations/1573738549835_update_permission_anonymous_public_table_proposals/up.yaml deleted file mode 100644 index b084f27b3..000000000 --- a/hasura/hasura-migrations/migrations/1573738549835_update_permission_anonymous_public_table_proposals/up.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - referendum - - deposit - - id - - onchain_id - - post_id - - method_arguments - - method_name - - created_at - - updated_at - filter: {} - limit: null - role: anonymous - table: - name: proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1573738558789_update_permission_proposal_bot_public_table_proposals/down.yaml b/hasura/hasura-migrations/migrations/1573738558789_update_permission_proposal_bot_public_table_proposals/down.yaml deleted file mode 100644 index 7825fa477..000000000 --- a/hasura/hasura-migrations/migrations/1573738558789_update_permission_proposal_bot_public_table_proposals/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: proposal_bot - table: - name: proposals - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1573738558789_update_permission_proposal_bot_public_table_proposals/up.yaml b/hasura/hasura-migrations/migrations/1573738558789_update_permission_proposal_bot_public_table_proposals/up.yaml deleted file mode 100644 index 22ad9d27d..000000000 --- a/hasura/hasura-migrations/migrations/1573738558789_update_permission_proposal_bot_public_table_proposals/up.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - referendum - - deposit - - id - - onchain_id - - post_id - - method_arguments - - method_name - - created_at - - updated_at - filter: {} - limit: null - role: proposal_bot - table: - name: proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1573738567289_update_permission_user_public_table_proposals/down.yaml b/hasura/hasura-migrations/migrations/1573738567289_update_permission_user_public_table_proposals/down.yaml deleted file mode 100644 index c7bc56f43..000000000 --- a/hasura/hasura-migrations/migrations/1573738567289_update_permission_user_public_table_proposals/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: proposals - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1573738567289_update_permission_user_public_table_proposals/up.yaml b/hasura/hasura-migrations/migrations/1573738567289_update_permission_user_public_table_proposals/up.yaml deleted file mode 100644 index 0d19d2887..000000000 --- a/hasura/hasura-migrations/migrations/1573738567289_update_permission_user_public_table_proposals/up.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - referendum - - deposit - - id - - onchain_id - - post_id - - method_arguments - - method_name - - created_at - - updated_at - filter: {} - limit: null - role: user - table: - name: proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1573766172430_alter_table_public_posts_add_column_proposal_id/down.yaml b/hasura/hasura-migrations/migrations/1573766172430_alter_table_public_posts_add_column_proposal_id/down.yaml deleted file mode 100644 index 23b0b40cf..000000000 --- a/hasura/hasura-migrations/migrations/1573766172430_alter_table_public_posts_add_column_proposal_id/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" DROP COLUMN "proposal_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1573766172430_alter_table_public_posts_add_column_proposal_id/up.yaml b/hasura/hasura-migrations/migrations/1573766172430_alter_table_public_posts_add_column_proposal_id/up.yaml deleted file mode 100644 index e976ac502..000000000 --- a/hasura/hasura-migrations/migrations/1573766172430_alter_table_public_posts_add_column_proposal_id/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" ADD COLUMN "proposal_id" integer NULL UNIQUE; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1573766216855_alter_table_public_posts_drop_column_proposal_id/down.yaml b/hasura/hasura-migrations/migrations/1573766216855_alter_table_public_posts_drop_column_proposal_id/down.yaml deleted file mode 100644 index 11b803d9e..000000000 --- a/hasura/hasura-migrations/migrations/1573766216855_alter_table_public_posts_drop_column_proposal_id/down.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" ADD COLUMN "proposal_id" int4 - type: run_sql -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "proposal_id" DROP NOT NULL - type: run_sql -- args: - sql: ALTER TABLE "public"."posts" ADD CONSTRAINT posts_proposal_id_key UNIQUE - (proposal_id) - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1573766216855_alter_table_public_posts_drop_column_proposal_id/up.yaml b/hasura/hasura-migrations/migrations/1573766216855_alter_table_public_posts_drop_column_proposal_id/up.yaml deleted file mode 100644 index 453851a55..000000000 --- a/hasura/hasura-migrations/migrations/1573766216855_alter_table_public_posts_drop_column_proposal_id/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" DROP COLUMN "proposal_id" CASCADE - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1573842176395_alter_table_public_proposals_alter_column_deposit/down.yaml b/hasura/hasura-migrations/migrations/1573842176395_alter_table_public_proposals_alter_column_deposit/down.yaml deleted file mode 100644 index 956e0fa8a..000000000 --- a/hasura/hasura-migrations/migrations/1573842176395_alter_table_public_proposals_alter_column_deposit/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: ALTER TABLE "public"."proposals" ALTER COLUMN "deposit" TYPE integer; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."proposals"."deposit" IS E'null' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1573842176395_alter_table_public_proposals_alter_column_deposit/up.yaml b/hasura/hasura-migrations/migrations/1573842176395_alter_table_public_proposals_alter_column_deposit/up.yaml deleted file mode 100644 index 2b88b90e3..000000000 --- a/hasura/hasura-migrations/migrations/1573842176395_alter_table_public_proposals_alter_column_deposit/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: ALTER TABLE "public"."proposals" ALTER COLUMN "deposit" TYPE float8; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."proposals"."deposit" IS E'' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1574246024580_run_sql_migration/up.yaml b/hasura/hasura-migrations/migrations/1574246024580_run_sql_migration/up.yaml deleted file mode 100644 index f3686ceec..000000000 --- a/hasura/hasura-migrations/migrations/1574246024580_run_sql_migration/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - cascade: false - sql: |- - CREATE FUNCTION replies_count(post_row posts) - RETURNS integer AS $$ - SELECT CAST( COUNT(*) as integer) FROM replies WHERE post_id = post_row.id - $$ LANGUAGE sql STABLE; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1574691032527_remove_replies_count/up.yaml b/hasura/hasura-migrations/migrations/1574691032527_remove_replies_count/up.yaml deleted file mode 100644 index d02149535..000000000 --- a/hasura/hasura-migrations/migrations/1574691032527_remove_replies_count/up.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - cascade: true - sql: DROP FUNCTION replies_count - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1574691139892_update_permission_anonymous_public_table_replies/down.yaml b/hasura/hasura-migrations/migrations/1574691139892_update_permission_anonymous_public_table_replies/down.yaml deleted file mode 100644 index 438386644..000000000 --- a/hasura/hasura-migrations/migrations/1574691139892_update_permission_anonymous_public_table_replies/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: anonymous - table: - name: replies - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - id - - author_id - - content - - created_at - - updated_at - - post_id - computed_fields: [] - filter: {} - role: anonymous - table: - name: replies - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1574691139892_update_permission_anonymous_public_table_replies/up.yaml b/hasura/hasura-migrations/migrations/1574691139892_update_permission_anonymous_public_table_replies/up.yaml deleted file mode 100644 index 4cb6326c7..000000000 --- a/hasura/hasura-migrations/migrations/1574691139892_update_permission_anonymous_public_table_replies/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: anonymous - table: - name: replies - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - id - - author_id - - content - - created_at - - updated_at - - post_id - computed_fields: [] - filter: {} - role: anonymous - table: - name: replies - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1574971921162_update_permission_user_public_table_replies/down.yaml b/hasura/hasura-migrations/migrations/1574971921162_update_permission_user_public_table_replies/down.yaml deleted file mode 100644 index 8e34bc46e..000000000 --- a/hasura/hasura-migrations/migrations/1574971921162_update_permission_user_public_table_replies/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - id - - post_id - - content - - created_at - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: replies - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1574971921162_update_permission_user_public_table_replies/up.yaml b/hasura/hasura-migrations/migrations/1574971921162_update_permission_user_public_table_replies/up.yaml deleted file mode 100644 index 768adecf9..000000000 --- a/hasura/hasura-migrations/migrations/1574971921162_update_permission_user_public_table_replies/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - author_id - - id - - post_id - - content - - created_at - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: replies - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1574977595328_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1574977595328_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index fb2fe517c..000000000 --- a/hasura/hasura-migrations/migrations/1574977595328_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,32 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - _and: - - author_id: - _eq: X-Hasura-User-Id - - category_id: - _nin: - - 1 - - 3 - columns: - - author_id - - category_id - - content - - creation_date - - modification_date - - title - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1574977595328_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1574977595328_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 77710fc8f..000000000 --- a/hasura/hasura-migrations/migrations/1574977595328_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - category_id - - content - - creation_date - - modification_date - - title - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1575300356679_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1575300356679_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index fb2fe517c..000000000 --- a/hasura/hasura-migrations/migrations/1575300356679_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,32 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - _and: - - author_id: - _eq: X-Hasura-User-Id - - category_id: - _nin: - - 1 - - 3 - columns: - - author_id - - category_id - - content - - creation_date - - modification_date - - title - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1575300356679_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1575300356679_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 9a7c9033f..000000000 --- a/hasura/hasura-migrations/migrations/1575300356679_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - category_id - - content - - creation_date - - id - - modification_date - - title - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1575366466304_update_permission_user_public_table_replies/down.yaml b/hasura/hasura-migrations/migrations/1575366466304_update_permission_user_public_table_replies/down.yaml deleted file mode 100644 index 8e34bc46e..000000000 --- a/hasura/hasura-migrations/migrations/1575366466304_update_permission_user_public_table_replies/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - id - - post_id - - content - - created_at - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: replies - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1575366466304_update_permission_user_public_table_replies/up.yaml b/hasura/hasura-migrations/migrations/1575366466304_update_permission_user_public_table_replies/up.yaml deleted file mode 100644 index 768adecf9..000000000 --- a/hasura/hasura-migrations/migrations/1575366466304_update_permission_user_public_table_replies/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - author_id - - id - - post_id - - content - - created_at - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: replies - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1575643372009_update_permission_user_public_table_replies/down.yaml b/hasura/hasura-migrations/migrations/1575643372009_update_permission_user_public_table_replies/down.yaml deleted file mode 100644 index 8e34bc46e..000000000 --- a/hasura/hasura-migrations/migrations/1575643372009_update_permission_user_public_table_replies/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - id - - post_id - - content - - created_at - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: replies - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1575643372009_update_permission_user_public_table_replies/up.yaml b/hasura/hasura-migrations/migrations/1575643372009_update_permission_user_public_table_replies/up.yaml deleted file mode 100644 index 768adecf9..000000000 --- a/hasura/hasura-migrations/migrations/1575643372009_update_permission_user_public_table_replies/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - author_id - - id - - post_id - - content - - created_at - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: replies - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1575741705711_drop_relationship_author_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1575741705711_drop_relationship_author_public_table_posts/down.yaml deleted file mode 100644 index c22ec93a1..000000000 --- a/hasura/hasura-migrations/migrations/1575741705711_drop_relationship_author_public_table_posts/down.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: author - table: - name: posts - schema: public - using: - foreign_key_constraint_on: author_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1575741705711_drop_relationship_author_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1575741705711_drop_relationship_author_public_table_posts/up.yaml deleted file mode 100644 index 2630d107a..000000000 --- a/hasura/hasura-migrations/migrations/1575741705711_drop_relationship_author_public_table_posts/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: author - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1575741714852_drop_relationship_author_public_table_replies/down.yaml b/hasura/hasura-migrations/migrations/1575741714852_drop_relationship_author_public_table_replies/down.yaml deleted file mode 100644 index 38a7ea131..000000000 --- a/hasura/hasura-migrations/migrations/1575741714852_drop_relationship_author_public_table_replies/down.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: author - table: - name: replies - schema: public - using: - foreign_key_constraint_on: author_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1575741714852_drop_relationship_author_public_table_replies/up.yaml b/hasura/hasura-migrations/migrations/1575741714852_drop_relationship_author_public_table_replies/up.yaml deleted file mode 100644 index 30dd521e5..000000000 --- a/hasura/hasura-migrations/migrations/1575741714852_drop_relationship_author_public_table_replies/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: author - table: - name: replies - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1575741722527_run_sql_migration/up.yaml b/hasura/hasura-migrations/migrations/1575741722527_run_sql_migration/up.yaml deleted file mode 100644 index a06c4c038..000000000 --- a/hasura/hasura-migrations/migrations/1575741722527_run_sql_migration/up.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - cascade: false - sql: drop table users cascade; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1575797453493_create_remote_schema_auth/down.yaml b/hasura/hasura-migrations/migrations/1575797453493_create_remote_schema_auth/down.yaml deleted file mode 100644 index fd8967fab..000000000 --- a/hasura/hasura-migrations/migrations/1575797453493_create_remote_schema_auth/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - name: auth - type: remove_remote_schema diff --git a/hasura/hasura-migrations/migrations/1575797453493_create_remote_schema_auth/up.yaml b/hasura/hasura-migrations/migrations/1575797453493_create_remote_schema_auth/up.yaml deleted file mode 100644 index 11a0d31d0..000000000 --- a/hasura/hasura-migrations/migrations/1575797453493_create_remote_schema_auth/up.yaml +++ /dev/null @@ -1,9 +0,0 @@ -- args: - definition: - forward_client_headers: true - headers: [] - timeout_seconds: 60 - url: http://auth-server-service:8010/auth/graphql - # url: http://host.docker.internal:8010/auth/graphql - name: auth - type: add_remote_schema diff --git a/hasura/hasura-migrations/migrations/1575797580584_table_posts_create_remote_relationship_author/down.yaml b/hasura/hasura-migrations/migrations/1575797580584_table_posts_create_remote_relationship_author/down.yaml deleted file mode 100644 index b854d615e..000000000 --- a/hasura/hasura-migrations/migrations/1575797580584_table_posts_create_remote_relationship_author/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: author - table: - name: posts - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1575797580584_table_posts_create_remote_relationship_author/up.yaml b/hasura/hasura-migrations/migrations/1575797580584_table_posts_create_remote_relationship_author/up.yaml deleted file mode 100644 index 8b03071ca..000000000 --- a/hasura/hasura-migrations/migrations/1575797580584_table_posts_create_remote_relationship_author/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - author_id - name: author - remote_field: - user: - arguments: - id: $author_id - remote_schema: auth - table: - name: posts - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1575798465420_table_replies_create_remote_relationship_author/down.yaml b/hasura/hasura-migrations/migrations/1575798465420_table_replies_create_remote_relationship_author/down.yaml deleted file mode 100644 index 0fef1039f..000000000 --- a/hasura/hasura-migrations/migrations/1575798465420_table_replies_create_remote_relationship_author/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: author - table: - name: replies - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1575798465420_table_replies_create_remote_relationship_author/up.yaml b/hasura/hasura-migrations/migrations/1575798465420_table_replies_create_remote_relationship_author/up.yaml deleted file mode 100644 index 54955b2a1..000000000 --- a/hasura/hasura-migrations/migrations/1575798465420_table_replies_create_remote_relationship_author/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - author_id - name: author - remote_field: - user: - arguments: - id: $author_id - remote_schema: auth - table: - name: replies - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1575798577360_update_permission_user_public_table_replies/down.yaml b/hasura/hasura-migrations/migrations/1575798577360_update_permission_user_public_table_replies/down.yaml deleted file mode 100644 index 49542166e..000000000 --- a/hasura/hasura-migrations/migrations/1575798577360_update_permission_user_public_table_replies/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_update_permission diff --git a/hasura/hasura-migrations/migrations/1575798577360_update_permission_user_public_table_replies/up.yaml b/hasura/hasura-migrations/migrations/1575798577360_update_permission_user_public_table_replies/up.yaml deleted file mode 100644 index 5691f467f..000000000 --- a/hasura/hasura-migrations/migrations/1575798577360_update_permission_user_public_table_replies/up.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- args: - permission: - columns: - - content - filter: - author_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: replies - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1575798608233_delete_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1575798608233_delete_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 3b663f971..000000000 --- a/hasura/hasura-migrations/migrations/1575798608233_delete_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - permission: - filter: - author_id: - _eq: X-Hasura-User-Id - role: user - table: - name: posts - schema: public - type: create_delete_permission diff --git a/hasura/hasura-migrations/migrations/1575798608233_delete_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1575798608233_delete_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 9e2a40110..000000000 --- a/hasura/hasura-migrations/migrations/1575798608233_delete_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_delete_permission diff --git a/hasura/hasura-migrations/migrations/1575798630195_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1575798630195_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 016f3486b..000000000 --- a/hasura/hasura-migrations/migrations/1575798630195_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_update_permission -- args: - permission: - columns: - - category_id - - content - - modification_date - - title - filter: - author_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1575798630195_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1575798630195_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index b824e8a2d..000000000 --- a/hasura/hasura-migrations/migrations/1575798630195_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_update_permission -- args: - permission: - columns: - - content - - title - filter: - author_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1575912510783_rename_table_public_categories/down.yaml b/hasura/hasura-migrations/migrations/1575912510783_rename_table_public_categories/down.yaml deleted file mode 100644 index c6d42fa87..000000000 --- a/hasura/hasura-migrations/migrations/1575912510783_rename_table_public_categories/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."topics" rename to "categories"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1575912510783_rename_table_public_categories/up.yaml b/hasura/hasura-migrations/migrations/1575912510783_rename_table_public_categories/up.yaml deleted file mode 100644 index 3faec0068..000000000 --- a/hasura/hasura-migrations/migrations/1575912510783_rename_table_public_categories/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."categories" rename to "topics"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1575912539353_rename_relationship_category_to_topic_schema_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1575912539353_rename_relationship_category_to_topic_schema_public_table_posts/down.yaml deleted file mode 100644 index e8e5702ba..000000000 --- a/hasura/hasura-migrations/migrations/1575912539353_rename_relationship_category_to_topic_schema_public_table_posts/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: topic - new_name: category - table: - name: posts - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1575912539353_rename_relationship_category_to_topic_schema_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1575912539353_rename_relationship_category_to_topic_schema_public_table_posts/up.yaml deleted file mode 100644 index 38772ec0d..000000000 --- a/hasura/hasura-migrations/migrations/1575912539353_rename_relationship_category_to_topic_schema_public_table_posts/up.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: category - new_name: topic - table: - name: posts - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1575912650379_alter_table_public_posts_alter_column_category_id/down.yaml b/hasura/hasura-migrations/migrations/1575912650379_alter_table_public_posts_alter_column_category_id/down.yaml deleted file mode 100644 index 2ee90bbdf..000000000 --- a/hasura/hasura-migrations/migrations/1575912650379_alter_table_public_posts_alter_column_category_id/down.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "category_id" TYPE integer; - type: run_sql -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "category_id" SET NOT NULL; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."posts"."category_id" IS E'null' - type: run_sql -- args: - sql: alter table "public"."posts" rename column "topic_id" to "category_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1575912650379_alter_table_public_posts_alter_column_category_id/up.yaml b/hasura/hasura-migrations/migrations/1575912650379_alter_table_public_posts_alter_column_category_id/up.yaml deleted file mode 100644 index 138e39420..000000000 --- a/hasura/hasura-migrations/migrations/1575912650379_alter_table_public_posts_alter_column_category_id/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "category_id" TYPE int4; - type: run_sql -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "category_id" DROP NOT NULL; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."posts"."category_id" IS E'Define the main suject - of the post' - type: run_sql -- args: - sql: alter table "public"."posts" rename column "category_id" to "topic_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1575912700926_run_sql_migration/up.yaml b/hasura/hasura-migrations/migrations/1575912700926_run_sql_migration/up.yaml deleted file mode 100644 index 1d6cf57fb..000000000 --- a/hasura/hasura-migrations/migrations/1575912700926_run_sql_migration/up.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - cascade: true - sql: drop table proposals; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1575913261082_create_table_public_post_types/down.yaml b/hasura/hasura-migrations/migrations/1575913261082_create_table_public_post_types/down.yaml deleted file mode 100644 index 50c101668..000000000 --- a/hasura/hasura-migrations/migrations/1575913261082_create_table_public_post_types/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: DROP TABLE "public"."post_types" - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1575913261082_create_table_public_post_types/up.yaml b/hasura/hasura-migrations/migrations/1575913261082_create_table_public_post_types/up.yaml deleted file mode 100644 index 4f8c90ed6..000000000 --- a/hasura/hasura-migrations/migrations/1575913261082_create_table_public_post_types/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - sql: CREATE TABLE "public"."post_types"("id" serial NOT NULL, "name" text NOT - NULL, PRIMARY KEY ("id") , UNIQUE ("id"), UNIQUE ("name")); - type: run_sql -- args: - name: post_types - schema: public - type: add_existing_table_or_view diff --git a/hasura/hasura-migrations/migrations/1575913307990_alter_table_public_posts_add_column_type_id/down.yaml b/hasura/hasura-migrations/migrations/1575913307990_alter_table_public_posts_add_column_type_id/down.yaml deleted file mode 100644 index c3e03b18a..000000000 --- a/hasura/hasura-migrations/migrations/1575913307990_alter_table_public_posts_add_column_type_id/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" DROP COLUMN "type_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1575913307990_alter_table_public_posts_add_column_type_id/up.yaml b/hasura/hasura-migrations/migrations/1575913307990_alter_table_public_posts_add_column_type_id/up.yaml deleted file mode 100644 index ebc5d5cb3..000000000 --- a/hasura/hasura-migrations/migrations/1575913307990_alter_table_public_posts_add_column_type_id/up.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" ADD COLUMN "type_id" integer NOT NULL DEFAULT - 1; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1575913387316_set_fk_public_posts_type_id/down.yaml b/hasura/hasura-migrations/migrations/1575913387316_set_fk_public_posts_type_id/down.yaml deleted file mode 100644 index 1872b1c26..000000000 --- a/hasura/hasura-migrations/migrations/1575913387316_set_fk_public_posts_type_id/down.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: "\n alter table \"public\".\"posts\" drop constraint \"posts_type_id_fkey\"\n - \ " - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1575913387316_set_fk_public_posts_type_id/up.yaml b/hasura/hasura-migrations/migrations/1575913387316_set_fk_public_posts_type_id/up.yaml deleted file mode 100644 index 4a24a4996..000000000 --- a/hasura/hasura-migrations/migrations/1575913387316_set_fk_public_posts_type_id/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: "\n alter table \"public\".\"posts\"\n add constraint - \"posts_type_id_fkey\" \n foreign key (\"type_id\") \n references - \"public\".\"post_types\"\n (\"id\") on update restrict on delete - restrict;\n " - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1575913421638_add_relationship__table_public_posts/down.yaml b/hasura/hasura-migrations/migrations/1575913421638_add_relationship__table_public_posts/down.yaml deleted file mode 100644 index 60f5ea48f..000000000 --- a/hasura/hasura-migrations/migrations/1575913421638_add_relationship__table_public_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: type - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1575913421638_add_relationship__table_public_posts/up.yaml b/hasura/hasura-migrations/migrations/1575913421638_add_relationship__table_public_posts/up.yaml deleted file mode 100644 index d7d263922..000000000 --- a/hasura/hasura-migrations/migrations/1575913421638_add_relationship__table_public_posts/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: type - table: - name: posts - schema: public - using: - foreign_key_constraint_on: type_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1575913449329_add_relationship__table_public_posts/down.yaml b/hasura/hasura-migrations/migrations/1575913449329_add_relationship__table_public_posts/down.yaml deleted file mode 100644 index eab897faf..000000000 --- a/hasura/hasura-migrations/migrations/1575913449329_add_relationship__table_public_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post_type - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1575913449329_add_relationship__table_public_posts/up.yaml b/hasura/hasura-migrations/migrations/1575913449329_add_relationship__table_public_posts/up.yaml deleted file mode 100644 index ca2162efc..000000000 --- a/hasura/hasura-migrations/migrations/1575913449329_add_relationship__table_public_posts/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: post_type - table: - name: posts - schema: public - using: - foreign_key_constraint_on: type_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1575913476888_add_relationship__table_public_post_types/down.yaml b/hasura/hasura-migrations/migrations/1575913476888_add_relationship__table_public_post_types/down.yaml deleted file mode 100644 index 6a992da02..000000000 --- a/hasura/hasura-migrations/migrations/1575913476888_add_relationship__table_public_post_types/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: posts - table: - name: post_types - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1575913476888_add_relationship__table_public_post_types/up.yaml b/hasura/hasura-migrations/migrations/1575913476888_add_relationship__table_public_post_types/up.yaml deleted file mode 100644 index 2abb41d3b..000000000 --- a/hasura/hasura-migrations/migrations/1575913476888_add_relationship__table_public_post_types/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: posts - table: - name: post_types - schema: public - using: - foreign_key_constraint_on: - column: type_id - table: - name: posts - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1575913702591_drop_relationship_post_type_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1575913702591_drop_relationship_post_type_public_table_posts/down.yaml deleted file mode 100644 index ca2162efc..000000000 --- a/hasura/hasura-migrations/migrations/1575913702591_drop_relationship_post_type_public_table_posts/down.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: post_type - table: - name: posts - schema: public - using: - foreign_key_constraint_on: type_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1575913702591_drop_relationship_post_type_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1575913702591_drop_relationship_post_type_public_table_posts/up.yaml deleted file mode 100644 index eab897faf..000000000 --- a/hasura/hasura-migrations/migrations/1575913702591_drop_relationship_post_type_public_table_posts/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post_type - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1575914829188_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1575914829188_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index b8e3a3161..000000000 --- a/hasura/hasura-migrations/migrations/1575914829188_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - topic_id - - content - - creation_date - - id - - modification_date - - title - filter: {} - role: user - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1575914829188_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1575914829188_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 20c6cf815..000000000 --- a/hasura/hasura-migrations/migrations/1575914829188_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - id - - author_id - - content - - creation_date - - modification_date - - title - - topic_id - - type_id - filter: {} - role: user - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1575914846965_update_permission_anonymous_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1575914846965_update_permission_anonymous_public_table_posts/down.yaml deleted file mode 100644 index 99b58077b..000000000 --- a/hasura/hasura-migrations/migrations/1575914846965_update_permission_anonymous_public_table_posts/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: anonymous - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - topic_id - - content - - creation_date - - id - - modification_date - - title - filter: {} - role: anonymous - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1575914846965_update_permission_anonymous_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1575914846965_update_permission_anonymous_public_table_posts/up.yaml deleted file mode 100644 index 6f9db4964..000000000 --- a/hasura/hasura-migrations/migrations/1575914846965_update_permission_anonymous_public_table_posts/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: anonymous - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - id - - type_id - - content - - title - - modification_date - - creation_date - - topic_id - filter: {} - role: anonymous - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1575914883092_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1575914883092_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index b824e8a2d..000000000 --- a/hasura/hasura-migrations/migrations/1575914883092_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_update_permission -- args: - permission: - columns: - - content - - title - filter: - author_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1575914883092_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1575914883092_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 002e9dfbe..000000000 --- a/hasura/hasura-migrations/migrations/1575914883092_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_update_permission -- args: - permission: - columns: - - content - - title - - topic_id - - type_id - filter: - author_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1575914898410_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1575914898410_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 87faaaf67..000000000 --- a/hasura/hasura-migrations/migrations/1575914898410_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - topic_id - - content - - creation_date - - id - - modification_date - - title - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1575914898410_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1575914898410_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 838c4dfaa..000000000 --- a/hasura/hasura-migrations/migrations/1575914898410_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,29 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - id - - type_id - - content - - title - - modification_date - - creation_date - - topic_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1575915049637_update_permission_proposal_bot_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1575915049637_update_permission_proposal_bot_public_table_posts/down.yaml deleted file mode 100644 index c98971c90..000000000 --- a/hasura/hasura-migrations/migrations/1575915049637_update_permission_proposal_bot_public_table_posts/down.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - topic_id: - _eq: 3 - columns: - - author_id - - topic_id - - content - - creation_date - - modification_date - - title - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1575915049637_update_permission_proposal_bot_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1575915049637_update_permission_proposal_bot_public_table_posts/up.yaml deleted file mode 100644 index 47309d862..000000000 --- a/hasura/hasura-migrations/migrations/1575915049637_update_permission_proposal_bot_public_table_posts/up.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: {} - columns: - - author_id - - id - - type_id - - content - - title - - modification_date - - creation_date - - topic_id - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1575915155690_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1575915155690_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 838c4dfaa..000000000 --- a/hasura/hasura-migrations/migrations/1575915155690_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,29 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - id - - type_id - - content - - title - - modification_date - - creation_date - - topic_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1575915155690_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1575915155690_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index b5df5c9a4..000000000 --- a/hasura/hasura-migrations/migrations/1575915155690_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,32 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - _and: - - author_id: - _eq: X-Hasura-User-Id - - type_id: - _eq: 1 - columns: - - author_id - - id - - type_id - - content - - title - - modification_date - - creation_date - - topic_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1575915295180_update_permission_user_public_table_replies/down.yaml b/hasura/hasura-migrations/migrations/1575915295180_update_permission_user_public_table_replies/down.yaml deleted file mode 100644 index 3641e6829..000000000 --- a/hasura/hasura-migrations/migrations/1575915295180_update_permission_user_public_table_replies/down.yaml +++ /dev/null @@ -1,26 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - content - - created_at - - post_id - - updated_at - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: replies - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1575915295180_update_permission_user_public_table_replies/up.yaml b/hasura/hasura-migrations/migrations/1575915295180_update_permission_user_public_table_replies/up.yaml deleted file mode 100644 index ba42e8d13..000000000 --- a/hasura/hasura-migrations/migrations/1575915295180_update_permission_user_public_table_replies/up.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - id - - author_id - - content - - created_at - - updated_at - - post_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: replies - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1575915685630_update_permission_user_public_table_post_types/down.yaml b/hasura/hasura-migrations/migrations/1575915685630_update_permission_user_public_table_post_types/down.yaml deleted file mode 100644 index a49ebaf79..000000000 --- a/hasura/hasura-migrations/migrations/1575915685630_update_permission_user_public_table_post_types/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: post_types - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1575915685630_update_permission_user_public_table_post_types/up.yaml b/hasura/hasura-migrations/migrations/1575915685630_update_permission_user_public_table_post_types/up.yaml deleted file mode 100644 index 59b6e6971..000000000 --- a/hasura/hasura-migrations/migrations/1575915685630_update_permission_user_public_table_post_types/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - id - - name - filter: {} - limit: null - role: user - table: - name: post_types - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1575915698012_update_permission_anonymous_public_table_post_types/down.yaml b/hasura/hasura-migrations/migrations/1575915698012_update_permission_anonymous_public_table_post_types/down.yaml deleted file mode 100644 index f0a4432a9..000000000 --- a/hasura/hasura-migrations/migrations/1575915698012_update_permission_anonymous_public_table_post_types/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: post_types - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1575915698012_update_permission_anonymous_public_table_post_types/up.yaml b/hasura/hasura-migrations/migrations/1575915698012_update_permission_anonymous_public_table_post_types/up.yaml deleted file mode 100644 index 57787b351..000000000 --- a/hasura/hasura-migrations/migrations/1575915698012_update_permission_anonymous_public_table_post_types/up.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: [] - filter: {} - limit: null - role: anonymous - table: - name: post_types - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1575915705300_update_permission_anonymous_public_table_post_types/down.yaml b/hasura/hasura-migrations/migrations/1575915705300_update_permission_anonymous_public_table_post_types/down.yaml deleted file mode 100644 index 8195c6752..000000000 --- a/hasura/hasura-migrations/migrations/1575915705300_update_permission_anonymous_public_table_post_types/down.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- args: - role: anonymous - table: - name: post_types - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: [] - filter: {} - role: anonymous - table: - name: post_types - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1575915705300_update_permission_anonymous_public_table_post_types/up.yaml b/hasura/hasura-migrations/migrations/1575915705300_update_permission_anonymous_public_table_post_types/up.yaml deleted file mode 100644 index 0bb2a27ed..000000000 --- a/hasura/hasura-migrations/migrations/1575915705300_update_permission_anonymous_public_table_post_types/up.yaml +++ /dev/null @@ -1,18 +0,0 @@ -- args: - role: anonymous - table: - name: post_types - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - id - - name - filter: {} - role: anonymous - table: - name: post_types - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1576175206805_alter_table_public_posts_add_column_created_at/down.yaml b/hasura/hasura-migrations/migrations/1576175206805_alter_table_public_posts_add_column_created_at/down.yaml deleted file mode 100644 index 240d4429c..000000000 --- a/hasura/hasura-migrations/migrations/1576175206805_alter_table_public_posts_add_column_created_at/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" DROP COLUMN "created_at"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576175206805_alter_table_public_posts_add_column_created_at/up.yaml b/hasura/hasura-migrations/migrations/1576175206805_alter_table_public_posts_add_column_created_at/up.yaml deleted file mode 100644 index 8bd3ce0bd..000000000 --- a/hasura/hasura-migrations/migrations/1576175206805_alter_table_public_posts_add_column_created_at/up.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" ADD COLUMN "created_at" timestamptz NULL DEFAULT - now(); - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576175211900_alter_table_public_posts_add_column_updated_at/down.yaml b/hasura/hasura-migrations/migrations/1576175211900_alter_table_public_posts_add_column_updated_at/down.yaml deleted file mode 100644 index 73e442383..000000000 --- a/hasura/hasura-migrations/migrations/1576175211900_alter_table_public_posts_add_column_updated_at/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - sql: |- - DROP TRIGGER IF EXISTS "set_public_posts_updated_at" ON "public"."posts"; - ALTER TABLE "public"."posts" DROP COLUMN "updated_at"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576175211900_alter_table_public_posts_add_column_updated_at/up.yaml b/hasura/hasura-migrations/migrations/1576175211900_alter_table_public_posts_add_column_updated_at/up.yaml deleted file mode 100644 index 2ae25bdc9..000000000 --- a/hasura/hasura-migrations/migrations/1576175211900_alter_table_public_posts_add_column_updated_at/up.yaml +++ /dev/null @@ -1,9 +0,0 @@ -- args: - sql: "ALTER TABLE \"public\".\"posts\" ADD COLUMN \"updated_at\" timestamptz NULL - DEFAULT now();\n\nCREATE OR REPLACE FUNCTION \"public\".\"set_current_timestamp_updated_at\"()\nRETURNS - TRIGGER AS $$\nDECLARE\n _new record;\nBEGIN\n _new := NEW;\n _new.\"updated_at\" - = NOW();\n RETURN _new;\nEND;\n$$ LANGUAGE plpgsql;\nCREATE TRIGGER \"set_public_posts_updated_at\"\nBEFORE - UPDATE ON \"public\".\"posts\"\nFOR EACH ROW\nEXECUTE PROCEDURE \"public\".\"set_current_timestamp_updated_at\"();\nCOMMENT - ON TRIGGER \"set_public_posts_updated_at\" ON \"public\".\"posts\" \nIS 'trigger - to set value of column \"updated_at\" to current timestamp on row update';\n" - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576175378909_run_sql_migration/down.yaml b/hasura/hasura-migrations/migrations/1576175378909_run_sql_migration/down.yaml deleted file mode 100644 index fe51488c7..000000000 --- a/hasura/hasura-migrations/migrations/1576175378909_run_sql_migration/down.yaml +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/hasura/hasura-migrations/migrations/1576175378909_run_sql_migration/up.yaml b/hasura/hasura-migrations/migrations/1576175378909_run_sql_migration/up.yaml deleted file mode 100644 index de616a199..000000000 --- a/hasura/hasura-migrations/migrations/1576175378909_run_sql_migration/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - cascade: true - sql: |- - ALTER TABLE posts - DROP COLUMN creation_date; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576175389718_run_sql_migration/down.yaml b/hasura/hasura-migrations/migrations/1576175389718_run_sql_migration/down.yaml deleted file mode 100644 index fe51488c7..000000000 --- a/hasura/hasura-migrations/migrations/1576175389718_run_sql_migration/down.yaml +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/hasura/hasura-migrations/migrations/1576175389718_run_sql_migration/up.yaml b/hasura/hasura-migrations/migrations/1576175389718_run_sql_migration/up.yaml deleted file mode 100644 index 54c64e527..000000000 --- a/hasura/hasura-migrations/migrations/1576175389718_run_sql_migration/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - cascade: true - sql: |- - ALTER TABLE posts - DROP COLUMN modification_date; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576175479587_update_permission_anonymous_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1576175479587_update_permission_anonymous_public_table_posts/down.yaml deleted file mode 100644 index 281a7c3f3..000000000 --- a/hasura/hasura-migrations/migrations/1576175479587_update_permission_anonymous_public_table_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: posts - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1576175479587_update_permission_anonymous_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1576175479587_update_permission_anonymous_public_table_posts/up.yaml deleted file mode 100644 index 51d3893bd..000000000 --- a/hasura/hasura-migrations/migrations/1576175479587_update_permission_anonymous_public_table_posts/up.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - id - - author_id - - content - - title - - topic_id - - type_id - - created_at - - updated_at - filter: {} - limit: null - role: anonymous - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1576175495071_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1576175495071_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 2cb134f44..000000000 --- a/hasura/hasura-migrations/migrations/1576175495071_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1576175495071_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1576175495071_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index b9e4376ac..000000000 --- a/hasura/hasura-migrations/migrations/1576175495071_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - author_id - - id - - type_id - - content - - title - - created_at - - updated_at - - topic_id - filter: {} - limit: null - role: user - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1576175553951_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1576175553951_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 002e9dfbe..000000000 --- a/hasura/hasura-migrations/migrations/1576175553951_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_update_permission -- args: - permission: - columns: - - content - - title - - topic_id - - type_id - filter: - author_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1576175553951_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1576175553951_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 495b466cb..000000000 --- a/hasura/hasura-migrations/migrations/1576175553951_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_update_permission -- args: - permission: - columns: - - content - - title - - topic_id - filter: - author_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1576175644974_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1576175644974_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 8a69c835b..000000000 --- a/hasura/hasura-migrations/migrations/1576175644974_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1576175644974_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1576175644974_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 96d9572a3..000000000 --- a/hasura/hasura-migrations/migrations/1576175644974_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - permission: - allow_upsert: true - check: - _and: - - author_id: - _eq: X-Hasura-User-Id - - type_id: - _eq: 1 - columns: - - author_id - - content - - title - - topic_id - - type_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1576175806996_update_permission_user_public_table_replies/down.yaml b/hasura/hasura-migrations/migrations/1576175806996_update_permission_user_public_table_replies/down.yaml deleted file mode 100644 index ba42e8d13..000000000 --- a/hasura/hasura-migrations/migrations/1576175806996_update_permission_user_public_table_replies/down.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - id - - author_id - - content - - created_at - - updated_at - - post_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: replies - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1576175806996_update_permission_user_public_table_replies/up.yaml b/hasura/hasura-migrations/migrations/1576175806996_update_permission_user_public_table_replies/up.yaml deleted file mode 100644 index e5fcf7e47..000000000 --- a/hasura/hasura-migrations/migrations/1576175806996_update_permission_user_public_table_replies/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: replies - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - content - - post_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: replies - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1576175875703_rename_table_public_topics/down.yaml b/hasura/hasura-migrations/migrations/1576175875703_rename_table_public_topics/down.yaml deleted file mode 100644 index 73505d7ab..000000000 --- a/hasura/hasura-migrations/migrations/1576175875703_rename_table_public_topics/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."post_topics" rename to "topics"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576175875703_rename_table_public_topics/up.yaml b/hasura/hasura-migrations/migrations/1576175875703_rename_table_public_topics/up.yaml deleted file mode 100644 index 085c29d75..000000000 --- a/hasura/hasura-migrations/migrations/1576175875703_rename_table_public_topics/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."topics" rename to "post_topics"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576445685035_run_sql_migration/down.yaml b/hasura/hasura-migrations/migrations/1576445685035_run_sql_migration/down.yaml deleted file mode 100644 index fe51488c7..000000000 --- a/hasura/hasura-migrations/migrations/1576445685035_run_sql_migration/down.yaml +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/hasura/hasura-migrations/migrations/1576445685035_run_sql_migration/up.yaml b/hasura/hasura-migrations/migrations/1576445685035_run_sql_migration/up.yaml deleted file mode 100644 index e55fe6d12..000000000 --- a/hasura/hasura-migrations/migrations/1576445685035_run_sql_migration/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - cascade: false - sql: |- - CREATE TABLE comments ( - id UUID PRIMARY KEY DEFAULT gen_random_uuid(), - content text NOT NULL, - parent_message UUID REFERENCES comments(id) - ); - type: run_sql -- args: - name: comments - schema: public - type: add_existing_table_or_view diff --git a/hasura/hasura-migrations/migrations/1576445750797_alter_table_public_comments_alter_column_parent_message/down.yaml b/hasura/hasura-migrations/migrations/1576445750797_alter_table_public_comments_alter_column_parent_message/down.yaml deleted file mode 100644 index b8d9c67a1..000000000 --- a/hasura/hasura-migrations/migrations/1576445750797_alter_table_public_comments_alter_column_parent_message/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: COMMENT ON COLUMN "public"."comments"."parent_message" IS E'null' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576445750797_alter_table_public_comments_alter_column_parent_message/up.yaml b/hasura/hasura-migrations/migrations/1576445750797_alter_table_public_comments_alter_column_parent_message/up.yaml deleted file mode 100644 index 6e16257d6..000000000 --- a/hasura/hasura-migrations/migrations/1576445750797_alter_table_public_comments_alter_column_parent_message/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: COMMENT ON COLUMN "public"."comments"."parent_message" IS E'' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576445785072_alter_table_public_comments_add_column_post_id/down.yaml b/hasura/hasura-migrations/migrations/1576445785072_alter_table_public_comments_add_column_post_id/down.yaml deleted file mode 100644 index 64802c23a..000000000 --- a/hasura/hasura-migrations/migrations/1576445785072_alter_table_public_comments_add_column_post_id/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comments" DROP COLUMN "post_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576445785072_alter_table_public_comments_add_column_post_id/up.yaml b/hasura/hasura-migrations/migrations/1576445785072_alter_table_public_comments_add_column_post_id/up.yaml deleted file mode 100644 index 1bca08e53..000000000 --- a/hasura/hasura-migrations/migrations/1576445785072_alter_table_public_comments_add_column_post_id/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comments" ADD COLUMN "post_id" integer NOT NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576445801628_alter_table_public_comments_add_column_author_id/down.yaml b/hasura/hasura-migrations/migrations/1576445801628_alter_table_public_comments_add_column_author_id/down.yaml deleted file mode 100644 index 1f90d3751..000000000 --- a/hasura/hasura-migrations/migrations/1576445801628_alter_table_public_comments_add_column_author_id/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comments" DROP COLUMN "author_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576445801628_alter_table_public_comments_add_column_author_id/up.yaml b/hasura/hasura-migrations/migrations/1576445801628_alter_table_public_comments_add_column_author_id/up.yaml deleted file mode 100644 index 8f7950ea5..000000000 --- a/hasura/hasura-migrations/migrations/1576445801628_alter_table_public_comments_add_column_author_id/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comments" ADD COLUMN "author_id" integer NOT NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576445827650_alter_table_public_comments_add_column_created_at/down.yaml b/hasura/hasura-migrations/migrations/1576445827650_alter_table_public_comments_add_column_created_at/down.yaml deleted file mode 100644 index 06ddb6fc0..000000000 --- a/hasura/hasura-migrations/migrations/1576445827650_alter_table_public_comments_add_column_created_at/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comments" DROP COLUMN "created_at"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576445827650_alter_table_public_comments_add_column_created_at/up.yaml b/hasura/hasura-migrations/migrations/1576445827650_alter_table_public_comments_add_column_created_at/up.yaml deleted file mode 100644 index 1a07cfe74..000000000 --- a/hasura/hasura-migrations/migrations/1576445827650_alter_table_public_comments_add_column_created_at/up.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comments" ADD COLUMN "created_at" timestamptz NOT NULL - DEFAULT now(); - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576445837494_alter_table_public_comments_add_column_updated_at/down.yaml b/hasura/hasura-migrations/migrations/1576445837494_alter_table_public_comments_add_column_updated_at/down.yaml deleted file mode 100644 index d59e25a1b..000000000 --- a/hasura/hasura-migrations/migrations/1576445837494_alter_table_public_comments_add_column_updated_at/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - sql: |- - DROP TRIGGER IF EXISTS "set_public_comments_updated_at" ON "public"."comments"; - ALTER TABLE "public"."comments" DROP COLUMN "updated_at"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576445837494_alter_table_public_comments_add_column_updated_at/up.yaml b/hasura/hasura-migrations/migrations/1576445837494_alter_table_public_comments_add_column_updated_at/up.yaml deleted file mode 100644 index 9a0113767..000000000 --- a/hasura/hasura-migrations/migrations/1576445837494_alter_table_public_comments_add_column_updated_at/up.yaml +++ /dev/null @@ -1,9 +0,0 @@ -- args: - sql: "ALTER TABLE \"public\".\"comments\" ADD COLUMN \"updated_at\" timestamptz - NOT NULL DEFAULT now();\n\nCREATE OR REPLACE FUNCTION \"public\".\"set_current_timestamp_updated_at\"()\nRETURNS - TRIGGER AS $$\nDECLARE\n _new record;\nBEGIN\n _new := NEW;\n _new.\"updated_at\" - = NOW();\n RETURN _new;\nEND;\n$$ LANGUAGE plpgsql;\nCREATE TRIGGER \"set_public_comments_updated_at\"\nBEFORE - UPDATE ON \"public\".\"comments\"\nFOR EACH ROW\nEXECUTE PROCEDURE \"public\".\"set_current_timestamp_updated_at\"();\nCOMMENT - ON TRIGGER \"set_public_comments_updated_at\" ON \"public\".\"comments\" \nIS - 'trigger to set value of column \"updated_at\" to current timestamp on row update';\n" - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576445929863_table_comments_create_remote_relationship_author/down.yaml b/hasura/hasura-migrations/migrations/1576445929863_table_comments_create_remote_relationship_author/down.yaml deleted file mode 100644 index 722b38d17..000000000 --- a/hasura/hasura-migrations/migrations/1576445929863_table_comments_create_remote_relationship_author/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: author - table: - name: comments - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1576445929863_table_comments_create_remote_relationship_author/up.yaml b/hasura/hasura-migrations/migrations/1576445929863_table_comments_create_remote_relationship_author/up.yaml deleted file mode 100644 index 06461ac04..000000000 --- a/hasura/hasura-migrations/migrations/1576445929863_table_comments_create_remote_relationship_author/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - author_id - name: author - remote_field: - user: - arguments: - id: $author_id - remote_schema: auth - table: - name: comments - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1576445945464_add_relationship__table_public_comments/down.yaml b/hasura/hasura-migrations/migrations/1576445945464_add_relationship__table_public_comments/down.yaml deleted file mode 100644 index 974b12bd1..000000000 --- a/hasura/hasura-migrations/migrations/1576445945464_add_relationship__table_public_comments/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: comment - table: - name: comments - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1576445945464_add_relationship__table_public_comments/up.yaml b/hasura/hasura-migrations/migrations/1576445945464_add_relationship__table_public_comments/up.yaml deleted file mode 100644 index c01a09607..000000000 --- a/hasura/hasura-migrations/migrations/1576445945464_add_relationship__table_public_comments/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: comment - table: - name: comments - schema: public - using: - foreign_key_constraint_on: parent_message - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1576445951080_add_relationship__table_public_comments/down.yaml b/hasura/hasura-migrations/migrations/1576445951080_add_relationship__table_public_comments/down.yaml deleted file mode 100644 index db7d7bbe2..000000000 --- a/hasura/hasura-migrations/migrations/1576445951080_add_relationship__table_public_comments/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: comments - table: - name: comments - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1576445951080_add_relationship__table_public_comments/up.yaml b/hasura/hasura-migrations/migrations/1576445951080_add_relationship__table_public_comments/up.yaml deleted file mode 100644 index de93a47ec..000000000 --- a/hasura/hasura-migrations/migrations/1576445951080_add_relationship__table_public_comments/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: comments - table: - name: comments - schema: public - using: - foreign_key_constraint_on: - column: parent_message - table: - name: comments - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1576446003702_alter_table_public_comments_alter_column_parent_message/down.yaml b/hasura/hasura-migrations/migrations/1576446003702_alter_table_public_comments_alter_column_parent_message/down.yaml deleted file mode 100644 index 568baacbf..000000000 --- a/hasura/hasura-migrations/migrations/1576446003702_alter_table_public_comments_alter_column_parent_message/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: COMMENT ON COLUMN "public"."comments"."parent_message" IS E'null' - type: run_sql -- args: - sql: alter table "public"."comments" rename column "parent_comment" to "parent_message"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576446003702_alter_table_public_comments_alter_column_parent_message/up.yaml b/hasura/hasura-migrations/migrations/1576446003702_alter_table_public_comments_alter_column_parent_message/up.yaml deleted file mode 100644 index 380f85395..000000000 --- a/hasura/hasura-migrations/migrations/1576446003702_alter_table_public_comments_alter_column_parent_message/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: COMMENT ON COLUMN "public"."comments"."parent_message" IS E'' - type: run_sql -- args: - sql: alter table "public"."comments" rename column "parent_message" to "parent_comment"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576446058295_set_fk_public_comments_post_id/down.yaml b/hasura/hasura-migrations/migrations/1576446058295_set_fk_public_comments_post_id/down.yaml deleted file mode 100644 index 3b9a39b97..000000000 --- a/hasura/hasura-migrations/migrations/1576446058295_set_fk_public_comments_post_id/down.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: "\n alter table \"public\".\"comments\" drop constraint \"comments_post_id_fkey\"\n - \ " - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576446058295_set_fk_public_comments_post_id/up.yaml b/hasura/hasura-migrations/migrations/1576446058295_set_fk_public_comments_post_id/up.yaml deleted file mode 100644 index 4a36bd415..000000000 --- a/hasura/hasura-migrations/migrations/1576446058295_set_fk_public_comments_post_id/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: "\n alter table \"public\".\"comments\"\n add constraint - \"comments_post_id_fkey\" \n foreign key (\"post_id\") \n references - \"public\".\"posts\"\n (\"id\") on update restrict on delete restrict;\n - \ " - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576446069453_add_relationship__table_public_comments/down.yaml b/hasura/hasura-migrations/migrations/1576446069453_add_relationship__table_public_comments/down.yaml deleted file mode 100644 index 2ec8af856..000000000 --- a/hasura/hasura-migrations/migrations/1576446069453_add_relationship__table_public_comments/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post - table: - name: comments - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1576446069453_add_relationship__table_public_comments/up.yaml b/hasura/hasura-migrations/migrations/1576446069453_add_relationship__table_public_comments/up.yaml deleted file mode 100644 index 4d6a95302..000000000 --- a/hasura/hasura-migrations/migrations/1576446069453_add_relationship__table_public_comments/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: post - table: - name: comments - schema: public - using: - foreign_key_constraint_on: post_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1576446094051_update_permission_anonymous_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1576446094051_update_permission_anonymous_public_table_comments/down.yaml deleted file mode 100644 index 143091d72..000000000 --- a/hasura/hasura-migrations/migrations/1576446094051_update_permission_anonymous_public_table_comments/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: comments - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1576446094051_update_permission_anonymous_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1576446094051_update_permission_anonymous_public_table_comments/up.yaml deleted file mode 100644 index 84362299b..000000000 --- a/hasura/hasura-migrations/migrations/1576446094051_update_permission_anonymous_public_table_comments/up.yaml +++ /dev/null @@ -1,18 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - id - - content - - parent_comment - - post_id - - author_id - - created_at - - updated_at - filter: {} - limit: null - role: anonymous - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1576446133783_apply_same_permissions_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1576446133783_apply_same_permissions_public_table_comments/down.yaml deleted file mode 100644 index 8a02de7c7..000000000 --- a/hasura/hasura-migrations/migrations/1576446133783_apply_same_permissions_public_table_comments/down.yaml +++ /dev/null @@ -1,29 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - id - - content - - parent_comment - - post_id - - author_id - - created_at - - updated_at - filter: {} - role: anonymous - table: - name: comments - schema: public - type: create_select_permission -- args: - role: anonymous - table: - name: comments - schema: public - type: drop_select_permission -- args: - role: user - table: - name: comments - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1576446133783_apply_same_permissions_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1576446133783_apply_same_permissions_public_table_comments/up.yaml deleted file mode 100644 index a19beb3ee..000000000 --- a/hasura/hasura-migrations/migrations/1576446133783_apply_same_permissions_public_table_comments/up.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- args: - role: anonymous - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: [] - filter: {} - limit: null - role: anonymous - table: - name: comments - schema: public - type: create_select_permission -- args: - permission: - allow_aggregations: false - columns: [] - filter: {} - limit: null - role: user - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1576446145888_update_permission_anonymous_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1576446145888_update_permission_anonymous_public_table_comments/down.yaml deleted file mode 100644 index c91cea797..000000000 --- a/hasura/hasura-migrations/migrations/1576446145888_update_permission_anonymous_public_table_comments/down.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- args: - role: anonymous - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: [] - filter: {} - role: anonymous - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1576446145888_update_permission_anonymous_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1576446145888_update_permission_anonymous_public_table_comments/up.yaml deleted file mode 100644 index 26225c786..000000000 --- a/hasura/hasura-migrations/migrations/1576446145888_update_permission_anonymous_public_table_comments/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: anonymous - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - post_id - - content - - created_at - - updated_at - - id - - parent_comment - filter: {} - role: anonymous - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1576446153812_update_permission_user_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1576446153812_update_permission_user_public_table_comments/down.yaml deleted file mode 100644 index 5be79faa4..000000000 --- a/hasura/hasura-migrations/migrations/1576446153812_update_permission_user_public_table_comments/down.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- args: - role: user - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: [] - filter: {} - role: user - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1576446153812_update_permission_user_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1576446153812_update_permission_user_public_table_comments/up.yaml deleted file mode 100644 index 2146ebf71..000000000 --- a/hasura/hasura-migrations/migrations/1576446153812_update_permission_user_public_table_comments/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - post_id - - content - - created_at - - updated_at - - id - - parent_comment - filter: {} - role: user - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1576446514894_update_permission_user_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1576446514894_update_permission_user_public_table_comments/down.yaml deleted file mode 100644 index a8674125b..000000000 --- a/hasura/hasura-migrations/migrations/1576446514894_update_permission_user_public_table_comments/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: comments - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1576446514894_update_permission_user_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1576446514894_update_permission_user_public_table_comments/up.yaml deleted file mode 100644 index dbe71d6da..000000000 --- a/hasura/hasura-migrations/migrations/1576446514894_update_permission_user_public_table_comments/up.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- args: - permission: - allow_upsert: true - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - content - - parent_comment - - post_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comments - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1576446558047_update_permission_user_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1576446558047_update_permission_user_public_table_comments/down.yaml deleted file mode 100644 index f5ceddd84..000000000 --- a/hasura/hasura-migrations/migrations/1576446558047_update_permission_user_public_table_comments/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: comments - schema: public - type: drop_update_permission diff --git a/hasura/hasura-migrations/migrations/1576446558047_update_permission_user_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1576446558047_update_permission_user_public_table_comments/up.yaml deleted file mode 100644 index 668e0671f..000000000 --- a/hasura/hasura-migrations/migrations/1576446558047_update_permission_user_public_table_comments/up.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- args: - permission: - columns: - - content - filter: - author_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comments - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1576446652098_drop_relationship_replies_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1576446652098_drop_relationship_replies_public_table_posts/down.yaml deleted file mode 100644 index 697e0c05f..000000000 --- a/hasura/hasura-migrations/migrations/1576446652098_drop_relationship_replies_public_table_posts/down.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: replies - table: - name: posts - schema: public - using: - foreign_key_constraint_on: - column: post_id - table: - name: replies - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1576446652098_drop_relationship_replies_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1576446652098_drop_relationship_replies_public_table_posts/up.yaml deleted file mode 100644 index 33d0653a3..000000000 --- a/hasura/hasura-migrations/migrations/1576446652098_drop_relationship_replies_public_table_posts/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: replies - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1576446656839_add_relationship__table_public_posts/down.yaml b/hasura/hasura-migrations/migrations/1576446656839_add_relationship__table_public_posts/down.yaml deleted file mode 100644 index e679e3499..000000000 --- a/hasura/hasura-migrations/migrations/1576446656839_add_relationship__table_public_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: comments - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1576446656839_add_relationship__table_public_posts/up.yaml b/hasura/hasura-migrations/migrations/1576446656839_add_relationship__table_public_posts/up.yaml deleted file mode 100644 index a6f9e9f54..000000000 --- a/hasura/hasura-migrations/migrations/1576446656839_add_relationship__table_public_posts/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: comments - table: - name: posts - schema: public - using: - foreign_key_constraint_on: - column: post_id - table: - name: comments - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1576446665237_run_sql_migration/down.yaml b/hasura/hasura-migrations/migrations/1576446665237_run_sql_migration/down.yaml deleted file mode 100644 index fe51488c7..000000000 --- a/hasura/hasura-migrations/migrations/1576446665237_run_sql_migration/down.yaml +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/hasura/hasura-migrations/migrations/1576446665237_run_sql_migration/up.yaml b/hasura/hasura-migrations/migrations/1576446665237_run_sql_migration/up.yaml deleted file mode 100644 index 7c0b2e4ba..000000000 --- a/hasura/hasura-migrations/migrations/1576446665237_run_sql_migration/up.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - cascade: false - sql: drop table replies; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576446679625_alter_table_public_comments_alter_column_parent_comment/down.yaml b/hasura/hasura-migrations/migrations/1576446679625_alter_table_public_comments_alter_column_parent_comment/down.yaml deleted file mode 100644 index 9da3b7b7d..000000000 --- a/hasura/hasura-migrations/migrations/1576446679625_alter_table_public_comments_alter_column_parent_comment/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: COMMENT ON COLUMN "public"."comments"."parent_comment" IS E'null' - type: run_sql -- args: - sql: alter table "public"."comments" rename column "parent_comment_id" to "parent_comment"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576446679625_alter_table_public_comments_alter_column_parent_comment/up.yaml b/hasura/hasura-migrations/migrations/1576446679625_alter_table_public_comments_alter_column_parent_comment/up.yaml deleted file mode 100644 index 164f8237a..000000000 --- a/hasura/hasura-migrations/migrations/1576446679625_alter_table_public_comments_alter_column_parent_comment/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: COMMENT ON COLUMN "public"."comments"."parent_comment" IS E'' - type: run_sql -- args: - sql: alter table "public"."comments" rename column "parent_comment" to "parent_comment_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576448067442_table_comments_drop_remote_relationship_author/down.yaml b/hasura/hasura-migrations/migrations/1576448067442_table_comments_drop_remote_relationship_author/down.yaml deleted file mode 100644 index 06461ac04..000000000 --- a/hasura/hasura-migrations/migrations/1576448067442_table_comments_drop_remote_relationship_author/down.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - author_id - name: author - remote_field: - user: - arguments: - id: $author_id - remote_schema: auth - table: - name: comments - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1576448067442_table_comments_drop_remote_relationship_author/up.yaml b/hasura/hasura-migrations/migrations/1576448067442_table_comments_drop_remote_relationship_author/up.yaml deleted file mode 100644 index 722b38d17..000000000 --- a/hasura/hasura-migrations/migrations/1576448067442_table_comments_drop_remote_relationship_author/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: author - table: - name: comments - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1576448077512_rename_table_public_comments/down.yaml b/hasura/hasura-migrations/migrations/1576448077512_rename_table_public_comments/down.yaml deleted file mode 100644 index 6dbe14412..000000000 --- a/hasura/hasura-migrations/migrations/1576448077512_rename_table_public_comments/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."replies" rename to "comments"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576448077512_rename_table_public_comments/up.yaml b/hasura/hasura-migrations/migrations/1576448077512_rename_table_public_comments/up.yaml deleted file mode 100644 index edb36a0de..000000000 --- a/hasura/hasura-migrations/migrations/1576448077512_rename_table_public_comments/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."comments" rename to "replies"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576448105487_alter_table_public_replies_alter_column_parent_comment_id/down.yaml b/hasura/hasura-migrations/migrations/1576448105487_alter_table_public_replies_alter_column_parent_comment_id/down.yaml deleted file mode 100644 index f4fdfd5d4..000000000 --- a/hasura/hasura-migrations/migrations/1576448105487_alter_table_public_replies_alter_column_parent_comment_id/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: COMMENT ON COLUMN "public"."replies"."parent_comment_id" IS E'null' - type: run_sql -- args: - sql: alter table "public"."replies" rename column "parent_reply_id" to "parent_comment_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576448105487_alter_table_public_replies_alter_column_parent_comment_id/up.yaml b/hasura/hasura-migrations/migrations/1576448105487_alter_table_public_replies_alter_column_parent_comment_id/up.yaml deleted file mode 100644 index 81876f2ef..000000000 --- a/hasura/hasura-migrations/migrations/1576448105487_alter_table_public_replies_alter_column_parent_comment_id/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: COMMENT ON COLUMN "public"."replies"."parent_comment_id" IS E'' - type: run_sql -- args: - sql: alter table "public"."replies" rename column "parent_comment_id" to "parent_reply_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576448183745_rename_table_public_replies/down.yaml b/hasura/hasura-migrations/migrations/1576448183745_rename_table_public_replies/down.yaml deleted file mode 100644 index edb36a0de..000000000 --- a/hasura/hasura-migrations/migrations/1576448183745_rename_table_public_replies/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."comments" rename to "replies"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576448183745_rename_table_public_replies/up.yaml b/hasura/hasura-migrations/migrations/1576448183745_rename_table_public_replies/up.yaml deleted file mode 100644 index 6dbe14412..000000000 --- a/hasura/hasura-migrations/migrations/1576448183745_rename_table_public_replies/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."replies" rename to "comments"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576448202475_alter_table_public_comments_alter_column_parent_reply_id/down.yaml b/hasura/hasura-migrations/migrations/1576448202475_alter_table_public_comments_alter_column_parent_reply_id/down.yaml deleted file mode 100644 index 571ffdd2c..000000000 --- a/hasura/hasura-migrations/migrations/1576448202475_alter_table_public_comments_alter_column_parent_reply_id/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: COMMENT ON COLUMN "public"."comments"."parent_reply_id" IS E'null' - type: run_sql -- args: - sql: alter table "public"."comments" rename column "parent_comment_id" to "parent_reply_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576448202475_alter_table_public_comments_alter_column_parent_reply_id/up.yaml b/hasura/hasura-migrations/migrations/1576448202475_alter_table_public_comments_alter_column_parent_reply_id/up.yaml deleted file mode 100644 index e1e553c83..000000000 --- a/hasura/hasura-migrations/migrations/1576448202475_alter_table_public_comments_alter_column_parent_reply_id/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: COMMENT ON COLUMN "public"."comments"."parent_reply_id" IS E'' - type: run_sql -- args: - sql: alter table "public"."comments" rename column "parent_reply_id" to "parent_comment_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1576448237616_table_comments_create_remote_relationship_author/down.yaml b/hasura/hasura-migrations/migrations/1576448237616_table_comments_create_remote_relationship_author/down.yaml deleted file mode 100644 index 722b38d17..000000000 --- a/hasura/hasura-migrations/migrations/1576448237616_table_comments_create_remote_relationship_author/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: author - table: - name: comments - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1576448237616_table_comments_create_remote_relationship_author/up.yaml b/hasura/hasura-migrations/migrations/1576448237616_table_comments_create_remote_relationship_author/up.yaml deleted file mode 100644 index 06461ac04..000000000 --- a/hasura/hasura-migrations/migrations/1576448237616_table_comments_create_remote_relationship_author/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - author_id - name: author - remote_field: - user: - arguments: - id: $author_id - remote_schema: auth - table: - name: comments - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1576450672551_update_permission_anonymous_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1576450672551_update_permission_anonymous_public_table_comments/down.yaml deleted file mode 100644 index 3875f6918..000000000 --- a/hasura/hasura-migrations/migrations/1576450672551_update_permission_anonymous_public_table_comments/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: anonymous - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - post_id - - content - - created_at - - updated_at - - id - - parent_comment_id - filter: {} - role: anonymous - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1576450672551_update_permission_anonymous_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1576450672551_update_permission_anonymous_public_table_comments/up.yaml deleted file mode 100644 index 80cb38297..000000000 --- a/hasura/hasura-migrations/migrations/1576450672551_update_permission_anonymous_public_table_comments/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: anonymous - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - author_id - - post_id - - content - - created_at - - updated_at - - id - - parent_comment_id - filter: {} - role: anonymous - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1576450680664_update_permission_user_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1576450680664_update_permission_user_public_table_comments/down.yaml deleted file mode 100644 index e2a3e6d23..000000000 --- a/hasura/hasura-migrations/migrations/1576450680664_update_permission_user_public_table_comments/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - post_id - - content - - created_at - - updated_at - - id - - parent_comment_id - filter: {} - role: user - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1576450680664_update_permission_user_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1576450680664_update_permission_user_public_table_comments/up.yaml deleted file mode 100644 index a0f7ca10d..000000000 --- a/hasura/hasura-migrations/migrations/1576450680664_update_permission_user_public_table_comments/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - author_id - - post_id - - content - - created_at - - updated_at - - id - - parent_comment_id - filter: {} - role: user - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1577893820108_create_trigger_post_subscription/down.yaml b/hasura/hasura-migrations/migrations/1577893820108_create_trigger_post_subscription/down.yaml deleted file mode 100644 index 7f498afdc..000000000 --- a/hasura/hasura-migrations/migrations/1577893820108_create_trigger_post_subscription/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - name: post_subscription - type: delete_event_trigger diff --git a/hasura/hasura-migrations/migrations/1577893820108_create_trigger_post_subscription/up.yaml b/hasura/hasura-migrations/migrations/1577893820108_create_trigger_post_subscription/up.yaml deleted file mode 100644 index dbcf8a5dc..000000000 --- a/hasura/hasura-migrations/migrations/1577893820108_create_trigger_post_subscription/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - enable_manual: false - headers: - - name: HASURA_POST_SUBSCRIPTION_SECRET - value_from_env: HASURA_POST_SUBSCRIPTION_SECRET - insert: - columns: '*' - name: post_subscription - retry_conf: - interval_sec: 10 - num_retries: 0 - timeout_sec: 60 - table: - name: comments - schema: public - webhook_from_env: HASURA_POST_SUBSCRIPTION_HOOK - type: create_event_trigger diff --git a/hasura/hasura-migrations/migrations/1578931943968_create_table_public_proposals/down.yaml b/hasura/hasura-migrations/migrations/1578931943968_create_table_public_proposals/down.yaml deleted file mode 100644 index 73fdc80bc..000000000 --- a/hasura/hasura-migrations/migrations/1578931943968_create_table_public_proposals/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: DROP TABLE "public"."proposals" - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1578931943968_create_table_public_proposals/up.yaml b/hasura/hasura-migrations/migrations/1578931943968_create_table_public_proposals/up.yaml deleted file mode 100644 index c600b5acc..000000000 --- a/hasura/hasura-migrations/migrations/1578931943968_create_table_public_proposals/up.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - sql: CREATE TABLE "public"."proposals"("id" serial NOT NULL, "created_at" timestamptz - NOT NULL DEFAULT now(), "post_id" integer NOT NULL, "chain_db_id" uuid NOT NULL, - PRIMARY KEY ("id") , UNIQUE ("id"), UNIQUE ("post_id"), UNIQUE ("chain_db_id")); - COMMENT ON TABLE "public"."proposals" IS E'on chain proposal created automatically - by chain-db-watcher'; - type: run_sql -- args: - name: proposals - schema: public - type: add_existing_table_or_view diff --git a/hasura/hasura-migrations/migrations/1578931980873_set_fk_public_proposals_post_id/down.yaml b/hasura/hasura-migrations/migrations/1578931980873_set_fk_public_proposals_post_id/down.yaml deleted file mode 100644 index 12acec074..000000000 --- a/hasura/hasura-migrations/migrations/1578931980873_set_fk_public_proposals_post_id/down.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: "\n alter table \"public\".\"proposals\" drop constraint \"proposals_post_id_fkey\"\n - \ " - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1578931980873_set_fk_public_proposals_post_id/up.yaml b/hasura/hasura-migrations/migrations/1578931980873_set_fk_public_proposals_post_id/up.yaml deleted file mode 100644 index 54ee65814..000000000 --- a/hasura/hasura-migrations/migrations/1578931980873_set_fk_public_proposals_post_id/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: "\n alter table \"public\".\"proposals\"\n add constraint - \"proposals_post_id_fkey\" \n foreign key (\"post_id\") \n references - \"public\".\"posts\"\n (\"id\") on update restrict on delete restrict;\n - \ " - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1578931998683_add_relationship__table_public_proposals/down.yaml b/hasura/hasura-migrations/migrations/1578931998683_add_relationship__table_public_proposals/down.yaml deleted file mode 100644 index 07186b24c..000000000 --- a/hasura/hasura-migrations/migrations/1578931998683_add_relationship__table_public_proposals/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post - table: - name: proposals - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1578931998683_add_relationship__table_public_proposals/up.yaml b/hasura/hasura-migrations/migrations/1578931998683_add_relationship__table_public_proposals/up.yaml deleted file mode 100644 index cfb25dbef..000000000 --- a/hasura/hasura-migrations/migrations/1578931998683_add_relationship__table_public_proposals/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: post - table: - name: proposals - schema: public - using: - foreign_key_constraint_on: post_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1578932261667_rename_table_public_proposals/down.yaml b/hasura/hasura-migrations/migrations/1578932261667_rename_table_public_proposals/down.yaml deleted file mode 100644 index 3c7db682d..000000000 --- a/hasura/hasura-migrations/migrations/1578932261667_rename_table_public_proposals/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."onchain_proposals" rename to "proposals"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1578932261667_rename_table_public_proposals/up.yaml b/hasura/hasura-migrations/migrations/1578932261667_rename_table_public_proposals/up.yaml deleted file mode 100644 index f726ca1c4..000000000 --- a/hasura/hasura-migrations/migrations/1578932261667_rename_table_public_proposals/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."proposals" rename to "onchain_proposals"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1578932276990_create_remote_schema_chain-db/down.yaml b/hasura/hasura-migrations/migrations/1578932276990_create_remote_schema_chain-db/down.yaml deleted file mode 100644 index 7d557876b..000000000 --- a/hasura/hasura-migrations/migrations/1578932276990_create_remote_schema_chain-db/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - name: chain-db - type: remove_remote_schema diff --git a/hasura/hasura-migrations/migrations/1578932276990_create_remote_schema_chain-db/up.yaml b/hasura/hasura-migrations/migrations/1578932276990_create_remote_schema_chain-db/up.yaml deleted file mode 100644 index 9ae2495eb..000000000 --- a/hasura/hasura-migrations/migrations/1578932276990_create_remote_schema_chain-db/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - definition: - forward_client_headers: false - headers: [] - timeout_seconds: 60 - url: http://35.189.196.74:4000 - name: chain-db - type: add_remote_schema diff --git a/hasura/hasura-migrations/migrations/1578999740424_alter_table_public_onchain_proposals_drop_column_chain_db_id/down.yaml b/hasura/hasura-migrations/migrations/1578999740424_alter_table_public_onchain_proposals_drop_column_chain_db_id/down.yaml deleted file mode 100644 index 1f09de141..000000000 --- a/hasura/hasura-migrations/migrations/1578999740424_alter_table_public_onchain_proposals_drop_column_chain_db_id/down.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_proposals" ADD COLUMN "chain_db_id" uuid - type: run_sql -- args: - sql: ALTER TABLE "public"."onchain_proposals" ALTER COLUMN "chain_db_id" DROP - NOT NULL - type: run_sql -- args: - sql: ALTER TABLE "public"."onchain_proposals" ADD CONSTRAINT proposals_chain_db_id_key - UNIQUE (chain_db_id) - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1578999740424_alter_table_public_onchain_proposals_drop_column_chain_db_id/up.yaml b/hasura/hasura-migrations/migrations/1578999740424_alter_table_public_onchain_proposals_drop_column_chain_db_id/up.yaml deleted file mode 100644 index e98ae38e6..000000000 --- a/hasura/hasura-migrations/migrations/1578999740424_alter_table_public_onchain_proposals_drop_column_chain_db_id/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_proposals" DROP COLUMN "chain_db_id" CASCADE - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1578999772469_alter_table_public_onchain_proposals_add_column_chain_db_id/down.yaml b/hasura/hasura-migrations/migrations/1578999772469_alter_table_public_onchain_proposals_add_column_chain_db_id/down.yaml deleted file mode 100644 index f8943a2d8..000000000 --- a/hasura/hasura-migrations/migrations/1578999772469_alter_table_public_onchain_proposals_add_column_chain_db_id/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_proposals" DROP COLUMN "chain_db_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1578999772469_alter_table_public_onchain_proposals_add_column_chain_db_id/up.yaml b/hasura/hasura-migrations/migrations/1578999772469_alter_table_public_onchain_proposals_add_column_chain_db_id/up.yaml deleted file mode 100644 index 0ae95bbc6..000000000 --- a/hasura/hasura-migrations/migrations/1578999772469_alter_table_public_onchain_proposals_add_column_chain_db_id/up.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_proposals" ADD COLUMN "chain_db_id" integer - NOT NULL UNIQUE; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1578999801505_table_onchain_proposals_create_remote_relationship_proposal/down.yaml b/hasura/hasura-migrations/migrations/1578999801505_table_onchain_proposals_create_remote_relationship_proposal/down.yaml deleted file mode 100644 index 1382edfe1..000000000 --- a/hasura/hasura-migrations/migrations/1578999801505_table_onchain_proposals_create_remote_relationship_proposal/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: proposal - table: - name: onchain_proposals - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1578999801505_table_onchain_proposals_create_remote_relationship_proposal/up.yaml b/hasura/hasura-migrations/migrations/1578999801505_table_onchain_proposals_create_remote_relationship_proposal/up.yaml deleted file mode 100644 index bf886f185..000000000 --- a/hasura/hasura-migrations/migrations/1578999801505_table_onchain_proposals_create_remote_relationship_proposal/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - chain_db_id - name: proposal - remote_field: - proposal: - arguments: - where: - id: $chain_db_id - remote_schema: chain-db - table: - name: onchain_proposals - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1579000780898_add_relationship__table_public_posts/down.yaml b/hasura/hasura-migrations/migrations/1579000780898_add_relationship__table_public_posts/down.yaml deleted file mode 100644 index 020a3e66a..000000000 --- a/hasura/hasura-migrations/migrations/1579000780898_add_relationship__table_public_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: onchain_proposal - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1579000780898_add_relationship__table_public_posts/up.yaml b/hasura/hasura-migrations/migrations/1579000780898_add_relationship__table_public_posts/up.yaml deleted file mode 100644 index 0673b8d56..000000000 --- a/hasura/hasura-migrations/migrations/1579000780898_add_relationship__table_public_posts/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - name: onchain_proposal - table: - name: posts - schema: public - using: - manual_configuration: - column_mapping: - id: post_id - remote_table: - name: onchain_proposals - schema: public - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1579007443923_update_permission_proposal_bot_public_table_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1579007443923_update_permission_proposal_bot_public_table_onchain_proposals/down.yaml deleted file mode 100644 index ccb92b6fb..000000000 --- a/hasura/hasura-migrations/migrations/1579007443923_update_permission_proposal_bot_public_table_onchain_proposals/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1579007443923_update_permission_proposal_bot_public_table_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1579007443923_update_permission_proposal_bot_public_table_onchain_proposals/up.yaml deleted file mode 100644 index dc5db7670..000000000 --- a/hasura/hasura-migrations/migrations/1579007443923_update_permission_proposal_bot_public_table_onchain_proposals/up.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- args: - permission: - allow_upsert: true - check: {} - columns: - - chain_db_id - - post_id - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1579007459238_update_permission_user_public_table_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1579007459238_update_permission_user_public_table_onchain_proposals/down.yaml deleted file mode 100644 index 947904d13..000000000 --- a/hasura/hasura-migrations/migrations/1579007459238_update_permission_user_public_table_onchain_proposals/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: onchain_proposals - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1579007459238_update_permission_user_public_table_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1579007459238_update_permission_user_public_table_onchain_proposals/up.yaml deleted file mode 100644 index 0ce277aa7..000000000 --- a/hasura/hasura-migrations/migrations/1579007459238_update_permission_user_public_table_onchain_proposals/up.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: [] - filter: {} - limit: null - role: user - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579007466945_update_permission_user_public_table_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1579007466945_update_permission_user_public_table_onchain_proposals/down.yaml deleted file mode 100644 index 0a7cae83a..000000000 --- a/hasura/hasura-migrations/migrations/1579007466945_update_permission_user_public_table_onchain_proposals/down.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- args: - role: user - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: [] - filter: {} - role: user - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579007466945_update_permission_user_public_table_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1579007466945_update_permission_user_public_table_onchain_proposals/up.yaml deleted file mode 100644 index c8d04d2b9..000000000 --- a/hasura/hasura-migrations/migrations/1579007466945_update_permission_user_public_table_onchain_proposals/up.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- args: - role: user - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - role: user - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579007499473_update_permission_anonymous_public_table_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1579007499473_update_permission_anonymous_public_table_onchain_proposals/down.yaml deleted file mode 100644 index 07e78e02d..000000000 --- a/hasura/hasura-migrations/migrations/1579007499473_update_permission_anonymous_public_table_onchain_proposals/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_proposals - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1579007499473_update_permission_anonymous_public_table_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1579007499473_update_permission_anonymous_public_table_onchain_proposals/up.yaml deleted file mode 100644 index b6bd9bd47..000000000 --- a/hasura/hasura-migrations/migrations/1579007499473_update_permission_anonymous_public_table_onchain_proposals/up.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - limit: null - role: anonymous - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579007533170_update_permission_proposal_bot_public_table_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1579007533170_update_permission_proposal_bot_public_table_onchain_proposals/down.yaml deleted file mode 100644 index f587b4d65..000000000 --- a/hasura/hasura-migrations/migrations/1579007533170_update_permission_proposal_bot_public_table_onchain_proposals/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1579007533170_update_permission_proposal_bot_public_table_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1579007533170_update_permission_proposal_bot_public_table_onchain_proposals/up.yaml deleted file mode 100644 index bd64318e0..000000000 --- a/hasura/hasura-migrations/migrations/1579007533170_update_permission_proposal_bot_public_table_onchain_proposals/up.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - limit: null - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009860363_alter_table_public_onchain_proposals_add_column_proposer_address/down.yaml b/hasura/hasura-migrations/migrations/1579009860363_alter_table_public_onchain_proposals_add_column_proposer_address/down.yaml deleted file mode 100644 index 215ebc191..000000000 --- a/hasura/hasura-migrations/migrations/1579009860363_alter_table_public_onchain_proposals_add_column_proposer_address/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_proposals" DROP COLUMN "proposer_address"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1579009860363_alter_table_public_onchain_proposals_add_column_proposer_address/up.yaml b/hasura/hasura-migrations/migrations/1579009860363_alter_table_public_onchain_proposals_add_column_proposer_address/up.yaml deleted file mode 100644 index 62078d0ba..000000000 --- a/hasura/hasura-migrations/migrations/1579009860363_alter_table_public_onchain_proposals_add_column_proposer_address/up.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_proposals" ADD COLUMN "proposer_address" text - NOT NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1579009891474_update_permission_anonymous_public_table_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1579009891474_update_permission_anonymous_public_table_onchain_proposals/down.yaml deleted file mode 100644 index c00c56975..000000000 --- a/hasura/hasura-migrations/migrations/1579009891474_update_permission_anonymous_public_table_onchain_proposals/down.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - role: anonymous - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009891474_update_permission_anonymous_public_table_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1579009891474_update_permission_anonymous_public_table_onchain_proposals/up.yaml deleted file mode 100644 index 389636a51..000000000 --- a/hasura/hasura-migrations/migrations/1579009891474_update_permission_anonymous_public_table_onchain_proposals/up.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - id - - created_at - - post_id - - chain_db_id - - proposer_address - filter: {} - role: anonymous - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009903222_apply_same_permissions_public_table_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1579009903222_apply_same_permissions_public_table_onchain_proposals/down.yaml deleted file mode 100644 index e6e0f2431..000000000 --- a/hasura/hasura-migrations/migrations/1579009903222_apply_same_permissions_public_table_onchain_proposals/down.yaml +++ /dev/null @@ -1,41 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - id - - created_at - - post_id - - chain_db_id - - proposer_address - filter: {} - role: anonymous - table: - name: onchain_proposals - schema: public - type: create_select_permission -- args: - role: anonymous - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: create_select_permission -- args: - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009903222_apply_same_permissions_public_table_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1579009903222_apply_same_permissions_public_table_onchain_proposals/up.yaml deleted file mode 100644 index 386a2917e..000000000 --- a/hasura/hasura-migrations/migrations/1579009903222_apply_same_permissions_public_table_onchain_proposals/up.yaml +++ /dev/null @@ -1,40 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - role: anonymous - table: - name: onchain_proposals - schema: public - type: create_select_permission -- args: - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009917927_update_permission_anonymous_public_table_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1579009917927_update_permission_anonymous_public_table_onchain_proposals/down.yaml deleted file mode 100644 index c00c56975..000000000 --- a/hasura/hasura-migrations/migrations/1579009917927_update_permission_anonymous_public_table_onchain_proposals/down.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - role: anonymous - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009917927_update_permission_anonymous_public_table_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1579009917927_update_permission_anonymous_public_table_onchain_proposals/up.yaml deleted file mode 100644 index 46633333a..000000000 --- a/hasura/hasura-migrations/migrations/1579009917927_update_permission_anonymous_public_table_onchain_proposals/up.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - created_at - - id - - post_id - - proposer_address - filter: {} - role: anonymous - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009931648_apply_same_permissions_public_table_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1579009931648_apply_same_permissions_public_table_onchain_proposals/down.yaml deleted file mode 100644 index 0ce04e957..000000000 --- a/hasura/hasura-migrations/migrations/1579009931648_apply_same_permissions_public_table_onchain_proposals/down.yaml +++ /dev/null @@ -1,41 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - created_at - - id - - post_id - - proposer_address - filter: {} - role: anonymous - table: - name: onchain_proposals - schema: public - type: create_select_permission -- args: - role: anonymous - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: create_select_permission -- args: - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009931648_apply_same_permissions_public_table_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1579009931648_apply_same_permissions_public_table_onchain_proposals/up.yaml deleted file mode 100644 index 386a2917e..000000000 --- a/hasura/hasura-migrations/migrations/1579009931648_apply_same_permissions_public_table_onchain_proposals/up.yaml +++ /dev/null @@ -1,40 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - role: anonymous - table: - name: onchain_proposals - schema: public - type: create_select_permission -- args: - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009945935_update_permission_user_public_table_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1579009945935_update_permission_user_public_table_onchain_proposals/down.yaml deleted file mode 100644 index c8d04d2b9..000000000 --- a/hasura/hasura-migrations/migrations/1579009945935_update_permission_user_public_table_onchain_proposals/down.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- args: - role: user - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - role: user - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009945935_update_permission_user_public_table_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1579009945935_update_permission_user_public_table_onchain_proposals/up.yaml deleted file mode 100644 index 9f44391f3..000000000 --- a/hasura/hasura-migrations/migrations/1579009945935_update_permission_user_public_table_onchain_proposals/up.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: user - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - proposer_address - - created_at - filter: {} - role: user - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009963620_apply_same_permissions_public_table_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1579009963620_apply_same_permissions_public_table_onchain_proposals/down.yaml deleted file mode 100644 index 6c7d56a1c..000000000 --- a/hasura/hasura-migrations/migrations/1579009963620_apply_same_permissions_public_table_onchain_proposals/down.yaml +++ /dev/null @@ -1,61 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - role: anonymous - table: - name: onchain_proposals - schema: public - type: create_select_permission -- args: - role: anonymous - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - created_at - filter: {} - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: create_select_permission -- args: - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - proposer_address - - created_at - filter: {} - role: user - table: - name: onchain_proposals - schema: public - type: create_select_permission -- args: - role: user - table: - name: onchain_proposals - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009963620_apply_same_permissions_public_table_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1579009963620_apply_same_permissions_public_table_onchain_proposals/up.yaml deleted file mode 100644 index 6a12d2c0e..000000000 --- a/hasura/hasura-migrations/migrations/1579009963620_apply_same_permissions_public_table_onchain_proposals/up.yaml +++ /dev/null @@ -1,63 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - proposer_address - - created_at - filter: {} - role: anonymous - table: - name: onchain_proposals - schema: public - type: create_select_permission -- args: - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - proposer_address - - created_at - filter: {} - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: create_select_permission -- args: - role: user - table: - name: onchain_proposals - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - chain_db_id - - id - - post_id - - proposer_address - - created_at - filter: {} - role: user - table: - name: onchain_proposals - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579009981229_update_permission_proposal_bot_public_table_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1579009981229_update_permission_proposal_bot_public_table_onchain_proposals/down.yaml deleted file mode 100644 index 7d5465a65..000000000 --- a/hasura/hasura-migrations/migrations/1579009981229_update_permission_proposal_bot_public_table_onchain_proposals/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: drop_insert_permission -- args: - permission: - check: {} - columns: - - chain_db_id - - post_id - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1579009981229_update_permission_proposal_bot_public_table_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1579009981229_update_permission_proposal_bot_public_table_onchain_proposals/up.yaml deleted file mode 100644 index 003d5126d..000000000 --- a/hasura/hasura-migrations/migrations/1579009981229_update_permission_proposal_bot_public_table_onchain_proposals/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: drop_insert_permission -- args: - permission: - check: {} - columns: - - chain_db_id - - post_id - - proposer_address - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_proposals - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1579021598518_table_onchain_proposals_drop_remote_relationship_proposal/down.yaml b/hasura/hasura-migrations/migrations/1579021598518_table_onchain_proposals_drop_remote_relationship_proposal/down.yaml deleted file mode 100644 index c646920b2..000000000 --- a/hasura/hasura-migrations/migrations/1579021598518_table_onchain_proposals_drop_remote_relationship_proposal/down.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - chain_db_id - name: proposal - remote_field: - proposals: - arguments: - where: - proposalId: $chain_db_id - remote_schema: chain-db - table: - name: onchain_proposals - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1579021598518_table_onchain_proposals_drop_remote_relationship_proposal/up.yaml b/hasura/hasura-migrations/migrations/1579021598518_table_onchain_proposals_drop_remote_relationship_proposal/up.yaml deleted file mode 100644 index 1382edfe1..000000000 --- a/hasura/hasura-migrations/migrations/1579021598518_table_onchain_proposals_drop_remote_relationship_proposal/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: proposal - table: - name: onchain_proposals - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1579021606920_alter_table_public_onchain_proposals_alter_column_chain_db_id/down.yaml b/hasura/hasura-migrations/migrations/1579021606920_alter_table_public_onchain_proposals_alter_column_chain_db_id/down.yaml deleted file mode 100644 index 7c61379dc..000000000 --- a/hasura/hasura-migrations/migrations/1579021606920_alter_table_public_onchain_proposals_alter_column_chain_db_id/down.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_proposals" ALTER COLUMN "chain_db_id" TYPE - integer; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."onchain_proposals"."chain_db_id" IS E'null' - type: run_sql -- args: - sql: alter table "public"."onchain_proposals" rename column "onchain_proposal_id" - to "chain_db_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1579021606920_alter_table_public_onchain_proposals_alter_column_chain_db_id/up.yaml b/hasura/hasura-migrations/migrations/1579021606920_alter_table_public_onchain_proposals_alter_column_chain_db_id/up.yaml deleted file mode 100644 index 33f2ba3d6..000000000 --- a/hasura/hasura-migrations/migrations/1579021606920_alter_table_public_onchain_proposals_alter_column_chain_db_id/up.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_proposals" ALTER COLUMN "chain_db_id" TYPE - int4; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."onchain_proposals"."chain_db_id" IS E'' - type: run_sql -- args: - sql: alter table "public"."onchain_proposals" rename column "chain_db_id" to "onchain_proposal_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1579021654138_table_onchain_proposals_create_remote_relationship_proposal/down.yaml b/hasura/hasura-migrations/migrations/1579021654138_table_onchain_proposals_create_remote_relationship_proposal/down.yaml deleted file mode 100644 index 1382edfe1..000000000 --- a/hasura/hasura-migrations/migrations/1579021654138_table_onchain_proposals_create_remote_relationship_proposal/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: proposal - table: - name: onchain_proposals - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1579021654138_table_onchain_proposals_create_remote_relationship_proposal/up.yaml b/hasura/hasura-migrations/migrations/1579021654138_table_onchain_proposals_create_remote_relationship_proposal/up.yaml deleted file mode 100644 index e3b451b68..000000000 --- a/hasura/hasura-migrations/migrations/1579021654138_table_onchain_proposals_create_remote_relationship_proposal/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - name: proposal - remote_field: - proposal: - arguments: - where: - proposalId: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_proposals - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1579022451785_apply_same_permissions_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1579022451785_apply_same_permissions_public_table_posts/down.yaml deleted file mode 100644 index e2e4bbd84..000000000 --- a/hasura/hasura-migrations/migrations/1579022451785_apply_same_permissions_public_table_posts/down.yaml +++ /dev/null @@ -1,36 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_select_permission -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - id - - type_id - - content - - title - - created_at - - updated_at - - topic_id - filter: {} - role: user - table: - name: posts - schema: public - type: create_select_permission -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1579022451785_apply_same_permissions_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1579022451785_apply_same_permissions_public_table_posts/up.yaml deleted file mode 100644 index 5e413025d..000000000 --- a/hasura/hasura-migrations/migrations/1579022451785_apply_same_permissions_public_table_posts/up.yaml +++ /dev/null @@ -1,61 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - author_id - - id - - type_id - - content - - title - - created_at - - updated_at - - topic_id - filter: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_select_permission -- args: - permission: - allow_aggregations: false - check: {} - columns: - - author_id - - id - - type_id - - content - - title - - created_at - - updated_at - - topic_id - filter: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - id - - type_id - - content - - title - - created_at - - updated_at - - topic_id - filter: {} - role: user - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1579022498117_update_permission_proposal_bot_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1579022498117_update_permission_proposal_bot_public_table_posts/down.yaml deleted file mode 100644 index 43ab4f96c..000000000 --- a/hasura/hasura-migrations/migrations/1579022498117_update_permission_proposal_bot_public_table_posts/down.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: {} - columns: - - author_id - - id - - type_id - - content - - title - - created_at - - updated_at - - topic_id - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1579022498117_update_permission_proposal_bot_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1579022498117_update_permission_proposal_bot_public_table_posts/up.yaml deleted file mode 100644 index 9b79baa77..000000000 --- a/hasura/hasura-migrations/migrations/1579022498117_update_permission_proposal_bot_public_table_posts/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: {} - columns: - - author_id - - content - - title - - topic_id - - type_id - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1580148698331_table_onchain_proposals_drop_remote_relationship_proposal/down.yaml b/hasura/hasura-migrations/migrations/1580148698331_table_onchain_proposals_drop_remote_relationship_proposal/down.yaml deleted file mode 100644 index e3b451b68..000000000 --- a/hasura/hasura-migrations/migrations/1580148698331_table_onchain_proposals_drop_remote_relationship_proposal/down.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - name: proposal - remote_field: - proposal: - arguments: - where: - proposalId: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_proposals - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1580148698331_table_onchain_proposals_drop_remote_relationship_proposal/up.yaml b/hasura/hasura-migrations/migrations/1580148698331_table_onchain_proposals_drop_remote_relationship_proposal/up.yaml deleted file mode 100644 index 1382edfe1..000000000 --- a/hasura/hasura-migrations/migrations/1580148698331_table_onchain_proposals_drop_remote_relationship_proposal/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: proposal - table: - name: onchain_proposals - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1580148716134_rename_table_public_onchain_proposals/down.yaml b/hasura/hasura-migrations/migrations/1580148716134_rename_table_public_onchain_proposals/down.yaml deleted file mode 100644 index c278dae97..000000000 --- a/hasura/hasura-migrations/migrations/1580148716134_rename_table_public_onchain_proposals/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."onchain_links" rename to "onchain_proposals"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1580148716134_rename_table_public_onchain_proposals/up.yaml b/hasura/hasura-migrations/migrations/1580148716134_rename_table_public_onchain_proposals/up.yaml deleted file mode 100644 index a27b39a79..000000000 --- a/hasura/hasura-migrations/migrations/1580148716134_rename_table_public_onchain_proposals/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."onchain_proposals" rename to "onchain_links"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1580148790706_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml b/hasura/hasura-migrations/migrations/1580148790706_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml deleted file mode 100644 index f711faf55..000000000 --- a/hasura/hasura-migrations/migrations/1580148790706_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_proposal - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1580148790706_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml b/hasura/hasura-migrations/migrations/1580148790706_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml deleted file mode 100644 index fb6709989..000000000 --- a/hasura/hasura-migrations/migrations/1580148790706_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - name: onchain_proposal - remote_field: - proposal: - arguments: - where: - proposalId: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1580149006511_alter_table_public_onchain_links_add_column_onchain_referendum_id/down.yaml b/hasura/hasura-migrations/migrations/1580149006511_alter_table_public_onchain_links_add_column_onchain_referendum_id/down.yaml deleted file mode 100644 index 3c028d0e1..000000000 --- a/hasura/hasura-migrations/migrations/1580149006511_alter_table_public_onchain_links_add_column_onchain_referendum_id/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_links" DROP COLUMN "onchain_referendum_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1580149006511_alter_table_public_onchain_links_add_column_onchain_referendum_id/up.yaml b/hasura/hasura-migrations/migrations/1580149006511_alter_table_public_onchain_links_add_column_onchain_referendum_id/up.yaml deleted file mode 100644 index 74d6baed1..000000000 --- a/hasura/hasura-migrations/migrations/1580149006511_alter_table_public_onchain_links_add_column_onchain_referendum_id/up.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_links" ADD COLUMN "onchain_referendum_id" integer - NULL UNIQUE DEFAULT null; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1580149017783_alter_table_public_onchain_links_alter_column_onchain_proposal_id/down.yaml b/hasura/hasura-migrations/migrations/1580149017783_alter_table_public_onchain_links_alter_column_onchain_proposal_id/down.yaml deleted file mode 100644 index 3f2d48645..000000000 --- a/hasura/hasura-migrations/migrations/1580149017783_alter_table_public_onchain_links_alter_column_onchain_proposal_id/down.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_links" ALTER COLUMN "onchain_proposal_id" TYPE - integer; - type: run_sql -- args: - sql: ALTER TABLE "public"."onchain_links" ALTER COLUMN "onchain_proposal_id" SET - NOT NULL; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."onchain_links"."onchain_proposal_id" IS E'null' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1580149017783_alter_table_public_onchain_links_alter_column_onchain_proposal_id/up.yaml b/hasura/hasura-migrations/migrations/1580149017783_alter_table_public_onchain_links_alter_column_onchain_proposal_id/up.yaml deleted file mode 100644 index d18172781..000000000 --- a/hasura/hasura-migrations/migrations/1580149017783_alter_table_public_onchain_links_alter_column_onchain_proposal_id/up.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_links" ALTER COLUMN "onchain_proposal_id" TYPE - int4; - type: run_sql -- args: - sql: ALTER TABLE "public"."onchain_links" ALTER COLUMN "onchain_proposal_id" DROP - NOT NULL; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."onchain_links"."onchain_proposal_id" IS E'' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1580149055449_update_permission_anonymous_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1580149055449_update_permission_anonymous_public_table_onchain_links/down.yaml deleted file mode 100644 index e772ef67e..000000000 --- a/hasura/hasura-migrations/migrations/1580149055449_update_permission_anonymous_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - onchain_proposal_id - - id - - post_id - - proposer_address - - created_at - filter: {} - role: anonymous - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1580149055449_update_permission_anonymous_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1580149055449_update_permission_anonymous_public_table_onchain_links/up.yaml deleted file mode 100644 index 192de45ae..000000000 --- a/hasura/hasura-migrations/migrations/1580149055449_update_permission_anonymous_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - created_at - - id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: anonymous - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1580149062208_update_permission_proposal_bot_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1580149062208_update_permission_proposal_bot_public_table_onchain_links/down.yaml deleted file mode 100644 index dd367ce1a..000000000 --- a/hasura/hasura-migrations/migrations/1580149062208_update_permission_proposal_bot_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - onchain_proposal_id - - id - - post_id - - proposer_address - - created_at - filter: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1580149062208_update_permission_proposal_bot_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1580149062208_update_permission_proposal_bot_public_table_onchain_links/up.yaml deleted file mode 100644 index 37f4d6765..000000000 --- a/hasura/hasura-migrations/migrations/1580149062208_update_permission_proposal_bot_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - created_at - - id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1580149076860_update_permission_proposal_bot_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1580149076860_update_permission_proposal_bot_public_table_onchain_links/down.yaml deleted file mode 100644 index 70688bbaa..000000000 --- a/hasura/hasura-migrations/migrations/1580149076860_update_permission_proposal_bot_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_insert_permission -- args: - permission: - check: {} - columns: - - onchain_proposal_id - - post_id - - proposer_address - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1580149076860_update_permission_proposal_bot_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1580149076860_update_permission_proposal_bot_public_table_onchain_links/up.yaml deleted file mode 100644 index 83975e191..000000000 --- a/hasura/hasura-migrations/migrations/1580149076860_update_permission_proposal_bot_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_insert_permission -- args: - permission: - check: {} - columns: - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1580149138051_update_permission_proposal_bot_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1580149138051_update_permission_proposal_bot_public_table_onchain_links/down.yaml deleted file mode 100644 index 0146ab64f..000000000 --- a/hasura/hasura-migrations/migrations/1580149138051_update_permission_proposal_bot_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_update_permission diff --git a/hasura/hasura-migrations/migrations/1580149138051_update_permission_proposal_bot_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1580149138051_update_permission_proposal_bot_public_table_onchain_links/up.yaml deleted file mode 100644 index f0be39c86..000000000 --- a/hasura/hasura-migrations/migrations/1580149138051_update_permission_proposal_bot_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- args: - permission: - columns: - - onchain_proposal_id - - onchain_referendum_id - filter: {} - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1580149171516_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml b/hasura/hasura-migrations/migrations/1580149171516_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml deleted file mode 100644 index 684feba0f..000000000 --- a/hasura/hasura-migrations/migrations/1580149171516_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_referendum - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1580149171516_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml b/hasura/hasura-migrations/migrations/1580149171516_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml deleted file mode 100644 index 06b9f3161..000000000 --- a/hasura/hasura-migrations/migrations/1580149171516_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_referendum_id - name: onchain_referendum - remote_field: - referendum: - arguments: - where: - referendumId: $onchain_referendum_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1580167344799_rename_relationship_onchain_proposal_to_onchain_link_schema_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1580167344799_rename_relationship_onchain_proposal_to_onchain_link_schema_public_table_posts/down.yaml deleted file mode 100644 index 01c047567..000000000 --- a/hasura/hasura-migrations/migrations/1580167344799_rename_relationship_onchain_proposal_to_onchain_link_schema_public_table_posts/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: onchain_link - new_name: onchain_proposal - table: - name: posts - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1580167344799_rename_relationship_onchain_proposal_to_onchain_link_schema_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1580167344799_rename_relationship_onchain_proposal_to_onchain_link_schema_public_table_posts/up.yaml deleted file mode 100644 index afe55e5d9..000000000 --- a/hasura/hasura-migrations/migrations/1580167344799_rename_relationship_onchain_proposal_to_onchain_link_schema_public_table_posts/up.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: onchain_proposal - new_name: onchain_link - table: - name: posts - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1580235067478_update_permission_user_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1580235067478_update_permission_user_public_table_onchain_links/down.yaml deleted file mode 100644 index c3460f62d..000000000 --- a/hasura/hasura-migrations/migrations/1580235067478_update_permission_user_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: user - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - onchain_proposal_id - - id - - post_id - - proposer_address - - created_at - filter: {} - role: user - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1580235067478_update_permission_user_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1580235067478_update_permission_user_public_table_onchain_links/up.yaml deleted file mode 100644 index c3843e1aa..000000000 --- a/hasura/hasura-migrations/migrations/1580235067478_update_permission_user_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - created_at - - id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: user - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1580235142132_alter_table_public_posts_alter_column_topic_id/down.yaml b/hasura/hasura-migrations/migrations/1580235142132_alter_table_public_posts_alter_column_topic_id/down.yaml deleted file mode 100644 index 20c092ae0..000000000 --- a/hasura/hasura-migrations/migrations/1580235142132_alter_table_public_posts_alter_column_topic_id/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "topic_id" TYPE integer; - type: run_sql -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "topic_id" DROP NOT NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1580235142132_alter_table_public_posts_alter_column_topic_id/up.yaml b/hasura/hasura-migrations/migrations/1580235142132_alter_table_public_posts_alter_column_topic_id/up.yaml deleted file mode 100644 index a05d4a13e..000000000 --- a/hasura/hasura-migrations/migrations/1580235142132_alter_table_public_posts_alter_column_topic_id/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "topic_id" TYPE int4; - type: run_sql -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "topic_id" SET NOT NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1580236437839_alter_table_public_posts_alter_column_created_at/down.yaml b/hasura/hasura-migrations/migrations/1580236437839_alter_table_public_posts_alter_column_created_at/down.yaml deleted file mode 100644 index 995a9c4e3..000000000 --- a/hasura/hasura-migrations/migrations/1580236437839_alter_table_public_posts_alter_column_created_at/down.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "created_at" TYPE timestamp with - time zone; - type: run_sql -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "created_at" DROP NOT NULL; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."posts"."created_at" IS E'null' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1580236437839_alter_table_public_posts_alter_column_created_at/up.yaml b/hasura/hasura-migrations/migrations/1580236437839_alter_table_public_posts_alter_column_created_at/up.yaml deleted file mode 100644 index 84bc58cc0..000000000 --- a/hasura/hasura-migrations/migrations/1580236437839_alter_table_public_posts_alter_column_created_at/up.yaml +++ /dev/null @@ -1,9 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "created_at" TYPE timestamptz; - type: run_sql -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "created_at" SET NOT NULL; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."posts"."created_at" IS E'' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1580236444981_alter_table_public_posts_alter_column_updated_at/down.yaml b/hasura/hasura-migrations/migrations/1580236444981_alter_table_public_posts_alter_column_updated_at/down.yaml deleted file mode 100644 index 8d7164094..000000000 --- a/hasura/hasura-migrations/migrations/1580236444981_alter_table_public_posts_alter_column_updated_at/down.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "updated_at" TYPE timestamp with - time zone; - type: run_sql -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "updated_at" DROP NOT NULL; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."posts"."updated_at" IS E'null' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1580236444981_alter_table_public_posts_alter_column_updated_at/up.yaml b/hasura/hasura-migrations/migrations/1580236444981_alter_table_public_posts_alter_column_updated_at/up.yaml deleted file mode 100644 index 19161a651..000000000 --- a/hasura/hasura-migrations/migrations/1580236444981_alter_table_public_posts_alter_column_updated_at/up.yaml +++ /dev/null @@ -1,9 +0,0 @@ -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "updated_at" TYPE timestamptz; - type: run_sql -- args: - sql: ALTER TABLE "public"."posts" ALTER COLUMN "updated_at" SET NOT NULL; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."posts"."updated_at" IS E'' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1580286221713_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1580286221713_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 495b466cb..000000000 --- a/hasura/hasura-migrations/migrations/1580286221713_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_update_permission -- args: - permission: - columns: - - content - - title - - topic_id - filter: - author_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1580286221713_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1580286221713_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 6ff73a87f..000000000 --- a/hasura/hasura-migrations/migrations/1580286221713_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_update_permission -- args: - permission: - columns: - - content - - title - - topic_id - filter: - _or: - - author_id: - _eq: X-Hasura-User-Id - - onchain_link: - proposer_address: - _in: X-Hasura-Kusama - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: posts - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1580740922837_update_permission_anonymous_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1580740922837_update_permission_anonymous_public_table_onchain_links/down.yaml deleted file mode 100644 index 192de45ae..000000000 --- a/hasura/hasura-migrations/migrations/1580740922837_update_permission_anonymous_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - created_at - - id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: anonymous - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1580740922837_update_permission_anonymous_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1580740922837_update_permission_anonymous_public_table_onchain_links/up.yaml deleted file mode 100644 index 64e4bd712..000000000 --- a/hasura/hasura-migrations/migrations/1580740922837_update_permission_anonymous_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: anonymous - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1580740931101_update_permission_user_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1580740931101_update_permission_user_public_table_onchain_links/down.yaml deleted file mode 100644 index c3843e1aa..000000000 --- a/hasura/hasura-migrations/migrations/1580740931101_update_permission_user_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - created_at - - id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: user - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1580740931101_update_permission_user_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1580740931101_update_permission_user_public_table_onchain_links/up.yaml deleted file mode 100644 index ba849e0ad..000000000 --- a/hasura/hasura-migrations/migrations/1580740931101_update_permission_user_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: user - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1580897919204_update_permission_proposal_bot_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1580897919204_update_permission_proposal_bot_public_table_posts/down.yaml deleted file mode 100644 index 9b79baa77..000000000 --- a/hasura/hasura-migrations/migrations/1580897919204_update_permission_proposal_bot_public_table_posts/down.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: {} - columns: - - author_id - - content - - title - - topic_id - - type_id - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1580897919204_update_permission_proposal_bot_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1580897919204_update_permission_proposal_bot_public_table_posts/up.yaml deleted file mode 100644 index b9f78e236..000000000 --- a/hasura/hasura-migrations/migrations/1580897919204_update_permission_proposal_bot_public_table_posts/up.yaml +++ /dev/null @@ -1,26 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - content - - title - - topic_id - - type_id - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1580901666299_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml b/hasura/hasura-migrations/migrations/1580901666299_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml deleted file mode 100644 index d6c5b7717..000000000 --- a/hasura/hasura-migrations/migrations/1580901666299_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - remote_field: - proposal: - arguments: - where: - proposalId: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: update_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1580901666299_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml b/hasura/hasura-migrations/migrations/1580901666299_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml deleted file mode 100644 index 9b5f57e36..000000000 --- a/hasura/hasura-migrations/migrations/1580901666299_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - name: onchain_proposal - remote_field: - proposals: - arguments: - where: - proposalId: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: update_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1580901723761_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml b/hasura/hasura-migrations/migrations/1580901723761_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml deleted file mode 100644 index 3b2616514..000000000 --- a/hasura/hasura-migrations/migrations/1580901723761_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - remote_field: - proposals: - arguments: - where: - proposalId: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: update_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1580901723761_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml b/hasura/hasura-migrations/migrations/1580901723761_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml deleted file mode 100644 index 5d5cb3b14..000000000 --- a/hasura/hasura-migrations/migrations/1580901723761_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_referendum_id - name: onchain_referendum - remote_field: - referendums: - arguments: - where: - referendumId: $onchain_referendum_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: update_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1581529252179_alter_table_public_onchain_links_add_column_onchain_motion_id/down.yaml b/hasura/hasura-migrations/migrations/1581529252179_alter_table_public_onchain_links_add_column_onchain_motion_id/down.yaml deleted file mode 100644 index 13135f8ff..000000000 --- a/hasura/hasura-migrations/migrations/1581529252179_alter_table_public_onchain_links_add_column_onchain_motion_id/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_links" DROP COLUMN "onchain_motion_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1581529252179_alter_table_public_onchain_links_add_column_onchain_motion_id/up.yaml b/hasura/hasura-migrations/migrations/1581529252179_alter_table_public_onchain_links_add_column_onchain_motion_id/up.yaml deleted file mode 100644 index f6f24ba80..000000000 --- a/hasura/hasura-migrations/migrations/1581529252179_alter_table_public_onchain_links_add_column_onchain_motion_id/up.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_links" ADD COLUMN "onchain_motion_id" integer - NULL UNIQUE; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1581529328961_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml b/hasura/hasura-migrations/migrations/1581529328961_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml deleted file mode 100644 index 62019683c..000000000 --- a/hasura/hasura-migrations/migrations/1581529328961_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_motion - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1581529328961_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml b/hasura/hasura-migrations/migrations/1581529328961_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml deleted file mode 100644 index 2b11607d1..000000000 --- a/hasura/hasura-migrations/migrations/1581529328961_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_motion_id - name: onchain_motion - remote_field: - motions: - arguments: - where: - motionProposalId: $onchain_motion_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1581529350797_update_permission_proposal_bot_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1581529350797_update_permission_proposal_bot_public_table_onchain_links/down.yaml deleted file mode 100644 index 37f4d6765..000000000 --- a/hasura/hasura-migrations/migrations/1581529350797_update_permission_proposal_bot_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - created_at - - id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1581529350797_update_permission_proposal_bot_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1581529350797_update_permission_proposal_bot_public_table_onchain_links/up.yaml deleted file mode 100644 index 409dc15e2..000000000 --- a/hasura/hasura-migrations/migrations/1581529350797_update_permission_proposal_bot_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - created_at - - id - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1581529362839_update_permission_anonymous_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1581529362839_update_permission_anonymous_public_table_onchain_links/down.yaml deleted file mode 100644 index 64e4bd712..000000000 --- a/hasura/hasura-migrations/migrations/1581529362839_update_permission_anonymous_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: anonymous - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1581529362839_update_permission_anonymous_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1581529362839_update_permission_anonymous_public_table_onchain_links/up.yaml deleted file mode 100644 index e14a279c4..000000000 --- a/hasura/hasura-migrations/migrations/1581529362839_update_permission_anonymous_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: anonymous - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1581529371808_update_permission_user_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1581529371808_update_permission_user_public_table_onchain_links/down.yaml deleted file mode 100644 index ba849e0ad..000000000 --- a/hasura/hasura-migrations/migrations/1581529371808_update_permission_user_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: user - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1581529371808_update_permission_user_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1581529371808_update_permission_user_public_table_onchain_links/up.yaml deleted file mode 100644 index 495a2d55f..000000000 --- a/hasura/hasura-migrations/migrations/1581529371808_update_permission_user_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: user - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1581529380814_update_permission_proposal_bot_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1581529380814_update_permission_proposal_bot_public_table_onchain_links/down.yaml deleted file mode 100644 index 83975e191..000000000 --- a/hasura/hasura-migrations/migrations/1581529380814_update_permission_proposal_bot_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_insert_permission -- args: - permission: - check: {} - columns: - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1581529380814_update_permission_proposal_bot_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1581529380814_update_permission_proposal_bot_public_table_onchain_links/up.yaml deleted file mode 100644 index 2bdbe6e00..000000000 --- a/hasura/hasura-migrations/migrations/1581529380814_update_permission_proposal_bot_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_insert_permission -- args: - permission: - check: {} - columns: - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1581529398610_update_permission_proposal_bot_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1581529398610_update_permission_proposal_bot_public_table_onchain_links/down.yaml deleted file mode 100644 index 32a64e849..000000000 --- a/hasura/hasura-migrations/migrations/1581529398610_update_permission_proposal_bot_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_update_permission -- args: - permission: - columns: - - onchain_proposal_id - - onchain_referendum_id - filter: {} - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1581529398610_update_permission_proposal_bot_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1581529398610_update_permission_proposal_bot_public_table_onchain_links/up.yaml deleted file mode 100644 index 722438c2c..000000000 --- a/hasura/hasura-migrations/migrations/1581529398610_update_permission_proposal_bot_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_update_permission -- args: - permission: - columns: - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - filter: {} - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1581963155466_update_permission_user_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1581963155466_update_permission_user_public_table_comments/down.yaml deleted file mode 100644 index a0f7ca10d..000000000 --- a/hasura/hasura-migrations/migrations/1581963155466_update_permission_user_public_table_comments/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - author_id - - post_id - - content - - created_at - - updated_at - - id - - parent_comment_id - filter: {} - role: user - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1581963155466_update_permission_user_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1581963155466_update_permission_user_public_table_comments/up.yaml deleted file mode 100644 index e4999672c..000000000 --- a/hasura/hasura-migrations/migrations/1581963155466_update_permission_user_public_table_comments/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - author_id - - content - - created_at - - id - - post_id - - updated_at - filter: {} - role: user - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1581963163194_update_permission_anonymous_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1581963163194_update_permission_anonymous_public_table_comments/down.yaml deleted file mode 100644 index 80cb38297..000000000 --- a/hasura/hasura-migrations/migrations/1581963163194_update_permission_anonymous_public_table_comments/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: anonymous - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - author_id - - post_id - - content - - created_at - - updated_at - - id - - parent_comment_id - filter: {} - role: anonymous - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1581963163194_update_permission_anonymous_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1581963163194_update_permission_anonymous_public_table_comments/up.yaml deleted file mode 100644 index 48fd9eb9a..000000000 --- a/hasura/hasura-migrations/migrations/1581963163194_update_permission_anonymous_public_table_comments/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: comments - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - author_id - - content - - created_at - - id - - post_id - - updated_at - filter: {} - role: anonymous - table: - name: comments - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1581963179201_update_permission_user_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1581963179201_update_permission_user_public_table_comments/down.yaml deleted file mode 100644 index b6a7c9d79..000000000 --- a/hasura/hasura-migrations/migrations/1581963179201_update_permission_user_public_table_comments/down.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: user - table: - name: comments - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - content - - parent_comment_id - - post_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comments - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1581963179201_update_permission_user_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1581963179201_update_permission_user_public_table_comments/up.yaml deleted file mode 100644 index 2caff1305..000000000 --- a/hasura/hasura-migrations/migrations/1581963179201_update_permission_user_public_table_comments/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: comments - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - content - - post_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comments - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1581963205483_drop_relationship_comment_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1581963205483_drop_relationship_comment_public_table_comments/down.yaml deleted file mode 100644 index 1512f1f35..000000000 --- a/hasura/hasura-migrations/migrations/1581963205483_drop_relationship_comment_public_table_comments/down.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: comment - table: - name: comments - schema: public - using: - foreign_key_constraint_on: parent_comment_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1581963205483_drop_relationship_comment_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1581963205483_drop_relationship_comment_public_table_comments/up.yaml deleted file mode 100644 index 974b12bd1..000000000 --- a/hasura/hasura-migrations/migrations/1581963205483_drop_relationship_comment_public_table_comments/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: comment - table: - name: comments - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1581963279778_drop_relationship_comments_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1581963279778_drop_relationship_comments_public_table_comments/down.yaml deleted file mode 100644 index 1562c47aa..000000000 --- a/hasura/hasura-migrations/migrations/1581963279778_drop_relationship_comments_public_table_comments/down.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: comments - table: - name: comments - schema: public - using: - foreign_key_constraint_on: - column: parent_comment_id - table: - name: comments - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1581963279778_drop_relationship_comments_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1581963279778_drop_relationship_comments_public_table_comments/up.yaml deleted file mode 100644 index db7d7bbe2..000000000 --- a/hasura/hasura-migrations/migrations/1581963279778_drop_relationship_comments_public_table_comments/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: comments - table: - name: comments - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1581963288889_delete_fk_public_comments_comments_parent_message_fkey/down.yaml b/hasura/hasura-migrations/migrations/1581963288889_delete_fk_public_comments_comments_parent_message_fkey/down.yaml deleted file mode 100644 index 501028b83..000000000 --- a/hasura/hasura-migrations/migrations/1581963288889_delete_fk_public_comments_comments_parent_message_fkey/down.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: alter table "public"."comments" add foreign key ("parent_comment_id") references - "public"."comments"("id") on update no action on delete no action; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1581963288889_delete_fk_public_comments_comments_parent_message_fkey/up.yaml b/hasura/hasura-migrations/migrations/1581963288889_delete_fk_public_comments_comments_parent_message_fkey/up.yaml deleted file mode 100644 index 9808ab3fb..000000000 --- a/hasura/hasura-migrations/migrations/1581963288889_delete_fk_public_comments_comments_parent_message_fkey/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."comments" drop constraint "comments_parent_message_fkey"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1581963300572_alter_table_public_comments_drop_column_parent_comment_id/down.yaml b/hasura/hasura-migrations/migrations/1581963300572_alter_table_public_comments_drop_column_parent_comment_id/down.yaml deleted file mode 100644 index 655cdfd11..000000000 --- a/hasura/hasura-migrations/migrations/1581963300572_alter_table_public_comments_drop_column_parent_comment_id/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comments" ADD COLUMN "parent_comment_id" uuid - type: run_sql -- args: - sql: ALTER TABLE "public"."comments" ALTER COLUMN "parent_comment_id" DROP NOT - NULL - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1581963300572_alter_table_public_comments_drop_column_parent_comment_id/up.yaml b/hasura/hasura-migrations/migrations/1581963300572_alter_table_public_comments_drop_column_parent_comment_id/up.yaml deleted file mode 100644 index eeec80133..000000000 --- a/hasura/hasura-migrations/migrations/1581963300572_alter_table_public_comments_drop_column_parent_comment_id/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comments" DROP COLUMN "parent_comment_id" CASCADE - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1582534538758_delete_trigger_post_subscription/down.yaml b/hasura/hasura-migrations/migrations/1582534538758_delete_trigger_post_subscription/down.yaml deleted file mode 100644 index dbcf8a5dc..000000000 --- a/hasura/hasura-migrations/migrations/1582534538758_delete_trigger_post_subscription/down.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - enable_manual: false - headers: - - name: HASURA_POST_SUBSCRIPTION_SECRET - value_from_env: HASURA_POST_SUBSCRIPTION_SECRET - insert: - columns: '*' - name: post_subscription - retry_conf: - interval_sec: 10 - num_retries: 0 - timeout_sec: 60 - table: - name: comments - schema: public - webhook_from_env: HASURA_POST_SUBSCRIPTION_HOOK - type: create_event_trigger diff --git a/hasura/hasura-migrations/migrations/1582534538758_delete_trigger_post_subscription/up.yaml b/hasura/hasura-migrations/migrations/1582534538758_delete_trigger_post_subscription/up.yaml deleted file mode 100644 index 7f498afdc..000000000 --- a/hasura/hasura-migrations/migrations/1582534538758_delete_trigger_post_subscription/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - name: post_subscription - type: delete_event_trigger diff --git a/hasura/hasura-migrations/migrations/1582534572909_create_trigger_comment_create/down.yaml b/hasura/hasura-migrations/migrations/1582534572909_create_trigger_comment_create/down.yaml deleted file mode 100644 index c7f7aa20b..000000000 --- a/hasura/hasura-migrations/migrations/1582534572909_create_trigger_comment_create/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - name: comment_create - type: delete_event_trigger diff --git a/hasura/hasura-migrations/migrations/1582534572909_create_trigger_comment_create/up.yaml b/hasura/hasura-migrations/migrations/1582534572909_create_trigger_comment_create/up.yaml deleted file mode 100644 index 7ca60a42d..000000000 --- a/hasura/hasura-migrations/migrations/1582534572909_create_trigger_comment_create/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - enable_manual: false - headers: - - name: HASURA_EVENT_SECRET - value_from_env: HASURA_EVENT_SECRET - insert: - columns: '*' - name: comment_create - retry_conf: - interval_sec: 10 - num_retries: 0 - timeout_sec: 60 - table: - name: comments - schema: public - webhook_from_env: HASURA_COMMENT_CREATE_EVENT_HOOK - type: create_event_trigger diff --git a/hasura/hasura-migrations/migrations/1582547761965_create_trigger_onchain_link_create/down.yaml b/hasura/hasura-migrations/migrations/1582547761965_create_trigger_onchain_link_create/down.yaml deleted file mode 100644 index 38f0395d4..000000000 --- a/hasura/hasura-migrations/migrations/1582547761965_create_trigger_onchain_link_create/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - name: onchain_link_create - type: delete_event_trigger diff --git a/hasura/hasura-migrations/migrations/1582547761965_create_trigger_onchain_link_create/up.yaml b/hasura/hasura-migrations/migrations/1582547761965_create_trigger_onchain_link_create/up.yaml deleted file mode 100644 index 60526c8e3..000000000 --- a/hasura/hasura-migrations/migrations/1582547761965_create_trigger_onchain_link_create/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - enable_manual: false - headers: - - name: HASURA_EVENT_SECRET - value_from_env: HASURA_EVENT_SECRET - insert: - columns: '*' - name: onchain_link_create - retry_conf: - interval_sec: 10 - num_retries: 0 - timeout_sec: 60 - table: - name: onchain_links - schema: public - webhook_from_env: HASURA_ONCHAIN_LINK_CREATE_HOOK - type: create_event_trigger diff --git a/hasura/hasura-migrations/migrations/1582552076335_table_posts_drop_remote_relationship_author/down.yaml b/hasura/hasura-migrations/migrations/1582552076335_table_posts_drop_remote_relationship_author/down.yaml deleted file mode 100644 index 8b03071ca..000000000 --- a/hasura/hasura-migrations/migrations/1582552076335_table_posts_drop_remote_relationship_author/down.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - author_id - name: author - remote_field: - user: - arguments: - id: $author_id - remote_schema: auth - table: - name: posts - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552076335_table_posts_drop_remote_relationship_author/up.yaml b/hasura/hasura-migrations/migrations/1582552076335_table_posts_drop_remote_relationship_author/up.yaml deleted file mode 100644 index b854d615e..000000000 --- a/hasura/hasura-migrations/migrations/1582552076335_table_posts_drop_remote_relationship_author/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: author - table: - name: posts - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552087743_table_comments_drop_remote_relationship_author/down.yaml b/hasura/hasura-migrations/migrations/1582552087743_table_comments_drop_remote_relationship_author/down.yaml deleted file mode 100644 index 06461ac04..000000000 --- a/hasura/hasura-migrations/migrations/1582552087743_table_comments_drop_remote_relationship_author/down.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - author_id - name: author - remote_field: - user: - arguments: - id: $author_id - remote_schema: auth - table: - name: comments - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552087743_table_comments_drop_remote_relationship_author/up.yaml b/hasura/hasura-migrations/migrations/1582552087743_table_comments_drop_remote_relationship_author/up.yaml deleted file mode 100644 index 722b38d17..000000000 --- a/hasura/hasura-migrations/migrations/1582552087743_table_comments_drop_remote_relationship_author/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: author - table: - name: comments - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552105476_update_remote_schema_auth/down.yaml b/hasura/hasura-migrations/migrations/1582552105476_update_remote_schema_auth/down.yaml deleted file mode 100644 index a82441cee..000000000 --- a/hasura/hasura-migrations/migrations/1582552105476_update_remote_schema_auth/down.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - name: auth - type: remove_remote_schema -- args: - definition: - forward_client_headers: true - headers: [] - timeout_seconds: 60 - url: http://localhost:8010/auth/graphql - name: auth - type: add_remote_schema diff --git a/hasura/hasura-migrations/migrations/1582552105476_update_remote_schema_auth/up.yaml b/hasura/hasura-migrations/migrations/1582552105476_update_remote_schema_auth/up.yaml deleted file mode 100644 index f6241bd15..000000000 --- a/hasura/hasura-migrations/migrations/1582552105476_update_remote_schema_auth/up.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - name: auth - type: remove_remote_schema -- args: - definition: - forward_client_headers: true - headers: [] - timeout_seconds: 60 - url_from_env: HASURA_AUTH_SERVER_REMOTE_SCHEMA - name: auth - type: add_remote_schema diff --git a/hasura/hasura-migrations/migrations/1582552134767_table_posts_create_remote_relationship_author/down.yaml b/hasura/hasura-migrations/migrations/1582552134767_table_posts_create_remote_relationship_author/down.yaml deleted file mode 100644 index b854d615e..000000000 --- a/hasura/hasura-migrations/migrations/1582552134767_table_posts_create_remote_relationship_author/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: author - table: - name: posts - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552134767_table_posts_create_remote_relationship_author/up.yaml b/hasura/hasura-migrations/migrations/1582552134767_table_posts_create_remote_relationship_author/up.yaml deleted file mode 100644 index 8b03071ca..000000000 --- a/hasura/hasura-migrations/migrations/1582552134767_table_posts_create_remote_relationship_author/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - author_id - name: author - remote_field: - user: - arguments: - id: $author_id - remote_schema: auth - table: - name: posts - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552151971_table_comments_create_remote_relationship_author/down.yaml b/hasura/hasura-migrations/migrations/1582552151971_table_comments_create_remote_relationship_author/down.yaml deleted file mode 100644 index 722b38d17..000000000 --- a/hasura/hasura-migrations/migrations/1582552151971_table_comments_create_remote_relationship_author/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: author - table: - name: comments - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552151971_table_comments_create_remote_relationship_author/up.yaml b/hasura/hasura-migrations/migrations/1582552151971_table_comments_create_remote_relationship_author/up.yaml deleted file mode 100644 index 06461ac04..000000000 --- a/hasura/hasura-migrations/migrations/1582552151971_table_comments_create_remote_relationship_author/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - author_id - name: author - remote_field: - user: - arguments: - id: $author_id - remote_schema: auth - table: - name: comments - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552229731_table_onchain_links_drop_remote_relationship_onchain_proposal/down.yaml b/hasura/hasura-migrations/migrations/1582552229731_table_onchain_links_drop_remote_relationship_onchain_proposal/down.yaml deleted file mode 100644 index e7d5c6e8f..000000000 --- a/hasura/hasura-migrations/migrations/1582552229731_table_onchain_links_drop_remote_relationship_onchain_proposal/down.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - name: onchain_proposal - remote_field: - proposals: - arguments: - where: - proposalId: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552229731_table_onchain_links_drop_remote_relationship_onchain_proposal/up.yaml b/hasura/hasura-migrations/migrations/1582552229731_table_onchain_links_drop_remote_relationship_onchain_proposal/up.yaml deleted file mode 100644 index f711faf55..000000000 --- a/hasura/hasura-migrations/migrations/1582552229731_table_onchain_links_drop_remote_relationship_onchain_proposal/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_proposal - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552237735_table_onchain_links_drop_remote_relationship_onchain_referendum/down.yaml b/hasura/hasura-migrations/migrations/1582552237735_table_onchain_links_drop_remote_relationship_onchain_referendum/down.yaml deleted file mode 100644 index bd4b7844a..000000000 --- a/hasura/hasura-migrations/migrations/1582552237735_table_onchain_links_drop_remote_relationship_onchain_referendum/down.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_referendum_id - name: onchain_referendum - remote_field: - referendums: - arguments: - where: - referendumId: $onchain_referendum_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552237735_table_onchain_links_drop_remote_relationship_onchain_referendum/up.yaml b/hasura/hasura-migrations/migrations/1582552237735_table_onchain_links_drop_remote_relationship_onchain_referendum/up.yaml deleted file mode 100644 index 684feba0f..000000000 --- a/hasura/hasura-migrations/migrations/1582552237735_table_onchain_links_drop_remote_relationship_onchain_referendum/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_referendum - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552248166_table_onchain_links_drop_remote_relationship_onchain_motion/down.yaml b/hasura/hasura-migrations/migrations/1582552248166_table_onchain_links_drop_remote_relationship_onchain_motion/down.yaml deleted file mode 100644 index 2b11607d1..000000000 --- a/hasura/hasura-migrations/migrations/1582552248166_table_onchain_links_drop_remote_relationship_onchain_motion/down.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_motion_id - name: onchain_motion - remote_field: - motions: - arguments: - where: - motionProposalId: $onchain_motion_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552248166_table_onchain_links_drop_remote_relationship_onchain_motion/up.yaml b/hasura/hasura-migrations/migrations/1582552248166_table_onchain_links_drop_remote_relationship_onchain_motion/up.yaml deleted file mode 100644 index 62019683c..000000000 --- a/hasura/hasura-migrations/migrations/1582552248166_table_onchain_links_drop_remote_relationship_onchain_motion/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_motion - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552281519_update_remote_schema_chain-db/down.yaml b/hasura/hasura-migrations/migrations/1582552281519_update_remote_schema_chain-db/down.yaml deleted file mode 100644 index 54081609d..000000000 --- a/hasura/hasura-migrations/migrations/1582552281519_update_remote_schema_chain-db/down.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - name: chain-db - type: remove_remote_schema -- args: - definition: - forward_client_headers: false - headers: [] - timeout_seconds: 60 - url: http://localhost:4466 - name: chain-db - type: add_remote_schema diff --git a/hasura/hasura-migrations/migrations/1582552281519_update_remote_schema_chain-db/up.yaml b/hasura/hasura-migrations/migrations/1582552281519_update_remote_schema_chain-db/up.yaml deleted file mode 100644 index 44005cfa2..000000000 --- a/hasura/hasura-migrations/migrations/1582552281519_update_remote_schema_chain-db/up.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - name: chain-db - type: remove_remote_schema -- args: - definition: - forward_client_headers: true - headers: [] - timeout_seconds: 60 - url_from_env: HASURA_CHAIN_DB_REMOTE_SCHEMA - name: chain-db - type: add_remote_schema diff --git a/hasura/hasura-migrations/migrations/1582552468902_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml b/hasura/hasura-migrations/migrations/1582552468902_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml deleted file mode 100644 index f711faf55..000000000 --- a/hasura/hasura-migrations/migrations/1582552468902_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_proposal - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552468902_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml b/hasura/hasura-migrations/migrations/1582552468902_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml deleted file mode 100644 index 0d922c0fd..000000000 --- a/hasura/hasura-migrations/migrations/1582552468902_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - name: onchain_proposal - remote_field: - proposal: - arguments: - where: - id: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552496160_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml b/hasura/hasura-migrations/migrations/1582552496160_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml deleted file mode 100644 index 684feba0f..000000000 --- a/hasura/hasura-migrations/migrations/1582552496160_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_referendum - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552496160_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml b/hasura/hasura-migrations/migrations/1582552496160_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml deleted file mode 100644 index 12ec06cc4..000000000 --- a/hasura/hasura-migrations/migrations/1582552496160_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_referendum_id - name: onchain_referendum - remote_field: - referendum: - arguments: - where: - id: $onchain_referendum_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552517341_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml b/hasura/hasura-migrations/migrations/1582552517341_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml deleted file mode 100644 index 62019683c..000000000 --- a/hasura/hasura-migrations/migrations/1582552517341_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_motion - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582552517341_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml b/hasura/hasura-migrations/migrations/1582552517341_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml deleted file mode 100644 index b71e5a640..000000000 --- a/hasura/hasura-migrations/migrations/1582552517341_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_motion_id - name: onchain_motion - remote_field: - motion: - arguments: - where: - id: $onchain_motion_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582631584192_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml b/hasura/hasura-migrations/migrations/1582631584192_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml deleted file mode 100644 index e15e6e1e1..000000000 --- a/hasura/hasura-migrations/migrations/1582631584192_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - remote_field: - proposal: - arguments: - where: - id: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: update_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582631584192_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml b/hasura/hasura-migrations/migrations/1582631584192_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml deleted file mode 100644 index 9b5f57e36..000000000 --- a/hasura/hasura-migrations/migrations/1582631584192_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - name: onchain_proposal - remote_field: - proposals: - arguments: - where: - proposalId: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: update_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582631619424_table_onchain_links_drop_remote_relationship_onchain_proposal/down.yaml b/hasura/hasura-migrations/migrations/1582631619424_table_onchain_links_drop_remote_relationship_onchain_proposal/down.yaml deleted file mode 100644 index e7d5c6e8f..000000000 --- a/hasura/hasura-migrations/migrations/1582631619424_table_onchain_links_drop_remote_relationship_onchain_proposal/down.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - name: onchain_proposal - remote_field: - proposals: - arguments: - where: - proposalId: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582631619424_table_onchain_links_drop_remote_relationship_onchain_proposal/up.yaml b/hasura/hasura-migrations/migrations/1582631619424_table_onchain_links_drop_remote_relationship_onchain_proposal/up.yaml deleted file mode 100644 index f711faf55..000000000 --- a/hasura/hasura-migrations/migrations/1582631619424_table_onchain_links_drop_remote_relationship_onchain_proposal/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_proposal - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582631659991_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml b/hasura/hasura-migrations/migrations/1582631659991_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml deleted file mode 100644 index c2134f43b..000000000 --- a/hasura/hasura-migrations/migrations/1582631659991_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - onchain_motion_id - remote_field: - motion: - arguments: - where: - id: $onchain_motion_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: update_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582631659991_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml b/hasura/hasura-migrations/migrations/1582631659991_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml deleted file mode 100644 index 5d5cb3b14..000000000 --- a/hasura/hasura-migrations/migrations/1582631659991_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_referendum_id - name: onchain_referendum - remote_field: - referendums: - arguments: - where: - referendumId: $onchain_referendum_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: update_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582631766314_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml b/hasura/hasura-migrations/migrations/1582631766314_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml deleted file mode 100644 index c2134f43b..000000000 --- a/hasura/hasura-migrations/migrations/1582631766314_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - onchain_motion_id - remote_field: - motion: - arguments: - where: - id: $onchain_motion_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: update_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582631766314_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml b/hasura/hasura-migrations/migrations/1582631766314_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml deleted file mode 100644 index 3659e58a5..000000000 --- a/hasura/hasura-migrations/migrations/1582631766314_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_motion_id - name: onchain_motion - remote_field: - motions: - arguments: - where: - motionProposalId: $onchain_motion_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: update_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582631823541_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml b/hasura/hasura-migrations/migrations/1582631823541_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml deleted file mode 100644 index f711faf55..000000000 --- a/hasura/hasura-migrations/migrations/1582631823541_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_proposal - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582631823541_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml b/hasura/hasura-migrations/migrations/1582631823541_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml deleted file mode 100644 index e7d5c6e8f..000000000 --- a/hasura/hasura-migrations/migrations/1582631823541_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - name: onchain_proposal - remote_field: - proposals: - arguments: - where: - proposalId: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582874306534_alter_table_public_onchain_links_add_column_onchain_treasury_proposal_id/down.yaml b/hasura/hasura-migrations/migrations/1582874306534_alter_table_public_onchain_links_add_column_onchain_treasury_proposal_id/down.yaml deleted file mode 100644 index 71bdf8061..000000000 --- a/hasura/hasura-migrations/migrations/1582874306534_alter_table_public_onchain_links_add_column_onchain_treasury_proposal_id/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_links" DROP COLUMN "onchain_treasury_proposal_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1582874306534_alter_table_public_onchain_links_add_column_onchain_treasury_proposal_id/up.yaml b/hasura/hasura-migrations/migrations/1582874306534_alter_table_public_onchain_links_add_column_onchain_treasury_proposal_id/up.yaml deleted file mode 100644 index dc6fac81a..000000000 --- a/hasura/hasura-migrations/migrations/1582874306534_alter_table_public_onchain_links_add_column_onchain_treasury_proposal_id/up.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_links" ADD COLUMN "onchain_treasury_proposal_id" - integer NULL UNIQUE; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1582891815240_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/down.yaml b/hasura/hasura-migrations/migrations/1582891815240_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/down.yaml deleted file mode 100644 index a84811e1a..000000000 --- a/hasura/hasura-migrations/migrations/1582891815240_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_treasury_spend_proposal - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1582891815240_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/up.yaml b/hasura/hasura-migrations/migrations/1582891815240_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/up.yaml deleted file mode 100644 index 4ba1aa3c7..000000000 --- a/hasura/hasura-migrations/migrations/1582891815240_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_treasury_proposal_id - name: onchain_treasury_spend_proposal - remote_field: - treasurySpendProposals: - arguments: - where: - treasuryProposalId: $onchain_treasury_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583160765774_update_permission_proposal_bot_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1583160765774_update_permission_proposal_bot_public_table_onchain_links/down.yaml deleted file mode 100644 index 409dc15e2..000000000 --- a/hasura/hasura-migrations/migrations/1583160765774_update_permission_proposal_bot_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - created_at - - id - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1583160765774_update_permission_proposal_bot_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1583160765774_update_permission_proposal_bot_public_table_onchain_links/up.yaml deleted file mode 100644 index 7823b9b75..000000000 --- a/hasura/hasura-migrations/migrations/1583160765774_update_permission_proposal_bot_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - created_at - - id - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - onchain_treasury_proposal_id - - post_id - - proposer_address - filter: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1583160772808_update_permission_anonymous_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1583160772808_update_permission_anonymous_public_table_onchain_links/down.yaml deleted file mode 100644 index e14a279c4..000000000 --- a/hasura/hasura-migrations/migrations/1583160772808_update_permission_anonymous_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: anonymous - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1583160772808_update_permission_anonymous_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1583160772808_update_permission_anonymous_public_table_onchain_links/up.yaml deleted file mode 100644 index cb032bb66..000000000 --- a/hasura/hasura-migrations/migrations/1583160772808_update_permission_anonymous_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: anonymous - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - onchain_treasury_proposal_id - - post_id - - proposer_address - filter: {} - role: anonymous - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1583160780222_update_permission_user_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1583160780222_update_permission_user_public_table_onchain_links/down.yaml deleted file mode 100644 index 495a2d55f..000000000 --- a/hasura/hasura-migrations/migrations/1583160780222_update_permission_user_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - filter: {} - role: user - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1583160780222_update_permission_user_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1583160780222_update_permission_user_public_table_onchain_links/up.yaml deleted file mode 100644 index 074f3d195..000000000 --- a/hasura/hasura-migrations/migrations/1583160780222_update_permission_user_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: onchain_links - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - onchain_treasury_proposal_id - - post_id - - proposer_address - filter: {} - role: user - table: - name: onchain_links - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1583160793903_update_permission_proposal_bot_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1583160793903_update_permission_proposal_bot_public_table_onchain_links/down.yaml deleted file mode 100644 index 2bdbe6e00..000000000 --- a/hasura/hasura-migrations/migrations/1583160793903_update_permission_proposal_bot_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_insert_permission -- args: - permission: - check: {} - columns: - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - post_id - - proposer_address - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1583160793903_update_permission_proposal_bot_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1583160793903_update_permission_proposal_bot_public_table_onchain_links/up.yaml deleted file mode 100644 index 3e098595d..000000000 --- a/hasura/hasura-migrations/migrations/1583160793903_update_permission_proposal_bot_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_insert_permission -- args: - permission: - check: {} - columns: - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - onchain_treasury_proposal_id - - post_id - - proposer_address - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1583160911479_update_permission_proposal_bot_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1583160911479_update_permission_proposal_bot_public_table_onchain_links/down.yaml deleted file mode 100644 index 722438c2c..000000000 --- a/hasura/hasura-migrations/migrations/1583160911479_update_permission_proposal_bot_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_update_permission -- args: - permission: - columns: - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - filter: {} - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1583160911479_update_permission_proposal_bot_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1583160911479_update_permission_proposal_bot_public_table_onchain_links/up.yaml deleted file mode 100644 index 3e9437133..000000000 --- a/hasura/hasura-migrations/migrations/1583160911479_update_permission_proposal_bot_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_update_permission -- args: - permission: - columns: - - onchain_referendum_id - filter: {} - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1583174810003_update_permission_proposal_bot_public_table_onchain_links/down.yaml b/hasura/hasura-migrations/migrations/1583174810003_update_permission_proposal_bot_public_table_onchain_links/down.yaml deleted file mode 100644 index 3e9437133..000000000 --- a/hasura/hasura-migrations/migrations/1583174810003_update_permission_proposal_bot_public_table_onchain_links/down.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_update_permission -- args: - permission: - columns: - - onchain_referendum_id - filter: {} - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1583174810003_update_permission_proposal_bot_public_table_onchain_links/up.yaml b/hasura/hasura-migrations/migrations/1583174810003_update_permission_proposal_bot_public_table_onchain_links/up.yaml deleted file mode 100644 index b005732ac..000000000 --- a/hasura/hasura-migrations/migrations/1583174810003_update_permission_proposal_bot_public_table_onchain_links/up.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: proposal_bot - table: - name: onchain_links - schema: public - type: drop_update_permission -- args: - permission: - columns: - - onchain_motion_id - - onchain_referendum_id - filter: {} - localPresets: - - key: "" - value: "" - set: {} - role: proposal_bot - table: - name: onchain_links - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1583261325406_alter_table_public_onchain_links_alter_column_onchain_treasury_proposal_id/down.yaml b/hasura/hasura-migrations/migrations/1583261325406_alter_table_public_onchain_links_alter_column_onchain_treasury_proposal_id/down.yaml deleted file mode 100644 index d6ca13798..000000000 --- a/hasura/hasura-migrations/migrations/1583261325406_alter_table_public_onchain_links_alter_column_onchain_treasury_proposal_id/down.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_links" ALTER COLUMN "onchain_treasury_proposal_id" - TYPE integer; - type: run_sql -- args: - sql: ALTER TABLE "public"."onchain_links" ADD CONSTRAINT "onchain_links_onchain_treasury_proposal_id_key" - UNIQUE ("onchain_treasury_proposal_id") - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."onchain_links"."onchain_treasury_proposal_id" - IS E'null' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1583261325406_alter_table_public_onchain_links_alter_column_onchain_treasury_proposal_id/up.yaml b/hasura/hasura-migrations/migrations/1583261325406_alter_table_public_onchain_links_alter_column_onchain_treasury_proposal_id/up.yaml deleted file mode 100644 index 18f16f664..000000000 --- a/hasura/hasura-migrations/migrations/1583261325406_alter_table_public_onchain_links_alter_column_onchain_treasury_proposal_id/up.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - sql: ALTER TABLE "public"."onchain_links" ALTER COLUMN "onchain_treasury_proposal_id" - TYPE int4; - type: run_sql -- args: - sql: ALTER TABLE "public"."onchain_links" DROP CONSTRAINT "onchain_links_onchain_treasury_proposal_id_key" - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."onchain_links"."onchain_treasury_proposal_id" - IS E'' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1583343381115_table_onchain_links_drop_remote_relationship_onchain_referendum/down.yaml b/hasura/hasura-migrations/migrations/1583343381115_table_onchain_links_drop_remote_relationship_onchain_referendum/down.yaml deleted file mode 100644 index bd4b7844a..000000000 --- a/hasura/hasura-migrations/migrations/1583343381115_table_onchain_links_drop_remote_relationship_onchain_referendum/down.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_referendum_id - name: onchain_referendum - remote_field: - referendums: - arguments: - where: - referendumId: $onchain_referendum_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343381115_table_onchain_links_drop_remote_relationship_onchain_referendum/up.yaml b/hasura/hasura-migrations/migrations/1583343381115_table_onchain_links_drop_remote_relationship_onchain_referendum/up.yaml deleted file mode 100644 index 684feba0f..000000000 --- a/hasura/hasura-migrations/migrations/1583343381115_table_onchain_links_drop_remote_relationship_onchain_referendum/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_referendum - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343385618_table_onchain_links_drop_remote_relationship_onchain_motion/down.yaml b/hasura/hasura-migrations/migrations/1583343385618_table_onchain_links_drop_remote_relationship_onchain_motion/down.yaml deleted file mode 100644 index 2b11607d1..000000000 --- a/hasura/hasura-migrations/migrations/1583343385618_table_onchain_links_drop_remote_relationship_onchain_motion/down.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_motion_id - name: onchain_motion - remote_field: - motions: - arguments: - where: - motionProposalId: $onchain_motion_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343385618_table_onchain_links_drop_remote_relationship_onchain_motion/up.yaml b/hasura/hasura-migrations/migrations/1583343385618_table_onchain_links_drop_remote_relationship_onchain_motion/up.yaml deleted file mode 100644 index 62019683c..000000000 --- a/hasura/hasura-migrations/migrations/1583343385618_table_onchain_links_drop_remote_relationship_onchain_motion/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_motion - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343390568_table_onchain_links_drop_remote_relationship_onchain_proposal/down.yaml b/hasura/hasura-migrations/migrations/1583343390568_table_onchain_links_drop_remote_relationship_onchain_proposal/down.yaml deleted file mode 100644 index e7d5c6e8f..000000000 --- a/hasura/hasura-migrations/migrations/1583343390568_table_onchain_links_drop_remote_relationship_onchain_proposal/down.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - name: onchain_proposal - remote_field: - proposals: - arguments: - where: - proposalId: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343390568_table_onchain_links_drop_remote_relationship_onchain_proposal/up.yaml b/hasura/hasura-migrations/migrations/1583343390568_table_onchain_links_drop_remote_relationship_onchain_proposal/up.yaml deleted file mode 100644 index f711faf55..000000000 --- a/hasura/hasura-migrations/migrations/1583343390568_table_onchain_links_drop_remote_relationship_onchain_proposal/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_proposal - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343434377_table_onchain_links_drop_remote_relationship_onchain_treasury_spend_proposal/down.yaml b/hasura/hasura-migrations/migrations/1583343434377_table_onchain_links_drop_remote_relationship_onchain_treasury_spend_proposal/down.yaml deleted file mode 100644 index 4ba1aa3c7..000000000 --- a/hasura/hasura-migrations/migrations/1583343434377_table_onchain_links_drop_remote_relationship_onchain_treasury_spend_proposal/down.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_treasury_proposal_id - name: onchain_treasury_spend_proposal - remote_field: - treasurySpendProposals: - arguments: - where: - treasuryProposalId: $onchain_treasury_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343434377_table_onchain_links_drop_remote_relationship_onchain_treasury_spend_proposal/up.yaml b/hasura/hasura-migrations/migrations/1583343434377_table_onchain_links_drop_remote_relationship_onchain_treasury_spend_proposal/up.yaml deleted file mode 100644 index a84811e1a..000000000 --- a/hasura/hasura-migrations/migrations/1583343434377_table_onchain_links_drop_remote_relationship_onchain_treasury_spend_proposal/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_treasury_spend_proposal - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343458805_remove_remote_schema_chain-db/down.yaml b/hasura/hasura-migrations/migrations/1583343458805_remove_remote_schema_chain-db/down.yaml deleted file mode 100644 index b4e60f395..000000000 --- a/hasura/hasura-migrations/migrations/1583343458805_remove_remote_schema_chain-db/down.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - definition: - forward_client_headers: true - headers: [] - url: null - url_from_env: HASURA_CHAIN_DB_REMOTE_SCHEMA - name: chain-db - type: add_remote_schema diff --git a/hasura/hasura-migrations/migrations/1583343458805_remove_remote_schema_chain-db/up.yaml b/hasura/hasura-migrations/migrations/1583343458805_remove_remote_schema_chain-db/up.yaml deleted file mode 100644 index 7d557876b..000000000 --- a/hasura/hasura-migrations/migrations/1583343458805_remove_remote_schema_chain-db/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - name: chain-db - type: remove_remote_schema diff --git a/hasura/hasura-migrations/migrations/1583343552059_create_remote_schema_chain-db/down.yaml b/hasura/hasura-migrations/migrations/1583343552059_create_remote_schema_chain-db/down.yaml deleted file mode 100644 index 7d557876b..000000000 --- a/hasura/hasura-migrations/migrations/1583343552059_create_remote_schema_chain-db/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - name: chain-db - type: remove_remote_schema diff --git a/hasura/hasura-migrations/migrations/1583343552059_create_remote_schema_chain-db/up.yaml b/hasura/hasura-migrations/migrations/1583343552059_create_remote_schema_chain-db/up.yaml deleted file mode 100644 index 7ea8dced6..000000000 --- a/hasura/hasura-migrations/migrations/1583343552059_create_remote_schema_chain-db/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - definition: - forward_client_headers: true - headers: [] - timeout_seconds: 60 - url_from_env: HASURA_CHAIN_DB_REMOTE_SCHEMA - name: chain-db - type: add_remote_schema diff --git a/hasura/hasura-migrations/migrations/1583343614940_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml b/hasura/hasura-migrations/migrations/1583343614940_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml deleted file mode 100644 index 684feba0f..000000000 --- a/hasura/hasura-migrations/migrations/1583343614940_table_onchain_links_create_remote_relationship_onchain_referendum/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_referendum - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343614940_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml b/hasura/hasura-migrations/migrations/1583343614940_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml deleted file mode 100644 index bd4b7844a..000000000 --- a/hasura/hasura-migrations/migrations/1583343614940_table_onchain_links_create_remote_relationship_onchain_referendum/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_referendum_id - name: onchain_referendum - remote_field: - referendums: - arguments: - where: - referendumId: $onchain_referendum_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343651816_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml b/hasura/hasura-migrations/migrations/1583343651816_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml deleted file mode 100644 index 62019683c..000000000 --- a/hasura/hasura-migrations/migrations/1583343651816_table_onchain_links_create_remote_relationship_onchain_motion/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_motion - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343651816_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml b/hasura/hasura-migrations/migrations/1583343651816_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml deleted file mode 100644 index 2b11607d1..000000000 --- a/hasura/hasura-migrations/migrations/1583343651816_table_onchain_links_create_remote_relationship_onchain_motion/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_motion_id - name: onchain_motion - remote_field: - motions: - arguments: - where: - motionProposalId: $onchain_motion_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343703170_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml b/hasura/hasura-migrations/migrations/1583343703170_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml deleted file mode 100644 index f711faf55..000000000 --- a/hasura/hasura-migrations/migrations/1583343703170_table_onchain_links_create_remote_relationship_onchain_proposal/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_proposal - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343703170_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml b/hasura/hasura-migrations/migrations/1583343703170_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml deleted file mode 100644 index e7d5c6e8f..000000000 --- a/hasura/hasura-migrations/migrations/1583343703170_table_onchain_links_create_remote_relationship_onchain_proposal/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_proposal_id - name: onchain_proposal - remote_field: - proposals: - arguments: - where: - proposalId: $onchain_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343780587_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/down.yaml b/hasura/hasura-migrations/migrations/1583343780587_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/down.yaml deleted file mode 100644 index a84811e1a..000000000 --- a/hasura/hasura-migrations/migrations/1583343780587_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: onchain_treasury_spend_proposal - table: - name: onchain_links - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583343780587_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/up.yaml b/hasura/hasura-migrations/migrations/1583343780587_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/up.yaml deleted file mode 100644 index 4ba1aa3c7..000000000 --- a/hasura/hasura-migrations/migrations/1583343780587_table_onchain_links_create_remote_relationship_onchain_treasury_spend_proposal/up.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- args: - hasura_fields: - - onchain_treasury_proposal_id - name: onchain_treasury_spend_proposal - remote_field: - treasurySpendProposals: - arguments: - where: - treasuryProposalId: $onchain_treasury_proposal_id - remote_schema: chain-db - table: - name: onchain_links - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1583398528688_modify_tr_onchain_link_create_ops/down.yaml b/hasura/hasura-migrations/migrations/1583398528688_modify_tr_onchain_link_create_ops/down.yaml deleted file mode 100644 index cff419965..000000000 --- a/hasura/hasura-migrations/migrations/1583398528688_modify_tr_onchain_link_create_ops/down.yaml +++ /dev/null @@ -1,18 +0,0 @@ -- args: - enable_manual: false - headers: - - name: HASURA_EVENT_SECRET - value_from_env: HASURA_EVENT_SECRET - insert: - columns: '*' - name: onchain_link_create - replace: true - retry_conf: - interval_sec: 10 - num_retries: 0 - timeout_sec: 60 - table: - name: onchain_links - schema: public - webhook_from_env: HASURA_ONCHAIN_LINK_CREATE_HOOK - type: create_event_trigger diff --git a/hasura/hasura-migrations/migrations/1583398528688_modify_tr_onchain_link_create_ops/up.yaml b/hasura/hasura-migrations/migrations/1583398528688_modify_tr_onchain_link_create_ops/up.yaml deleted file mode 100644 index 0979fc050..000000000 --- a/hasura/hasura-migrations/migrations/1583398528688_modify_tr_onchain_link_create_ops/up.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- args: - enable_manual: false - headers: - - name: HASURA_EVENT_SECRET - value_from_env: HASURA_EVENT_SECRET - insert: - columns: '*' - name: onchain_link_create - replace: true - retry_conf: - interval_sec: 10 - num_retries: 0 - timeout_sec: 60 - table: - name: onchain_links - schema: public - update: - columns: - - id - - onchain_motion_id - - onchain_proposal_id - - onchain_referendum_id - - onchain_treasury_proposal_id - - post_id - - proposer_address - - created_at - webhook_from_env: HASURA_ONCHAIN_LINK_CREATE_HOOK - type: create_event_trigger diff --git a/hasura/hasura-migrations/migrations/1584428358108_create_table_public_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584428358108_create_table_public_reactions/down.yaml deleted file mode 100644 index 3f66bdee0..000000000 --- a/hasura/hasura-migrations/migrations/1584428358108_create_table_public_reactions/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: DROP TABLE "public"."reactions" - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1584428358108_create_table_public_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584428358108_create_table_public_reactions/up.yaml deleted file mode 100644 index d37ebcf20..000000000 --- a/hasura/hasura-migrations/migrations/1584428358108_create_table_public_reactions/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - sql: CREATE TABLE "public"."reactions"("id" serial NOT NULL, "reaction" char NOT - NULL, PRIMARY KEY ("id") , UNIQUE ("id"), UNIQUE ("reaction")); - type: run_sql -- args: - name: reactions - schema: public - type: add_existing_table_or_view diff --git a/hasura/hasura-migrations/migrations/1584429477420_create_table_public_post_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584429477420_create_table_public_post_reactions/down.yaml deleted file mode 100644 index 35be52b37..000000000 --- a/hasura/hasura-migrations/migrations/1584429477420_create_table_public_post_reactions/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: DROP TABLE "public"."post_reactions" - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1584429477420_create_table_public_post_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584429477420_create_table_public_post_reactions/up.yaml deleted file mode 100644 index ef78ca84e..000000000 --- a/hasura/hasura-migrations/migrations/1584429477420_create_table_public_post_reactions/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - sql: CREATE TABLE "public"."post_reactions"("id" serial NOT NULL, "post_id" integer - NOT NULL, "user_id" integer NOT NULL, "reaction_id" integer NOT NULL, "created_at" - timestamp NOT NULL DEFAULT now(), "updated_at" timestamp NOT NULL DEFAULT now(), - PRIMARY KEY ("id") , FOREIGN KEY ("post_id") REFERENCES "public"."posts"("id") - ON UPDATE cascade ON DELETE cascade, FOREIGN KEY ("reaction_id") REFERENCES - "public"."reactions"("id") ON UPDATE cascade ON DELETE cascade, UNIQUE ("id")); - type: run_sql -- args: - name: post_reactions - schema: public - type: add_existing_table_or_view diff --git a/hasura/hasura-migrations/migrations/1584429556118_table_post_reactions_create_remote_relationship_reactor/down.yaml b/hasura/hasura-migrations/migrations/1584429556118_table_post_reactions_create_remote_relationship_reactor/down.yaml deleted file mode 100644 index 81e432dfb..000000000 --- a/hasura/hasura-migrations/migrations/1584429556118_table_post_reactions_create_remote_relationship_reactor/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: reactor - table: - name: post_reactions - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1584429556118_table_post_reactions_create_remote_relationship_reactor/up.yaml b/hasura/hasura-migrations/migrations/1584429556118_table_post_reactions_create_remote_relationship_reactor/up.yaml deleted file mode 100644 index 18f1e462f..000000000 --- a/hasura/hasura-migrations/migrations/1584429556118_table_post_reactions_create_remote_relationship_reactor/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - user_id - name: reactor - remote_field: - user: - arguments: - id: $user_id - remote_schema: auth - table: - name: post_reactions - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1584430212995_create_table_public_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584430212995_create_table_public_comment_reactions/down.yaml deleted file mode 100644 index eb87c9b37..000000000 --- a/hasura/hasura-migrations/migrations/1584430212995_create_table_public_comment_reactions/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: DROP TABLE "public"."comment_reactions" - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1584430212995_create_table_public_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584430212995_create_table_public_comment_reactions/up.yaml deleted file mode 100644 index 54f2d4ad7..000000000 --- a/hasura/hasura-migrations/migrations/1584430212995_create_table_public_comment_reactions/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - sql: CREATE TABLE "public"."comment_reactions"("id" serial NOT NULL, "comment_id" - uuid NOT NULL, "user_id" integer NOT NULL, "reaction_id" integer NOT NULL, "created_at" - timestamp NOT NULL DEFAULT now(), "updated_at" timestamp NOT NULL DEFAULT now(), - PRIMARY KEY ("id") , FOREIGN KEY ("comment_id") REFERENCES "public"."comments"("id") - ON UPDATE cascade ON DELETE cascade, FOREIGN KEY ("reaction_id") REFERENCES - "public"."reactions"("id") ON UPDATE cascade ON DELETE cascade, UNIQUE ("id")); - type: run_sql -- args: - name: comment_reactions - schema: public - type: add_existing_table_or_view diff --git a/hasura/hasura-migrations/migrations/1584430241194_table_comment_reactions_create_remote_relationship_reactor/down.yaml b/hasura/hasura-migrations/migrations/1584430241194_table_comment_reactions_create_remote_relationship_reactor/down.yaml deleted file mode 100644 index ab5d21796..000000000 --- a/hasura/hasura-migrations/migrations/1584430241194_table_comment_reactions_create_remote_relationship_reactor/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: reactor - table: - name: comment_reactions - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1584430241194_table_comment_reactions_create_remote_relationship_reactor/up.yaml b/hasura/hasura-migrations/migrations/1584430241194_table_comment_reactions_create_remote_relationship_reactor/up.yaml deleted file mode 100644 index d828a9b96..000000000 --- a/hasura/hasura-migrations/migrations/1584430241194_table_comment_reactions_create_remote_relationship_reactor/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - user_id - name: reactor - remote_field: - user: - arguments: - id: $user_id - remote_schema: auth - table: - name: comment_reactions - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1584430355283_update_permission_anonymous_public_table_post_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584430355283_update_permission_anonymous_public_table_post_reactions/down.yaml deleted file mode 100644 index 19323801b..000000000 --- a/hasura/hasura-migrations/migrations/1584430355283_update_permission_anonymous_public_table_post_reactions/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: post_reactions - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1584430355283_update_permission_anonymous_public_table_post_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584430355283_update_permission_anonymous_public_table_post_reactions/up.yaml deleted file mode 100644 index 68c419c3c..000000000 --- a/hasura/hasura-migrations/migrations/1584430355283_update_permission_anonymous_public_table_post_reactions/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - permission: - allow_aggregations: true - columns: - - id - - post_id - - user_id - - reaction_id - - created_at - - updated_at - filter: {} - limit: null - role: anonymous - table: - name: post_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1584430935514_update_permission_user_public_table_post_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584430935514_update_permission_user_public_table_post_reactions/down.yaml deleted file mode 100644 index 665b0f795..000000000 --- a/hasura/hasura-migrations/migrations/1584430935514_update_permission_user_public_table_post_reactions/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: post_reactions - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1584430935514_update_permission_user_public_table_post_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584430935514_update_permission_user_public_table_post_reactions/up.yaml deleted file mode 100644 index f7c88370c..000000000 --- a/hasura/hasura-migrations/migrations/1584430935514_update_permission_user_public_table_post_reactions/up.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- args: - permission: - allow_upsert: true - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - post_id - - reaction_id - - user_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: post_reactions - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1584430958467_update_permission_user_public_table_post_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584430958467_update_permission_user_public_table_post_reactions/down.yaml deleted file mode 100644 index 4e1bc4052..000000000 --- a/hasura/hasura-migrations/migrations/1584430958467_update_permission_user_public_table_post_reactions/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: post_reactions - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1584430958467_update_permission_user_public_table_post_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584430958467_update_permission_user_public_table_post_reactions/up.yaml deleted file mode 100644 index 5d7413e1e..000000000 --- a/hasura/hasura-migrations/migrations/1584430958467_update_permission_user_public_table_post_reactions/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - id - - post_id - - reaction_id - - user_id - - created_at - - updated_at - filter: {} - limit: null - role: user - table: - name: post_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1584431036619_apply_same_permissions_public_table_post_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584431036619_apply_same_permissions_public_table_post_reactions/down.yaml deleted file mode 100644 index 8d7da9520..000000000 --- a/hasura/hasura-migrations/migrations/1584431036619_apply_same_permissions_public_table_post_reactions/down.yaml +++ /dev/null @@ -1,36 +0,0 @@ -- args: - role: user - table: - name: post_reactions - schema: public - type: drop_update_permission -- args: - role: user - table: - name: post_reactions - schema: public - type: drop_delete_permission -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - post_id - - reaction_id - - user_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: post_reactions - schema: public - type: create_insert_permission -- args: - role: user - table: - name: post_reactions - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1584431036619_apply_same_permissions_public_table_post_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584431036619_apply_same_permissions_public_table_post_reactions/up.yaml deleted file mode 100644 index 0cc341715..000000000 --- a/hasura/hasura-migrations/migrations/1584431036619_apply_same_permissions_public_table_post_reactions/up.yaml +++ /dev/null @@ -1,66 +0,0 @@ -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - post_id - - reaction_id - - user_id - filter: - user_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: post_reactions - schema: public - type: create_update_permission -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - post_id - - reaction_id - - user_id - filter: - user_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: post_reactions - schema: public - type: create_delete_permission -- args: - role: user - table: - name: post_reactions - schema: public - type: drop_insert_permission -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - post_id - - reaction_id - - user_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: post_reactions - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1584431116589_update_permission_anonymous_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584431116589_update_permission_anonymous_public_table_comment_reactions/down.yaml deleted file mode 100644 index 7ffd4e815..000000000 --- a/hasura/hasura-migrations/migrations/1584431116589_update_permission_anonymous_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: comment_reactions - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1584431116589_update_permission_anonymous_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584431116589_update_permission_anonymous_public_table_comment_reactions/up.yaml deleted file mode 100644 index 154cbf7b4..000000000 --- a/hasura/hasura-migrations/migrations/1584431116589_update_permission_anonymous_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - permission: - allow_aggregations: true - columns: - - id - - comment_id - - user_id - - reaction_id - - created_at - - updated_at - filter: {} - limit: null - role: anonymous - table: - name: comment_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1584431155471_update_permission_user_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584431155471_update_permission_user_public_table_comment_reactions/down.yaml deleted file mode 100644 index c2451e0b0..000000000 --- a/hasura/hasura-migrations/migrations/1584431155471_update_permission_user_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1584431155471_update_permission_user_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584431155471_update_permission_user_public_table_comment_reactions/up.yaml deleted file mode 100644 index 56d4b3621..000000000 --- a/hasura/hasura-migrations/migrations/1584431155471_update_permission_user_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- args: - permission: - allow_upsert: true - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - comment_id - - reaction_id - - user_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1584431166239_update_permission_user_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584431166239_update_permission_user_public_table_comment_reactions/down.yaml deleted file mode 100644 index 9a3058e98..000000000 --- a/hasura/hasura-migrations/migrations/1584431166239_update_permission_user_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1584431166239_update_permission_user_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584431166239_update_permission_user_public_table_comment_reactions/up.yaml deleted file mode 100644 index 7f220af59..000000000 --- a/hasura/hasura-migrations/migrations/1584431166239_update_permission_user_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - permission: - allow_aggregations: true - columns: - - id - - reaction_id - - user_id - - created_at - - updated_at - - comment_id - filter: {} - limit: null - role: user - table: - name: comment_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1584431196039_apply_same_permissions_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584431196039_apply_same_permissions_public_table_comment_reactions/down.yaml deleted file mode 100644 index 0edcd7bad..000000000 --- a/hasura/hasura-migrations/migrations/1584431196039_apply_same_permissions_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,36 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_update_permission -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_delete_permission -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - comment_id - - reaction_id - - user_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_insert_permission -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1584431196039_apply_same_permissions_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584431196039_apply_same_permissions_public_table_comment_reactions/up.yaml deleted file mode 100644 index ee9722051..000000000 --- a/hasura/hasura-migrations/migrations/1584431196039_apply_same_permissions_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,66 +0,0 @@ -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - comment_id - - reaction_id - - user_id - filter: - user_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_update_permission -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - comment_id - - reaction_id - - user_id - filter: - user_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_delete_permission -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_insert_permission -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - comment_id - - reaction_id - - user_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1584439444388_add_relationship__table_public_posts/down.yaml b/hasura/hasura-migrations/migrations/1584439444388_add_relationship__table_public_posts/down.yaml deleted file mode 100644 index 21307568b..000000000 --- a/hasura/hasura-migrations/migrations/1584439444388_add_relationship__table_public_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post_reactions - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1584439444388_add_relationship__table_public_posts/up.yaml b/hasura/hasura-migrations/migrations/1584439444388_add_relationship__table_public_posts/up.yaml deleted file mode 100644 index 8625c8b3a..000000000 --- a/hasura/hasura-migrations/migrations/1584439444388_add_relationship__table_public_posts/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: post_reactions - table: - name: posts - schema: public - using: - foreign_key_constraint_on: - column: post_id - table: - name: post_reactions - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1584439484406_add_relationship__table_public_comments/down.yaml b/hasura/hasura-migrations/migrations/1584439484406_add_relationship__table_public_comments/down.yaml deleted file mode 100644 index 3ee95c7d0..000000000 --- a/hasura/hasura-migrations/migrations/1584439484406_add_relationship__table_public_comments/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: comment_reactions - table: - name: comments - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1584439484406_add_relationship__table_public_comments/up.yaml b/hasura/hasura-migrations/migrations/1584439484406_add_relationship__table_public_comments/up.yaml deleted file mode 100644 index 1db8013b0..000000000 --- a/hasura/hasura-migrations/migrations/1584439484406_add_relationship__table_public_comments/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: comment_reactions - table: - name: comments - schema: public - using: - foreign_key_constraint_on: - column: comment_id - table: - name: comment_reactions - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1584439635410_add_relationship__table_public_post_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584439635410_add_relationship__table_public_post_reactions/down.yaml deleted file mode 100644 index c95ab7d7f..000000000 --- a/hasura/hasura-migrations/migrations/1584439635410_add_relationship__table_public_post_reactions/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post - table: - name: post_reactions - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1584439635410_add_relationship__table_public_post_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584439635410_add_relationship__table_public_post_reactions/up.yaml deleted file mode 100644 index de5330557..000000000 --- a/hasura/hasura-migrations/migrations/1584439635410_add_relationship__table_public_post_reactions/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: post - table: - name: post_reactions - schema: public - using: - foreign_key_constraint_on: post_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1584439640242_add_relationship__table_public_post_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584439640242_add_relationship__table_public_post_reactions/down.yaml deleted file mode 100644 index 77249e251..000000000 --- a/hasura/hasura-migrations/migrations/1584439640242_add_relationship__table_public_post_reactions/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: reaction - table: - name: post_reactions - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1584439640242_add_relationship__table_public_post_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584439640242_add_relationship__table_public_post_reactions/up.yaml deleted file mode 100644 index c403c85f1..000000000 --- a/hasura/hasura-migrations/migrations/1584439640242_add_relationship__table_public_post_reactions/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: reaction - table: - name: post_reactions - schema: public - using: - foreign_key_constraint_on: reaction_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1584439647720_add_relationship__table_public_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584439647720_add_relationship__table_public_comment_reactions/down.yaml deleted file mode 100644 index 279258b62..000000000 --- a/hasura/hasura-migrations/migrations/1584439647720_add_relationship__table_public_comment_reactions/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: comment - table: - name: comment_reactions - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1584439647720_add_relationship__table_public_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584439647720_add_relationship__table_public_comment_reactions/up.yaml deleted file mode 100644 index ba26207fe..000000000 --- a/hasura/hasura-migrations/migrations/1584439647720_add_relationship__table_public_comment_reactions/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: comment - table: - name: comment_reactions - schema: public - using: - foreign_key_constraint_on: comment_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1584439650411_add_relationship__table_public_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584439650411_add_relationship__table_public_comment_reactions/down.yaml deleted file mode 100644 index ed045b92a..000000000 --- a/hasura/hasura-migrations/migrations/1584439650411_add_relationship__table_public_comment_reactions/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: reaction - table: - name: comment_reactions - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1584439650411_add_relationship__table_public_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584439650411_add_relationship__table_public_comment_reactions/up.yaml deleted file mode 100644 index 23f5468d1..000000000 --- a/hasura/hasura-migrations/migrations/1584439650411_add_relationship__table_public_comment_reactions/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: reaction - table: - name: comment_reactions - schema: public - using: - foreign_key_constraint_on: reaction_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1584439741599_rename_relationship_post_reactions_to_reactions_schema_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1584439741599_rename_relationship_post_reactions_to_reactions_schema_public_table_posts/down.yaml deleted file mode 100644 index 79e3819c7..000000000 --- a/hasura/hasura-migrations/migrations/1584439741599_rename_relationship_post_reactions_to_reactions_schema_public_table_posts/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: reactions - new_name: post_reactions - table: - name: posts - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1584439741599_rename_relationship_post_reactions_to_reactions_schema_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1584439741599_rename_relationship_post_reactions_to_reactions_schema_public_table_posts/up.yaml deleted file mode 100644 index 60ca076a5..000000000 --- a/hasura/hasura-migrations/migrations/1584439741599_rename_relationship_post_reactions_to_reactions_schema_public_table_posts/up.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: post_reactions - new_name: reactions - table: - name: posts - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1584439752764_rename_relationship_comment_reactions_to_reactions_schema_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1584439752764_rename_relationship_comment_reactions_to_reactions_schema_public_table_comments/down.yaml deleted file mode 100644 index 9dd775d08..000000000 --- a/hasura/hasura-migrations/migrations/1584439752764_rename_relationship_comment_reactions_to_reactions_schema_public_table_comments/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: reactions - new_name: comment_reactions - table: - name: comments - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1584439752764_rename_relationship_comment_reactions_to_reactions_schema_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1584439752764_rename_relationship_comment_reactions_to_reactions_schema_public_table_comments/up.yaml deleted file mode 100644 index b26428491..000000000 --- a/hasura/hasura-migrations/migrations/1584439752764_rename_relationship_comment_reactions_to_reactions_schema_public_table_comments/up.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: comment_reactions - new_name: reactions - table: - name: comments - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1584446493586_rename_relationship_reactions_to_post_reactions_schema_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1584446493586_rename_relationship_reactions_to_post_reactions_schema_public_table_posts/down.yaml deleted file mode 100644 index 60ca076a5..000000000 --- a/hasura/hasura-migrations/migrations/1584446493586_rename_relationship_reactions_to_post_reactions_schema_public_table_posts/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: post_reactions - new_name: reactions - table: - name: posts - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1584446493586_rename_relationship_reactions_to_post_reactions_schema_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1584446493586_rename_relationship_reactions_to_post_reactions_schema_public_table_posts/up.yaml deleted file mode 100644 index 79e3819c7..000000000 --- a/hasura/hasura-migrations/migrations/1584446493586_rename_relationship_reactions_to_post_reactions_schema_public_table_posts/up.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: reactions - new_name: post_reactions - table: - name: posts - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1584446531681_rename_relationship_reactions_to_comment_reactions_schema_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1584446531681_rename_relationship_reactions_to_comment_reactions_schema_public_table_comments/down.yaml deleted file mode 100644 index b26428491..000000000 --- a/hasura/hasura-migrations/migrations/1584446531681_rename_relationship_reactions_to_comment_reactions_schema_public_table_comments/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: comment_reactions - new_name: reactions - table: - name: comments - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1584446531681_rename_relationship_reactions_to_comment_reactions_schema_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1584446531681_rename_relationship_reactions_to_comment_reactions_schema_public_table_comments/up.yaml deleted file mode 100644 index 9dd775d08..000000000 --- a/hasura/hasura-migrations/migrations/1584446531681_rename_relationship_reactions_to_comment_reactions_schema_public_table_comments/up.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - name: reactions - new_name: comment_reactions - table: - name: comments - schema: public - type: rename_relationship diff --git a/hasura/hasura-migrations/migrations/1584533428256_update_permission_anonymous_public_table_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584533428256_update_permission_anonymous_public_table_reactions/down.yaml deleted file mode 100644 index d0fbe9834..000000000 --- a/hasura/hasura-migrations/migrations/1584533428256_update_permission_anonymous_public_table_reactions/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: reactions - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1584533428256_update_permission_anonymous_public_table_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584533428256_update_permission_anonymous_public_table_reactions/up.yaml deleted file mode 100644 index 9950a7fc4..000000000 --- a/hasura/hasura-migrations/migrations/1584533428256_update_permission_anonymous_public_table_reactions/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - permission: - allow_aggregations: true - columns: - - id - - reaction - filter: {} - limit: null - role: anonymous - table: - name: reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1584533441059_update_permission_user_public_table_reactions/down.yaml b/hasura/hasura-migrations/migrations/1584533441059_update_permission_user_public_table_reactions/down.yaml deleted file mode 100644 index fee41d61a..000000000 --- a/hasura/hasura-migrations/migrations/1584533441059_update_permission_user_public_table_reactions/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: reactions - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1584533441059_update_permission_user_public_table_reactions/up.yaml b/hasura/hasura-migrations/migrations/1584533441059_update_permission_user_public_table_reactions/up.yaml deleted file mode 100644 index 473ee25c5..000000000 --- a/hasura/hasura-migrations/migrations/1584533441059_update_permission_user_public_table_reactions/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - permission: - allow_aggregations: true - columns: - - reaction - - id - filter: {} - limit: null - role: user - table: - name: reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1584616062898_create_relationship_reactions_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1584616062898_create_relationship_reactions_public_table_comments/down.yaml deleted file mode 100644 index 14e9c6b91..000000000 --- a/hasura/hasura-migrations/migrations/1584616062898_create_relationship_reactions_public_table_comments/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: reactions - table: - name: comments - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1584616062898_create_relationship_reactions_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1584616062898_create_relationship_reactions_public_table_comments/up.yaml deleted file mode 100644 index 66fa83891..000000000 --- a/hasura/hasura-migrations/migrations/1584616062898_create_relationship_reactions_public_table_comments/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: reactions - table: - name: comments - schema: public - using: - manual_configuration: - column_mapping: {} - remote_table: - name: reactions - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1584616073168_create_relationship_reactions_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1584616073168_create_relationship_reactions_public_table_posts/down.yaml deleted file mode 100644 index fb1697ea1..000000000 --- a/hasura/hasura-migrations/migrations/1584616073168_create_relationship_reactions_public_table_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: reactions - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1584616073168_create_relationship_reactions_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1584616073168_create_relationship_reactions_public_table_posts/up.yaml deleted file mode 100644 index 32038b2f8..000000000 --- a/hasura/hasura-migrations/migrations/1584616073168_create_relationship_reactions_public_table_posts/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: reactions - table: - name: posts - schema: public - using: - manual_configuration: - column_mapping: {} - remote_table: - name: reactions - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1584704715110_table_comment_reactions_drop_remote_relationship_reactor/down.yaml b/hasura/hasura-migrations/migrations/1584704715110_table_comment_reactions_drop_remote_relationship_reactor/down.yaml deleted file mode 100644 index d828a9b96..000000000 --- a/hasura/hasura-migrations/migrations/1584704715110_table_comment_reactions_drop_remote_relationship_reactor/down.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - user_id - name: reactor - remote_field: - user: - arguments: - id: $user_id - remote_schema: auth - table: - name: comment_reactions - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1584704715110_table_comment_reactions_drop_remote_relationship_reactor/up.yaml b/hasura/hasura-migrations/migrations/1584704715110_table_comment_reactions_drop_remote_relationship_reactor/up.yaml deleted file mode 100644 index ab5d21796..000000000 --- a/hasura/hasura-migrations/migrations/1584704715110_table_comment_reactions_drop_remote_relationship_reactor/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: reactor - table: - name: comment_reactions - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1584704749958_table_comment_reactions_create_remote_relationship_reacting_user/down.yaml b/hasura/hasura-migrations/migrations/1584704749958_table_comment_reactions_create_remote_relationship_reacting_user/down.yaml deleted file mode 100644 index de6fd08a4..000000000 --- a/hasura/hasura-migrations/migrations/1584704749958_table_comment_reactions_create_remote_relationship_reacting_user/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: reacting_user - table: - name: comment_reactions - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1584704749958_table_comment_reactions_create_remote_relationship_reacting_user/up.yaml b/hasura/hasura-migrations/migrations/1584704749958_table_comment_reactions_create_remote_relationship_reacting_user/up.yaml deleted file mode 100644 index 0e5f1d7e6..000000000 --- a/hasura/hasura-migrations/migrations/1584704749958_table_comment_reactions_create_remote_relationship_reacting_user/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - user_id - name: reacting_user - remote_field: - user: - arguments: - id: $user_id - remote_schema: auth - table: - name: comment_reactions - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1584704765149_table_post_reactions_drop_remote_relationship_reactor/down.yaml b/hasura/hasura-migrations/migrations/1584704765149_table_post_reactions_drop_remote_relationship_reactor/down.yaml deleted file mode 100644 index 18f1e462f..000000000 --- a/hasura/hasura-migrations/migrations/1584704765149_table_post_reactions_drop_remote_relationship_reactor/down.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - user_id - name: reactor - remote_field: - user: - arguments: - id: $user_id - remote_schema: auth - table: - name: post_reactions - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1584704765149_table_post_reactions_drop_remote_relationship_reactor/up.yaml b/hasura/hasura-migrations/migrations/1584704765149_table_post_reactions_drop_remote_relationship_reactor/up.yaml deleted file mode 100644 index 81e432dfb..000000000 --- a/hasura/hasura-migrations/migrations/1584704765149_table_post_reactions_drop_remote_relationship_reactor/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: reactor - table: - name: post_reactions - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1584704783342_table_post_reactions_create_remote_relationship_reacting_user/down.yaml b/hasura/hasura-migrations/migrations/1584704783342_table_post_reactions_create_remote_relationship_reacting_user/down.yaml deleted file mode 100644 index 604b2ff0e..000000000 --- a/hasura/hasura-migrations/migrations/1584704783342_table_post_reactions_create_remote_relationship_reacting_user/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: reacting_user - table: - name: post_reactions - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1584704783342_table_post_reactions_create_remote_relationship_reacting_user/up.yaml b/hasura/hasura-migrations/migrations/1584704783342_table_post_reactions_create_remote_relationship_reacting_user/up.yaml deleted file mode 100644 index ba692f1a8..000000000 --- a/hasura/hasura-migrations/migrations/1584704783342_table_post_reactions_create_remote_relationship_reacting_user/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - user_id - name: reacting_user - remote_field: - user: - arguments: - id: $user_id - remote_schema: auth - table: - name: post_reactions - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1585070080311_drop_relationship_reactions_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1585070080311_drop_relationship_reactions_public_table_posts/down.yaml deleted file mode 100644 index 32038b2f8..000000000 --- a/hasura/hasura-migrations/migrations/1585070080311_drop_relationship_reactions_public_table_posts/down.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: reactions - table: - name: posts - schema: public - using: - manual_configuration: - column_mapping: {} - remote_table: - name: reactions - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1585070080311_drop_relationship_reactions_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1585070080311_drop_relationship_reactions_public_table_posts/up.yaml deleted file mode 100644 index fb1697ea1..000000000 --- a/hasura/hasura-migrations/migrations/1585070080311_drop_relationship_reactions_public_table_posts/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: reactions - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1585070102064_drop_relationship_reactions_public_table_comments/down.yaml b/hasura/hasura-migrations/migrations/1585070102064_drop_relationship_reactions_public_table_comments/down.yaml deleted file mode 100644 index 66fa83891..000000000 --- a/hasura/hasura-migrations/migrations/1585070102064_drop_relationship_reactions_public_table_comments/down.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: reactions - table: - name: comments - schema: public - using: - manual_configuration: - column_mapping: {} - remote_table: - name: reactions - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1585070102064_drop_relationship_reactions_public_table_comments/up.yaml b/hasura/hasura-migrations/migrations/1585070102064_drop_relationship_reactions_public_table_comments/up.yaml deleted file mode 100644 index 14e9c6b91..000000000 --- a/hasura/hasura-migrations/migrations/1585070102064_drop_relationship_reactions_public_table_comments/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: reactions - table: - name: comments - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1585070136784_drop_relationship_reaction_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070136784_drop_relationship_reaction_public_table_comment_reactions/down.yaml deleted file mode 100644 index 23f5468d1..000000000 --- a/hasura/hasura-migrations/migrations/1585070136784_drop_relationship_reaction_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: reaction - table: - name: comment_reactions - schema: public - using: - foreign_key_constraint_on: reaction_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1585070136784_drop_relationship_reaction_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070136784_drop_relationship_reaction_public_table_comment_reactions/up.yaml deleted file mode 100644 index ed045b92a..000000000 --- a/hasura/hasura-migrations/migrations/1585070136784_drop_relationship_reaction_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: reaction - table: - name: comment_reactions - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1585070151364_drop_relationship_reaction_public_table_post_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070151364_drop_relationship_reaction_public_table_post_reactions/down.yaml deleted file mode 100644 index c403c85f1..000000000 --- a/hasura/hasura-migrations/migrations/1585070151364_drop_relationship_reaction_public_table_post_reactions/down.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: reaction - table: - name: post_reactions - schema: public - using: - foreign_key_constraint_on: reaction_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1585070151364_drop_relationship_reaction_public_table_post_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070151364_drop_relationship_reaction_public_table_post_reactions/up.yaml deleted file mode 100644 index 77249e251..000000000 --- a/hasura/hasura-migrations/migrations/1585070151364_drop_relationship_reaction_public_table_post_reactions/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: reaction - table: - name: post_reactions - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1585070246777_delete_fk_public_post_reactions_post_reactions_reaction_id_fkey/down.yaml b/hasura/hasura-migrations/migrations/1585070246777_delete_fk_public_post_reactions_post_reactions_reaction_id_fkey/down.yaml deleted file mode 100644 index 11de3ea27..000000000 --- a/hasura/hasura-migrations/migrations/1585070246777_delete_fk_public_post_reactions_post_reactions_reaction_id_fkey/down.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: alter table "public"."post_reactions" add foreign key ("reaction_id") references - "public"."reactions"("id") on update cascade on delete cascade; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070246777_delete_fk_public_post_reactions_post_reactions_reaction_id_fkey/up.yaml b/hasura/hasura-migrations/migrations/1585070246777_delete_fk_public_post_reactions_post_reactions_reaction_id_fkey/up.yaml deleted file mode 100644 index 7fec37c3a..000000000 --- a/hasura/hasura-migrations/migrations/1585070246777_delete_fk_public_post_reactions_post_reactions_reaction_id_fkey/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."post_reactions" drop constraint "post_reactions_reaction_id_fkey"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070262777_delete_fk_public_comment_reactions_comment_reactions_reaction_id_fkey/down.yaml b/hasura/hasura-migrations/migrations/1585070262777_delete_fk_public_comment_reactions_comment_reactions_reaction_id_fkey/down.yaml deleted file mode 100644 index f179a9c95..000000000 --- a/hasura/hasura-migrations/migrations/1585070262777_delete_fk_public_comment_reactions_comment_reactions_reaction_id_fkey/down.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- args: - sql: alter table "public"."comment_reactions" add foreign key ("reaction_id") - references "public"."reactions"("id") on update cascade on delete cascade; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070262777_delete_fk_public_comment_reactions_comment_reactions_reaction_id_fkey/up.yaml b/hasura/hasura-migrations/migrations/1585070262777_delete_fk_public_comment_reactions_comment_reactions_reaction_id_fkey/up.yaml deleted file mode 100644 index eee8aeb9c..000000000 --- a/hasura/hasura-migrations/migrations/1585070262777_delete_fk_public_comment_reactions_comment_reactions_reaction_id_fkey/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: alter table "public"."comment_reactions" drop constraint "comment_reactions_reaction_id_fkey"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070285557_drop_table_public_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070285557_drop_table_public_reactions/down.yaml deleted file mode 100644 index fe51488c7..000000000 --- a/hasura/hasura-migrations/migrations/1585070285557_drop_table_public_reactions/down.yaml +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/hasura/hasura-migrations/migrations/1585070285557_drop_table_public_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070285557_drop_table_public_reactions/up.yaml deleted file mode 100644 index 3f66bdee0..000000000 --- a/hasura/hasura-migrations/migrations/1585070285557_drop_table_public_reactions/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: DROP TABLE "public"."reactions" - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070357441_alter_table_public_comment_reactions_add_column_reaction/down.yaml b/hasura/hasura-migrations/migrations/1585070357441_alter_table_public_comment_reactions_add_column_reaction/down.yaml deleted file mode 100644 index 909ca3d7c..000000000 --- a/hasura/hasura-migrations/migrations/1585070357441_alter_table_public_comment_reactions_add_column_reaction/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comment_reactions" DROP COLUMN "reaction"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070357441_alter_table_public_comment_reactions_add_column_reaction/up.yaml b/hasura/hasura-migrations/migrations/1585070357441_alter_table_public_comment_reactions_add_column_reaction/up.yaml deleted file mode 100644 index c479200ee..000000000 --- a/hasura/hasura-migrations/migrations/1585070357441_alter_table_public_comment_reactions_add_column_reaction/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comment_reactions" ADD COLUMN "reaction" bpchar NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070432177_alter_table_public_comment_reactions_alter_column_reaction/down.yaml b/hasura/hasura-migrations/migrations/1585070432177_alter_table_public_comment_reactions_alter_column_reaction/down.yaml deleted file mode 100644 index 8186043b2..000000000 --- a/hasura/hasura-migrations/migrations/1585070432177_alter_table_public_comment_reactions_alter_column_reaction/down.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction" TYPE character; - type: run_sql -- args: - sql: ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction" DROP NOT - NULL; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."comment_reactions"."reaction" IS E'null' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070432177_alter_table_public_comment_reactions_alter_column_reaction/up.yaml b/hasura/hasura-migrations/migrations/1585070432177_alter_table_public_comment_reactions_alter_column_reaction/up.yaml deleted file mode 100644 index c11ce0eb2..000000000 --- a/hasura/hasura-migrations/migrations/1585070432177_alter_table_public_comment_reactions_alter_column_reaction/up.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction" TYPE bpchar; - type: run_sql -- args: - sql: ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction" SET NOT - NULL; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."comment_reactions"."reaction" IS E'' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070455396_alter_table_public_post_reactions_add_column_reaction/down.yaml b/hasura/hasura-migrations/migrations/1585070455396_alter_table_public_post_reactions_add_column_reaction/down.yaml deleted file mode 100644 index 033baa556..000000000 --- a/hasura/hasura-migrations/migrations/1585070455396_alter_table_public_post_reactions_add_column_reaction/down.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."post_reactions" DROP COLUMN "reaction"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070455396_alter_table_public_post_reactions_add_column_reaction/up.yaml b/hasura/hasura-migrations/migrations/1585070455396_alter_table_public_post_reactions_add_column_reaction/up.yaml deleted file mode 100644 index f7d947271..000000000 --- a/hasura/hasura-migrations/migrations/1585070455396_alter_table_public_post_reactions_add_column_reaction/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."post_reactions" ADD COLUMN "reaction" bpchar NOT NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070686316_update_permission_anonymous_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070686316_update_permission_anonymous_public_table_comment_reactions/down.yaml deleted file mode 100644 index 4e7ac1c6b..000000000 --- a/hasura/hasura-migrations/migrations/1585070686316_update_permission_anonymous_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: comment_reactions - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - id - - comment_id - - user_id - - reaction_id - - created_at - - updated_at - filter: {} - role: anonymous - table: - name: comment_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1585070686316_update_permission_anonymous_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070686316_update_permission_anonymous_public_table_comment_reactions/up.yaml deleted file mode 100644 index a1d939bcc..000000000 --- a/hasura/hasura-migrations/migrations/1585070686316_update_permission_anonymous_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: anonymous - table: - name: comment_reactions - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - comment_id - - created_at - - id - - updated_at - - user_id - filter: {} - role: anonymous - table: - name: comment_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1585070699776_update_permission_user_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070699776_update_permission_user_public_table_comment_reactions/down.yaml deleted file mode 100644 index 66d907de7..000000000 --- a/hasura/hasura-migrations/migrations/1585070699776_update_permission_user_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_insert_permission -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - comment_id - - reaction_id - - user_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1585070699776_update_permission_user_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070699776_update_permission_user_public_table_comment_reactions/up.yaml deleted file mode 100644 index 8212fa587..000000000 --- a/hasura/hasura-migrations/migrations/1585070699776_update_permission_user_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_insert_permission -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - comment_id - - user_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1585070708485_update_permission_user_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070708485_update_permission_user_public_table_comment_reactions/down.yaml deleted file mode 100644 index b1872d0e1..000000000 --- a/hasura/hasura-migrations/migrations/1585070708485_update_permission_user_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - id - - reaction_id - - user_id - - created_at - - updated_at - - comment_id - filter: {} - role: user - table: - name: comment_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1585070708485_update_permission_user_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070708485_update_permission_user_public_table_comment_reactions/up.yaml deleted file mode 100644 index 3367c81ed..000000000 --- a/hasura/hasura-migrations/migrations/1585070708485_update_permission_user_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - comment_id - - created_at - - id - - updated_at - - user_id - filter: {} - role: user - table: - name: comment_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1585070717846_update_permission_user_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070717846_update_permission_user_public_table_comment_reactions/down.yaml deleted file mode 100644 index a290b2d5a..000000000 --- a/hasura/hasura-migrations/migrations/1585070717846_update_permission_user_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_update_permission -- args: - permission: - columns: - - comment_id - - reaction_id - - user_id - filter: - user_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1585070717846_update_permission_user_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070717846_update_permission_user_public_table_comment_reactions/up.yaml deleted file mode 100644 index d9f5c7e70..000000000 --- a/hasura/hasura-migrations/migrations/1585070717846_update_permission_user_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_update_permission -- args: - permission: - columns: - - comment_id - - user_id - filter: - user_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1585070735275_alter_table_public_comment_reactions_drop_column_reaction_id/down.yaml b/hasura/hasura-migrations/migrations/1585070735275_alter_table_public_comment_reactions_drop_column_reaction_id/down.yaml deleted file mode 100644 index 1d06a580a..000000000 --- a/hasura/hasura-migrations/migrations/1585070735275_alter_table_public_comment_reactions_drop_column_reaction_id/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comment_reactions" ADD COLUMN "reaction_id" int4 - type: run_sql -- args: - sql: ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction_id" DROP - NOT NULL - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070735275_alter_table_public_comment_reactions_drop_column_reaction_id/up.yaml b/hasura/hasura-migrations/migrations/1585070735275_alter_table_public_comment_reactions_drop_column_reaction_id/up.yaml deleted file mode 100644 index c8e5a2655..000000000 --- a/hasura/hasura-migrations/migrations/1585070735275_alter_table_public_comment_reactions_drop_column_reaction_id/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comment_reactions" DROP COLUMN "reaction_id" CASCADE - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070771245_update_permission_anonymous_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070771245_update_permission_anonymous_public_table_comment_reactions/down.yaml deleted file mode 100644 index a1d939bcc..000000000 --- a/hasura/hasura-migrations/migrations/1585070771245_update_permission_anonymous_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: anonymous - table: - name: comment_reactions - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - comment_id - - created_at - - id - - updated_at - - user_id - filter: {} - role: anonymous - table: - name: comment_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1585070771245_update_permission_anonymous_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070771245_update_permission_anonymous_public_table_comment_reactions/up.yaml deleted file mode 100644 index 22e04847a..000000000 --- a/hasura/hasura-migrations/migrations/1585070771245_update_permission_anonymous_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: comment_reactions - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - comment_id - - created_at - - id - - reaction - - updated_at - - user_id - filter: {} - role: anonymous - table: - name: comment_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1585070780477_update_permission_user_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070780477_update_permission_user_public_table_comment_reactions/down.yaml deleted file mode 100644 index 8212fa587..000000000 --- a/hasura/hasura-migrations/migrations/1585070780477_update_permission_user_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_insert_permission -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - comment_id - - user_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1585070780477_update_permission_user_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070780477_update_permission_user_public_table_comment_reactions/up.yaml deleted file mode 100644 index 8337534a7..000000000 --- a/hasura/hasura-migrations/migrations/1585070780477_update_permission_user_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_insert_permission -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - comment_id - - reaction - - user_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1585070785504_update_permission_user_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070785504_update_permission_user_public_table_comment_reactions/down.yaml deleted file mode 100644 index 3367c81ed..000000000 --- a/hasura/hasura-migrations/migrations/1585070785504_update_permission_user_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - comment_id - - created_at - - id - - updated_at - - user_id - filter: {} - role: user - table: - name: comment_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1585070785504_update_permission_user_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070785504_update_permission_user_public_table_comment_reactions/up.yaml deleted file mode 100644 index b5c28fb2e..000000000 --- a/hasura/hasura-migrations/migrations/1585070785504_update_permission_user_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - comment_id - - created_at - - id - - reaction - - updated_at - - user_id - filter: {} - role: user - table: - name: comment_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1585070789506_update_permission_user_public_table_comment_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070789506_update_permission_user_public_table_comment_reactions/down.yaml deleted file mode 100644 index d9f5c7e70..000000000 --- a/hasura/hasura-migrations/migrations/1585070789506_update_permission_user_public_table_comment_reactions/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_update_permission -- args: - permission: - columns: - - comment_id - - user_id - filter: - user_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1585070789506_update_permission_user_public_table_comment_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070789506_update_permission_user_public_table_comment_reactions/up.yaml deleted file mode 100644 index 3b486eb1e..000000000 --- a/hasura/hasura-migrations/migrations/1585070789506_update_permission_user_public_table_comment_reactions/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: comment_reactions - schema: public - type: drop_update_permission -- args: - permission: - columns: - - comment_id - - reaction - - user_id - filter: - user_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: comment_reactions - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1585070817204_update_permission_anonymous_public_table_post_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070817204_update_permission_anonymous_public_table_post_reactions/down.yaml deleted file mode 100644 index d58fdbc68..000000000 --- a/hasura/hasura-migrations/migrations/1585070817204_update_permission_anonymous_public_table_post_reactions/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: post_reactions - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - id - - post_id - - user_id - - reaction_id - - created_at - - updated_at - filter: {} - role: anonymous - table: - name: post_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1585070817204_update_permission_anonymous_public_table_post_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070817204_update_permission_anonymous_public_table_post_reactions/up.yaml deleted file mode 100644 index 45b40e3b1..000000000 --- a/hasura/hasura-migrations/migrations/1585070817204_update_permission_anonymous_public_table_post_reactions/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: post_reactions - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - post_id - - reaction - - updated_at - - user_id - filter: {} - role: anonymous - table: - name: post_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1585070825735_update_permission_user_public_table_post_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070825735_update_permission_user_public_table_post_reactions/down.yaml deleted file mode 100644 index 5fe70c338..000000000 --- a/hasura/hasura-migrations/migrations/1585070825735_update_permission_user_public_table_post_reactions/down.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: post_reactions - schema: public - type: drop_insert_permission -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - post_id - - reaction_id - - user_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: post_reactions - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1585070825735_update_permission_user_public_table_post_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070825735_update_permission_user_public_table_post_reactions/up.yaml deleted file mode 100644 index 0a8835dbf..000000000 --- a/hasura/hasura-migrations/migrations/1585070825735_update_permission_user_public_table_post_reactions/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: post_reactions - schema: public - type: drop_insert_permission -- args: - permission: - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - post_id - - reaction - - user_id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: post_reactions - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1585070834731_update_permission_user_public_table_post_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070834731_update_permission_user_public_table_post_reactions/down.yaml deleted file mode 100644 index 6bacd87bf..000000000 --- a/hasura/hasura-migrations/migrations/1585070834731_update_permission_user_public_table_post_reactions/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: post_reactions - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - id - - post_id - - reaction_id - - user_id - - created_at - - updated_at - filter: {} - role: user - table: - name: post_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1585070834731_update_permission_user_public_table_post_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070834731_update_permission_user_public_table_post_reactions/up.yaml deleted file mode 100644 index 232ee698b..000000000 --- a/hasura/hasura-migrations/migrations/1585070834731_update_permission_user_public_table_post_reactions/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: post_reactions - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - created_at - - id - - post_id - - reaction - - updated_at - - user_id - filter: {} - role: user - table: - name: post_reactions - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1585070948440_update_permission_user_public_table_post_reactions/down.yaml b/hasura/hasura-migrations/migrations/1585070948440_update_permission_user_public_table_post_reactions/down.yaml deleted file mode 100644 index c96292e28..000000000 --- a/hasura/hasura-migrations/migrations/1585070948440_update_permission_user_public_table_post_reactions/down.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: post_reactions - schema: public - type: drop_update_permission -- args: - permission: - columns: - - post_id - - reaction_id - - user_id - filter: - user_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: post_reactions - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1585070948440_update_permission_user_public_table_post_reactions/up.yaml b/hasura/hasura-migrations/migrations/1585070948440_update_permission_user_public_table_post_reactions/up.yaml deleted file mode 100644 index 35fa231b5..000000000 --- a/hasura/hasura-migrations/migrations/1585070948440_update_permission_user_public_table_post_reactions/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: user - table: - name: post_reactions - schema: public - type: drop_update_permission -- args: - permission: - columns: - - post_id - - reaction - - user_id - filter: - user_id: - _eq: X-Hasura-User-Id - localPresets: - - key: "" - value: "" - set: {} - role: user - table: - name: post_reactions - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1585070990800_alter_table_public_post_reactions_drop_column_reaction_id/down.yaml b/hasura/hasura-migrations/migrations/1585070990800_alter_table_public_post_reactions_drop_column_reaction_id/down.yaml deleted file mode 100644 index 4dfd93f54..000000000 --- a/hasura/hasura-migrations/migrations/1585070990800_alter_table_public_post_reactions_drop_column_reaction_id/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - sql: ALTER TABLE "public"."post_reactions" ADD COLUMN "reaction_id" int4 - type: run_sql -- args: - sql: ALTER TABLE "public"."post_reactions" ALTER COLUMN "reaction_id" DROP NOT - NULL - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585070990800_alter_table_public_post_reactions_drop_column_reaction_id/up.yaml b/hasura/hasura-migrations/migrations/1585070990800_alter_table_public_post_reactions_drop_column_reaction_id/up.yaml deleted file mode 100644 index e4d0a9b60..000000000 --- a/hasura/hasura-migrations/migrations/1585070990800_alter_table_public_post_reactions_drop_column_reaction_id/up.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- args: - sql: ALTER TABLE "public"."post_reactions" DROP COLUMN "reaction_id" CASCADE - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585072400445_alter_table_public_post_reactions_alter_column_reaction/down.yaml b/hasura/hasura-migrations/migrations/1585072400445_alter_table_public_post_reactions_alter_column_reaction/down.yaml deleted file mode 100644 index da531fd8b..000000000 --- a/hasura/hasura-migrations/migrations/1585072400445_alter_table_public_post_reactions_alter_column_reaction/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: ALTER TABLE "public"."post_reactions" ALTER COLUMN "reaction" TYPE character; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."post_reactions"."reaction" IS E'null' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585072400445_alter_table_public_post_reactions_alter_column_reaction/up.yaml b/hasura/hasura-migrations/migrations/1585072400445_alter_table_public_post_reactions_alter_column_reaction/up.yaml deleted file mode 100644 index 57270a522..000000000 --- a/hasura/hasura-migrations/migrations/1585072400445_alter_table_public_post_reactions_alter_column_reaction/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: ALTER TABLE "public"."post_reactions" ALTER COLUMN "reaction" TYPE char; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."post_reactions"."reaction" IS E'' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585072413124_alter_table_public_comment_reactions_alter_column_reaction/down.yaml b/hasura/hasura-migrations/migrations/1585072413124_alter_table_public_comment_reactions_alter_column_reaction/down.yaml deleted file mode 100644 index 9eedb7e4e..000000000 --- a/hasura/hasura-migrations/migrations/1585072413124_alter_table_public_comment_reactions_alter_column_reaction/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction" TYPE character; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."comment_reactions"."reaction" IS E'null' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1585072413124_alter_table_public_comment_reactions_alter_column_reaction/up.yaml b/hasura/hasura-migrations/migrations/1585072413124_alter_table_public_comment_reactions_alter_column_reaction/up.yaml deleted file mode 100644 index e3d96ba6d..000000000 --- a/hasura/hasura-migrations/migrations/1585072413124_alter_table_public_comment_reactions_alter_column_reaction/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - sql: ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction" TYPE char; - type: run_sql -- args: - sql: COMMENT ON COLUMN "public"."comment_reactions"."reaction" IS E'' - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1587052949446_alter_table_public_posts_alter_column_title/down.yaml b/hasura/hasura-migrations/migrations/1587052949446_alter_table_public_posts_alter_column_title/down.yaml deleted file mode 100644 index ee5a16f7e..000000000 --- a/hasura/hasura-migrations/migrations/1587052949446_alter_table_public_posts_alter_column_title/down.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE ONLY "public"."posts" ALTER COLUMN "title" SET DEFAULT ''no title'::text'; - type: run_sql -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ALTER COLUMN "title" SET NOT NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1587052949446_alter_table_public_posts_alter_column_title/up.yaml b/hasura/hasura-migrations/migrations/1587052949446_alter_table_public_posts_alter_column_title/up.yaml deleted file mode 100644 index 7184e22ba..000000000 --- a/hasura/hasura-migrations/migrations/1587052949446_alter_table_public_posts_alter_column_title/up.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ALTER COLUMN "title" DROP DEFAULT; - type: run_sql -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ALTER COLUMN "title" DROP NOT NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1589713322733_create_table_public_post_votes/down.yaml b/hasura/hasura-migrations/migrations/1589713322733_create_table_public_post_votes/down.yaml deleted file mode 100644 index 6aebbbd4a..000000000 --- a/hasura/hasura-migrations/migrations/1589713322733_create_table_public_post_votes/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: DROP TABLE "public"."post_votes"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1589713322733_create_table_public_post_votes/up.yaml b/hasura/hasura-migrations/migrations/1589713322733_create_table_public_post_votes/up.yaml deleted file mode 100644 index bb6f3fd8d..000000000 --- a/hasura/hasura-migrations/migrations/1589713322733_create_table_public_post_votes/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - cascade: false - read_only: false - sql: CREATE TABLE "public"."post_votes"("id" serial NOT NULL, "post_id" integer - NOT NULL, "user_id" integer NOT NULL, "vote" bpchar NOT NULL, "created_at" timestamp - NOT NULL DEFAULT now(), "updated_at" timestamp NOT NULL DEFAULT now(), PRIMARY - KEY ("id") , FOREIGN KEY ("post_id") REFERENCES "public"."posts"("id") ON UPDATE - restrict ON DELETE restrict, UNIQUE ("id")); - type: run_sql -- args: - name: post_votes - schema: public - type: add_existing_table_or_view diff --git a/hasura/hasura-migrations/migrations/1589713356426_add_relationship__table_public_post_votes/down.yaml b/hasura/hasura-migrations/migrations/1589713356426_add_relationship__table_public_post_votes/down.yaml deleted file mode 100644 index 20dc0635a..000000000 --- a/hasura/hasura-migrations/migrations/1589713356426_add_relationship__table_public_post_votes/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post - table: - name: post_votes - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1589713356426_add_relationship__table_public_post_votes/up.yaml b/hasura/hasura-migrations/migrations/1589713356426_add_relationship__table_public_post_votes/up.yaml deleted file mode 100644 index 7eb8f62e4..000000000 --- a/hasura/hasura-migrations/migrations/1589713356426_add_relationship__table_public_post_votes/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: post - table: - name: post_votes - schema: public - using: - foreign_key_constraint_on: post_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1589713396627_table_post_votes_create_remote_relationship_voter/down.yaml b/hasura/hasura-migrations/migrations/1589713396627_table_post_votes_create_remote_relationship_voter/down.yaml deleted file mode 100644 index 1aa7b02eb..000000000 --- a/hasura/hasura-migrations/migrations/1589713396627_table_post_votes_create_remote_relationship_voter/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: voter - table: - name: post_votes - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1589713396627_table_post_votes_create_remote_relationship_voter/up.yaml b/hasura/hasura-migrations/migrations/1589713396627_table_post_votes_create_remote_relationship_voter/up.yaml deleted file mode 100644 index 941d9c8ab..000000000 --- a/hasura/hasura-migrations/migrations/1589713396627_table_post_votes_create_remote_relationship_voter/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - user_id - name: voter - remote_field: - user: - arguments: - id: $user_id - remote_schema: auth - table: - name: post_votes - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1589713424209_add_relationship__table_public_posts/down.yaml b/hasura/hasura-migrations/migrations/1589713424209_add_relationship__table_public_posts/down.yaml deleted file mode 100644 index a47e326ca..000000000 --- a/hasura/hasura-migrations/migrations/1589713424209_add_relationship__table_public_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post_votes - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1589713424209_add_relationship__table_public_posts/up.yaml b/hasura/hasura-migrations/migrations/1589713424209_add_relationship__table_public_posts/up.yaml deleted file mode 100644 index 4b4f19249..000000000 --- a/hasura/hasura-migrations/migrations/1589713424209_add_relationship__table_public_posts/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: post_votes - table: - name: posts - schema: public - using: - foreign_key_constraint_on: - column: post_id - table: - name: post_votes - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1589713763447_update_permission_anonymous_public_table_post_votes/down.yaml b/hasura/hasura-migrations/migrations/1589713763447_update_permission_anonymous_public_table_post_votes/down.yaml deleted file mode 100644 index 080430470..000000000 --- a/hasura/hasura-migrations/migrations/1589713763447_update_permission_anonymous_public_table_post_votes/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: post_votes - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1589713763447_update_permission_anonymous_public_table_post_votes/up.yaml b/hasura/hasura-migrations/migrations/1589713763447_update_permission_anonymous_public_table_post_votes/up.yaml deleted file mode 100644 index 6e47930d5..000000000 --- a/hasura/hasura-migrations/migrations/1589713763447_update_permission_anonymous_public_table_post_votes/up.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- args: - permission: - allow_aggregations: true - backend_only: false - columns: - - id - - post_id - - user_id - - vote - - created_at - - updated_at - computed_fields: [] - filter: {} - limit: null - role: anonymous - table: - name: post_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1589713783663_update_permission_user_public_table_post_votes/down.yaml b/hasura/hasura-migrations/migrations/1589713783663_update_permission_user_public_table_post_votes/down.yaml deleted file mode 100644 index 861d68ca9..000000000 --- a/hasura/hasura-migrations/migrations/1589713783663_update_permission_user_public_table_post_votes/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: post_votes - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1589713783663_update_permission_user_public_table_post_votes/up.yaml b/hasura/hasura-migrations/migrations/1589713783663_update_permission_user_public_table_post_votes/up.yaml deleted file mode 100644 index 939316f90..000000000 --- a/hasura/hasura-migrations/migrations/1589713783663_update_permission_user_public_table_post_votes/up.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- args: - permission: - allow_aggregations: true - backend_only: false - columns: - - vote - - id - - post_id - - user_id - - created_at - - updated_at - computed_fields: [] - filter: {} - limit: null - role: user - table: - name: post_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1589713825290_update_permission_user_public_table_post_votes/down.yaml b/hasura/hasura-migrations/migrations/1589713825290_update_permission_user_public_table_post_votes/down.yaml deleted file mode 100644 index ed01bddd6..000000000 --- a/hasura/hasura-migrations/migrations/1589713825290_update_permission_user_public_table_post_votes/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: post_votes - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1589713825290_update_permission_user_public_table_post_votes/up.yaml b/hasura/hasura-migrations/migrations/1589713825290_update_permission_user_public_table_post_votes/up.yaml deleted file mode 100644 index 60f45927e..000000000 --- a/hasura/hasura-migrations/migrations/1589713825290_update_permission_user_public_table_post_votes/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - permission: - allow_upsert: true - backend_only: false - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - post_id - - user_id - - vote - set: {} - role: user - table: - name: post_votes - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1589713857773_apply_same_permissions_public_table_post_votes/down.yaml b/hasura/hasura-migrations/migrations/1589713857773_apply_same_permissions_public_table_post_votes/down.yaml deleted file mode 100644 index e494a2aea..000000000 --- a/hasura/hasura-migrations/migrations/1589713857773_apply_same_permissions_public_table_post_votes/down.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - role: user - table: - name: post_votes - schema: public - type: drop_delete_permission -- args: - role: user - table: - name: post_votes - schema: public - type: drop_update_permission diff --git a/hasura/hasura-migrations/migrations/1589713857773_apply_same_permissions_public_table_post_votes/up.yaml b/hasura/hasura-migrations/migrations/1589713857773_apply_same_permissions_public_table_post_votes/up.yaml deleted file mode 100644 index 8f358a47c..000000000 --- a/hasura/hasura-migrations/migrations/1589713857773_apply_same_permissions_public_table_post_votes/up.yaml +++ /dev/null @@ -1,38 +0,0 @@ -- args: - permission: - backend_only: false - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - post_id - - user_id - - vote - filter: - user_id: - _eq: X-Hasura-User-Id - set: {} - role: user - table: - name: post_votes - schema: public - type: create_update_permission -- args: - permission: - backend_only: false - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - post_id - - user_id - - vote - filter: - user_id: - _eq: X-Hasura-User-Id - set: {} - role: user - table: - name: post_votes - schema: public - type: create_delete_permission diff --git a/hasura/hasura-migrations/migrations/1590394794357_alter_table_public_posts_add_column_has_poll/down.yaml b/hasura/hasura-migrations/migrations/1590394794357_alter_table_public_posts_add_column_has_poll/down.yaml deleted file mode 100644 index b1c9891a5..000000000 --- a/hasura/hasura-migrations/migrations/1590394794357_alter_table_public_posts_add_column_has_poll/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" DROP COLUMN "has_poll"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1590394794357_alter_table_public_posts_add_column_has_poll/up.yaml b/hasura/hasura-migrations/migrations/1590394794357_alter_table_public_posts_add_column_has_poll/up.yaml deleted file mode 100644 index 235157a57..000000000 --- a/hasura/hasura-migrations/migrations/1590394794357_alter_table_public_posts_add_column_has_poll/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ADD COLUMN "has_poll" boolean NOT NULL DEFAULT - false; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1590398012080_update_permission_anonymous_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1590398012080_update_permission_anonymous_public_table_posts/down.yaml deleted file mode 100644 index aa768ffa0..000000000 --- a/hasura/hasura-migrations/migrations/1590398012080_update_permission_anonymous_public_table_posts/down.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: anonymous - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - id - - author_id - - content - - title - - topic_id - - type_id - - created_at - - updated_at - computed_fields: [] - filter: {} - role: anonymous - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590398012080_update_permission_anonymous_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1590398012080_update_permission_anonymous_public_table_posts/up.yaml deleted file mode 100644 index 387106ee8..000000000 --- a/hasura/hasura-migrations/migrations/1590398012080_update_permission_anonymous_public_table_posts/up.yaml +++ /dev/null @@ -1,26 +0,0 @@ -- args: - role: anonymous - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - content - - created_at - - has_poll - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: anonymous - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590398036930_update_permission_proposal_bot_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1590398036930_update_permission_proposal_bot_public_table_posts/down.yaml deleted file mode 100644 index bc769a231..000000000 --- a/hasura/hasura-migrations/migrations/1590398036930_update_permission_proposal_bot_public_table_posts/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - content - - title - - topic_id - - type_id - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1590398036930_update_permission_proposal_bot_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1590398036930_update_permission_proposal_bot_public_table_posts/up.yaml deleted file mode 100644 index 7ae6b9296..000000000 --- a/hasura/hasura-migrations/migrations/1590398036930_update_permission_proposal_bot_public_table_posts/up.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - content - - has_poll - - title - - topic_id - - type_id - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1590398042712_update_permission_proposal_bot_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1590398042712_update_permission_proposal_bot_public_table_posts/down.yaml deleted file mode 100644 index 23bc0c2a1..000000000 --- a/hasura/hasura-migrations/migrations/1590398042712_update_permission_proposal_bot_public_table_posts/down.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - id - - type_id - - content - - title - - created_at - - updated_at - - topic_id - computed_fields: [] - filter: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590398042712_update_permission_proposal_bot_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1590398042712_update_permission_proposal_bot_public_table_posts/up.yaml deleted file mode 100644 index 72ebc41c9..000000000 --- a/hasura/hasura-migrations/migrations/1590398042712_update_permission_proposal_bot_public_table_posts/up.yaml +++ /dev/null @@ -1,26 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - content - - created_at - - has_poll - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590398048601_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1590398048601_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 93ec82637..000000000 --- a/hasura/hasura-migrations/migrations/1590398048601_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,26 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - _and: - - author_id: - _eq: X-Hasura-User-Id - - type_id: - _eq: 1 - columns: - - author_id - - content - - title - - topic_id - - type_id - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1590398048601_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1590398048601_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index e14efb6dc..000000000 --- a/hasura/hasura-migrations/migrations/1590398048601_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - _and: - - author_id: - _eq: X-Hasura-User-Id - - type_id: - _eq: 1 - columns: - - author_id - - content - - has_poll - - title - - topic_id - - type_id - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1590398053786_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1590398053786_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index c4c35c92e..000000000 --- a/hasura/hasura-migrations/migrations/1590398053786_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - id - - type_id - - content - - title - - created_at - - updated_at - - topic_id - computed_fields: [] - filter: {} - role: user - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590398053786_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1590398053786_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 2e88ff057..000000000 --- a/hasura/hasura-migrations/migrations/1590398053786_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,26 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - content - - created_at - - has_poll - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590551879644_alter_table_public_posts_add_column_block_number/down.yaml b/hasura/hasura-migrations/migrations/1590551879644_alter_table_public_posts_add_column_block_number/down.yaml deleted file mode 100644 index ce808a21e..000000000 --- a/hasura/hasura-migrations/migrations/1590551879644_alter_table_public_posts_add_column_block_number/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" DROP COLUMN "block_number"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1590551879644_alter_table_public_posts_add_column_block_number/up.yaml b/hasura/hasura-migrations/migrations/1590551879644_alter_table_public_posts_add_column_block_number/up.yaml deleted file mode 100644 index dfb39cb2c..000000000 --- a/hasura/hasura-migrations/migrations/1590551879644_alter_table_public_posts_add_column_block_number/up.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ADD COLUMN "block_number" integer NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1590551903082_update_permission_anonymous_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1590551903082_update_permission_anonymous_public_table_posts/down.yaml deleted file mode 100644 index 387106ee8..000000000 --- a/hasura/hasura-migrations/migrations/1590551903082_update_permission_anonymous_public_table_posts/down.yaml +++ /dev/null @@ -1,26 +0,0 @@ -- args: - role: anonymous - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - content - - created_at - - has_poll - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: anonymous - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590551903082_update_permission_anonymous_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1590551903082_update_permission_anonymous_public_table_posts/up.yaml deleted file mode 100644 index 4c18efe66..000000000 --- a/hasura/hasura-migrations/migrations/1590551903082_update_permission_anonymous_public_table_posts/up.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: anonymous - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - block_number - - content - - created_at - - has_poll - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: anonymous - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590551914387_update_permission_proposal_bot_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1590551914387_update_permission_proposal_bot_public_table_posts/down.yaml deleted file mode 100644 index 7ae6b9296..000000000 --- a/hasura/hasura-migrations/migrations/1590551914387_update_permission_proposal_bot_public_table_posts/down.yaml +++ /dev/null @@ -1,24 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - content - - has_poll - - title - - topic_id - - type_id - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1590551914387_update_permission_proposal_bot_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1590551914387_update_permission_proposal_bot_public_table_posts/up.yaml deleted file mode 100644 index ecf4796cc..000000000 --- a/hasura/hasura-migrations/migrations/1590551914387_update_permission_proposal_bot_public_table_posts/up.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - block_number - - content - - has_poll - - title - - topic_id - - type_id - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1590551918775_update_permission_proposal_bot_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1590551918775_update_permission_proposal_bot_public_table_posts/down.yaml deleted file mode 100644 index 72ebc41c9..000000000 --- a/hasura/hasura-migrations/migrations/1590551918775_update_permission_proposal_bot_public_table_posts/down.yaml +++ /dev/null @@ -1,26 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - content - - created_at - - has_poll - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590551918775_update_permission_proposal_bot_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1590551918775_update_permission_proposal_bot_public_table_posts/up.yaml deleted file mode 100644 index b360bf9aa..000000000 --- a/hasura/hasura-migrations/migrations/1590551918775_update_permission_proposal_bot_public_table_posts/up.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - block_number - - content - - created_at - - has_poll - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590551931219_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1590551931219_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index e14efb6dc..000000000 --- a/hasura/hasura-migrations/migrations/1590551931219_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - _and: - - author_id: - _eq: X-Hasura-User-Id - - type_id: - _eq: 1 - columns: - - author_id - - content - - has_poll - - title - - topic_id - - type_id - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1590551931219_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1590551931219_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 6aea6478b..000000000 --- a/hasura/hasura-migrations/migrations/1590551931219_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - _and: - - author_id: - _eq: X-Hasura-User-Id - - type_id: - _eq: 1 - columns: - - author_id - - block_number - - content - - has_poll - - title - - topic_id - - type_id - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1590551936342_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1590551936342_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 2e88ff057..000000000 --- a/hasura/hasura-migrations/migrations/1590551936342_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,26 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - content - - created_at - - has_poll - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590551936342_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1590551936342_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index a4fdd92c9..000000000 --- a/hasura/hasura-migrations/migrations/1590551936342_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - block_number - - content - - created_at - - has_poll - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590576328516_run_sql_migration/down.yaml b/hasura/hasura-migrations/migrations/1590576328516_run_sql_migration/down.yaml deleted file mode 100644 index fe51488c7..000000000 --- a/hasura/hasura-migrations/migrations/1590576328516_run_sql_migration/down.yaml +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/hasura/hasura-migrations/migrations/1590576328516_run_sql_migration/up.yaml b/hasura/hasura-migrations/migrations/1590576328516_run_sql_migration/up.yaml deleted file mode 100644 index bcc3b7784..000000000 --- a/hasura/hasura-migrations/migrations/1590576328516_run_sql_migration/up.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - cascade: true - read_only: false - sql: |- - ALTER TABLE post_votes - DROP COLUMN updated_at; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1590576353167_alter_table_public_post_votes_add_column_updated_at/down.yaml b/hasura/hasura-migrations/migrations/1590576353167_alter_table_public_post_votes_add_column_updated_at/down.yaml deleted file mode 100644 index 55fa7107f..000000000 --- a/hasura/hasura-migrations/migrations/1590576353167_alter_table_public_post_votes_add_column_updated_at/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - cascade: false - read_only: false - sql: |- - DROP TRIGGER IF EXISTS "set_public_post_votes_updated_at" ON "public"."post_votes"; - ALTER TABLE "public"."post_votes" DROP COLUMN "updated_at"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1590576353167_alter_table_public_post_votes_add_column_updated_at/up.yaml b/hasura/hasura-migrations/migrations/1590576353167_alter_table_public_post_votes_add_column_updated_at/up.yaml deleted file mode 100644 index 2c785d5dc..000000000 --- a/hasura/hasura-migrations/migrations/1590576353167_alter_table_public_post_votes_add_column_updated_at/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - cascade: false - read_only: false - sql: "ALTER TABLE \"public\".\"post_votes\" ADD COLUMN \"updated_at\" timestamptz - NULL DEFAULT now();\n\nCREATE OR REPLACE FUNCTION \"public\".\"set_current_timestamp_updated_at\"()\nRETURNS - TRIGGER AS $$\nDECLARE\n _new record;\nBEGIN\n _new := NEW;\n _new.\"updated_at\" - = NOW();\n RETURN _new;\nEND;\n$$ LANGUAGE plpgsql;\nCREATE TRIGGER \"set_public_post_votes_updated_at\"\nBEFORE - UPDATE ON \"public\".\"post_votes\"\nFOR EACH ROW\nEXECUTE PROCEDURE \"public\".\"set_current_timestamp_updated_at\"();\nCOMMENT - ON TRIGGER \"set_public_post_votes_updated_at\" ON \"public\".\"post_votes\" - \nIS 'trigger to set value of column \"updated_at\" to current timestamp on - row update';" - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1590576386997_update_permission_user_public_table_post_votes/down.yaml b/hasura/hasura-migrations/migrations/1590576386997_update_permission_user_public_table_post_votes/down.yaml deleted file mode 100644 index 861d68ca9..000000000 --- a/hasura/hasura-migrations/migrations/1590576386997_update_permission_user_public_table_post_votes/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: post_votes - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1590576386997_update_permission_user_public_table_post_votes/up.yaml b/hasura/hasura-migrations/migrations/1590576386997_update_permission_user_public_table_post_votes/up.yaml deleted file mode 100644 index 41bed3aa4..000000000 --- a/hasura/hasura-migrations/migrations/1590576386997_update_permission_user_public_table_post_votes/up.yaml +++ /dev/null @@ -1,18 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - id - - post_id - - user_id - - vote - - created_at - - updated_at - computed_fields: [] - filter: {} - limit: null - role: user - table: - name: post_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1590576430409_update_permission_anonymous_public_table_post_votes/down.yaml b/hasura/hasura-migrations/migrations/1590576430409_update_permission_anonymous_public_table_post_votes/down.yaml deleted file mode 100644 index 080430470..000000000 --- a/hasura/hasura-migrations/migrations/1590576430409_update_permission_anonymous_public_table_post_votes/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: post_votes - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1590576430409_update_permission_anonymous_public_table_post_votes/up.yaml b/hasura/hasura-migrations/migrations/1590576430409_update_permission_anonymous_public_table_post_votes/up.yaml deleted file mode 100644 index 795aff546..000000000 --- a/hasura/hasura-migrations/migrations/1590576430409_update_permission_anonymous_public_table_post_votes/up.yaml +++ /dev/null @@ -1,18 +0,0 @@ -- args: - permission: - allow_aggregations: false - columns: - - vote - - id - - post_id - - user_id - - created_at - - updated_at - computed_fields: [] - filter: {} - limit: null - role: anonymous - table: - name: post_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591588689454_alter_table_public_posts_alter_column_block_number/down.yaml b/hasura/hasura-migrations/migrations/1591588689454_alter_table_public_posts_alter_column_block_number/down.yaml deleted file mode 100644 index b8aa46c81..000000000 --- a/hasura/hasura-migrations/migrations/1591588689454_alter_table_public_posts_alter_column_block_number/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: alter table "public"."posts" rename column "poll_block_number_end" to "block_number"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591588689454_alter_table_public_posts_alter_column_block_number/up.yaml b/hasura/hasura-migrations/migrations/1591588689454_alter_table_public_posts_alter_column_block_number/up.yaml deleted file mode 100644 index c128065ba..000000000 --- a/hasura/hasura-migrations/migrations/1591588689454_alter_table_public_posts_alter_column_block_number/up.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: alter table "public"."posts" rename column "block_number" to "poll_block_number_end"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591691644022_create_table_public_poll/down.yaml b/hasura/hasura-migrations/migrations/1591691644022_create_table_public_poll/down.yaml deleted file mode 100644 index 5c2dced07..000000000 --- a/hasura/hasura-migrations/migrations/1591691644022_create_table_public_poll/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: DROP TABLE "public"."poll"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591691644022_create_table_public_poll/up.yaml b/hasura/hasura-migrations/migrations/1591691644022_create_table_public_poll/up.yaml deleted file mode 100644 index 73b15004f..000000000 --- a/hasura/hasura-migrations/migrations/1591691644022_create_table_public_poll/up.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - cascade: false - read_only: false - sql: CREATE TABLE "public"."poll"("id" serial NOT NULL, "block_end" integer NOT - NULL, PRIMARY KEY ("id") , UNIQUE ("id")); - type: run_sql -- args: - name: poll - schema: public - type: add_existing_table_or_view diff --git a/hasura/hasura-migrations/migrations/1591691691193_alter_table_public_posts_add_column_poll_id/down.yaml b/hasura/hasura-migrations/migrations/1591691691193_alter_table_public_posts_add_column_poll_id/down.yaml deleted file mode 100644 index 7c7dc2f32..000000000 --- a/hasura/hasura-migrations/migrations/1591691691193_alter_table_public_posts_add_column_poll_id/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" DROP COLUMN "poll_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591691691193_alter_table_public_posts_add_column_poll_id/up.yaml b/hasura/hasura-migrations/migrations/1591691691193_alter_table_public_posts_add_column_poll_id/up.yaml deleted file mode 100644 index 8eddb22ea..000000000 --- a/hasura/hasura-migrations/migrations/1591691691193_alter_table_public_posts_add_column_poll_id/up.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ADD COLUMN "poll_id" integer NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591691714640_set_fk_public_posts_poll_id/down.yaml b/hasura/hasura-migrations/migrations/1591691714640_set_fk_public_posts_poll_id/down.yaml deleted file mode 100644 index c01dc0811..000000000 --- a/hasura/hasura-migrations/migrations/1591691714640_set_fk_public_posts_poll_id/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: alter table "public"."posts" drop constraint "posts_poll_id_fkey"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591691714640_set_fk_public_posts_poll_id/up.yaml b/hasura/hasura-migrations/migrations/1591691714640_set_fk_public_posts_poll_id/up.yaml deleted file mode 100644 index 8b5f0ce4b..000000000 --- a/hasura/hasura-migrations/migrations/1591691714640_set_fk_public_posts_poll_id/up.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - cascade: false - read_only: false - sql: |- - alter table "public"."posts" - add constraint "posts_poll_id_fkey" - foreign key ("poll_id") - references "public"."poll" - ("id") on update restrict on delete restrict; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591691750165_add_relationship__table_public_posts/down.yaml b/hasura/hasura-migrations/migrations/1591691750165_add_relationship__table_public_posts/down.yaml deleted file mode 100644 index 46e357054..000000000 --- a/hasura/hasura-migrations/migrations/1591691750165_add_relationship__table_public_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: poll - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1591691750165_add_relationship__table_public_posts/up.yaml b/hasura/hasura-migrations/migrations/1591691750165_add_relationship__table_public_posts/up.yaml deleted file mode 100644 index 5a55bfbe1..000000000 --- a/hasura/hasura-migrations/migrations/1591691750165_add_relationship__table_public_posts/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: poll - table: - name: posts - schema: public - using: - foreign_key_constraint_on: poll_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1591692079949_create_table_public_poll_votes/down.yaml b/hasura/hasura-migrations/migrations/1591692079949_create_table_public_poll_votes/down.yaml deleted file mode 100644 index 2b34bd630..000000000 --- a/hasura/hasura-migrations/migrations/1591692079949_create_table_public_poll_votes/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: DROP TABLE "public"."poll_votes"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591692079949_create_table_public_poll_votes/up.yaml b/hasura/hasura-migrations/migrations/1591692079949_create_table_public_poll_votes/up.yaml deleted file mode 100644 index c3b726c24..000000000 --- a/hasura/hasura-migrations/migrations/1591692079949_create_table_public_poll_votes/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - cascade: false - read_only: false - sql: CREATE TABLE "public"."poll_votes"("id" serial NOT NULL, "poll_id" integer - NOT NULL, "user_id" integer NOT NULL, "vote" bpchar NOT NULL, "created_at" timestamp - NOT NULL DEFAULT now(), "updated_at" timestamp NOT NULL DEFAULT now(), PRIMARY - KEY ("id") , FOREIGN KEY ("poll_id") REFERENCES "public"."poll"("id") ON UPDATE - restrict ON DELETE restrict, UNIQUE ("id")); - type: run_sql -- args: - name: poll_votes - schema: public - type: add_existing_table_or_view diff --git a/hasura/hasura-migrations/migrations/1591692108483_add_relationship__table_public_poll_votes/down.yaml b/hasura/hasura-migrations/migrations/1591692108483_add_relationship__table_public_poll_votes/down.yaml deleted file mode 100644 index 50e238c8b..000000000 --- a/hasura/hasura-migrations/migrations/1591692108483_add_relationship__table_public_poll_votes/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: poll - table: - name: poll_votes - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1591692108483_add_relationship__table_public_poll_votes/up.yaml b/hasura/hasura-migrations/migrations/1591692108483_add_relationship__table_public_poll_votes/up.yaml deleted file mode 100644 index b004fa6f2..000000000 --- a/hasura/hasura-migrations/migrations/1591692108483_add_relationship__table_public_poll_votes/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: poll - table: - name: poll_votes - schema: public - using: - foreign_key_constraint_on: poll_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1591692145733_table_poll_votes_create_remote_relationship_voter/down.yaml b/hasura/hasura-migrations/migrations/1591692145733_table_poll_votes_create_remote_relationship_voter/down.yaml deleted file mode 100644 index 88849afeb..000000000 --- a/hasura/hasura-migrations/migrations/1591692145733_table_poll_votes_create_remote_relationship_voter/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - name: voter - table: - name: poll_votes - schema: public - type: delete_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1591692145733_table_poll_votes_create_remote_relationship_voter/up.yaml b/hasura/hasura-migrations/migrations/1591692145733_table_poll_votes_create_remote_relationship_voter/up.yaml deleted file mode 100644 index 0c6d1f417..000000000 --- a/hasura/hasura-migrations/migrations/1591692145733_table_poll_votes_create_remote_relationship_voter/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - hasura_fields: - - user_id - name: voter - remote_field: - user: - arguments: - id: $user_id - remote_schema: auth - table: - name: poll_votes - schema: public - type: create_remote_relationship diff --git a/hasura/hasura-migrations/migrations/1591692234831_add_relationship__table_public_poll/down.yaml b/hasura/hasura-migrations/migrations/1591692234831_add_relationship__table_public_poll/down.yaml deleted file mode 100644 index 61d1271e2..000000000 --- a/hasura/hasura-migrations/migrations/1591692234831_add_relationship__table_public_poll/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: posts - table: - name: poll - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1591692234831_add_relationship__table_public_poll/up.yaml b/hasura/hasura-migrations/migrations/1591692234831_add_relationship__table_public_poll/up.yaml deleted file mode 100644 index 1f95f4c8d..000000000 --- a/hasura/hasura-migrations/migrations/1591692234831_add_relationship__table_public_poll/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: posts - table: - name: poll - schema: public - using: - foreign_key_constraint_on: - column: poll_id - table: - name: posts - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1591692243735_add_relationship__table_public_poll/down.yaml b/hasura/hasura-migrations/migrations/1591692243735_add_relationship__table_public_poll/down.yaml deleted file mode 100644 index 991bdd43d..000000000 --- a/hasura/hasura-migrations/migrations/1591692243735_add_relationship__table_public_poll/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: poll_votes - table: - name: poll - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1591692243735_add_relationship__table_public_poll/up.yaml b/hasura/hasura-migrations/migrations/1591692243735_add_relationship__table_public_poll/up.yaml deleted file mode 100644 index 21aac6a4f..000000000 --- a/hasura/hasura-migrations/migrations/1591692243735_add_relationship__table_public_poll/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: poll_votes - table: - name: poll - schema: public - using: - foreign_key_constraint_on: - column: poll_id - table: - name: poll_votes - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1591692261923_drop_relationship_post_votes_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1591692261923_drop_relationship_post_votes_public_table_posts/down.yaml deleted file mode 100644 index 4b4f19249..000000000 --- a/hasura/hasura-migrations/migrations/1591692261923_drop_relationship_post_votes_public_table_posts/down.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: post_votes - table: - name: posts - schema: public - using: - foreign_key_constraint_on: - column: post_id - table: - name: post_votes - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1591692261923_drop_relationship_post_votes_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1591692261923_drop_relationship_post_votes_public_table_posts/up.yaml deleted file mode 100644 index a47e326ca..000000000 --- a/hasura/hasura-migrations/migrations/1591692261923_drop_relationship_post_votes_public_table_posts/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post_votes - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1591692369110_alter_table_public_poll_add_column_created_at/down.yaml b/hasura/hasura-migrations/migrations/1591692369110_alter_table_public_poll_add_column_created_at/down.yaml deleted file mode 100644 index 91a29cc29..000000000 --- a/hasura/hasura-migrations/migrations/1591692369110_alter_table_public_poll_add_column_created_at/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll" DROP COLUMN "created_at"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591692369110_alter_table_public_poll_add_column_created_at/up.yaml b/hasura/hasura-migrations/migrations/1591692369110_alter_table_public_poll_add_column_created_at/up.yaml deleted file mode 100644 index f29f1540f..000000000 --- a/hasura/hasura-migrations/migrations/1591692369110_alter_table_public_poll_add_column_created_at/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll" ADD COLUMN "created_at" timestamp NOT NULL DEFAULT - now(); - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591692383595_alter_table_public_poll_add_column_updated_at/down.yaml b/hasura/hasura-migrations/migrations/1591692383595_alter_table_public_poll_add_column_updated_at/down.yaml deleted file mode 100644 index 72b315ef4..000000000 --- a/hasura/hasura-migrations/migrations/1591692383595_alter_table_public_poll_add_column_updated_at/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll" DROP COLUMN "updated_at"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591692383595_alter_table_public_poll_add_column_updated_at/up.yaml b/hasura/hasura-migrations/migrations/1591692383595_alter_table_public_poll_add_column_updated_at/up.yaml deleted file mode 100644 index b0f9b9e34..000000000 --- a/hasura/hasura-migrations/migrations/1591692383595_alter_table_public_poll_add_column_updated_at/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll" ADD COLUMN "updated_at" timestamp NOT NULL DEFAULT - now(); - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591692413798_update_permission_anonymous_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591692413798_update_permission_anonymous_public_table_poll/down.yaml deleted file mode 100644 index 652307632..000000000 --- a/hasura/hasura-migrations/migrations/1591692413798_update_permission_anonymous_public_table_poll/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: poll - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1591692413798_update_permission_anonymous_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591692413798_update_permission_anonymous_public_table_poll/up.yaml deleted file mode 100644 index a5e8e405a..000000000 --- a/hasura/hasura-migrations/migrations/1591692413798_update_permission_anonymous_public_table_poll/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - permission: - allow_aggregations: true - backend_only: false - columns: - - id - - block_end - - created_at - - updated_at - computed_fields: [] - filter: {} - limit: null - role: anonymous - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591692844048_apply_same_permissions_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591692844048_apply_same_permissions_public_table_poll/down.yaml deleted file mode 100644 index 50d7f69f3..000000000 --- a/hasura/hasura-migrations/migrations/1591692844048_apply_same_permissions_public_table_poll/down.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_insert_permission -- args: - role: user - table: - name: poll - schema: public - type: drop_update_permission diff --git a/hasura/hasura-migrations/migrations/1591692844048_apply_same_permissions_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591692844048_apply_same_permissions_public_table_poll/up.yaml deleted file mode 100644 index 19fb5c13a..000000000 --- a/hasura/hasura-migrations/migrations/1591692844048_apply_same_permissions_public_table_poll/up.yaml +++ /dev/null @@ -1,36 +0,0 @@ -- args: - permission: - allow_upsert: true - backend_only: false - check: - posts: - author_id: - _eq: X-Hasura-User-Id - columns: - - block_end - filter: - posts: - author_id: - _eq: X-Hasura-User-Id - set: {} - role: user - table: - name: poll - schema: public - type: create_update_permission -- args: - permission: - allow_upsert: true - backend_only: false - check: - posts: - author_id: - _eq: X-Hasura-User-Id - columns: - - block_end - set: {} - role: user - table: - name: poll - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1591692878220_update_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591692878220_update_permission_user_public_table_poll/down.yaml deleted file mode 100644 index 92aad81d2..000000000 --- a/hasura/hasura-migrations/migrations/1591692878220_update_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1591692878220_update_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591692878220_update_permission_user_public_table_poll/up.yaml deleted file mode 100644 index bdd9f0aeb..000000000 --- a/hasura/hasura-migrations/migrations/1591692878220_update_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - permission: - allow_aggregations: true - backend_only: false - columns: - - block_end - - id - - created_at - - updated_at - computed_fields: [] - filter: {} - limit: null - role: user - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591692915618_apply_same_permissions_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591692915618_apply_same_permissions_public_table_poll/down.yaml deleted file mode 100644 index aff1db422..000000000 --- a/hasura/hasura-migrations/migrations/1591692915618_apply_same_permissions_public_table_poll/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_delete_permission diff --git a/hasura/hasura-migrations/migrations/1591692915618_apply_same_permissions_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591692915618_apply_same_permissions_public_table_poll/up.yaml deleted file mode 100644 index 5bc9b0ef0..000000000 --- a/hasura/hasura-migrations/migrations/1591692915618_apply_same_permissions_public_table_poll/up.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- args: - permission: - backend_only: false - check: - posts: - author_id: - _eq: X-Hasura-User-Id - columns: - - block_end - filter: - posts: - author_id: - _eq: X-Hasura-User-Id - set: {} - role: user - table: - name: poll - schema: public - type: create_delete_permission diff --git a/hasura/hasura-migrations/migrations/1591692960440_update_permission_anonymous_public_table_poll_votes/down.yaml b/hasura/hasura-migrations/migrations/1591692960440_update_permission_anonymous_public_table_poll_votes/down.yaml deleted file mode 100644 index e93d81cd6..000000000 --- a/hasura/hasura-migrations/migrations/1591692960440_update_permission_anonymous_public_table_poll_votes/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: poll_votes - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1591692960440_update_permission_anonymous_public_table_poll_votes/up.yaml b/hasura/hasura-migrations/migrations/1591692960440_update_permission_anonymous_public_table_poll_votes/up.yaml deleted file mode 100644 index 60d5ff0ea..000000000 --- a/hasura/hasura-migrations/migrations/1591692960440_update_permission_anonymous_public_table_poll_votes/up.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- args: - permission: - allow_aggregations: true - backend_only: false - columns: - - id - - poll_id - - user_id - - vote - - created_at - - updated_at - computed_fields: [] - filter: {} - limit: null - role: anonymous - table: - name: poll_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591692994943_update_permission_user_public_table_poll_votes/down.yaml b/hasura/hasura-migrations/migrations/1591692994943_update_permission_user_public_table_poll_votes/down.yaml deleted file mode 100644 index 88f7801dc..000000000 --- a/hasura/hasura-migrations/migrations/1591692994943_update_permission_user_public_table_poll_votes/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll_votes - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1591692994943_update_permission_user_public_table_poll_votes/up.yaml b/hasura/hasura-migrations/migrations/1591692994943_update_permission_user_public_table_poll_votes/up.yaml deleted file mode 100644 index 8ebe5a950..000000000 --- a/hasura/hasura-migrations/migrations/1591692994943_update_permission_user_public_table_poll_votes/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - permission: - allow_upsert: true - backend_only: false - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - poll_id - - user_id - - vote - set: {} - role: user - table: - name: poll_votes - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1591693013352_apply_same_permissions_public_table_poll_votes/down.yaml b/hasura/hasura-migrations/migrations/1591693013352_apply_same_permissions_public_table_poll_votes/down.yaml deleted file mode 100644 index f244e422e..000000000 --- a/hasura/hasura-migrations/migrations/1591693013352_apply_same_permissions_public_table_poll_votes/down.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - role: user - table: - name: poll_votes - schema: public - type: drop_delete_permission -- args: - role: user - table: - name: poll_votes - schema: public - type: drop_update_permission diff --git a/hasura/hasura-migrations/migrations/1591693013352_apply_same_permissions_public_table_poll_votes/up.yaml b/hasura/hasura-migrations/migrations/1591693013352_apply_same_permissions_public_table_poll_votes/up.yaml deleted file mode 100644 index 74c3cc193..000000000 --- a/hasura/hasura-migrations/migrations/1591693013352_apply_same_permissions_public_table_poll_votes/up.yaml +++ /dev/null @@ -1,38 +0,0 @@ -- args: - permission: - backend_only: false - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - poll_id - - user_id - - vote - filter: - user_id: - _eq: X-Hasura-User-Id - set: {} - role: user - table: - name: poll_votes - schema: public - type: create_update_permission -- args: - permission: - backend_only: false - check: - user_id: - _eq: X-Hasura-User-Id - columns: - - poll_id - - user_id - - vote - filter: - user_id: - _eq: X-Hasura-User-Id - set: {} - role: user - table: - name: poll_votes - schema: public - type: create_delete_permission diff --git a/hasura/hasura-migrations/migrations/1591693032342_update_permission_user_public_table_poll_votes/down.yaml b/hasura/hasura-migrations/migrations/1591693032342_update_permission_user_public_table_poll_votes/down.yaml deleted file mode 100644 index 369a7c5a2..000000000 --- a/hasura/hasura-migrations/migrations/1591693032342_update_permission_user_public_table_poll_votes/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll_votes - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1591693032342_update_permission_user_public_table_poll_votes/up.yaml b/hasura/hasura-migrations/migrations/1591693032342_update_permission_user_public_table_poll_votes/up.yaml deleted file mode 100644 index 8a80c866f..000000000 --- a/hasura/hasura-migrations/migrations/1591693032342_update_permission_user_public_table_poll_votes/up.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- args: - permission: - allow_aggregations: true - backend_only: false - columns: - - vote - - id - - poll_id - - user_id - - created_at - - updated_at - computed_fields: [] - filter: {} - limit: null - role: user - table: - name: poll_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591693127056_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1591693127056_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index bee48bc6b..000000000 --- a/hasura/hasura-migrations/migrations/1591693127056_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - poll_block_number_end - - content - - created_at - - has_poll - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591693127056_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1591693127056_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 0fc1f36f1..000000000 --- a/hasura/hasura-migrations/migrations/1591693127056_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - content - - created_at - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591693135655_update_permission_user_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1591693135655_update_permission_user_public_table_posts/down.yaml deleted file mode 100644 index 84ca41379..000000000 --- a/hasura/hasura-migrations/migrations/1591693135655_update_permission_user_public_table_posts/down.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - _and: - - author_id: - _eq: X-Hasura-User-Id - - type_id: - _eq: 1 - columns: - - author_id - - poll_block_number_end - - content - - has_poll - - title - - topic_id - - type_id - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1591693135655_update_permission_user_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1591693135655_update_permission_user_public_table_posts/up.yaml deleted file mode 100644 index 93ec82637..000000000 --- a/hasura/hasura-migrations/migrations/1591693135655_update_permission_user_public_table_posts/up.yaml +++ /dev/null @@ -1,26 +0,0 @@ -- args: - role: user - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - _and: - - author_id: - _eq: X-Hasura-User-Id - - type_id: - _eq: 1 - columns: - - author_id - - content - - title - - topic_id - - type_id - set: {} - role: user - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1591693143030_update_permission_proposal_bot_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1591693143030_update_permission_proposal_bot_public_table_posts/down.yaml deleted file mode 100644 index bd730fae0..000000000 --- a/hasura/hasura-migrations/migrations/1591693143030_update_permission_proposal_bot_public_table_posts/down.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - poll_block_number_end - - content - - has_poll - - title - - topic_id - - type_id - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1591693143030_update_permission_proposal_bot_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1591693143030_update_permission_proposal_bot_public_table_posts/up.yaml deleted file mode 100644 index bc769a231..000000000 --- a/hasura/hasura-migrations/migrations/1591693143030_update_permission_proposal_bot_public_table_posts/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_insert_permission -- args: - permission: - check: - author_id: - _eq: X-Hasura-User-Id - columns: - - author_id - - content - - title - - topic_id - - type_id - set: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1591693151518_update_permission_proposal_bot_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1591693151518_update_permission_proposal_bot_public_table_posts/down.yaml deleted file mode 100644 index 8a7259779..000000000 --- a/hasura/hasura-migrations/migrations/1591693151518_update_permission_proposal_bot_public_table_posts/down.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - poll_block_number_end - - content - - created_at - - has_poll - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591693151518_update_permission_proposal_bot_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1591693151518_update_permission_proposal_bot_public_table_posts/up.yaml deleted file mode 100644 index 434adfa6d..000000000 --- a/hasura/hasura-migrations/migrations/1591693151518_update_permission_proposal_bot_public_table_posts/up.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: proposal_bot - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - content - - created_at - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: proposal_bot - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591693193633_update_permission_anonymous_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1591693193633_update_permission_anonymous_public_table_posts/down.yaml deleted file mode 100644 index f401ecfe4..000000000 --- a/hasura/hasura-migrations/migrations/1591693193633_update_permission_anonymous_public_table_posts/down.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- args: - role: anonymous - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - poll_block_number_end - - content - - created_at - - has_poll - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: anonymous - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591693193633_update_permission_anonymous_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1591693193633_update_permission_anonymous_public_table_posts/up.yaml deleted file mode 100644 index 9a6f3cde9..000000000 --- a/hasura/hasura-migrations/migrations/1591693193633_update_permission_anonymous_public_table_posts/up.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- args: - role: anonymous - table: - name: posts - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: false - columns: - - author_id - - content - - created_at - - id - - title - - topic_id - - type_id - - updated_at - computed_fields: [] - filter: {} - role: anonymous - table: - name: posts - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591693205543_alter_table_public_posts_drop_column_has_poll/down.yaml b/hasura/hasura-migrations/migrations/1591693205543_alter_table_public_posts_drop_column_has_poll/down.yaml deleted file mode 100644 index 6b612d737..000000000 --- a/hasura/hasura-migrations/migrations/1591693205543_alter_table_public_posts_drop_column_has_poll/down.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ADD COLUMN "has_poll" bool; - type: run_sql -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ALTER COLUMN "has_poll" DROP NOT NULL; - type: run_sql -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ALTER COLUMN "has_poll" SET DEFAULT false; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591693205543_alter_table_public_posts_drop_column_has_poll/up.yaml b/hasura/hasura-migrations/migrations/1591693205543_alter_table_public_posts_drop_column_has_poll/up.yaml deleted file mode 100644 index 60cf12f15..000000000 --- a/hasura/hasura-migrations/migrations/1591693205543_alter_table_public_posts_drop_column_has_poll/up.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" DROP COLUMN "has_poll" CASCADE; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591693227470_alter_table_public_posts_drop_column_poll_block_number_end/down.yaml b/hasura/hasura-migrations/migrations/1591693227470_alter_table_public_posts_drop_column_poll_block_number_end/down.yaml deleted file mode 100644 index 11061bc69..000000000 --- a/hasura/hasura-migrations/migrations/1591693227470_alter_table_public_posts_drop_column_poll_block_number_end/down.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ADD COLUMN "poll_block_number_end" int4; - type: run_sql -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ALTER COLUMN "poll_block_number_end" DROP NOT - NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591693227470_alter_table_public_posts_drop_column_poll_block_number_end/up.yaml b/hasura/hasura-migrations/migrations/1591693227470_alter_table_public_posts_drop_column_poll_block_number_end/up.yaml deleted file mode 100644 index 3676a592d..000000000 --- a/hasura/hasura-migrations/migrations/1591693227470_alter_table_public_posts_drop_column_poll_block_number_end/up.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" DROP COLUMN "poll_block_number_end" CASCADE; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591694916750_drop_table_public_post_votes/down.yaml b/hasura/hasura-migrations/migrations/1591694916750_drop_table_public_post_votes/down.yaml deleted file mode 100644 index fe51488c7..000000000 --- a/hasura/hasura-migrations/migrations/1591694916750_drop_table_public_post_votes/down.yaml +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/hasura/hasura-migrations/migrations/1591694916750_drop_table_public_post_votes/up.yaml b/hasura/hasura-migrations/migrations/1591694916750_drop_table_public_post_votes/up.yaml deleted file mode 100644 index 6aebbbd4a..000000000 --- a/hasura/hasura-migrations/migrations/1591694916750_drop_table_public_post_votes/up.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: DROP TABLE "public"."post_votes"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591710822941_alter_table_public_poll_add_column_post_id/down.yaml b/hasura/hasura-migrations/migrations/1591710822941_alter_table_public_poll_add_column_post_id/down.yaml deleted file mode 100644 index 7fb917778..000000000 --- a/hasura/hasura-migrations/migrations/1591710822941_alter_table_public_poll_add_column_post_id/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll" DROP COLUMN "post_id"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591710822941_alter_table_public_poll_add_column_post_id/up.yaml b/hasura/hasura-migrations/migrations/1591710822941_alter_table_public_poll_add_column_post_id/up.yaml deleted file mode 100644 index d733493b7..000000000 --- a/hasura/hasura-migrations/migrations/1591710822941_alter_table_public_poll_add_column_post_id/up.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll" ADD COLUMN "post_id" integer NOT NULL; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591710846626_set_fk_public_poll_post_id/down.yaml b/hasura/hasura-migrations/migrations/1591710846626_set_fk_public_poll_post_id/down.yaml deleted file mode 100644 index 9f6a66cb0..000000000 --- a/hasura/hasura-migrations/migrations/1591710846626_set_fk_public_poll_post_id/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: alter table "public"."poll" drop constraint "poll_post_id_fkey"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591710846626_set_fk_public_poll_post_id/up.yaml b/hasura/hasura-migrations/migrations/1591710846626_set_fk_public_poll_post_id/up.yaml deleted file mode 100644 index d62f0157a..000000000 --- a/hasura/hasura-migrations/migrations/1591710846626_set_fk_public_poll_post_id/up.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- args: - cascade: false - read_only: false - sql: |- - alter table "public"."poll" - add constraint "poll_post_id_fkey" - foreign key ("post_id") - references "public"."posts" - ("id") on update restrict on delete restrict; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591710865995_add_relationship__table_public_poll/down.yaml b/hasura/hasura-migrations/migrations/1591710865995_add_relationship__table_public_poll/down.yaml deleted file mode 100644 index 32f7032cd..000000000 --- a/hasura/hasura-migrations/migrations/1591710865995_add_relationship__table_public_poll/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post - table: - name: poll - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1591710865995_add_relationship__table_public_poll/up.yaml b/hasura/hasura-migrations/migrations/1591710865995_add_relationship__table_public_poll/up.yaml deleted file mode 100644 index e6d927b7b..000000000 --- a/hasura/hasura-migrations/migrations/1591710865995_add_relationship__table_public_poll/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: post - table: - name: poll - schema: public - using: - foreign_key_constraint_on: post_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1591710875868_drop_relationship_poll_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1591710875868_drop_relationship_poll_public_table_posts/down.yaml deleted file mode 100644 index 5a55bfbe1..000000000 --- a/hasura/hasura-migrations/migrations/1591710875868_drop_relationship_poll_public_table_posts/down.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: poll - table: - name: posts - schema: public - using: - foreign_key_constraint_on: poll_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1591710875868_drop_relationship_poll_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1591710875868_drop_relationship_poll_public_table_posts/up.yaml deleted file mode 100644 index 46e357054..000000000 --- a/hasura/hasura-migrations/migrations/1591710875868_drop_relationship_poll_public_table_posts/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: poll - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1591711198482_add_relationship__table_public_posts/down.yaml b/hasura/hasura-migrations/migrations/1591711198482_add_relationship__table_public_posts/down.yaml deleted file mode 100644 index 46e357054..000000000 --- a/hasura/hasura-migrations/migrations/1591711198482_add_relationship__table_public_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: poll - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1591711198482_add_relationship__table_public_posts/up.yaml b/hasura/hasura-migrations/migrations/1591711198482_add_relationship__table_public_posts/up.yaml deleted file mode 100644 index 5a55bfbe1..000000000 --- a/hasura/hasura-migrations/migrations/1591711198482_add_relationship__table_public_posts/up.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: poll - table: - name: posts - schema: public - using: - foreign_key_constraint_on: poll_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1591711295651_delete_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591711295651_delete_permission_user_public_table_poll/down.yaml deleted file mode 100644 index 2f1b84915..000000000 --- a/hasura/hasura-migrations/migrations/1591711295651_delete_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- args: - permission: - backend_only: false - check: - posts: - author_id: - _eq: X-Hasura-User-Id - columns: - - block_end - set: {} - role: user - table: - name: poll - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1591711295651_delete_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591711295651_delete_permission_user_public_table_poll/up.yaml deleted file mode 100644 index 8074a214f..000000000 --- a/hasura/hasura-migrations/migrations/1591711295651_delete_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1591711298802_delete_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591711298802_delete_permission_user_public_table_poll/down.yaml deleted file mode 100644 index 2de3dfa65..000000000 --- a/hasura/hasura-migrations/migrations/1591711298802_delete_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- args: - permission: - allow_aggregations: true - columns: - - block_end - - id - - created_at - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591711298802_delete_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591711298802_delete_permission_user_public_table_poll/up.yaml deleted file mode 100644 index 92aad81d2..000000000 --- a/hasura/hasura-migrations/migrations/1591711298802_delete_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1591711301778_delete_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591711301778_delete_permission_user_public_table_poll/down.yaml deleted file mode 100644 index 55807f8ea..000000000 --- a/hasura/hasura-migrations/migrations/1591711301778_delete_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,18 +0,0 @@ -- args: - permission: - check: - posts: - author_id: - _eq: X-Hasura-User-Id - columns: - - block_end - filter: - posts: - author_id: - _eq: X-Hasura-User-Id - set: {} - role: user - table: - name: poll - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1591711301778_delete_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591711301778_delete_permission_user_public_table_poll/up.yaml deleted file mode 100644 index 1e9d1b147..000000000 --- a/hasura/hasura-migrations/migrations/1591711301778_delete_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_update_permission diff --git a/hasura/hasura-migrations/migrations/1591711304546_delete_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591711304546_delete_permission_user_public_table_poll/down.yaml deleted file mode 100644 index 46359ec90..000000000 --- a/hasura/hasura-migrations/migrations/1591711304546_delete_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - permission: - filter: - posts: - author_id: - _eq: X-Hasura-User-Id - role: user - table: - name: poll - schema: public - type: create_delete_permission diff --git a/hasura/hasura-migrations/migrations/1591711304546_delete_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591711304546_delete_permission_user_public_table_poll/up.yaml deleted file mode 100644 index aff1db422..000000000 --- a/hasura/hasura-migrations/migrations/1591711304546_delete_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_delete_permission diff --git a/hasura/hasura-migrations/migrations/1591711349916_drop_relationship_posts_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591711349916_drop_relationship_posts_public_table_poll/down.yaml deleted file mode 100644 index 1f95f4c8d..000000000 --- a/hasura/hasura-migrations/migrations/1591711349916_drop_relationship_posts_public_table_poll/down.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: posts - table: - name: poll - schema: public - using: - foreign_key_constraint_on: - column: poll_id - table: - name: posts - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1591711349916_drop_relationship_posts_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591711349916_drop_relationship_posts_public_table_poll/up.yaml deleted file mode 100644 index 61d1271e2..000000000 --- a/hasura/hasura-migrations/migrations/1591711349916_drop_relationship_posts_public_table_poll/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: posts - table: - name: poll - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1591711415750_update_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591711415750_update_permission_user_public_table_poll/down.yaml deleted file mode 100644 index 8074a214f..000000000 --- a/hasura/hasura-migrations/migrations/1591711415750_update_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_insert_permission diff --git a/hasura/hasura-migrations/migrations/1591711415750_update_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591711415750_update_permission_user_public_table_poll/up.yaml deleted file mode 100644 index e20852c4b..000000000 --- a/hasura/hasura-migrations/migrations/1591711415750_update_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- args: - permission: - allow_upsert: true - backend_only: false - check: - post: - author_id: - _eq: X-Hasura-User-Id - columns: - - block_end - - post_id - set: {} - role: user - table: - name: poll - schema: public - type: create_insert_permission diff --git a/hasura/hasura-migrations/migrations/1591711424931_update_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591711424931_update_permission_user_public_table_poll/down.yaml deleted file mode 100644 index 92aad81d2..000000000 --- a/hasura/hasura-migrations/migrations/1591711424931_update_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1591711424931_update_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591711424931_update_permission_user_public_table_poll/up.yaml deleted file mode 100644 index 548343558..000000000 --- a/hasura/hasura-migrations/migrations/1591711424931_update_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,18 +0,0 @@ -- args: - permission: - allow_aggregations: true - backend_only: false - columns: - - block_end - - id - - post_id - - created_at - - updated_at - computed_fields: [] - filter: {} - limit: null - role: user - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591711440804_update_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591711440804_update_permission_user_public_table_poll/down.yaml deleted file mode 100644 index 1e9d1b147..000000000 --- a/hasura/hasura-migrations/migrations/1591711440804_update_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_update_permission diff --git a/hasura/hasura-migrations/migrations/1591711440804_update_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591711440804_update_permission_user_public_table_poll/up.yaml deleted file mode 100644 index 9409dfea4..000000000 --- a/hasura/hasura-migrations/migrations/1591711440804_update_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- args: - permission: - backend_only: false - columns: - - block_end - - post_id - filter: - post: - author_id: - _eq: X-Hasura-User-Id - set: {} - role: user - table: - name: poll - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1591711449429_update_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591711449429_update_permission_user_public_table_poll/down.yaml deleted file mode 100644 index aff1db422..000000000 --- a/hasura/hasura-migrations/migrations/1591711449429_update_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_delete_permission diff --git a/hasura/hasura-migrations/migrations/1591711449429_update_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591711449429_update_permission_user_public_table_poll/up.yaml deleted file mode 100644 index 95985be0a..000000000 --- a/hasura/hasura-migrations/migrations/1591711449429_update_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - permission: - backend_only: false - filter: - post: - author_id: - _eq: X-Hasura-User-Id - role: user - table: - name: poll - schema: public - type: create_delete_permission diff --git a/hasura/hasura-migrations/migrations/1591711486018_drop_relationship_poll_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1591711486018_drop_relationship_poll_public_table_posts/down.yaml deleted file mode 100644 index 5a55bfbe1..000000000 --- a/hasura/hasura-migrations/migrations/1591711486018_drop_relationship_poll_public_table_posts/down.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: poll - table: - name: posts - schema: public - using: - foreign_key_constraint_on: poll_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1591711486018_drop_relationship_poll_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1591711486018_drop_relationship_poll_public_table_posts/up.yaml deleted file mode 100644 index 46e357054..000000000 --- a/hasura/hasura-migrations/migrations/1591711486018_drop_relationship_poll_public_table_posts/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: poll - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1591711496030_alter_table_public_posts_drop_column_poll_id/down.yaml b/hasura/hasura-migrations/migrations/1591711496030_alter_table_public_posts_drop_column_poll_id/down.yaml deleted file mode 100644 index 32b8dd528..000000000 --- a/hasura/hasura-migrations/migrations/1591711496030_alter_table_public_posts_drop_column_poll_id/down.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ADD COLUMN "poll_id" int4; - type: run_sql -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ALTER COLUMN "poll_id" DROP NOT NULL; - type: run_sql -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" ADD CONSTRAINT posts_poll_id_fkey FOREIGN KEY - (poll_id) REFERENCES "public"."poll" (id) ON DELETE restrict ON UPDATE restrict; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591711496030_alter_table_public_posts_drop_column_poll_id/up.yaml b/hasura/hasura-migrations/migrations/1591711496030_alter_table_public_posts_drop_column_poll_id/up.yaml deleted file mode 100644 index 151405828..000000000 --- a/hasura/hasura-migrations/migrations/1591711496030_alter_table_public_posts_drop_column_poll_id/up.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."posts" DROP COLUMN "poll_id" CASCADE; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591714881453_update_permission_anonymous_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591714881453_update_permission_anonymous_public_table_poll/down.yaml deleted file mode 100644 index e65d46ee9..000000000 --- a/hasura/hasura-migrations/migrations/1591714881453_update_permission_anonymous_public_table_poll/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: anonymous - table: - name: poll - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - id - - block_end - - created_at - - updated_at - computed_fields: [] - filter: {} - role: anonymous - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591714881453_update_permission_anonymous_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591714881453_update_permission_anonymous_public_table_poll/up.yaml deleted file mode 100644 index 14c85f27b..000000000 --- a/hasura/hasura-migrations/migrations/1591714881453_update_permission_anonymous_public_table_poll/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: poll - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - id - - block_end - - created_at - - updated_at - - post_id - computed_fields: [] - filter: {} - role: anonymous - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591783921171_update_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591783921171_update_permission_user_public_table_poll/down.yaml deleted file mode 100644 index f9316170c..000000000 --- a/hasura/hasura-migrations/migrations/1591783921171_update_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_update_permission -- args: - permission: - columns: - - block_end - - post_id - filter: - post: - author_id: - _eq: X-Hasura-User-Id - set: {} - role: user - table: - name: poll - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1591783921171_update_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591783921171_update_permission_user_public_table_poll/up.yaml deleted file mode 100644 index 24e3ed263..000000000 --- a/hasura/hasura-migrations/migrations/1591783921171_update_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_update_permission -- args: - permission: - columns: - - block_end - filter: - post: - author_id: - _eq: X-Hasura-User-Id - set: {} - role: user - table: - name: poll - schema: public - type: create_update_permission diff --git a/hasura/hasura-migrations/migrations/1591783928515_delete_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591783928515_delete_permission_user_public_table_poll/down.yaml deleted file mode 100644 index 39594d5bf..000000000 --- a/hasura/hasura-migrations/migrations/1591783928515_delete_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - permission: - filter: - post: - author_id: - _eq: X-Hasura-User-Id - role: user - table: - name: poll - schema: public - type: create_delete_permission diff --git a/hasura/hasura-migrations/migrations/1591783928515_delete_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591783928515_delete_permission_user_public_table_poll/up.yaml deleted file mode 100644 index aff1db422..000000000 --- a/hasura/hasura-migrations/migrations/1591783928515_delete_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_delete_permission diff --git a/hasura/hasura-migrations/migrations/1591784156111_update_permission_anonymous_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591784156111_update_permission_anonymous_public_table_poll/down.yaml deleted file mode 100644 index 14c85f27b..000000000 --- a/hasura/hasura-migrations/migrations/1591784156111_update_permission_anonymous_public_table_poll/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: poll - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - id - - block_end - - created_at - - updated_at - - post_id - computed_fields: [] - filter: {} - role: anonymous - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591784156111_update_permission_anonymous_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591784156111_update_permission_anonymous_public_table_poll/up.yaml deleted file mode 100644 index 213d0e746..000000000 --- a/hasura/hasura-migrations/migrations/1591784156111_update_permission_anonymous_public_table_poll/up.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: anonymous - table: - name: poll - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - block_end - - created_at - - id - - post_id - computed_fields: [] - filter: {} - role: anonymous - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591784203328_update_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591784203328_update_permission_user_public_table_poll/down.yaml deleted file mode 100644 index 4d64a5e50..000000000 --- a/hasura/hasura-migrations/migrations/1591784203328_update_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - block_end - - id - - post_id - - created_at - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591784203328_update_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591784203328_update_permission_user_public_table_poll/up.yaml deleted file mode 100644 index 4ef52a7d2..000000000 --- a/hasura/hasura-migrations/migrations/1591784203328_update_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - block_end - - created_at - - id - - post_id - computed_fields: [] - filter: {} - role: user - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591784218585_alter_table_public_poll_drop_column_updated_at/down.yaml b/hasura/hasura-migrations/migrations/1591784218585_alter_table_public_poll_drop_column_updated_at/down.yaml deleted file mode 100644 index cad1e1d46..000000000 --- a/hasura/hasura-migrations/migrations/1591784218585_alter_table_public_poll_drop_column_updated_at/down.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll" ADD COLUMN "updated_at" timestamp; - type: run_sql -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll" ALTER COLUMN "updated_at" DROP NOT NULL; - type: run_sql -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll" ALTER COLUMN "updated_at" SET DEFAULT now(); - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591784218585_alter_table_public_poll_drop_column_updated_at/up.yaml b/hasura/hasura-migrations/migrations/1591784218585_alter_table_public_poll_drop_column_updated_at/up.yaml deleted file mode 100644 index 406634042..000000000 --- a/hasura/hasura-migrations/migrations/1591784218585_alter_table_public_poll_drop_column_updated_at/up.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll" DROP COLUMN "updated_at" CASCADE; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591784231257_alter_table_public_poll_add_column_updated_at/down.yaml b/hasura/hasura-migrations/migrations/1591784231257_alter_table_public_poll_add_column_updated_at/down.yaml deleted file mode 100644 index 9a769c10c..000000000 --- a/hasura/hasura-migrations/migrations/1591784231257_alter_table_public_poll_add_column_updated_at/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - cascade: false - read_only: false - sql: |- - DROP TRIGGER IF EXISTS "set_public_poll_updated_at" ON "public"."poll"; - ALTER TABLE "public"."poll" DROP COLUMN "updated_at"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591784231257_alter_table_public_poll_add_column_updated_at/up.yaml b/hasura/hasura-migrations/migrations/1591784231257_alter_table_public_poll_add_column_updated_at/up.yaml deleted file mode 100644 index 8ed9d5c01..000000000 --- a/hasura/hasura-migrations/migrations/1591784231257_alter_table_public_poll_add_column_updated_at/up.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- args: - cascade: false - read_only: false - sql: "ALTER TABLE \"public\".\"poll\" ADD COLUMN \"updated_at\" timestamptz NULL - DEFAULT now();\n\nCREATE OR REPLACE FUNCTION \"public\".\"set_current_timestamp_updated_at\"()\nRETURNS - TRIGGER AS $$\nDECLARE\n _new record;\nBEGIN\n _new := NEW;\n _new.\"updated_at\" - = NOW();\n RETURN _new;\nEND;\n$$ LANGUAGE plpgsql;\nCREATE TRIGGER \"set_public_poll_updated_at\"\nBEFORE - UPDATE ON \"public\".\"poll\"\nFOR EACH ROW\nEXECUTE PROCEDURE \"public\".\"set_current_timestamp_updated_at\"();\nCOMMENT - ON TRIGGER \"set_public_poll_updated_at\" ON \"public\".\"poll\" \nIS 'trigger - to set value of column \"updated_at\" to current timestamp on row update';" - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591784238235_update_permission_anonymous_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591784238235_update_permission_anonymous_public_table_poll/down.yaml deleted file mode 100644 index 213d0e746..000000000 --- a/hasura/hasura-migrations/migrations/1591784238235_update_permission_anonymous_public_table_poll/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: anonymous - table: - name: poll - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - block_end - - created_at - - id - - post_id - computed_fields: [] - filter: {} - role: anonymous - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591784238235_update_permission_anonymous_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591784238235_update_permission_anonymous_public_table_poll/up.yaml deleted file mode 100644 index bec513f4c..000000000 --- a/hasura/hasura-migrations/migrations/1591784238235_update_permission_anonymous_public_table_poll/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: poll - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - id - - block_end - - created_at - - post_id - - updated_at - computed_fields: [] - filter: {} - role: anonymous - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591784245879_update_permission_user_public_table_poll/down.yaml b/hasura/hasura-migrations/migrations/1591784245879_update_permission_user_public_table_poll/down.yaml deleted file mode 100644 index 4ef52a7d2..000000000 --- a/hasura/hasura-migrations/migrations/1591784245879_update_permission_user_public_table_poll/down.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - block_end - - created_at - - id - - post_id - computed_fields: [] - filter: {} - role: user - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591784245879_update_permission_user_public_table_poll/up.yaml b/hasura/hasura-migrations/migrations/1591784245879_update_permission_user_public_table_poll/up.yaml deleted file mode 100644 index 4d64a5e50..000000000 --- a/hasura/hasura-migrations/migrations/1591784245879_update_permission_user_public_table_poll/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: poll - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - block_end - - id - - post_id - - created_at - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: poll - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591784265460_update_permission_anonymous_public_table_poll_votes/down.yaml b/hasura/hasura-migrations/migrations/1591784265460_update_permission_anonymous_public_table_poll_votes/down.yaml deleted file mode 100644 index 9c476ac53..000000000 --- a/hasura/hasura-migrations/migrations/1591784265460_update_permission_anonymous_public_table_poll_votes/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: anonymous - table: - name: poll_votes - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - id - - poll_id - - user_id - - vote - - created_at - - updated_at - computed_fields: [] - filter: {} - role: anonymous - table: - name: poll_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591784265460_update_permission_anonymous_public_table_poll_votes/up.yaml b/hasura/hasura-migrations/migrations/1591784265460_update_permission_anonymous_public_table_poll_votes/up.yaml deleted file mode 100644 index b4229b643..000000000 --- a/hasura/hasura-migrations/migrations/1591784265460_update_permission_anonymous_public_table_poll_votes/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: poll_votes - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - poll_id - - user_id - - vote - computed_fields: [] - filter: {} - role: anonymous - table: - name: poll_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591784271440_update_permission_user_public_table_poll_votes/down.yaml b/hasura/hasura-migrations/migrations/1591784271440_update_permission_user_public_table_poll_votes/down.yaml deleted file mode 100644 index fd4ff6ba1..000000000 --- a/hasura/hasura-migrations/migrations/1591784271440_update_permission_user_public_table_poll_votes/down.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: poll_votes - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - vote - - id - - poll_id - - user_id - - created_at - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: poll_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591784271440_update_permission_user_public_table_poll_votes/up.yaml b/hasura/hasura-migrations/migrations/1591784271440_update_permission_user_public_table_poll_votes/up.yaml deleted file mode 100644 index c8aed703f..000000000 --- a/hasura/hasura-migrations/migrations/1591784271440_update_permission_user_public_table_poll_votes/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: poll_votes - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - poll_id - - user_id - - vote - computed_fields: [] - filter: {} - role: user - table: - name: poll_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591784279283_alter_table_public_poll_votes_drop_column_updated_at/down.yaml b/hasura/hasura-migrations/migrations/1591784279283_alter_table_public_poll_votes_drop_column_updated_at/down.yaml deleted file mode 100644 index 857fb2188..000000000 --- a/hasura/hasura-migrations/migrations/1591784279283_alter_table_public_poll_votes_drop_column_updated_at/down.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll_votes" ADD COLUMN "updated_at" timestamp; - type: run_sql -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll_votes" ALTER COLUMN "updated_at" DROP NOT NULL; - type: run_sql -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll_votes" ALTER COLUMN "updated_at" SET DEFAULT now(); - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591784279283_alter_table_public_poll_votes_drop_column_updated_at/up.yaml b/hasura/hasura-migrations/migrations/1591784279283_alter_table_public_poll_votes_drop_column_updated_at/up.yaml deleted file mode 100644 index 57175da15..000000000 --- a/hasura/hasura-migrations/migrations/1591784279283_alter_table_public_poll_votes_drop_column_updated_at/up.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: ALTER TABLE "public"."poll_votes" DROP COLUMN "updated_at" CASCADE; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591784288149_alter_table_public_poll_votes_add_column_updated_at/down.yaml b/hasura/hasura-migrations/migrations/1591784288149_alter_table_public_poll_votes_add_column_updated_at/down.yaml deleted file mode 100644 index ec74f3d1e..000000000 --- a/hasura/hasura-migrations/migrations/1591784288149_alter_table_public_poll_votes_add_column_updated_at/down.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- args: - cascade: false - read_only: false - sql: |- - DROP TRIGGER IF EXISTS "set_public_poll_votes_updated_at" ON "public"."poll_votes"; - ALTER TABLE "public"."poll_votes" DROP COLUMN "updated_at"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591784288149_alter_table_public_poll_votes_add_column_updated_at/up.yaml b/hasura/hasura-migrations/migrations/1591784288149_alter_table_public_poll_votes_add_column_updated_at/up.yaml deleted file mode 100644 index 326ff8d0b..000000000 --- a/hasura/hasura-migrations/migrations/1591784288149_alter_table_public_poll_votes_add_column_updated_at/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - cascade: false - read_only: false - sql: "ALTER TABLE \"public\".\"poll_votes\" ADD COLUMN \"updated_at\" timestamptz - NULL DEFAULT now();\n\nCREATE OR REPLACE FUNCTION \"public\".\"set_current_timestamp_updated_at\"()\nRETURNS - TRIGGER AS $$\nDECLARE\n _new record;\nBEGIN\n _new := NEW;\n _new.\"updated_at\" - = NOW();\n RETURN _new;\nEND;\n$$ LANGUAGE plpgsql;\nCREATE TRIGGER \"set_public_poll_votes_updated_at\"\nBEFORE - UPDATE ON \"public\".\"poll_votes\"\nFOR EACH ROW\nEXECUTE PROCEDURE \"public\".\"set_current_timestamp_updated_at\"();\nCOMMENT - ON TRIGGER \"set_public_poll_votes_updated_at\" ON \"public\".\"poll_votes\" - \nIS 'trigger to set value of column \"updated_at\" to current timestamp on - row update';" - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1591784367682_add_relationship__table_public_posts/down.yaml b/hasura/hasura-migrations/migrations/1591784367682_add_relationship__table_public_posts/down.yaml deleted file mode 100644 index c08e590a7..000000000 --- a/hasura/hasura-migrations/migrations/1591784367682_add_relationship__table_public_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: polls - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1591784367682_add_relationship__table_public_posts/up.yaml b/hasura/hasura-migrations/migrations/1591784367682_add_relationship__table_public_posts/up.yaml deleted file mode 100644 index 20ea07cd6..000000000 --- a/hasura/hasura-migrations/migrations/1591784367682_add_relationship__table_public_posts/up.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- args: - name: polls - table: - name: posts - schema: public - using: - foreign_key_constraint_on: - column: post_id - table: - name: poll - schema: public - type: create_array_relationship diff --git a/hasura/hasura-migrations/migrations/1591787142733_update_permission_anonymous_public_table_poll_votes/down.yaml b/hasura/hasura-migrations/migrations/1591787142733_update_permission_anonymous_public_table_poll_votes/down.yaml deleted file mode 100644 index b4229b643..000000000 --- a/hasura/hasura-migrations/migrations/1591787142733_update_permission_anonymous_public_table_poll_votes/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: anonymous - table: - name: poll_votes - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - poll_id - - user_id - - vote - computed_fields: [] - filter: {} - role: anonymous - table: - name: poll_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591787142733_update_permission_anonymous_public_table_poll_votes/up.yaml b/hasura/hasura-migrations/migrations/1591787142733_update_permission_anonymous_public_table_poll_votes/up.yaml deleted file mode 100644 index 9c476ac53..000000000 --- a/hasura/hasura-migrations/migrations/1591787142733_update_permission_anonymous_public_table_poll_votes/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: anonymous - table: - name: poll_votes - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - id - - poll_id - - user_id - - vote - - created_at - - updated_at - computed_fields: [] - filter: {} - role: anonymous - table: - name: poll_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591787147722_update_permission_user_public_table_poll_votes/down.yaml b/hasura/hasura-migrations/migrations/1591787147722_update_permission_user_public_table_poll_votes/down.yaml deleted file mode 100644 index c8aed703f..000000000 --- a/hasura/hasura-migrations/migrations/1591787147722_update_permission_user_public_table_poll_votes/down.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - role: user - table: - name: poll_votes - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - created_at - - id - - poll_id - - user_id - - vote - computed_fields: [] - filter: {} - role: user - table: - name: poll_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591787147722_update_permission_user_public_table_poll_votes/up.yaml b/hasura/hasura-migrations/migrations/1591787147722_update_permission_user_public_table_poll_votes/up.yaml deleted file mode 100644 index fd4ff6ba1..000000000 --- a/hasura/hasura-migrations/migrations/1591787147722_update_permission_user_public_table_poll_votes/up.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- args: - role: user - table: - name: poll_votes - schema: public - type: drop_select_permission -- args: - permission: - allow_aggregations: true - columns: - - vote - - id - - poll_id - - user_id - - created_at - - updated_at - computed_fields: [] - filter: {} - role: user - table: - name: poll_votes - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591974115375_run_sql_migration/down.yaml b/hasura/hasura-migrations/migrations/1591974115375_run_sql_migration/down.yaml deleted file mode 100644 index fe51488c7..000000000 --- a/hasura/hasura-migrations/migrations/1591974115375_run_sql_migration/down.yaml +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/hasura/hasura-migrations/migrations/1591974115375_run_sql_migration/up.yaml b/hasura/hasura-migrations/migrations/1591974115375_run_sql_migration/up.yaml deleted file mode 100644 index dd0c09800..000000000 --- a/hasura/hasura-migrations/migrations/1591974115375_run_sql_migration/up.yaml +++ /dev/null @@ -1,22 +0,0 @@ -- args: - cascade: false - read_only: false - sql: |- - CREATE VIEW post_last_update AS - SELECT c1.id AS comment_id, - p.id AS post_id, - max( - CASE - WHEN (c1.* IS NULL) THEN p.created_at - ELSE c1.created_at - END) AS last_update - FROM ((posts p - LEFT JOIN comments c1 ON ((p.id = c1.post_id))) - LEFT JOIN comments c2 ON (((p.id = c2.post_id) AND ((c1.created_at < c2.created_at) OR ((c1.created_at = c2.created_at) AND (c1.id < c2.id)))))) - WHERE (c2.id IS NULL) - GROUP BY p.id, c1.id; - type: run_sql -- args: - name: post_last_update - schema: public - type: add_existing_table_or_view diff --git a/hasura/hasura-migrations/migrations/1591974154804_create_relationship_post_public_table_post_last_update/down.yaml b/hasura/hasura-migrations/migrations/1591974154804_create_relationship_post_public_table_post_last_update/down.yaml deleted file mode 100644 index 838749639..000000000 --- a/hasura/hasura-migrations/migrations/1591974154804_create_relationship_post_public_table_post_last_update/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post - table: - name: post_last_update - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1591974154804_create_relationship_post_public_table_post_last_update/up.yaml b/hasura/hasura-migrations/migrations/1591974154804_create_relationship_post_public_table_post_last_update/up.yaml deleted file mode 100644 index 564a005cd..000000000 --- a/hasura/hasura-migrations/migrations/1591974154804_create_relationship_post_public_table_post_last_update/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - name: post - table: - name: post_last_update - schema: public - using: - manual_configuration: - column_mapping: - post_id: id - remote_table: - name: posts - schema: public - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1591974175368_update_permission_anonymous_public_table_post_last_update/down.yaml b/hasura/hasura-migrations/migrations/1591974175368_update_permission_anonymous_public_table_post_last_update/down.yaml deleted file mode 100644 index aadbc0e19..000000000 --- a/hasura/hasura-migrations/migrations/1591974175368_update_permission_anonymous_public_table_post_last_update/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: anonymous - table: - name: post_last_update - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1591974175368_update_permission_anonymous_public_table_post_last_update/up.yaml b/hasura/hasura-migrations/migrations/1591974175368_update_permission_anonymous_public_table_post_last_update/up.yaml deleted file mode 100644 index 9826ad960..000000000 --- a/hasura/hasura-migrations/migrations/1591974175368_update_permission_anonymous_public_table_post_last_update/up.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- args: - permission: - allow_aggregations: false - backend_only: false - columns: - - comment_id - - post_id - - last_update - computed_fields: [] - filter: {} - limit: null - role: anonymous - table: - name: post_last_update - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1591974197981_update_permission_user_public_table_post_last_update/down.yaml b/hasura/hasura-migrations/migrations/1591974197981_update_permission_user_public_table_post_last_update/down.yaml deleted file mode 100644 index 222af3f92..000000000 --- a/hasura/hasura-migrations/migrations/1591974197981_update_permission_user_public_table_post_last_update/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - role: user - table: - name: post_last_update - schema: public - type: drop_select_permission diff --git a/hasura/hasura-migrations/migrations/1591974197981_update_permission_user_public_table_post_last_update/up.yaml b/hasura/hasura-migrations/migrations/1591974197981_update_permission_user_public_table_post_last_update/up.yaml deleted file mode 100644 index 96084c4f1..000000000 --- a/hasura/hasura-migrations/migrations/1591974197981_update_permission_user_public_table_post_last_update/up.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- args: - permission: - allow_aggregations: false - backend_only: false - columns: - - post_id - - last_update - - comment_id - computed_fields: [] - filter: {} - limit: null - role: user - table: - name: post_last_update - schema: public - type: create_select_permission diff --git a/hasura/hasura-migrations/migrations/1592305332830_drop_relationship_post_public_table_post_last_update/down.yaml b/hasura/hasura-migrations/migrations/1592305332830_drop_relationship_post_public_table_post_last_update/down.yaml deleted file mode 100644 index 966aaedc4..000000000 --- a/hasura/hasura-migrations/migrations/1592305332830_drop_relationship_post_public_table_post_last_update/down.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- args: - name: post - table: - name: post_last_update - schema: public - using: - foreign_key_constraint_on: post_id - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1592305332830_drop_relationship_post_public_table_post_last_update/up.yaml b/hasura/hasura-migrations/migrations/1592305332830_drop_relationship_post_public_table_post_last_update/up.yaml deleted file mode 100644 index 838749639..000000000 --- a/hasura/hasura-migrations/migrations/1592305332830_drop_relationship_post_public_table_post_last_update/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: post - table: - name: post_last_update - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1592305755095_create_relationship_last_update_public_table_posts/down.yaml b/hasura/hasura-migrations/migrations/1592305755095_create_relationship_last_update_public_table_posts/down.yaml deleted file mode 100644 index 900901d36..000000000 --- a/hasura/hasura-migrations/migrations/1592305755095_create_relationship_last_update_public_table_posts/down.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - relationship: last_update - table: - name: posts - schema: public - type: drop_relationship diff --git a/hasura/hasura-migrations/migrations/1592305755095_create_relationship_last_update_public_table_posts/up.yaml b/hasura/hasura-migrations/migrations/1592305755095_create_relationship_last_update_public_table_posts/up.yaml deleted file mode 100644 index bbcb396cb..000000000 --- a/hasura/hasura-migrations/migrations/1592305755095_create_relationship_last_update_public_table_posts/up.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- args: - name: last_update - table: - name: posts - schema: public - using: - manual_configuration: - column_mapping: - id: post_id - remote_table: - name: post_last_update - schema: public - type: create_object_relationship diff --git a/hasura/hasura-migrations/migrations/1592400318046_alter_table_public_poll_votes_add_unique_poll_id_user_id/down.yaml b/hasura/hasura-migrations/migrations/1592400318046_alter_table_public_poll_votes_add_unique_poll_id_user_id/down.yaml deleted file mode 100644 index 03a680c98..000000000 --- a/hasura/hasura-migrations/migrations/1592400318046_alter_table_public_poll_votes_add_unique_poll_id_user_id/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: alter table "public"."poll_votes" drop constraint "poll_votes_poll_id_user_id_key"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1592400318046_alter_table_public_poll_votes_add_unique_poll_id_user_id/up.yaml b/hasura/hasura-migrations/migrations/1592400318046_alter_table_public_poll_votes_add_unique_poll_id_user_id/up.yaml deleted file mode 100644 index 341ce24b7..000000000 --- a/hasura/hasura-migrations/migrations/1592400318046_alter_table_public_poll_votes_add_unique_poll_id_user_id/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - cascade: false - read_only: false - sql: alter table "public"."poll_votes" add constraint "poll_votes_poll_id_user_id_key" - unique ("poll_id", "user_id"); - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1592400359607_alter_table_public_comment_reactions_add_unique_comment_id_user_id_reaction/down.yaml b/hasura/hasura-migrations/migrations/1592400359607_alter_table_public_comment_reactions_add_unique_comment_id_user_id_reaction/down.yaml deleted file mode 100644 index 19aa4772c..000000000 --- a/hasura/hasura-migrations/migrations/1592400359607_alter_table_public_comment_reactions_add_unique_comment_id_user_id_reaction/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: alter table "public"."comment_reactions" drop constraint "comment_reactions_comment_id_user_id_reaction_key"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1592400359607_alter_table_public_comment_reactions_add_unique_comment_id_user_id_reaction/up.yaml b/hasura/hasura-migrations/migrations/1592400359607_alter_table_public_comment_reactions_add_unique_comment_id_user_id_reaction/up.yaml deleted file mode 100644 index 4301ca1bd..000000000 --- a/hasura/hasura-migrations/migrations/1592400359607_alter_table_public_comment_reactions_add_unique_comment_id_user_id_reaction/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - cascade: false - read_only: false - sql: alter table "public"."comment_reactions" add constraint "comment_reactions_comment_id_user_id_reaction_key" - unique ("comment_id", "user_id", "reaction"); - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1592400398659_alter_table_public_post_reactions_add_unique_post_id_user_id_reaction/down.yaml b/hasura/hasura-migrations/migrations/1592400398659_alter_table_public_post_reactions_add_unique_post_id_user_id_reaction/down.yaml deleted file mode 100644 index b15874909..000000000 --- a/hasura/hasura-migrations/migrations/1592400398659_alter_table_public_post_reactions_add_unique_post_id_user_id_reaction/down.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- args: - cascade: false - read_only: false - sql: alter table "public"."post_reactions" drop constraint "post_reactions_post_id_user_id_reaction_key"; - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1592400398659_alter_table_public_post_reactions_add_unique_post_id_user_id_reaction/up.yaml b/hasura/hasura-migrations/migrations/1592400398659_alter_table_public_post_reactions_add_unique_post_id_user_id_reaction/up.yaml deleted file mode 100644 index 57ffdc139..000000000 --- a/hasura/hasura-migrations/migrations/1592400398659_alter_table_public_post_reactions_add_unique_post_id_user_id_reaction/up.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- args: - cascade: false - read_only: false - sql: alter table "public"."post_reactions" add constraint "post_reactions_post_id_user_id_reaction_key" - unique ("post_id", "user_id", "reaction"); - type: run_sql diff --git a/hasura/hasura-migrations/migrations/1593523732824_squashed/down.sql b/hasura/hasura-migrations/migrations/1593523732824_squashed/down.sql new file mode 100644 index 000000000..b45cb41b2 --- /dev/null +++ b/hasura/hasura-migrations/migrations/1593523732824_squashed/down.sql @@ -0,0 +1,173 @@ + + +ALTER TABLE "public"."onchain_links" DROP COLUMN "onchain_tip_id"; + +alter table "public"."post_reactions" drop constraint "post_reactions_post_id_user_id_reaction_key"; + +alter table "public"."comment_reactions" drop constraint "comment_reactions_comment_id_user_id_reaction_key"; + +alter table "public"."poll_votes" drop constraint "poll_votes_poll_id_user_id_key"; + +DELETE VIEW post_last_update + +DROP TRIGGER IF EXISTS "set_public_poll_votes_updated_at" ON "public"."poll_votes"; +ALTER TABLE "public"."poll_votes" DROP COLUMN "updated_at"; + +DROP TRIGGER IF EXISTS "set_public_poll_updated_at" ON "public"."poll"; +ALTER TABLE "public"."poll" DROP COLUMN "updated_at"; + +alter table "public"."poll" drop constraint "poll_post_id_fkey"; + +ALTER TABLE "public"."poll" DROP COLUMN "post_id"; + +DROP TABLE "public"."poll_votes"; + +ALTER TABLE "public"."posts" ADD COLUMN "poll_block_number_end" int4; +ALTER TABLE "public"."posts" ALTER COLUMN "poll_block_number_end" DROP NOT NULL; + +ALTER TABLE "public"."poll" DROP COLUMN "updated_at"; + +ALTER TABLE "public"."poll" DROP COLUMN "created_at"; + +DROP TABLE "public"."poll_votes"; + +DROP TABLE "public"."poll"; + +alter table "public"."posts" rename column "poll_block_number_end" to "block_number"; + +ALTER TABLE "public"."posts" DROP COLUMN "block_number"; + +ALTER TABLE ONLY "public"."posts" ALTER COLUMN "title" SET DEFAULT ''no title'::text'; +ALTER TABLE "public"."posts" ALTER COLUMN "title" SET NOT NULL; + +ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction" TYPE character; +COMMENT ON COLUMN "public"."comment_reactions"."reaction" IS E'null' + +ALTER TABLE "public"."post_reactions" ALTER COLUMN "reaction" TYPE character; +COMMENT ON COLUMN "public"."post_reactions"."reaction" IS E'null' + +ALTER TABLE "public"."post_reactions" ADD COLUMN "reaction_id" int4 +ALTER TABLE "public"."post_reactions" ALTER COLUMN "reaction_id" DROP NOT NULL + +ALTER TABLE "public"."comment_reactions" ADD COLUMN "reaction_id" int4 +ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction_id" DROP NOT NULL + +ALTER TABLE "public"."post_reactions" DROP COLUMN "reaction"; + +ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction" TYPE character; +ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction" DROP NOT NULL; +COMMENT ON COLUMN "public"."comment_reactions"."reaction" IS E'null' + +ALTER TABLE "public"."comment_reactions" DROP COLUMN "reaction"; + +alter table "public"."comment_reactions" add foreign key ("reaction_id") references "public"."reactions"("id") on update cascade on delete cascade; + +alter table "public"."post_reactions" add foreign key ("reaction_id") references "public"."reactions"("id") on update cascade on delete cascade; + +DROP TABLE "public"."comment_reactions" + +DROP TABLE "public"."post_reactions" + +ALTER TABLE "public"."onchain_links" ALTER COLUMN "onchain_treasury_proposal_id" TYPE integer; +ALTER TABLE "public"."onchain_links" ADD CONSTRAINT "onchain_links_onchain_treasury_proposal_id_key" UNIQUE ("onchain_treasury_proposal_id") +COMMENT ON COLUMN "public"."onchain_links"."onchain_treasury_proposal_id" IS E'null' + +ALTER TABLE "public"."onchain_links" DROP COLUMN "onchain_treasury_proposal_id"; + +ALTER TABLE "public"."comments" ADD COLUMN "parent_comment_id" uuid +ALTER TABLE "public"."comments" ALTER COLUMN "parent_comment_id" DROP NOT NULL + +alter table "public"."comments" add foreign key ("parent_comment_id") references "public"."comments"("id") on update no action on delete no action; + +ALTER TABLE "public"."onchain_links" DROP COLUMN "onchain_motion_id"; + +ALTER TABLE "public"."posts" ALTER COLUMN "updated_at" TYPE timestamp with time zone; +ALTER TABLE "public"."posts" ALTER COLUMN "updated_at" DROP NOT NULL; +COMMENT ON COLUMN "public"."posts"."updated_at" IS E'null' + +ALTER TABLE "public"."posts" ALTER COLUMN "created_at" TYPE timestamp with time zone; +ALTER TABLE "public"."posts" ALTER COLUMN "created_at" DROP NOT NULL; +COMMENT ON COLUMN "public"."posts"."created_at" IS E'null' + +ALTER TABLE "public"."posts" ALTER COLUMN "topic_id" TYPE integer; +ALTER TABLE "public"."posts" ALTER COLUMN "topic_id" DROP NOT NULL; + +ALTER TABLE "public"."onchain_links" ALTER COLUMN "onchain_proposal_id" TYPE integer; +ALTER TABLE "public"."onchain_links" ALTER COLUMN "onchain_proposal_id" SET NOT NULL; +COMMENT ON COLUMN "public"."onchain_links"."onchain_proposal_id" IS E'null' + +ALTER TABLE "public"."onchain_links" DROP COLUMN "onchain_referendum_id"; + +alter table "public"."onchain_links" rename to "onchain_proposals"; + +ALTER TABLE "public"."onchain_proposals" ALTER COLUMN "chain_db_id" TYPE integer; +COMMENT ON COLUMN "public"."onchain_proposals"."chain_db_id" IS E'null' +alter table "public"."onchain_proposals" rename column "onchain_proposal_id" to "chain_db_id"; + +ALTER TABLE "public"."onchain_proposals" DROP COLUMN "proposer_address"; + +ALTER TABLE "public"."onchain_proposals" DROP COLUMN "chain_db_id"; + +ALTER TABLE "public"."onchain_proposals" ADD COLUMN "chain_db_id" uuid +ALTER TABLE "public"."onchain_proposals" ALTER COLUMN "chain_db_id" DROP NOT NULL +ALTER TABLE "public"."onchain_proposals" ADD CONSTRAINT proposals_chain_db_id_key UNIQUE (chain_db_id) + +alter table "public"."onchain_proposals" rename to "proposals"; + + +alter table "public"."proposals" drop constraint "proposals_post_id_fkey" + + +DROP TABLE "public"."proposals" + +COMMENT ON COLUMN "public"."comments"."parent_comment" IS E'null' +alter table "public"."comments" rename column "parent_comment_id" to "parent_comment"; + + +alter table "public"."comments" drop constraint "comments_post_id_fkey" + + +COMMENT ON COLUMN "public"."comments"."parent_message" IS E'null' +alter table "public"."comments" rename column "parent_comment" to "parent_message"; + +DROP TRIGGER IF EXISTS "set_public_comments_updated_at" ON "public"."comments"; +ALTER TABLE "public"."comments" DROP COLUMN "updated_at"; + +ALTER TABLE "public"."comments" DROP COLUMN "created_at"; + +ALTER TABLE "public"."comments" DROP COLUMN "author_id"; + +ALTER TABLE "public"."comments" DROP COLUMN "post_id"; + +COMMENT ON COLUMN "public"."comments"."parent_message" IS E'null' + +DROP TABLE comments; + +alter table "public"."post_topics" rename to "topics"; + +DROP TRIGGER IF EXISTS "set_public_posts_updated_at" ON "public"."posts"; +ALTER TABLE "public"."posts" DROP COLUMN "updated_at"; + +ALTER TABLE "public"."posts" DROP COLUMN "created_at"; + + +alter table "public"."posts" drop constraint "posts_type_id_fkey" + + +ALTER TABLE "public"."posts" DROP COLUMN "type_id"; + +DROP TABLE "public"."post_types" + +ALTER TABLE "public"."posts" ALTER COLUMN "category_id" TYPE integer; +ALTER TABLE "public"."posts" ALTER COLUMN "category_id" SET NOT NULL; +COMMENT ON COLUMN "public"."posts"."category_id" IS E'null' +alter table "public"."posts" rename column "topic_id" to "category_id"; + +alter table "public"."topics" rename to "categories"; + +DELETE FUNCTION public.set_current_timestamp_updated_at; +DELETE FUNCTION public.truncate_tables; +DROP TABLE public.posts; +DROP TABLE public.categ; +DROP SEQUENCE public.categories_id_seq; +DROP SEQUENCE public.messages_id_seq; \ No newline at end of file diff --git a/hasura/hasura-migrations/migrations/1593523732824_squashed/up.sql b/hasura/hasura-migrations/migrations/1593523732824_squashed/up.sql new file mode 100644 index 000000000..71b203def --- /dev/null +++ b/hasura/hasura-migrations/migrations/1593523732824_squashed/up.sql @@ -0,0 +1,318 @@ + +CREATE FUNCTION public.set_current_timestamp_updated_at() RETURNS trigger + LANGUAGE plpgsql + AS $$ +DECLARE + _new record; +BEGIN + _new := NEW; + _new."updated_at" = NOW(); + RETURN _new; +END; +$$; +CREATE FUNCTION public.truncate_tables(username character varying) RETURNS void + LANGUAGE plpgsql + AS $$ +DECLARE + statements CURSOR FOR + SELECT tablename FROM pg_tables + WHERE tableowner = username AND schemaname = 'public'; +BEGIN + FOR stmt IN statements LOOP + EXECUTE 'TRUNCATE TABLE ' || quote_ident(stmt.tablename) || ' CASCADE;'; + END LOOP; +END; +$$; +CREATE TABLE public.posts ( + id integer NOT NULL, + author_id integer NOT NULL, + content text, + title text DEFAULT 'no title'::text NOT NULL, + category_id integer DEFAULT 2 NOT NULL +); +CREATE TABLE public.categories ( + id integer NOT NULL, + name text NOT NULL +); +CREATE SEQUENCE public.categories_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; +ALTER SEQUENCE public.categories_id_seq OWNED BY public.categories.id; +CREATE SEQUENCE public.messages_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; +ALTER SEQUENCE public.messages_id_seq OWNED BY public.posts.id; + +ALTER TABLE ONLY public.categories ALTER COLUMN id SET DEFAULT nextval('public.categories_id_seq'::regclass); +ALTER TABLE ONLY public.posts ALTER COLUMN id SET DEFAULT nextval('public.messages_id_seq'::regclass); +ALTER TABLE ONLY public.categories + ADD CONSTRAINT categories_name_key UNIQUE (name); +ALTER TABLE ONLY public.categories + ADD CONSTRAINT categories_pkey PRIMARY KEY (id); +ALTER TABLE ONLY public.posts + ADD CONSTRAINT messages_pkey PRIMARY KEY (id); +ALTER TABLE ONLY public.posts + ADD CONSTRAINT posts_category_id_fkey FOREIGN KEY (category_id) REFERENCES public.categories(id) ON UPDATE RESTRICT ON DELETE RESTRICT; + +CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"() +RETURNS TRIGGER AS $$ +DECLARE + _new record; +BEGIN + _new := NEW; + _new."updated_at" = NOW(); + RETURN _new; +END; +$$ LANGUAGE plpgsql; + +ALTER table "public"."categories" rename to "topics"; + +ALTER TABLE "public"."posts" ALTER COLUMN "category_id" TYPE int4; +ALTER TABLE "public"."posts" ALTER COLUMN "category_id" DROP NOT NULL; +COMMENT ON COLUMN "public"."posts"."category_id" IS E'Define the main suject of the post'; +ALTER table "public"."posts" rename column "category_id" to "topic_id"; + +CREATE TABLE "public"."post_types"("id" serial NOT NULL, "name" text NOT NULL, PRIMARY KEY ("id") , UNIQUE ("id"), UNIQUE ("name")); + +ALTER TABLE "public"."posts" ADD COLUMN "type_id" integer NOT NULL DEFAULT 1; + + +ALTER table "public"."posts" ADD CONSTRAINT "posts_type_id_fkey" +foreign key ("type_id") +references "public"."post_types" +("id") on update restrict on delete restrict; + + +ALTER TABLE "public"."posts" ADD COLUMN "created_at" timestamptz NULL DEFAULT now(); + +ALTER TABLE "public"."posts" ADD COLUMN "updated_at" timestamptz NULL DEFAULT now(); + +CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"() +RETURNS TRIGGER AS $$ +DECLARE + _new record; +BEGIN + _new := NEW; + _new."updated_at" = NOW(); + RETURN _new; +END; +$$ LANGUAGE plpgsql; +CREATE TRIGGER "set_public_posts_updated_at" +BEFORE UPDATE ON "public"."posts" +FOR EACH ROW +EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"(); +COMMENT ON TRIGGER "set_public_posts_updated_at" ON "public"."posts" +IS 'trigger to set value of column "updated_at" to current timestamp on row update'; + +ALTER table "public"."topics" rename to "post_topics"; + +CREATE TABLE comments ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + content text NOT NULL, + parent_message UUID REFERENCES comments(id) +); + +COMMENT ON COLUMN "public"."comments"."parent_message" IS E''; + +ALTER TABLE "public"."comments" ADD COLUMN "post_id" integer NOT NULL; + +ALTER TABLE "public"."comments" ADD COLUMN "author_id" integer NOT NULL; + +ALTER TABLE "public"."comments" ADD COLUMN "created_at" timestamptz NOT NULL DEFAULT now(); + +ALTER TABLE "public"."comments" ADD COLUMN "updated_at" timestamptz NOT NULL DEFAULT now(); + +CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"() +RETURNS TRIGGER AS $$ +DECLARE + _new record; +BEGIN + _new := NEW; + _new."updated_at" = NOW(); + RETURN _new; +END; +$$ LANGUAGE plpgsql; +CREATE TRIGGER "set_public_comments_updated_at" +BEFORE UPDATE ON "public"."comments" +FOR EACH ROW +EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"(); +COMMENT ON TRIGGER "set_public_comments_updated_at" ON "public"."comments" +IS 'trigger to set value of column "updated_at" to current timestamp on row update'; + + +COMMENT ON COLUMN "public"."comments"."parent_message" IS E''; +ALTER table "public"."comments" rename column "parent_message" to "parent_comment"; + + +ALTER table "public"."comments" +ADD CONSTRAINT "comments_post_id_fkey" +foreign key ("post_id") +references "public"."posts" +("id") on update restrict on delete restrict; + +COMMENT ON COLUMN "public"."comments"."parent_comment" IS E''; +ALTER table "public"."comments" rename column "parent_comment" to "parent_comment_id"; + +CREATE TABLE "public"."proposals"("id" serial NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "post_id" integer NOT NULL, "chain_db_id" uuid NOT NULL, PRIMARY KEY ("id") , UNIQUE ("id"), UNIQUE ("post_id"), UNIQUE ("chain_db_id")); COMMENT ON TABLE "public"."proposals" IS E'on chain proposal created automatically by chain-db-watcher'; + +ALTER table "public"."proposals" +ADD CONSTRAINT "proposals_post_id_fkey" +foreign key ("post_id") +references "public"."posts" +("id") on update restrict on delete restrict; + +ALTER table "public"."proposals" rename to "onchain_proposals"; + +ALTER TABLE "public"."onchain_proposals" DROP COLUMN "chain_db_id" CASCADE; + +ALTER TABLE "public"."onchain_proposals" ADD COLUMN "chain_db_id" integer NOT NULL UNIQUE; + +ALTER TABLE "public"."onchain_proposals" ADD COLUMN "proposer_address" text NOT NULL; + +ALTER TABLE "public"."onchain_proposals" ALTER COLUMN "chain_db_id" TYPE int4; +COMMENT ON COLUMN "public"."onchain_proposals"."chain_db_id" IS E''; +ALTER table "public"."onchain_proposals" rename column "chain_db_id" to "onchain_proposal_id"; + +ALTER table "public"."onchain_proposals" rename to "onchain_links"; + +ALTER TABLE "public"."onchain_links" ADD COLUMN "onchain_referendum_id" integer NULL UNIQUE DEFAULT null; + +ALTER TABLE "public"."onchain_links" ALTER COLUMN "onchain_proposal_id" TYPE int4; +ALTER TABLE "public"."onchain_links" ALTER COLUMN "onchain_proposal_id" DROP NOT NULL; +COMMENT ON COLUMN "public"."onchain_links"."onchain_proposal_id" IS E''; + +ALTER TABLE "public"."posts" ALTER COLUMN "topic_id" TYPE int4; +ALTER TABLE "public"."posts" ALTER COLUMN "topic_id" SET NOT NULL; + +ALTER TABLE "public"."posts" ALTER COLUMN "created_at" TYPE timestamptz; +ALTER TABLE "public"."posts" ALTER COLUMN "created_at" SET NOT NULL; +COMMENT ON COLUMN "public"."posts"."created_at" IS E''; + +ALTER TABLE "public"."posts" ALTER COLUMN "updated_at" TYPE timestamptz; +ALTER TABLE "public"."posts" ALTER COLUMN "updated_at" SET NOT NULL; +COMMENT ON COLUMN "public"."posts"."updated_at" IS E''; + +ALTER TABLE "public"."onchain_links" ADD COLUMN "onchain_motion_id" integer NULL UNIQUE; + +ALTER table "public"."comments" drop CONSTRAINT "comments_parent_message_fkey"; + +ALTER TABLE "public"."comments" DROP COLUMN "parent_comment_id" CASCADE; + +ALTER TABLE "public"."onchain_links" ADD COLUMN "onchain_treasury_proposal_id" integer NULL UNIQUE; + +ALTER TABLE "public"."onchain_links" ALTER COLUMN "onchain_treasury_proposal_id" TYPE int4; +ALTER TABLE "public"."onchain_links" DROP CONSTRAINT "onchain_links_onchain_treasury_proposal_id_key"; +COMMENT ON COLUMN "public"."onchain_links"."onchain_treasury_proposal_id" IS E''; + +CREATE TABLE "public"."post_reactions"("id" serial NOT NULL, "post_id" integer NOT NULL, "user_id" integer NOT NULL, "reaction_id" integer NOT NULL, "created_at" timestamp NOT NULL DEFAULT now(), "updated_at" timestamp NOT NULL DEFAULT now(), PRIMARY KEY ("id") , FOREIGN KEY ("post_id") REFERENCES "public"."posts"("id") ON UPDATE cascade ON DELETE cascade, UNIQUE ("id")); + +CREATE TABLE "public"."comment_reactions"("id" serial NOT NULL, "comment_id" uuid NOT NULL, "user_id" integer NOT NULL, "reaction_id" integer NOT NULL, "created_at" timestamp NOT NULL DEFAULT now(), "updated_at" timestamp NOT NULL DEFAULT now(), PRIMARY KEY ("id") , FOREIGN KEY ("comment_id") REFERENCES "public"."comments"("id") ON UPDATE cascade ON DELETE cascade, UNIQUE ("id")); + +ALTER TABLE "public"."comment_reactions" ADD COLUMN "reaction" bpchar NULL; + +ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction" TYPE bpchar; +ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction" SET NOT NULL; +COMMENT ON COLUMN "public"."comment_reactions"."reaction" IS E''; + +ALTER TABLE "public"."post_reactions" ADD COLUMN "reaction" bpchar NOT NULL; + +ALTER TABLE "public"."comment_reactions" DROP COLUMN "reaction_id" CASCADE; + +ALTER TABLE "public"."post_reactions" DROP COLUMN "reaction_id" CASCADE; + +ALTER TABLE "public"."post_reactions" ALTER COLUMN "reaction" TYPE char; +COMMENT ON COLUMN "public"."post_reactions"."reaction" IS E''; + +ALTER TABLE "public"."comment_reactions" ALTER COLUMN "reaction" TYPE char; +COMMENT ON COLUMN "public"."comment_reactions"."reaction" IS E''; + +ALTER TABLE "public"."posts" ALTER COLUMN "title" DROP DEFAULT; +ALTER TABLE "public"."posts" ALTER COLUMN "title" DROP NOT NULL; + +ALTER TABLE "public"."posts" ADD COLUMN "block_number" integer NULL; + +ALTER table "public"."posts" rename column "block_number" to "poll_block_number_end"; + +CREATE TABLE "public"."poll"("id" serial NOT NULL, "block_end" integer NOT NULL, PRIMARY KEY ("id") , UNIQUE ("id")); + +CREATE TABLE "public"."poll_votes"("id" serial NOT NULL, "poll_id" integer NOT NULL, "user_id" integer NOT NULL, "vote" bpchar NOT NULL, "created_at" timestamp NOT NULL DEFAULT now(), PRIMARY KEY ("id") , FOREIGN KEY ("poll_id") REFERENCES "public"."poll"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("id")); + +ALTER TABLE "public"."poll" ADD COLUMN "created_at" timestamp NOT NULL DEFAULT now(); + +ALTER TABLE "public"."posts" DROP COLUMN "poll_block_number_end" CASCADE; + +ALTER TABLE "public"."poll" ADD COLUMN "post_id" integer NOT NULL; + +ALTER table "public"."poll" +ADD CONSTRAINT "poll_post_id_fkey" +foreign key ("post_id") +references "public"."posts" +("id") on update restrict on delete restrict; + +ALTER TABLE "public"."poll" ADD COLUMN "updated_at" timestamptz NULL DEFAULT now(); + +CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"() +RETURNS TRIGGER AS $$ +DECLARE + _new record; +BEGIN + _new := NEW; + _new."updated_at" = NOW(); + RETURN _new; +END; +$$ LANGUAGE plpgsql; +CREATE TRIGGER "set_public_poll_updated_at" +BEFORE UPDATE ON "public"."poll" +FOR EACH ROW +EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"(); +COMMENT ON TRIGGER "set_public_poll_updated_at" ON "public"."poll" +IS 'trigger to set value of column "updated_at" to current timestamp on row update'; + +ALTER TABLE "public"."poll_votes" ADD COLUMN "updated_at" timestamptz NULL DEFAULT now(); + +CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"() +RETURNS TRIGGER AS $$ +DECLARE + _new record; +BEGIN + _new := NEW; + _new."updated_at" = NOW(); + RETURN _new; +END; +$$ LANGUAGE plpgsql; +CREATE TRIGGER "set_public_poll_votes_updated_at" +BEFORE UPDATE ON "public"."poll_votes" +FOR EACH ROW +EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"(); +COMMENT ON TRIGGER "set_public_poll_votes_updated_at" ON "public"."poll_votes" +IS 'trigger to set value of column "updated_at" to current timestamp on row update'; + +CREATE VIEW post_last_update AS +SELECT c1.id AS comment_id, + p.id AS post_id, + max( + CASE + WHEN (c1.* IS NULL) THEN p.created_at + ELSE c1.created_at + END) AS last_update + FROM ((posts p + LEFT JOIN comments c1 ON ((p.id = c1.post_id))) + LEFT JOIN comments c2 ON (((p.id = c2.post_id) AND ((c1.created_at < c2.created_at) OR ((c1.created_at = c2.created_at) AND (c1.id < c2.id)))))) + WHERE (c2.id IS NULL) + GROUP BY p.id, c1.id; + +ALTER table "public"."poll_votes" ADD CONSTRAINT "poll_votes_poll_id_user_id_key" unique ("poll_id", "user_id"); + +ALTER table "public"."comment_reactions" ADD CONSTRAINT "comment_reactions_comment_id_user_id_reaction_key" unique ("comment_id", "user_id", "reaction"); + +ALTER table "public"."post_reactions" ADD CONSTRAINT "post_reactions_post_id_user_id_reaction_key" unique ("post_id", "user_id", "reaction"); + +ALTER TABLE "public"."onchain_links" ADD COLUMN "onchain_tip_id" integer NULL UNIQUE; \ No newline at end of file diff --git a/hasura/hasura-migrations/migrations/metadata.yaml b/hasura/hasura-migrations/migrations/metadata.yaml new file mode 100644 index 000000000..22dd3bd3d --- /dev/null +++ b/hasura/hasura-migrations/migrations/metadata.yaml @@ -0,0 +1,698 @@ +version: 2 +tables: +- table: + schema: public + name: comment_reactions + object_relationships: + - name: comment + using: + foreign_key_constraint_on: comment_id + remote_relationships: + - definition: + remote_field: + user: + arguments: + id: $user_id + hasura_fields: + - user_id + remote_schema: auth + name: reacting_user + insert_permissions: + - role: user + permission: + check: + user_id: + _eq: X-Hasura-User-Id + columns: + - comment_id + - reaction + - user_id + select_permissions: + - role: anonymous + permission: + columns: + - comment_id + - created_at + - id + - reaction + - updated_at + - user_id + filter: {} + allow_aggregations: true + - role: user + permission: + columns: + - comment_id + - created_at + - id + - reaction + - updated_at + - user_id + filter: {} + allow_aggregations: true + update_permissions: + - role: user + permission: + columns: + - comment_id + - reaction + - user_id + filter: + user_id: + _eq: X-Hasura-User-Id + check: null + delete_permissions: + - role: user + permission: + filter: + user_id: + _eq: X-Hasura-User-Id +- table: + schema: public + name: comments + object_relationships: + - name: post + using: + foreign_key_constraint_on: post_id + array_relationships: + - name: comment_reactions + using: + foreign_key_constraint_on: + column: comment_id + table: + schema: public + name: comment_reactions + remote_relationships: + - definition: + remote_field: + user: + arguments: + id: $author_id + hasura_fields: + - author_id + remote_schema: auth + name: author + insert_permissions: + - role: user + permission: + check: + author_id: + _eq: X-Hasura-User-Id + columns: + - author_id + - content + - post_id + select_permissions: + - role: anonymous + permission: + columns: + - author_id + - content + - created_at + - id + - post_id + - updated_at + filter: {} + allow_aggregations: true + - role: user + permission: + columns: + - author_id + - content + - created_at + - id + - post_id + - updated_at + filter: {} + allow_aggregations: true + update_permissions: + - role: user + permission: + columns: + - content + filter: + author_id: + _eq: X-Hasura-User-Id + check: null + event_triggers: + - name: comment_create + definition: + enable_manual: false + insert: + columns: '*' + retry_conf: + num_retries: 0 + interval_sec: 10 + timeout_sec: 60 + webhook_from_env: HASURA_COMMENT_CREATE_EVENT_HOOK + headers: + - name: HASURA_EVENT_SECRET + value_from_env: HASURA_EVENT_SECRET +- table: + schema: public + name: onchain_links + object_relationships: + - name: post + using: + foreign_key_constraint_on: post_id + remote_relationships: + - definition: + remote_field: + motions: + arguments: + where: + motionProposalId: $onchain_motion_id + hasura_fields: + - onchain_motion_id + remote_schema: chain-db + name: onchain_motion + - definition: + remote_field: + proposals: + arguments: + where: + proposalId: $onchain_proposal_id + hasura_fields: + - onchain_proposal_id + remote_schema: chain-db + name: onchain_proposal + - definition: + remote_field: + referendums: + arguments: + where: + referendumId: $onchain_referendum_id + hasura_fields: + - onchain_referendum_id + remote_schema: chain-db + name: onchain_referendum + - definition: + remote_field: + treasurySpendProposals: + arguments: + where: + treasuryProposalId: $onchain_treasury_proposal_id + hasura_fields: + - onchain_treasury_proposal_id + remote_schema: chain-db + name: onchain_treasury_spend_proposal + - definition: + remote_field: + tips: + arguments: + where: + id: $onchain_tip_id + hasura_fields: + - onchain_tip_id + remote_schema: chain-db + name: onchain_tip + insert_permissions: + - role: proposal_bot + permission: + check: {} + columns: + - onchain_motion_id + - onchain_proposal_id + - onchain_referendum_id + - onchain_tip_id + - onchain_treasury_proposal_id + - post_id + - proposer_address + select_permissions: + - role: anonymous + permission: + columns: + - created_at + - id + - onchain_motion_id + - onchain_proposal_id + - onchain_referendum_id + - onchain_tip_id + - onchain_treasury_proposal_id + - post_id + - proposer_address + filter: {} + allow_aggregations: true + - role: proposal_bot + permission: + columns: + - created_at + - id + - onchain_motion_id + - onchain_proposal_id + - onchain_referendum_id + - onchain_tip_id + - onchain_treasury_proposal_id + - post_id + - proposer_address + filter: {} + - role: user + permission: + columns: + - created_at + - id + - onchain_motion_id + - onchain_proposal_id + - onchain_referendum_id + - onchain_tip_id + - onchain_treasury_proposal_id + - post_id + - proposer_address + filter: {} + allow_aggregations: true + update_permissions: + - role: proposal_bot + permission: + columns: + - onchain_motion_id + - onchain_referendum_id + filter: {} + check: null + event_triggers: + - name: onchain_link_create + definition: + enable_manual: false + insert: + columns: '*' + update: + columns: + - id + - onchain_motion_id + - onchain_proposal_id + - onchain_referendum_id + - onchain_treasury_proposal_id + - post_id + - proposer_address + - created_at + retry_conf: + num_retries: 0 + interval_sec: 10 + timeout_sec: 60 + webhook_from_env: HASURA_ONCHAIN_LINK_CREATE_HOOK + headers: + - name: HASURA_EVENT_SECRET + value_from_env: HASURA_EVENT_SECRET +- table: + schema: public + name: poll + object_relationships: + - name: post + using: + foreign_key_constraint_on: post_id + array_relationships: + - name: poll_votes + using: + foreign_key_constraint_on: + column: poll_id + table: + schema: public + name: poll_votes + insert_permissions: + - role: user + permission: + check: + post: + author_id: + _eq: X-Hasura-User-Id + columns: + - block_end + - post_id + select_permissions: + - role: anonymous + permission: + columns: + - id + - block_end + - created_at + - post_id + - updated_at + filter: {} + allow_aggregations: true + - role: user + permission: + columns: + - block_end + - id + - post_id + - created_at + - updated_at + filter: {} + allow_aggregations: true + update_permissions: + - role: user + permission: + columns: + - block_end + filter: + post: + author_id: + _eq: X-Hasura-User-Id + check: null +- table: + schema: public + name: poll_votes + object_relationships: + - name: poll + using: + foreign_key_constraint_on: poll_id + remote_relationships: + - definition: + remote_field: + user: + arguments: + id: $user_id + hasura_fields: + - user_id + remote_schema: auth + name: voter + insert_permissions: + - role: user + permission: + check: + user_id: + _eq: X-Hasura-User-Id + columns: + - poll_id + - user_id + - vote + select_permissions: + - role: anonymous + permission: + columns: + - id + - poll_id + - user_id + - vote + - created_at + - updated_at + filter: {} + allow_aggregations: true + - role: user + permission: + columns: + - vote + - id + - poll_id + - user_id + - created_at + - updated_at + filter: {} + allow_aggregations: true + update_permissions: + - role: user + permission: + columns: + - poll_id + - user_id + - vote + filter: + user_id: + _eq: X-Hasura-User-Id + check: + user_id: + _eq: X-Hasura-User-Id + delete_permissions: + - role: user + permission: + filter: + user_id: + _eq: X-Hasura-User-Id +- table: + schema: public + name: post_last_update + select_permissions: + - role: anonymous + permission: + columns: + - comment_id + - post_id + - last_update + filter: {} + - role: user + permission: + columns: + - post_id + - last_update + - comment_id + filter: {} +- table: + schema: public + name: post_reactions + object_relationships: + - name: post + using: + foreign_key_constraint_on: post_id + remote_relationships: + - definition: + remote_field: + user: + arguments: + id: $user_id + hasura_fields: + - user_id + remote_schema: auth + name: reacting_user + insert_permissions: + - role: user + permission: + check: + user_id: + _eq: X-Hasura-User-Id + columns: + - post_id + - reaction + - user_id + select_permissions: + - role: anonymous + permission: + columns: + - created_at + - id + - post_id + - reaction + - updated_at + - user_id + filter: {} + allow_aggregations: true + - role: user + permission: + columns: + - created_at + - id + - post_id + - reaction + - updated_at + - user_id + filter: {} + update_permissions: + - role: user + permission: + columns: + - post_id + - reaction + - user_id + filter: + user_id: + _eq: X-Hasura-User-Id + check: null + delete_permissions: + - role: user + permission: + filter: + user_id: + _eq: X-Hasura-User-Id +- table: + schema: public + name: post_topics + array_relationships: + - name: posts + using: + foreign_key_constraint_on: + column: topic_id + table: + schema: public + name: posts + select_permissions: + - role: anonymous + permission: + columns: + - id + - name + filter: {} + - role: user + permission: + columns: + - id + - name + filter: {} +- table: + schema: public + name: post_types + array_relationships: + - name: posts + using: + foreign_key_constraint_on: + column: type_id + table: + schema: public + name: posts + select_permissions: + - role: anonymous + permission: + columns: + - id + - name + filter: {} + - role: user + permission: + columns: + - id + - name + filter: {} +- table: + schema: public + name: posts + object_relationships: + - name: last_update + using: + manual_configuration: + remote_table: + schema: public + name: post_last_update + column_mapping: + id: post_id + - name: onchain_link + using: + manual_configuration: + remote_table: + schema: public + name: onchain_links + column_mapping: + id: post_id + - name: topic + using: + foreign_key_constraint_on: topic_id + - name: type + using: + foreign_key_constraint_on: type_id + array_relationships: + - name: comments + using: + foreign_key_constraint_on: + column: post_id + table: + schema: public + name: comments + - name: polls + using: + foreign_key_constraint_on: + column: post_id + table: + schema: public + name: poll + - name: post_reactions + using: + foreign_key_constraint_on: + column: post_id + table: + schema: public + name: post_reactions + remote_relationships: + - definition: + remote_field: + user: + arguments: + id: $author_id + hasura_fields: + - author_id + remote_schema: auth + name: author + insert_permissions: + - role: proposal_bot + permission: + check: + author_id: + _eq: X-Hasura-User-Id + columns: + - author_id + - content + - title + - topic_id + - type_id + - role: user + permission: + check: + _and: + - author_id: + _eq: X-Hasura-User-Id + - type_id: + _eq: 1 + columns: + - author_id + - content + - title + - topic_id + - type_id + select_permissions: + - role: anonymous + permission: + columns: + - author_id + - content + - created_at + - id + - title + - topic_id + - type_id + - updated_at + filter: {} + - role: proposal_bot + permission: + columns: + - author_id + - content + - created_at + - id + - title + - topic_id + - type_id + - updated_at + filter: {} + - role: user + permission: + columns: + - author_id + - content + - created_at + - id + - title + - topic_id + - type_id + - updated_at + filter: {} + update_permissions: + - role: user + permission: + columns: + - content + - title + - topic_id + filter: + _or: + - author_id: + _eq: X-Hasura-User-Id + - onchain_link: + proposer_address: + _in: X-Hasura-Kusama + check: null +remote_schemas: +- name: auth + definition: + url_from_env: HASURA_AUTH_SERVER_REMOTE_SCHEMA + timeout_seconds: 60 + forward_client_headers: true +- name: chain-db + definition: + url_from_env: HASURA_CHAIN_DB_REMOTE_SCHEMA + timeout_seconds: 60 + forward_client_headers: true diff --git a/kubernetes/polkassembly/values.yaml b/kubernetes/polkassembly/values.yaml index 1e0f0b36f..b1c6c48a4 100644 --- a/kubernetes/polkassembly/values.yaml +++ b/kubernetes/polkassembly/values.yaml @@ -66,7 +66,7 @@ hasura: HASURA_GRAPHQL_JWT_SECRET: from-gitlab-vars image: - repository: hasura/graphql-engine:v1.3.0-beta.2.cli-migrations + repository: hasura/graphql-engine:v1.3.0-beta.2 pullPolicy: IfNotPresent nameOverride: "" diff --git a/node-watcher/datamodel.prisma b/node-watcher/datamodel.prisma index ca653ef15..b5b0bbbd7 100644 --- a/node-watcher/datamodel.prisma +++ b/node-watcher/datamodel.prisma @@ -215,3 +215,22 @@ type TreasuryStatus { status: String! uniqueStatus: String! @unique } + +type Tip { + id: Int! @id(strategy: SEQUENCE) @sequence(name: "TIP_SEQUENCE" initialValue:1 allocationSize:1) + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int + tipStatus: [TipStatus]! @relation(name: "TipStatusFromTip") +} + +type TipStatus { + id: ID! @id + blockNumber: BlockNumber! @relation(name: "TipStatusAtBlockNumber", link: INLINE) + tip: Tip! @relation(name: "TipStatusFromTip", link: INLINE) + status: String! + uniqueStatus: String! @unique +} diff --git a/node-watcher/package.json b/node-watcher/package.json index 3eb7b19c7..009bffde6 100644 --- a/node-watcher/package.json +++ b/node-watcher/package.json @@ -27,7 +27,7 @@ "start:local": "PRISMA_ENDPOINT=http://127.0.0.1:4466 ARCHIVE_NODE_ENDPOINT=ws://127.0.0.1:9944 MAX_LAG=1 yarn start", "start:polkadot": "PRISMA_ENDPOINT=http://127.0.0.1:4466 ARCHIVE_NODE_ENDPOINT=wss://rpc.polkadot.io MAX_LAG=1 yarn start", "start:kusama": "PRISMA_ENDPOINT=http://127.0.0.1:4466 START_FROM=2872538 ARCHIVE_NODE_ENDPOINT=wss://kusama-rpc.polkadot.io MAX_LAG=1 yarn start", - "local:reset": "yarn reset && yarn local", + "local:reset": "yarn reset && yarn start:local", "start": "node -r ts-node/register --max-old-space-size=8192 ./src/index.ts", "api:bump": "yarn add @polkadot/api @polkadot/dev" }, diff --git a/node-watcher/src/generated/prisma-client/index.ts b/node-watcher/src/generated/prisma-client/index.ts index eb3acfe4f..d176cb9c5 100644 --- a/node-watcher/src/generated/prisma-client/index.ts +++ b/node-watcher/src/generated/prisma-client/index.ts @@ -40,6 +40,8 @@ export interface Exists { session: (where?: SessionWhereInput) => Promise; slashing: (where?: SlashingWhereInput) => Promise; stake: (where?: StakeWhereInput) => Promise; + tip: (where?: TipWhereInput) => Promise; + tipStatus: (where?: TipStatusWhereInput) => Promise; totalIssuance: (where?: TotalIssuanceWhereInput) => Promise; treasurySpendProposal: ( where?: TreasurySpendProposalWhereInput @@ -503,6 +505,44 @@ export interface Prisma { first?: Int; last?: Int; }) => StakeConnectionPromise; + tip: (where: TipWhereUniqueInput) => TipNullablePromise; + tips: (args?: { + where?: TipWhereInput; + orderBy?: TipOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => FragmentableArray; + tipsConnection: (args?: { + where?: TipWhereInput; + orderBy?: TipOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => TipConnectionPromise; + tipStatus: (where: TipStatusWhereUniqueInput) => TipStatusNullablePromise; + tipStatuses: (args?: { + where?: TipStatusWhereInput; + orderBy?: TipStatusOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => FragmentableArray; + tipStatusesConnection: (args?: { + where?: TipStatusWhereInput; + orderBy?: TipStatusOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => TipStatusConnectionPromise; totalIssuance: ( where: TotalIssuanceWhereUniqueInput ) => TotalIssuanceNullablePromise; @@ -985,6 +1025,38 @@ export interface Prisma { }) => StakePromise; deleteStake: (where: StakeWhereUniqueInput) => StakePromise; deleteManyStakes: (where?: StakeWhereInput) => BatchPayloadPromise; + createTip: (data: TipCreateInput) => TipPromise; + updateTip: (args: { + data: TipUpdateInput; + where: TipWhereUniqueInput; + }) => TipPromise; + updateManyTips: (args: { + data: TipUpdateManyMutationInput; + where?: TipWhereInput; + }) => BatchPayloadPromise; + upsertTip: (args: { + where: TipWhereUniqueInput; + create: TipCreateInput; + update: TipUpdateInput; + }) => TipPromise; + deleteTip: (where: TipWhereUniqueInput) => TipPromise; + deleteManyTips: (where?: TipWhereInput) => BatchPayloadPromise; + createTipStatus: (data: TipStatusCreateInput) => TipStatusPromise; + updateTipStatus: (args: { + data: TipStatusUpdateInput; + where: TipStatusWhereUniqueInput; + }) => TipStatusPromise; + updateManyTipStatuses: (args: { + data: TipStatusUpdateManyMutationInput; + where?: TipStatusWhereInput; + }) => BatchPayloadPromise; + upsertTipStatus: (args: { + where: TipStatusWhereUniqueInput; + create: TipStatusCreateInput; + update: TipStatusUpdateInput; + }) => TipStatusPromise; + deleteTipStatus: (where: TipStatusWhereUniqueInput) => TipStatusPromise; + deleteManyTipStatuses: (where?: TipStatusWhereInput) => BatchPayloadPromise; createTotalIssuance: (data: TotalIssuanceCreateInput) => TotalIssuancePromise; updateTotalIssuance: (args: { data: TotalIssuanceUpdateInput; @@ -1140,6 +1212,12 @@ export interface Subscription { stake: ( where?: StakeSubscriptionWhereInput ) => StakeSubscriptionPayloadSubscription; + tip: ( + where?: TipSubscriptionWhereInput + ) => TipSubscriptionPayloadSubscription; + tipStatus: ( + where?: TipStatusSubscriptionWhereInput + ) => TipStatusSubscriptionPayloadSubscription; totalIssuance: ( where?: TotalIssuanceSubscriptionWhereInput ) => TotalIssuanceSubscriptionPayloadSubscription; @@ -1374,6 +1452,30 @@ export type StakeOrderByInput = | "totalStake_ASC" | "totalStake_DESC"; +export type TipStatusOrderByInput = + | "id_ASC" + | "id_DESC" + | "status_ASC" + | "status_DESC" + | "uniqueStatus_ASC" + | "uniqueStatus_DESC"; + +export type TipOrderByInput = + | "id_ASC" + | "id_DESC" + | "hash_ASC" + | "hash_DESC" + | "reason_ASC" + | "reason_DESC" + | "who_ASC" + | "who_DESC" + | "finder_ASC" + | "finder_DESC" + | "finderFee_ASC" + | "finderFee_DESC" + | "closes_ASC" + | "closes_DESC"; + export type TotalIssuanceOrderByInput = | "id_ASC" | "id_DESC" @@ -2878,6 +2980,160 @@ export interface StakeWhereInput { NOT?: Maybe; } +export type TipWhereUniqueInput = AtLeastOne<{ + id: Maybe; +}>; + +export interface TipStatusWhereInput { + id?: Maybe; + id_not?: Maybe; + id_in?: Maybe; + id_not_in?: Maybe; + id_lt?: Maybe; + id_lte?: Maybe; + id_gt?: Maybe; + id_gte?: Maybe; + id_contains?: Maybe; + id_not_contains?: Maybe; + id_starts_with?: Maybe; + id_not_starts_with?: Maybe; + id_ends_with?: Maybe; + id_not_ends_with?: Maybe; + blockNumber?: Maybe; + tip?: Maybe; + status?: Maybe; + status_not?: Maybe; + status_in?: Maybe; + status_not_in?: Maybe; + status_lt?: Maybe; + status_lte?: Maybe; + status_gt?: Maybe; + status_gte?: Maybe; + status_contains?: Maybe; + status_not_contains?: Maybe; + status_starts_with?: Maybe; + status_not_starts_with?: Maybe; + status_ends_with?: Maybe; + status_not_ends_with?: Maybe; + uniqueStatus?: Maybe; + uniqueStatus_not?: Maybe; + uniqueStatus_in?: Maybe; + uniqueStatus_not_in?: Maybe; + uniqueStatus_lt?: Maybe; + uniqueStatus_lte?: Maybe; + uniqueStatus_gt?: Maybe; + uniqueStatus_gte?: Maybe; + uniqueStatus_contains?: Maybe; + uniqueStatus_not_contains?: Maybe; + uniqueStatus_starts_with?: Maybe; + uniqueStatus_not_starts_with?: Maybe; + uniqueStatus_ends_with?: Maybe; + uniqueStatus_not_ends_with?: Maybe; + AND?: Maybe; + OR?: Maybe; + NOT?: Maybe; +} + +export interface TipWhereInput { + id?: Maybe; + id_not?: Maybe; + id_in?: Maybe; + id_not_in?: Maybe; + id_lt?: Maybe; + id_lte?: Maybe; + id_gt?: Maybe; + id_gte?: Maybe; + hash?: Maybe; + hash_not?: Maybe; + hash_in?: Maybe; + hash_not_in?: Maybe; + hash_lt?: Maybe; + hash_lte?: Maybe; + hash_gt?: Maybe; + hash_gte?: Maybe; + hash_contains?: Maybe; + hash_not_contains?: Maybe; + hash_starts_with?: Maybe; + hash_not_starts_with?: Maybe; + hash_ends_with?: Maybe; + hash_not_ends_with?: Maybe; + reason?: Maybe; + reason_not?: Maybe; + reason_in?: Maybe; + reason_not_in?: Maybe; + reason_lt?: Maybe; + reason_lte?: Maybe; + reason_gt?: Maybe; + reason_gte?: Maybe; + reason_contains?: Maybe; + reason_not_contains?: Maybe; + reason_starts_with?: Maybe; + reason_not_starts_with?: Maybe; + reason_ends_with?: Maybe; + reason_not_ends_with?: Maybe; + who?: Maybe; + who_not?: Maybe; + who_in?: Maybe; + who_not_in?: Maybe; + who_lt?: Maybe; + who_lte?: Maybe; + who_gt?: Maybe; + who_gte?: Maybe; + who_contains?: Maybe; + who_not_contains?: Maybe; + who_starts_with?: Maybe; + who_not_starts_with?: Maybe; + who_ends_with?: Maybe; + who_not_ends_with?: Maybe; + finder?: Maybe; + finder_not?: Maybe; + finder_in?: Maybe; + finder_not_in?: Maybe; + finder_lt?: Maybe; + finder_lte?: Maybe; + finder_gt?: Maybe; + finder_gte?: Maybe; + finder_contains?: Maybe; + finder_not_contains?: Maybe; + finder_starts_with?: Maybe; + finder_not_starts_with?: Maybe; + finder_ends_with?: Maybe; + finder_not_ends_with?: Maybe; + finderFee?: Maybe; + finderFee_not?: Maybe; + finderFee_in?: Maybe; + finderFee_not_in?: Maybe; + finderFee_lt?: Maybe; + finderFee_lte?: Maybe; + finderFee_gt?: Maybe; + finderFee_gte?: Maybe; + finderFee_contains?: Maybe; + finderFee_not_contains?: Maybe; + finderFee_starts_with?: Maybe; + finderFee_not_starts_with?: Maybe; + finderFee_ends_with?: Maybe; + finderFee_not_ends_with?: Maybe; + closes?: Maybe; + closes_not?: Maybe; + closes_in?: Maybe; + closes_not_in?: Maybe; + closes_lt?: Maybe; + closes_lte?: Maybe; + closes_gt?: Maybe; + closes_gte?: Maybe; + tipStatus_every?: Maybe; + tipStatus_some?: Maybe; + tipStatus_none?: Maybe; + AND?: Maybe; + OR?: Maybe; + NOT?: Maybe; +} + +export type TipStatusWhereUniqueInput = AtLeastOne<{ + id: Maybe; + uniqueStatus?: Maybe; +}>; + export type TotalIssuanceWhereUniqueInput = AtLeastOne<{ id: Maybe; }>; @@ -5162,6 +5418,202 @@ export interface StakeUpdateManyMutationInput { totalStake?: Maybe; } +export interface TipCreateInput { + hash: String; + reason: String; + who: String; + finder?: Maybe; + finderFee?: Maybe; + closes?: Maybe; + tipStatus?: Maybe; +} + +export interface TipStatusCreateManyWithoutTipInput { + create?: Maybe< + TipStatusCreateWithoutTipInput[] | TipStatusCreateWithoutTipInput + >; + connect?: Maybe; +} + +export interface TipStatusCreateWithoutTipInput { + id?: Maybe; + blockNumber: BlockNumberCreateOneInput; + status: String; + uniqueStatus: String; +} + +export interface TipUpdateInput { + hash?: Maybe; + reason?: Maybe; + who?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + closes?: Maybe; + tipStatus?: Maybe; +} + +export interface TipStatusUpdateManyWithoutTipInput { + create?: Maybe< + TipStatusCreateWithoutTipInput[] | TipStatusCreateWithoutTipInput + >; + delete?: Maybe; + connect?: Maybe; + set?: Maybe; + disconnect?: Maybe; + update?: Maybe< + | TipStatusUpdateWithWhereUniqueWithoutTipInput[] + | TipStatusUpdateWithWhereUniqueWithoutTipInput + >; + upsert?: Maybe< + | TipStatusUpsertWithWhereUniqueWithoutTipInput[] + | TipStatusUpsertWithWhereUniqueWithoutTipInput + >; + deleteMany?: Maybe; + updateMany?: Maybe< + | TipStatusUpdateManyWithWhereNestedInput[] + | TipStatusUpdateManyWithWhereNestedInput + >; +} + +export interface TipStatusUpdateWithWhereUniqueWithoutTipInput { + where: TipStatusWhereUniqueInput; + data: TipStatusUpdateWithoutTipDataInput; +} + +export interface TipStatusUpdateWithoutTipDataInput { + blockNumber?: Maybe; + status?: Maybe; + uniqueStatus?: Maybe; +} + +export interface TipStatusUpsertWithWhereUniqueWithoutTipInput { + where: TipStatusWhereUniqueInput; + update: TipStatusUpdateWithoutTipDataInput; + create: TipStatusCreateWithoutTipInput; +} + +export interface TipStatusScalarWhereInput { + id?: Maybe; + id_not?: Maybe; + id_in?: Maybe; + id_not_in?: Maybe; + id_lt?: Maybe; + id_lte?: Maybe; + id_gt?: Maybe; + id_gte?: Maybe; + id_contains?: Maybe; + id_not_contains?: Maybe; + id_starts_with?: Maybe; + id_not_starts_with?: Maybe; + id_ends_with?: Maybe; + id_not_ends_with?: Maybe; + status?: Maybe; + status_not?: Maybe; + status_in?: Maybe; + status_not_in?: Maybe; + status_lt?: Maybe; + status_lte?: Maybe; + status_gt?: Maybe; + status_gte?: Maybe; + status_contains?: Maybe; + status_not_contains?: Maybe; + status_starts_with?: Maybe; + status_not_starts_with?: Maybe; + status_ends_with?: Maybe; + status_not_ends_with?: Maybe; + uniqueStatus?: Maybe; + uniqueStatus_not?: Maybe; + uniqueStatus_in?: Maybe; + uniqueStatus_not_in?: Maybe; + uniqueStatus_lt?: Maybe; + uniqueStatus_lte?: Maybe; + uniqueStatus_gt?: Maybe; + uniqueStatus_gte?: Maybe; + uniqueStatus_contains?: Maybe; + uniqueStatus_not_contains?: Maybe; + uniqueStatus_starts_with?: Maybe; + uniqueStatus_not_starts_with?: Maybe; + uniqueStatus_ends_with?: Maybe; + uniqueStatus_not_ends_with?: Maybe; + AND?: Maybe; + OR?: Maybe; + NOT?: Maybe; +} + +export interface TipStatusUpdateManyWithWhereNestedInput { + where: TipStatusScalarWhereInput; + data: TipStatusUpdateManyDataInput; +} + +export interface TipStatusUpdateManyDataInput { + status?: Maybe; + uniqueStatus?: Maybe; +} + +export interface TipUpdateManyMutationInput { + hash?: Maybe; + reason?: Maybe; + who?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + closes?: Maybe; +} + +export interface TipStatusCreateInput { + id?: Maybe; + blockNumber: BlockNumberCreateOneInput; + tip: TipCreateOneWithoutTipStatusInput; + status: String; + uniqueStatus: String; +} + +export interface TipCreateOneWithoutTipStatusInput { + create?: Maybe; + connect?: Maybe; +} + +export interface TipCreateWithoutTipStatusInput { + hash: String; + reason: String; + who: String; + finder?: Maybe; + finderFee?: Maybe; + closes?: Maybe; +} + +export interface TipStatusUpdateInput { + blockNumber?: Maybe; + tip?: Maybe; + status?: Maybe; + uniqueStatus?: Maybe; +} + +export interface TipUpdateOneRequiredWithoutTipStatusInput { + create?: Maybe; + update?: Maybe; + upsert?: Maybe; + connect?: Maybe; +} + +export interface TipUpdateWithoutTipStatusDataInput { + hash?: Maybe; + reason?: Maybe; + who?: Maybe; + finder?: Maybe; + finderFee?: Maybe; + closes?: Maybe; +} + +export interface TipUpsertWithoutTipStatusInput { + update: TipUpdateWithoutTipStatusDataInput; + create: TipCreateWithoutTipStatusInput; +} + +export interface TipStatusUpdateManyMutationInput { + status?: Maybe; + uniqueStatus?: Maybe; +} + export interface TotalIssuanceCreateInput { id?: Maybe; blockNumber: BlockNumberCreateOneInput; @@ -5688,6 +6140,34 @@ export interface StakeSubscriptionWhereInput { NOT?: Maybe; } +export interface TipSubscriptionWhereInput { + mutation_in?: Maybe; + updatedFields_contains?: Maybe; + updatedFields_contains_every?: Maybe; + updatedFields_contains_some?: Maybe; + node?: Maybe; + AND?: Maybe; + OR?: Maybe; + NOT?: Maybe; +} + +export interface TipStatusSubscriptionWhereInput { + mutation_in?: Maybe; + updatedFields_contains?: Maybe; + updatedFields_contains_every?: Maybe; + updatedFields_contains_some?: Maybe; + node?: Maybe; + AND?: Maybe< + TipStatusSubscriptionWhereInput[] | TipStatusSubscriptionWhereInput + >; + OR?: Maybe< + TipStatusSubscriptionWhereInput[] | TipStatusSubscriptionWhereInput + >; + NOT?: Maybe< + TipStatusSubscriptionWhereInput[] | TipStatusSubscriptionWhereInput + >; +} + export interface TotalIssuanceSubscriptionWhereInput { mutation_in?: Maybe; updatedFields_contains?: Maybe; @@ -8130,6 +8610,219 @@ export interface AggregateStakeSubscription count: () => Promise>; } +export interface Tip { + id: Int; + hash: String; + reason: String; + who: String; + finder?: String; + finderFee?: String; + closes?: Int; +} + +export interface TipPromise extends Promise, Fragmentable { + id: () => Promise; + hash: () => Promise; + reason: () => Promise; + who: () => Promise; + finder: () => Promise; + finderFee: () => Promise; + closes: () => Promise; + tipStatus: >(args?: { + where?: TipStatusWhereInput; + orderBy?: TipStatusOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => T; +} + +export interface TipSubscription + extends Promise>, + Fragmentable { + id: () => Promise>; + hash: () => Promise>; + reason: () => Promise>; + who: () => Promise>; + finder: () => Promise>; + finderFee: () => Promise>; + closes: () => Promise>; + tipStatus: >>(args?: { + where?: TipStatusWhereInput; + orderBy?: TipStatusOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => T; +} + +export interface TipNullablePromise extends Promise, Fragmentable { + id: () => Promise; + hash: () => Promise; + reason: () => Promise; + who: () => Promise; + finder: () => Promise; + finderFee: () => Promise; + closes: () => Promise; + tipStatus: >(args?: { + where?: TipStatusWhereInput; + orderBy?: TipStatusOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => T; +} + +export interface TipStatus { + id: ID_Output; + status: String; + uniqueStatus: String; +} + +export interface TipStatusPromise extends Promise, Fragmentable { + id: () => Promise; + blockNumber: () => T; + tip: () => T; + status: () => Promise; + uniqueStatus: () => Promise; +} + +export interface TipStatusSubscription + extends Promise>, + Fragmentable { + id: () => Promise>; + blockNumber: () => T; + tip: () => T; + status: () => Promise>; + uniqueStatus: () => Promise>; +} + +export interface TipStatusNullablePromise + extends Promise, + Fragmentable { + id: () => Promise; + blockNumber: () => T; + tip: () => T; + status: () => Promise; + uniqueStatus: () => Promise; +} + +export interface TipConnection { + pageInfo: PageInfo; + edges: TipEdge[]; +} + +export interface TipConnectionPromise + extends Promise, + Fragmentable { + pageInfo: () => T; + edges: >() => T; + aggregate: () => T; +} + +export interface TipConnectionSubscription + extends Promise>, + Fragmentable { + pageInfo: () => T; + edges: >>() => T; + aggregate: () => T; +} + +export interface TipEdge { + node: Tip; + cursor: String; +} + +export interface TipEdgePromise extends Promise, Fragmentable { + node: () => T; + cursor: () => Promise; +} + +export interface TipEdgeSubscription + extends Promise>, + Fragmentable { + node: () => T; + cursor: () => Promise>; +} + +export interface AggregateTip { + count: Int; +} + +export interface AggregateTipPromise + extends Promise, + Fragmentable { + count: () => Promise; +} + +export interface AggregateTipSubscription + extends Promise>, + Fragmentable { + count: () => Promise>; +} + +export interface TipStatusConnection { + pageInfo: PageInfo; + edges: TipStatusEdge[]; +} + +export interface TipStatusConnectionPromise + extends Promise, + Fragmentable { + pageInfo: () => T; + edges: >() => T; + aggregate: () => T; +} + +export interface TipStatusConnectionSubscription + extends Promise>, + Fragmentable { + pageInfo: () => T; + edges: >>() => T; + aggregate: () => T; +} + +export interface TipStatusEdge { + node: TipStatus; + cursor: String; +} + +export interface TipStatusEdgePromise + extends Promise, + Fragmentable { + node: () => T; + cursor: () => Promise; +} + +export interface TipStatusEdgeSubscription + extends Promise>, + Fragmentable { + node: () => T; + cursor: () => Promise>; +} + +export interface AggregateTipStatus { + count: Int; +} + +export interface AggregateTipStatusPromise + extends Promise, + Fragmentable { + count: () => Promise; +} + +export interface AggregateTipStatusSubscription + extends Promise>, + Fragmentable { + count: () => Promise>; +} + export interface TotalIssuance { id: ID_Output; amount: String; @@ -9521,6 +10214,112 @@ export interface StakePreviousValuesSubscription totalStake: () => Promise>; } +export interface TipSubscriptionPayload { + mutation: MutationType; + node: Tip; + updatedFields: String[]; + previousValues: TipPreviousValues; +} + +export interface TipSubscriptionPayloadPromise + extends Promise, + Fragmentable { + mutation: () => Promise; + node: () => T; + updatedFields: () => Promise; + previousValues: () => T; +} + +export interface TipSubscriptionPayloadSubscription + extends Promise>, + Fragmentable { + mutation: () => Promise>; + node: () => T; + updatedFields: () => Promise>; + previousValues: () => T; +} + +export interface TipPreviousValues { + id: Int; + hash: String; + reason: String; + who: String; + finder?: String; + finderFee?: String; + closes?: Int; +} + +export interface TipPreviousValuesPromise + extends Promise, + Fragmentable { + id: () => Promise; + hash: () => Promise; + reason: () => Promise; + who: () => Promise; + finder: () => Promise; + finderFee: () => Promise; + closes: () => Promise; +} + +export interface TipPreviousValuesSubscription + extends Promise>, + Fragmentable { + id: () => Promise>; + hash: () => Promise>; + reason: () => Promise>; + who: () => Promise>; + finder: () => Promise>; + finderFee: () => Promise>; + closes: () => Promise>; +} + +export interface TipStatusSubscriptionPayload { + mutation: MutationType; + node: TipStatus; + updatedFields: String[]; + previousValues: TipStatusPreviousValues; +} + +export interface TipStatusSubscriptionPayloadPromise + extends Promise, + Fragmentable { + mutation: () => Promise; + node: () => T; + updatedFields: () => Promise; + previousValues: () => T; +} + +export interface TipStatusSubscriptionPayloadSubscription + extends Promise>, + Fragmentable { + mutation: () => Promise>; + node: () => T; + updatedFields: () => Promise>; + previousValues: () => T; +} + +export interface TipStatusPreviousValues { + id: ID_Output; + status: String; + uniqueStatus: String; +} + +export interface TipStatusPreviousValuesPromise + extends Promise, + Fragmentable { + id: () => Promise; + status: () => Promise; + uniqueStatus: () => Promise; +} + +export interface TipStatusPreviousValuesSubscription + extends Promise>, + Fragmentable { + id: () => Promise>; + status: () => Promise>; + uniqueStatus: () => Promise>; +} + export interface TotalIssuanceSubscriptionPayload { mutation: MutationType; node: TotalIssuance; @@ -9861,6 +10660,14 @@ export const models: Model[] = [ { name: "TreasuryStatus", embedded: false + }, + { + name: "Tip", + embedded: false + }, + { + name: "TipStatus", + embedded: false } ]; diff --git a/node-watcher/src/generated/prisma-client/prisma-schema.ts b/node-watcher/src/generated/prisma-client/prisma-schema.ts index 4fa44a490..265c8d382 100644 --- a/node-watcher/src/generated/prisma-client/prisma-schema.ts +++ b/node-watcher/src/generated/prisma-client/prisma-schema.ts @@ -90,6 +90,14 @@ type AggregateStake { count: Int! } +type AggregateTip { + count: Int! +} + +type AggregateTipStatus { + count: Int! +} + type AggregateTotalIssuance { count: Int! } @@ -1979,6 +1987,18 @@ type Mutation { upsertStake(where: StakeWhereUniqueInput!, create: StakeCreateInput!, update: StakeUpdateInput!): Stake! deleteStake(where: StakeWhereUniqueInput!): Stake deleteManyStakes(where: StakeWhereInput): BatchPayload! + createTip(data: TipCreateInput!): Tip! + updateTip(data: TipUpdateInput!, where: TipWhereUniqueInput!): Tip + updateManyTips(data: TipUpdateManyMutationInput!, where: TipWhereInput): BatchPayload! + upsertTip(where: TipWhereUniqueInput!, create: TipCreateInput!, update: TipUpdateInput!): Tip! + deleteTip(where: TipWhereUniqueInput!): Tip + deleteManyTips(where: TipWhereInput): BatchPayload! + createTipStatus(data: TipStatusCreateInput!): TipStatus! + updateTipStatus(data: TipStatusUpdateInput!, where: TipStatusWhereUniqueInput!): TipStatus + updateManyTipStatuses(data: TipStatusUpdateManyMutationInput!, where: TipStatusWhereInput): BatchPayload! + upsertTipStatus(where: TipStatusWhereUniqueInput!, create: TipStatusCreateInput!, update: TipStatusUpdateInput!): TipStatus! + deleteTipStatus(where: TipStatusWhereUniqueInput!): TipStatus + deleteManyTipStatuses(where: TipStatusWhereInput): BatchPayload! createTotalIssuance(data: TotalIssuanceCreateInput!): TotalIssuance! updateTotalIssuance(data: TotalIssuanceUpdateInput!, where: TotalIssuanceWhereUniqueInput!): TotalIssuance updateManyTotalIssuances(data: TotalIssuanceUpdateManyMutationInput!, where: TotalIssuanceWhereInput): BatchPayload! @@ -3740,6 +3760,12 @@ type Query { stake(where: StakeWhereUniqueInput!): Stake stakes(where: StakeWhereInput, orderBy: StakeOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Stake]! stakesConnection(where: StakeWhereInput, orderBy: StakeOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): StakeConnection! + tip(where: TipWhereUniqueInput!): Tip + tips(where: TipWhereInput, orderBy: TipOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Tip]! + tipsConnection(where: TipWhereInput, orderBy: TipOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TipConnection! + tipStatus(where: TipStatusWhereUniqueInput!): TipStatus + tipStatuses(where: TipStatusWhereInput, orderBy: TipStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TipStatus]! + tipStatusesConnection(where: TipStatusWhereInput, orderBy: TipStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TipStatusConnection! totalIssuance(where: TotalIssuanceWhereUniqueInput!): TotalIssuance totalIssuances(where: TotalIssuanceWhereInput, orderBy: TotalIssuanceOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TotalIssuance]! totalIssuancesConnection(where: TotalIssuanceWhereInput, orderBy: TotalIssuanceOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): TotalIssuanceConnection! @@ -4711,12 +4737,470 @@ type Subscription { session(where: SessionSubscriptionWhereInput): SessionSubscriptionPayload slashing(where: SlashingSubscriptionWhereInput): SlashingSubscriptionPayload stake(where: StakeSubscriptionWhereInput): StakeSubscriptionPayload + tip(where: TipSubscriptionWhereInput): TipSubscriptionPayload + tipStatus(where: TipStatusSubscriptionWhereInput): TipStatusSubscriptionPayload totalIssuance(where: TotalIssuanceSubscriptionWhereInput): TotalIssuanceSubscriptionPayload treasurySpendProposal(where: TreasurySpendProposalSubscriptionWhereInput): TreasurySpendProposalSubscriptionPayload treasuryStatus(where: TreasuryStatusSubscriptionWhereInput): TreasuryStatusSubscriptionPayload validator(where: ValidatorSubscriptionWhereInput): ValidatorSubscriptionPayload } +type Tip { + id: Int! + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int + tipStatus(where: TipStatusWhereInput, orderBy: TipStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TipStatus!] +} + +type TipConnection { + pageInfo: PageInfo! + edges: [TipEdge]! + aggregate: AggregateTip! +} + +input TipCreateInput { + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int + tipStatus: TipStatusCreateManyWithoutTipInput +} + +input TipCreateOneWithoutTipStatusInput { + create: TipCreateWithoutTipStatusInput + connect: TipWhereUniqueInput +} + +input TipCreateWithoutTipStatusInput { + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int +} + +type TipEdge { + node: Tip! + cursor: String! +} + +enum TipOrderByInput { + id_ASC + id_DESC + hash_ASC + hash_DESC + reason_ASC + reason_DESC + who_ASC + who_DESC + finder_ASC + finder_DESC + finderFee_ASC + finderFee_DESC + closes_ASC + closes_DESC +} + +type TipPreviousValues { + id: Int! + hash: String! + reason: String! + who: String! + finder: String + finderFee: String + closes: Int +} + +type TipStatus { + id: ID! + blockNumber: BlockNumber! + tip: Tip! + status: String! + uniqueStatus: String! +} + +type TipStatusConnection { + pageInfo: PageInfo! + edges: [TipStatusEdge]! + aggregate: AggregateTipStatus! +} + +input TipStatusCreateInput { + id: ID + blockNumber: BlockNumberCreateOneInput! + tip: TipCreateOneWithoutTipStatusInput! + status: String! + uniqueStatus: String! +} + +input TipStatusCreateManyWithoutTipInput { + create: [TipStatusCreateWithoutTipInput!] + connect: [TipStatusWhereUniqueInput!] +} + +input TipStatusCreateWithoutTipInput { + id: ID + blockNumber: BlockNumberCreateOneInput! + status: String! + uniqueStatus: String! +} + +type TipStatusEdge { + node: TipStatus! + cursor: String! +} + +enum TipStatusOrderByInput { + id_ASC + id_DESC + status_ASC + status_DESC + uniqueStatus_ASC + uniqueStatus_DESC +} + +type TipStatusPreviousValues { + id: ID! + status: String! + uniqueStatus: String! +} + +input TipStatusScalarWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + id_lt: ID + id_lte: ID + id_gt: ID + id_gte: ID + id_contains: ID + id_not_contains: ID + id_starts_with: ID + id_not_starts_with: ID + id_ends_with: ID + id_not_ends_with: ID + status: String + status_not: String + status_in: [String!] + status_not_in: [String!] + status_lt: String + status_lte: String + status_gt: String + status_gte: String + status_contains: String + status_not_contains: String + status_starts_with: String + status_not_starts_with: String + status_ends_with: String + status_not_ends_with: String + uniqueStatus: String + uniqueStatus_not: String + uniqueStatus_in: [String!] + uniqueStatus_not_in: [String!] + uniqueStatus_lt: String + uniqueStatus_lte: String + uniqueStatus_gt: String + uniqueStatus_gte: String + uniqueStatus_contains: String + uniqueStatus_not_contains: String + uniqueStatus_starts_with: String + uniqueStatus_not_starts_with: String + uniqueStatus_ends_with: String + uniqueStatus_not_ends_with: String + AND: [TipStatusScalarWhereInput!] + OR: [TipStatusScalarWhereInput!] + NOT: [TipStatusScalarWhereInput!] +} + +type TipStatusSubscriptionPayload { + mutation: MutationType! + node: TipStatus + updatedFields: [String!] + previousValues: TipStatusPreviousValues +} + +input TipStatusSubscriptionWhereInput { + mutation_in: [MutationType!] + updatedFields_contains: String + updatedFields_contains_every: [String!] + updatedFields_contains_some: [String!] + node: TipStatusWhereInput + AND: [TipStatusSubscriptionWhereInput!] + OR: [TipStatusSubscriptionWhereInput!] + NOT: [TipStatusSubscriptionWhereInput!] +} + +input TipStatusUpdateInput { + blockNumber: BlockNumberUpdateOneRequiredInput + tip: TipUpdateOneRequiredWithoutTipStatusInput + status: String + uniqueStatus: String +} + +input TipStatusUpdateManyDataInput { + status: String + uniqueStatus: String +} + +input TipStatusUpdateManyMutationInput { + status: String + uniqueStatus: String +} + +input TipStatusUpdateManyWithoutTipInput { + create: [TipStatusCreateWithoutTipInput!] + delete: [TipStatusWhereUniqueInput!] + connect: [TipStatusWhereUniqueInput!] + set: [TipStatusWhereUniqueInput!] + disconnect: [TipStatusWhereUniqueInput!] + update: [TipStatusUpdateWithWhereUniqueWithoutTipInput!] + upsert: [TipStatusUpsertWithWhereUniqueWithoutTipInput!] + deleteMany: [TipStatusScalarWhereInput!] + updateMany: [TipStatusUpdateManyWithWhereNestedInput!] +} + +input TipStatusUpdateManyWithWhereNestedInput { + where: TipStatusScalarWhereInput! + data: TipStatusUpdateManyDataInput! +} + +input TipStatusUpdateWithoutTipDataInput { + blockNumber: BlockNumberUpdateOneRequiredInput + status: String + uniqueStatus: String +} + +input TipStatusUpdateWithWhereUniqueWithoutTipInput { + where: TipStatusWhereUniqueInput! + data: TipStatusUpdateWithoutTipDataInput! +} + +input TipStatusUpsertWithWhereUniqueWithoutTipInput { + where: TipStatusWhereUniqueInput! + update: TipStatusUpdateWithoutTipDataInput! + create: TipStatusCreateWithoutTipInput! +} + +input TipStatusWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + id_lt: ID + id_lte: ID + id_gt: ID + id_gte: ID + id_contains: ID + id_not_contains: ID + id_starts_with: ID + id_not_starts_with: ID + id_ends_with: ID + id_not_ends_with: ID + blockNumber: BlockNumberWhereInput + tip: TipWhereInput + status: String + status_not: String + status_in: [String!] + status_not_in: [String!] + status_lt: String + status_lte: String + status_gt: String + status_gte: String + status_contains: String + status_not_contains: String + status_starts_with: String + status_not_starts_with: String + status_ends_with: String + status_not_ends_with: String + uniqueStatus: String + uniqueStatus_not: String + uniqueStatus_in: [String!] + uniqueStatus_not_in: [String!] + uniqueStatus_lt: String + uniqueStatus_lte: String + uniqueStatus_gt: String + uniqueStatus_gte: String + uniqueStatus_contains: String + uniqueStatus_not_contains: String + uniqueStatus_starts_with: String + uniqueStatus_not_starts_with: String + uniqueStatus_ends_with: String + uniqueStatus_not_ends_with: String + AND: [TipStatusWhereInput!] + OR: [TipStatusWhereInput!] + NOT: [TipStatusWhereInput!] +} + +input TipStatusWhereUniqueInput { + id: ID + uniqueStatus: String +} + +type TipSubscriptionPayload { + mutation: MutationType! + node: Tip + updatedFields: [String!] + previousValues: TipPreviousValues +} + +input TipSubscriptionWhereInput { + mutation_in: [MutationType!] + updatedFields_contains: String + updatedFields_contains_every: [String!] + updatedFields_contains_some: [String!] + node: TipWhereInput + AND: [TipSubscriptionWhereInput!] + OR: [TipSubscriptionWhereInput!] + NOT: [TipSubscriptionWhereInput!] +} + +input TipUpdateInput { + hash: String + reason: String + who: String + finder: String + finderFee: String + closes: Int + tipStatus: TipStatusUpdateManyWithoutTipInput +} + +input TipUpdateManyMutationInput { + hash: String + reason: String + who: String + finder: String + finderFee: String + closes: Int +} + +input TipUpdateOneRequiredWithoutTipStatusInput { + create: TipCreateWithoutTipStatusInput + update: TipUpdateWithoutTipStatusDataInput + upsert: TipUpsertWithoutTipStatusInput + connect: TipWhereUniqueInput +} + +input TipUpdateWithoutTipStatusDataInput { + hash: String + reason: String + who: String + finder: String + finderFee: String + closes: Int +} + +input TipUpsertWithoutTipStatusInput { + update: TipUpdateWithoutTipStatusDataInput! + create: TipCreateWithoutTipStatusInput! +} + +input TipWhereInput { + id: Int + id_not: Int + id_in: [Int!] + id_not_in: [Int!] + id_lt: Int + id_lte: Int + id_gt: Int + id_gte: Int + hash: String + hash_not: String + hash_in: [String!] + hash_not_in: [String!] + hash_lt: String + hash_lte: String + hash_gt: String + hash_gte: String + hash_contains: String + hash_not_contains: String + hash_starts_with: String + hash_not_starts_with: String + hash_ends_with: String + hash_not_ends_with: String + reason: String + reason_not: String + reason_in: [String!] + reason_not_in: [String!] + reason_lt: String + reason_lte: String + reason_gt: String + reason_gte: String + reason_contains: String + reason_not_contains: String + reason_starts_with: String + reason_not_starts_with: String + reason_ends_with: String + reason_not_ends_with: String + who: String + who_not: String + who_in: [String!] + who_not_in: [String!] + who_lt: String + who_lte: String + who_gt: String + who_gte: String + who_contains: String + who_not_contains: String + who_starts_with: String + who_not_starts_with: String + who_ends_with: String + who_not_ends_with: String + finder: String + finder_not: String + finder_in: [String!] + finder_not_in: [String!] + finder_lt: String + finder_lte: String + finder_gt: String + finder_gte: String + finder_contains: String + finder_not_contains: String + finder_starts_with: String + finder_not_starts_with: String + finder_ends_with: String + finder_not_ends_with: String + finderFee: String + finderFee_not: String + finderFee_in: [String!] + finderFee_not_in: [String!] + finderFee_lt: String + finderFee_lte: String + finderFee_gt: String + finderFee_gte: String + finderFee_contains: String + finderFee_not_contains: String + finderFee_starts_with: String + finderFee_not_starts_with: String + finderFee_ends_with: String + finderFee_not_ends_with: String + closes: Int + closes_not: Int + closes_in: [Int!] + closes_not_in: [Int!] + closes_lt: Int + closes_lte: Int + closes_gt: Int + closes_gte: Int + tipStatus_every: TipStatusWhereInput + tipStatus_some: TipStatusWhereInput + tipStatus_none: TipStatusWhereInput + AND: [TipWhereInput!] + OR: [TipWhereInput!] + NOT: [TipWhereInput!] +} + +input TipWhereUniqueInput { + id: Int +} + type TotalIssuance { id: ID! blockNumber: BlockNumber! diff --git a/node-watcher/src/tasks/createTip.ts b/node-watcher/src/tasks/createTip.ts new file mode 100644 index 000000000..6f1c25d2f --- /dev/null +++ b/node-watcher/src/tasks/createTip.ts @@ -0,0 +1,160 @@ +// Copyright 2018-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { ApiPromise } from '@polkadot/api'; +import { Option } from '@polkadot/types'; +import { + BlockNumber, + Hash, + OpenTip, +} from '@polkadot/types/interfaces'; +import { hexToString, logger } from '@polkadot/util'; + +import { prisma } from '../generated/prisma-client'; +import { filterEvents } from '../util/filterEvents'; +import { tipStatus } from '../util/statuses'; +import { + Cached, + NomidotTip, + Task, + TipRawEvent, +} from './types'; + +const l = logger('Task: Tip'); + +/* + * ======= Table (Tip) ====== + */ +const createTip: Task = { + name: 'createTip', + read: async ( + blockHash: Hash, + cached: Cached, + api: ApiPromise + ): Promise => { + const { events } = cached; + + const tipEvents = filterEvents( + events, + 'treasury', + 'NewTip' + ); + + const results: NomidotTip[] = []; + + await Promise.all( + tipEvents.map(async ({ event: { data, typeDef } }) => { + + const tipRawEvent: TipRawEvent = data.reduce( + (prev, curr, index) => { + const type = typeDef[index].type; + + return { + ...prev, + [type]: curr.toJSON(), + }; + }, + {} + ); + + if (!tipRawEvent.Hash) { + l.error( + `Expected Tip hash missing in the event: ${tipRawEvent.Hash}` + ); + return null; + } + + const tipInfoRaw: Option = await api.query.treasury.tips.at( + blockHash, + tipRawEvent.Hash + ); + + if (tipInfoRaw.isNone) { + l.error(`No tip data found for Hash: ${tipRawEvent.Hash}`); + return null; + } + + const tip = tipInfoRaw.unwrap(); + + const reason = await api.query.treasury.reasons.at( + blockHash, + tip.reason + ) + + const reasonText = reason.isSome ? hexToString(reason.unwrap().toHex()) : ''; + + let finder = tip.finder.toString(); + // Hack to check if finder is of old ITuple type [AccountId, Balance] + if (finder.includes(',')) { + try { + finder = JSON.parse(finder)[0]; + } catch (error) { + l.error('Error while parsing finder', error); + } + } + + const result: NomidotTip = { + hash: tipRawEvent.Hash, + reason: reasonText, + who: tip.who, + status: tipStatus.OPENED, + finder, + }; + + if (tip.closes.isSome) { + result.closes = tip.closes.unwrap().toNumber(); + } + + // finder is council member/tipper when tip submitted by council member + if (tip.tips.length) { + const [AccountId] = tip.tips[0]; + if (!result.finder) { + result.finder = AccountId.toString(); + } + } + + l.log(`Nomidot Tip: ${JSON.stringify(result)}`); + + results.push(result); + }) + ); + + return results; + }, + write: async (blockNumber: BlockNumber, value: NomidotTip[]) => { + await Promise.all( + value.map(async prop => { + const { + hash, + reason, + who, + closes, + finder, + status, + } = prop; + + await prisma.createTip({ + hash: hash, + reason, + who: who.toString(), + finder, + closes: closes, + tipStatus: { + create: { + blockNumber: { + connect: { + number: blockNumber.toNumber(), + }, + }, + status, + uniqueStatus: `${hash}_${status}`, + }, + }, + }); + }) + ); + }, +}; + +export default createTip; diff --git a/node-watcher/src/tasks/createTipStatus.ts b/node-watcher/src/tasks/createTipStatus.ts new file mode 100644 index 000000000..83572a769 --- /dev/null +++ b/node-watcher/src/tasks/createTipStatus.ts @@ -0,0 +1,148 @@ +// Copyright 2018-2020 @paritytech/polkassembly authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { ApiPromise } from '@polkadot/api'; +import { BlockNumber, Hash, OpenTip } from '@polkadot/types/interfaces'; +import { Option } from '@polkadot/types'; +import { logger } from '@polkadot/util'; + +import { prisma } from '../generated/prisma-client'; +import { tipStatus } from '../util/statuses'; +import { + Cached, + TipRawEvent, + NomidotTipStatusUpdate, + Task, +} from './types'; + +const l = logger('Task: Tip Status Update'); + +/* + * ======= Table (Tip Status Update) ====== + */ +const createTipStatus: Task = { + name: 'createTipStatusUpdate', + read: async ( + blockHash: Hash, + cached: Cached, + api: ApiPromise + ): Promise => { + const { events } = cached; + + const filteredEvents = events.filter( + ({ event: { method, section } }) => + section === 'treasury' && + [tipStatus.CLOSED, tipStatus.CLOSING, tipStatus.RETRACTED].includes(method) + ); + + const results: NomidotTipStatusUpdate[] = []; + + if (!filteredEvents.length) { + return results; + } + + await Promise.all( + filteredEvents.map(async ({ event: { data, typeDef, method } }) => { + const tipRawEvent: TipRawEvent = data.reduce( + (result, curr, index) => { + const type = typeDef[index].type; + + return { + ...result, + [type]: curr.toJSON(), + }; + }, + {} + ); + + if (!tipRawEvent.Hash) { + l.error( + `Expected Tip hash missing in the event: ${tipRawEvent.Hash}` + ); + return; + } + + const tips = await prisma.tips({ + where: { hash: tipRawEvent.Hash }, + }); + + if (!tips || !tips.length) { + l.error( + `No existing tip found for hash: ${tipRawEvent.Hash}` + ); + return; + } + + let closes: number | undefined; + + if (method === tipStatus.CLOSING) { + const tipInfoRaw: Option = await api.query.treasury.tips( + tipRawEvent.Hash + ); + + if (tipInfoRaw.isNone) { + l.error(`No tip data found for Hash: ${tipRawEvent.Hash}`); + + } else { + const tip = tipInfoRaw.unwrap(); + + if (tip.closes.isSome) { + closes = tip.closes.unwrap().toNumber() + } + } + } + + const result: NomidotTipStatusUpdate = { + tipId: tips[0].id, + status: method, + closes + }; + l.log(`Nomidot Tip Status Update: ${JSON.stringify(result)}`); + results.push(result); + }) + ); + + return results; + }, + write: async ( + blockNumber: BlockNumber, + value: NomidotTipStatusUpdate[] + ) => { + if (value && value.length) { + await Promise.all( + value.map(async ref => { + const { tipId, status, closes } = ref; + + if (closes) { + await prisma.updateTip({ + data: { + closes, + }, + where: { + id: tipId, + }, + }); + } + + await prisma.createTipStatus({ + blockNumber: { + connect: { + number: blockNumber.toNumber(), + }, + }, + tip: { + connect: { + id: tipId, + }, + }, + status, + uniqueStatus: `${tipId}_${status}`, + }); + }) + ); + } + }, +}; + +export default createTipStatus; diff --git a/node-watcher/src/tasks/index.ts b/node-watcher/src/tasks/index.ts index 8e76d8ea8..5fb1e8565 100644 --- a/node-watcher/src/tasks/index.ts +++ b/node-watcher/src/tasks/index.ts @@ -19,6 +19,8 @@ import createReferendumStatus from './createReferendumStatus'; // import createSlashing from './createSlashing'; // import createStake from './createStake'; // import createTotalIssuance from './createTotalIssuance'; +import createTip from './createTip'; +import createTipStatus from './createTipStatus'; import createTreasury from './createTreasury'; import { NomidotTask } from './types'; @@ -42,4 +44,6 @@ export const nomidotTasks: NomidotTask[] = [ createMotion, createMotionStatus, createTreasury, + createTip, + createTipStatus ]; diff --git a/node-watcher/src/tasks/types.ts b/node-watcher/src/tasks/types.ts index 140beb389..e67c29068 100644 --- a/node-watcher/src/tasks/types.ts +++ b/node-watcher/src/tasks/types.ts @@ -118,7 +118,9 @@ export type Nomidot = | NomidotSlashing[] | NomidotStake | NomidotTotalIssuance - | NomidotTreasury[]; + | NomidotTreasury[] + | NomidotTip[] + | NomidotTipStatusUpdate[]; export type NomidotTask = Task; @@ -138,6 +140,19 @@ export interface NomidotProposalRawEvent { Balance?: Balance; } +export interface NomidotTip { + hash: string + reason: string + who: AccountId + closes?: number + finder?: string + status: string +} + +export interface TipRawEvent { + Hash?: string +} + export interface NomidotTreasury { treasuryProposalId: number; proposer: AccountId; @@ -238,3 +253,9 @@ export interface NomidotReferendumStatusUpdate { } export type NomidotCouncil = AccountId[]; + +export interface NomidotTipStatusUpdate { + tipId: number; + status: string; + closes?: number; +} diff --git a/node-watcher/src/util/statuses.ts b/node-watcher/src/util/statuses.ts index 54dccc9c4..8798b0922 100644 --- a/node-watcher/src/util/statuses.ts +++ b/node-watcher/src/util/statuses.ts @@ -37,3 +37,10 @@ export const treasuryProposalStatus = { TABLED: 'Awarded', REJECTED: 'Rejected', }; + +export const tipStatus = { + OPENED: 'TipOpened', + CLOSED: 'TipClosed', + CLOSING: 'TipClosing', + RETRACTED: 'TipRetracted' +};