Skip to content

Commit

Permalink
Move index creation to setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dostrelith678 committed Oct 27, 2021
1 parent bb60612 commit 870623b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions files/grest/rpc/assets/asset_address_list.sql
@@ -1,8 +1,3 @@
-- Index creation should be moved to a more general place in the setup
CREATE INDEX IF NOT EXISTS _asset_policy_idx ON PUBLIC.MA_TX_OUT ( policy);

CREATE INDEX IF NOT EXISTS _asset_identifier_idx ON PUBLIC.MA_TX_OUT ( policy, name);

DROP FUNCTION IF EXISTS grest.asset_address_list (text, text);

CREATE FUNCTION grest.asset_address_list (_asset_policy text, _asset_name text)
Expand Down
4 changes: 4 additions & 0 deletions scripts/grest-helper-scripts/setup-grest.sh
Expand Up @@ -424,6 +424,10 @@
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO web_anon;
ALTER DEFAULT PRIVILEGES IN SCHEMA grest GRANT SELECT ON TABLES TO web_anon;
ALTER ROLE web_anon SET search_path TO grest, public;
CREATE INDEX IF NOT EXISTS _asset_policy_idx ON PUBLIC.MA_TX_OUT (policy);
CREATE INDEX IF NOT EXISTS _asset_identifier_idx ON PUBLIC.MA_TX_OUT (policy, name);
COMMIT;
EOF
populate_genesis_table
Expand Down

0 comments on commit 870623b

Please sign in to comment.