[root@localhost ~]# rm -rf /etc/localtime [root@localhost ~]# ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime [root@localhost ~]# echo "ZONE="Asia/Shanghai" > UTC=false > ARC=false">>/etc/sysconfig/clock [root@localhost ~]# yum install -y ntp Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.bfsu.edu.cn Resolving Dependencies --> Running transaction check ---> Package ntp.x86_64 0:4.2.6p5-29.el7.centos.2 will be installed --> Processing Dependency: ntpdate = 4.2.6p5-29.el7.centos.2 for package: ntp-4.2.6p5-29.el7.centos.2.x86_64 --> Processing Dependency: libopts.so.25()(64bit) for package: ntp-4.2.6p5-29.el7.centos.2.x86_64 --> Running transaction check ---> Package autogen-libopts.x86_64 0:5.18-5.el7 will be installed ---> Package ntpdate.x86_64 0:4.2.6p5-29.el7.centos will be updated ---> Package ntpdate.x86_64 0:4.2.6p5-29.el7.centos.2 will be an update --> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================== Package Arch Version Repository Size =========================================================================================================== Installing: ntp x86_64 4.2.6p5-29.el7.centos.2 updates 549 k Installing for dependencies: autogen-libopts x86_64 5.18-5.el7 base 66 k Updating for dependencies: ntpdate x86_64 4.2.6p5-29.el7.centos.2 updates 87 k
[root@localhost ~]# yum install -y curl \ > wget \ > tree \ > lrzsz \ > dos2unix \ > git Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.tuna.tsinghua.edu.cn Package wget-1.14-18.el7_6.1.x86_64 already installed and latest version Package lrzsz-0.12.20-36.el7.x86_64 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package curl.x86_64 0:7.29.0-57.el7 will be updated ---> Package curl.x86_64 0:7.29.0-57.el7_8.1 will be an update --> Processing Dependency: libcurl = 7.29.0-57.el7_8.1 for package: curl-7.29.0-57.el7_8.1.x86_64 ---> Package dos2unix.x86_64 0:6.0.3-7.el7 will be installed ---> Package git.x86_64 0:1.8.3.1-23.el7_8 will be installed --> Processing Dependency: perl-Git = 1.8.3.1-23.el7_8 for package: git-1.8.3.1-23.el7_8.x86_64 --> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.3.1-23.el7_8.x86_64 --> Processing Dependency: perl(Git) for package: git-1.8.3.1-23.el7_8.x86_64 --> Processing Dependency: perl(Error) for package: git-1.8.3.1-23.el7_8.x86_64 ---> Package tree.x86_64 0:1.6.0-10.el7 will be installed --> Running transaction check ---> Package libcurl.x86_64 0:7.29.0-57.el7 will be updated ---> Package libcurl.x86_64 0:7.29.0-57.el7_8.1 will be an update ---> Package perl-Error.noarch 1:0.17020-2.el7 will be installed ---> Package perl-Git.noarch 0:1.8.3.1-23.el7_8 will be installed ---> Package perl-TermReadKey.x86_64 0:2.30-20.el7 will be installed --> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================== Package Arch Version Repository Size =========================================================================================================== Installing: dos2unix x86_64 6.0.3-7.el7 base 74 k git x86_64 1.8.3.1-23.el7_8 updates 4.4 M tree x86_64 1.6.0-10.el7 base 46 k Updating: curl x86_64 7.29.0-57.el7_8.1 updates 271 k Installing for dependencies: perl-Error noarch 1:0.17020-2.el7 base 32 k perl-Git noarch 1.8.3.1-23.el7_8 updates 56 k perl-TermReadKey x86_64 2.30-20.el7 base 31 k Updating for dependencies: libcurl x86_64 7.29.0-57.el7_8.1 updates 223 k
[root@vm192168308 ~]# cd /usr/local [root@vm192168308 local]# su postgres bash-4.2$ ls bin etc games go include lib lib64 libexec nodejs sbin share src bash-4.2$ exit [root@vm192168308 local]#
# 密码123456 [root@localhost ~]# sudo -u postgres psql could not change directory to "/root": Permission denied psql (9.5.23) Type "help" for help.
postgres=# ALTER USER postgres WITH PASSWORD '123456789'; ALTER ROLE postgres=# \q # 密码hello123456 [root@localhost ~]# sudo passwd -d postgres Removing password for user postgres. passwd: Success [root@localhost ~]# sudo -u postgres passwd Changing password for user postgres. New password: Retype new password: passwd: all authentication tokens updated successfully. [root@localhost ~]#
Total download size: 15 k Installed size: 24 k Is this ok [y/d/N]: y Downloading packages: epel-release-7-11.noarch.rpm | 15 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : epel-release-7-11.noarch 1/1 Verifying : epel-release-7-11.noarch 1/1
[root@localhost local]# yum install -y gcc-c++ Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * epel: mirrors.tuna.tsinghua.edu.cn Resolving Dependencies --> Running transaction check ---> Package gcc-c++.x86_64 0:4.8.5-39.el7 will be installed --> Processing Dependency: libstdc++-devel = 4.8.5-39.el7 for package: gcc-c++-4.8.5-39.el7.x86_64 --> Processing Dependency: gcc = 4.8.5-39.el7 for package: gcc-c++-4.8.5-39.el7.x86_64 --> Running transaction check ---> Package gcc.x86_64 0:4.8.5-39.el7 will be installed --> Processing Dependency: cpp = 4.8.5-39.el7 for package: gcc-4.8.5-39.el7.x86_64 --> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-39.el7.x86_64 ---> Package libstdc++-devel.x86_64 0:4.8.5-39.el7 will be installed --> Running transaction check ---> Package cpp.x86_64 0:4.8.5-39.el7 will be installed ---> Package glibc-devel.x86_64 0:2.17-307.el7.1 will be installed --> Processing Dependency: glibc-headers = 2.17-307.el7.1 for package: glibc-devel-2.17-307.el7.1.x86_64 --> Processing Dependency: glibc-headers for package: glibc-devel-2.17-307.el7.1.x86_64 --> Running transaction check ---> Package glibc-headers.x86_64 0:2.17-307.el7.1 will be installed --> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-307.el7.1.x86_64 --> Processing Dependency: kernel-headers for package: glibc-headers-2.17-307.el7.1.x86_64 --> Running transaction check ---> Package kernel-headers.x86_64 0:3.10.0-1127.19.1.el7 will be installed --> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================== Package Arch Version Repository Size =========================================================================================================== Installing: gcc-c++ x86_64 4.8.5-39.el7 base 7.2 M Installing for dependencies: cpp x86_64 4.8.5-39.el7 base 5.9 M gcc x86_64 4.8.5-39.el7 base 16 M glibc-devel x86_64 2.17-307.el7.1 base 1.1 M glibc-headers x86_64 2.17-307.el7.1 base 689 k kernel-headers x86_64 3.10.0-1127.19.1.el7 updates 9.0 M libstdc++-devel x86_64 4.8.5-39.el7 base 1.5 M
[root@localhost db]# su postgres bash-4.2$ ./createdb.sh Copying ENV variables into temp file... USER="cups" DATABASE="fabricexplorer" PASSWD='123456789' Executing SQL scripts, OS=linux-gnu psql:./explorerpg.sql:6: ERROR: role "cups" already exists DROP DATABASE CREATE DATABASE You are now connected to database "fabricexplorer" as user "postgres". psql:./explorerpg.sql:15: NOTICE: table "blocks" does not exist, skipping DROP TABLE CREATE TABLE ALTER TABLE psql:./explorerpg.sql:37: NOTICE: table "chaincodes" does not exist, skipping DROP TABLE CREATE TABLE ALTER TABLE ALTER SEQUENCE psql:./explorerpg.sql:57: NOTICE: table "peer_ref_chaincode" does not exist, skipping DROP TABLE CREATE TABLE ALTER TABLE psql:./explorerpg.sql:74: NOTICE: table "channel" does not exist, skipping DROP TABLE CREATE TABLE ALTER TABLE ALTER SEQUENCE psql:./explorerpg.sql:99: NOTICE: table "peer" does not exist, skipping DROP TABLE CREATE TABLE ALTER TABLE psql:./explorerpg.sql:120: NOTICE: table "peer_ref_channel" does not exist, skipping DROP TABLE CREATE TABLE ALTER TABLE psql:./explorerpg.sql:137: NOTICE: table "orderer" does not exist, skipping DROP TABLE CREATE TABLE ALTER TABLE psql:./explorerpg.sql:155: NOTICE: table "transactions" does not exist, skipping DROP TABLE CREATE TABLE ALTER TABLE ALTER SEQUENCE psql:./explorerpg.sql:190: NOTICE: table "users" does not exist, skipping DROP TABLE CREATE TABLE ALTER TABLE psql:./explorerpg.sql:208: NOTICE: table "write_lock" does not exist, skipping DROP TABLE CREATE TABLE ALTER TABLE ALTER SEQUENCE psql:./explorerpg.sql:217: NOTICE: index "blocks_blocknum_idx" does not exist, skipping DROP INDEX CREATE INDEX psql:./explorerpg.sql:221: NOTICE: index "blocks_channel_genesis_hash_idx" does not exist, skipping DROP INDEX CREATE INDEX psql:./explorerpg.sql:225: NOTICE: index "blocks_createdt_idx" does not exist, skipping DROP INDEX CREATE INDEX psql:./explorerpg.sql:229: NOTICE: index "transaction_txhash_idx" does not exist, skipping DROP INDEX CREATE INDEX psql:./explorerpg.sql:233: NOTICE: index "transaction_channel_genesis_hash_idx" does not exist, skipping DROP INDEX CREATE INDEX psql:./explorerpg.sql:237: NOTICE: index "transaction_createdt_idx" does not exist, skipping DROP INDEX CREATE INDEX psql:./explorerpg.sql:241: NOTICE: index "transaction_blockid_idx" does not exist, skipping DROP INDEX CREATE INDEX psql:./explorerpg.sql:245: NOTICE: index "transaction_chaincode_proposal_input_idx" does not exist, skipping DROP INDEX CREATE INDEX psql:./explorerpg.sql:250: NOTICE: index "channel_channel_genesis_hash_idx" does not exist, skipping DROP INDEX CREATE INDEX psql:./explorerpg.sql:254: NOTICE: index "channel_channel_hash_idx" does not exist, skipping DROP INDEX CREATE INDEX GRANT You are now connected to database "fabricexplorer" as user "postgres". bash-4.2$ exit [root@localhost db]# sudo -u postgres psql fabricexplorer -c '\d' List of relations Schema | Name | Type | Owner --------+---------------------------+----------+------- public | blocks | table | cups public | blocks_id_seq | sequence | cups public | chaincodes | table | cups public | chaincodes_id_seq | sequence | cups public | channel | table | cups public | channel_id_seq | sequence | cups public | orderer | table | cups public | orderer_id_seq | sequence | cups public | peer | table | cups public | peer_id_seq | sequence | cups public | peer_ref_chaincode | table | cups public | peer_ref_chaincode_id_seq | sequence | cups public | peer_ref_channel | table | cups public | peer_ref_channel_id_seq | sequence | cups public | transactions | table | cups public | transactions_id_seq | sequence | cups public | users | table | cups public | users_id_seq | sequence | cups public | write_lock | table | cups public | write_lock_write_lock_seq | sequence | cups (20 rows)
node-pre-gyp WARN Using request for node-pre-gyp https download [bcrypt] Success: "/usr/local/blockchain-explorer/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" is installed via remote
node-pre-gyp WARN Using request for node-pre-gyp https download [grpc] Success: "/usr/local/blockchain-explorer/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" is installed via remote
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN eslint-config-airbnb@17.1.1 requires a peer of eslint@^4.19.1 || ^5.3.0 but none is installed. You must install peer dependencies yourself. npm WARN eslint-plugin-import@2.22.0 requires a peer of eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 but none is installed. You must install peer dependencies yourself. npm WARN eslint-plugin-jsx-a11y@6.3.1 requires a peer of eslint@^3 || ^4 || ^5 || ^6 || ^7 but none is installed. You must install peer dependencies yourself. npm WARN eslint-plugin-react@7.21.2 requires a peer of eslint@^3 || ^4 || ^5 || ^6 || ^7 but none is installed. You must install peer dependencies yourself. npm WARN eslint-plugin-spellcheck@0.0.11 requires a peer of eslint@>=0.8.0 but none is installed. You must install peer dependencies yourself. npm WARN eslint-config-airbnb-base@13.2.0 requires a peer of eslint@^4.19.1 || ^5.3.0 but none is installed. You must install peer dependencies yourself.
added 713 packages from 575 contributors and audited 716 packages in 60.908s
28 packages are looking for funding run `npm fund` for details
found 0 vulnerabilities
[root@localhost blockchain-explorer]# cd app/test [root@localhost test]# npm install npm WARN hyperledger-explorer-test@0.3.9 No repository field.
added 341 packages from 1086 contributors and audited 341 packages in 24.425s
22 packages are looking for funding run `npm fund` for details
found 1 low severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details [root@localhost test]# npm run test
> hyperledger-explorer-test@0.3.9 test /usr/local/blockchain-explorer/app/test > nyc mocha *.js --exit
GET /api/blockactivity/:channel_genesis_hash ✓ should return blockactivity
GET /api/blockAndTxList/:channel/:blocknum ✓ should return blockandtx
GET /api/block/:channel_genesis_hash/:number ✓ should return block
GET /api/blocksByHour/:channel_genesis_hash/:day ✓ should return blockbyhour
GET /api/blocksByMinute/:channel_genesis_hash/:hour ✓ should return blockbyminute
GET /api/block/transactions/:channel_genesis_hash/:number ✓ should return blocktransaction
GET /api/chaincode/:channel ✓ should return chaincode
GET /api/changeChannel/:channelName ✓ should return changedchannel
GET /api/channels/info ✓ should return channelsinfo
GET /api/channels/ ✓ should return channels
GET /api/curChannel ✓ should return currentchannel
dateUtils().toUTCmilliseconds ✓ dateUtils.toUTCmilliseconds should be not null
POST /auth/enroll/ ✓ should return enroll
POST /auth/login ✓ should return login
GET /auth/networklist ✓ should return networklist
GET /api/peer/channel ✓ should return peers
Test explorerpg.sql for DDL statements syntax verification ✓ should read the file explorerpg.sql for ddl statements TAP version 13 # Test Results # Test completed and Temporary database deleted ✓ should execute statements successfully in explorerpg.sql file
POST /auth/register/ ✓ should return register
requestutils().orgsArrayToString should return empty string ✓ requestutils().orgsArrayToString should return empty string
requestutils().orgsArrayToString should return single quotes value ✓ requestutils().orgsArrayToString should return single quotes value
requestutils().orgsArrayToString should return comma separated single quotes values ✓ requestutils().orgsArrayToString should return comma separated single quotes values
GET api/status/:channel_genesis_hash ✓ should return channel status
getLogger() ✓ should getLogger()
GET /api/transaction/:channel_genesis_hash/:txid ✓ should return transaction
GET /api/txByHour/:channel_genesis_hash/:day ✓ should return txbyhour
GET /api/txByMinute/:channel_genesis/:hour ✓ should return txbyminute
GET /api/txByOrg/:channel ✓ should return txbyorg
28 passing (86ms)
1..0 # tests 0 # pass 0
# ok
[root@localhost test]# cd ../../client [root@localhost client]# npm install
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
> jss@9.8.7 postinstall /usr/local/blockchain-explorer/client/node_modules/jss > node -e "console.log('\u001b[35m\u001b[1mLove JSS? You can now support us on open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/jss/donate\u001b[0m')"
Love JSS? You can now support us on open collective: > https://opencollective.com/jss/donate
-- -- SPDX-License-Identifier: Apache-2.0 -- -- CREATE USER cups -- WITH PASSWORD 123456789; -- DROP DATABASE IF EXISTS fabricexplorer; -- CREATE DATABASE fabricexplorer owner cups; -- \c fabricexplorer; --
-- ---------------------------- -- Table structure for `blocks` -- ---------------------------- DROP TABLE IF EXISTS blocks;
CREATE TABLE blocks ( id SERIAL PRIMARY KEY, blocknum integer DEFAULT NULL, datahash character varying(256) DEFAULT NULL, prehash character varying(256) DEFAULT NULL, txcount integer DEFAULT NULL, createdt Timestamp DEFAULT NULL, prev_blockhash character varying(256) DEFAULT NULL, blockhash character varying(256) DEFAULT NULL, channel_genesis_hash character varying(256) DEFAULT NULL, blksize integer DEFAULT NULL, network_name varchar(255) );
ALTER table blocks owner to cups;
-- ---------------------------- -- Table structure for `chaincodes` -- ---------------------------- DROP TABLE IF EXISTS chaincodes;
CREATE TABLE chaincodes ( id SERIAL PRIMARY KEY, name character varying(255) DEFAULT NULL, version character varying(255) DEFAULT NULL, path character varying(255) DEFAULT NULL, channel_genesis_hash character varying(256) DEFAULT NULL, txcount integer DEFAULT 0, createdt Timestamp DEFAULT NULL, network_name varchar(255) );
ALTER table chaincodes owner to cups; Alter sequence chaincodes_id_seq restart with 10;
-- --------------------------- -- Table structure for `peer_ref_chaincode` -- ---------------------------- DROP TABLE IF EXISTS peer_ref_chaincode;
CREATE TABLE peer_ref_chaincode ( id SERIAL PRIMARY KEY, peerid varchar(256) DEFAULT NULL, chaincodeid varchar(255) DEFAULT NULL, cc_version varchar(255) DEFAULT NULL, channelid character varying(256) DEFAULT NULL, createdt Timestamp DEFAULT NULL, network_name varchar(255) ); ALTER table peer_ref_chaincode owner to cups;
-- ---------------------------- -- Table structure for `channel` -- ---------------------------- DROP TABLE IF EXISTS channel;
-- state character(1) NOT NULL DEFAULT A CHECK (state in (A, D, S))
CREATE TABLE channel ( id SERIAL PRIMARY KEY, name varchar(256) DEFAULT NULL, blocks integer DEFAULT NULL, trans integer DEFAULT NULL, createdt Timestamp DEFAULT NULL, channel_genesis_hash character varying(256) DEFAULT NULL, channel_hash character varying(256) DEFAULT NULL, channel_config bytea default NULL, channel_block bytea DEFAULT NULL, channel_tx bytea DEFAULT NULL, channel_version character varying(256) DEFAULT NULL, network_name varchar(255) );
ALTER table channel owner to cups; Alter sequence channel_id_seq restart with 3; -- ---------------------------- -- Table structure for `peer` -- ---------------------------- DROP TABLE IF EXISTS peer;
-- state character(1) NOT NULL DEFAULT A CHECK (state in (A, D, S))
CREATE TABLE peer ( id SERIAL PRIMARY KEY, org integer DEFAULT NULL, channel_genesis_hash character varying(256) DEFAULT NULL, mspid varchar(256) DEFAULT NULL, requests varchar(256) DEFAULT NULL, events varchar(256) DEFAULT NULL, server_hostname varchar(256) DEFAULT NULL, createdt timestamp DEFAULT NULL, peer_type character varying(256) DEFAULT NULL, network_name varchar(255) ); ALTER table peer owner to cups; -- --------------------------- -- Table structure for `peer_ref_channel` -- ---------------------------- DROP TABLE IF EXISTS peer_ref_channel;
CREATE TABLE peer_ref_channel ( id SERIAL PRIMARY KEY, createdt Timestamp DEFAULT NULL, peerid varchar(256), channelid character varying(256), peer_type character varying(256) DEFAULT NULL, network_name varchar(255) ); ALTER table peer_ref_channel owner to cups;
-- ====================Orderer BE-303===================================== -- ---------------------------- -- Table structure for `orderer` -- ---------------------------- DROP TABLE IF EXISTS orderer;
-- state character(1) NOT NULL DEFAULT A CHECK (state in (A, D, S))
CREATE TABLE orderer ( id SERIAL PRIMARY KEY, requests varchar(256) DEFAULT NULL, server_hostname varchar(256) DEFAULT NULL, createdt timestamp DEFAULT NULL, network_name varchar(255) ); ALTER table orderer owner to cups;
--// ====================Orderer BE-303===================================== -- ---------------------------- -- Table structure for `transactions` -- ---------------------------- DROP TABLE IF EXISTS transactions; CREATE TABLE transactions ( id SERIAL PRIMARY KEY, blockid integer DEFAULT NULL, txhash character varying(256) DEFAULT NULL, createdt timestamp DEFAULT NULL, chaincodename character varying(255) DEFAULT NULL, status integer DEFAULT NULL, creator_msp_id character varying(256) DEFAULT NULL, endorser_msp_id character varying(800) DEFAULT NULL, chaincode_id character varying(256) DEFAULT NULL, type character varying(256) DEFAULT NULL, read_set json default NULL, write_set json default NULL, channel_genesis_hash character varying(256) DEFAULT NULL, validation_code character varying(255) DEFAULT NULL, envelope_signature character varying DEFAULT NULL, payload_extension character varying DEFAULT NULL, creator_id_bytes character varying DEFAULT NULL, creator_nonce character varying DEFAULT NULL, chaincode_proposal_input character varying DEFAULT NULL, tx_response character varying DEFAULT NULL, payload_proposal_hash character varying DEFAULT NULL, endorser_id_bytes character varying DEFAULT NULL, endorser_signature character varying DEFAULT NULL, network_name varchar(255) );
ALTER table transactions owner to cups; Alter sequence transactions_id_seq restart with 6;
-- --------------------------- -- Table structure for `users` -- ---------------------------- DROP TABLE IF EXISTS users;
CREATE TABLE users ( id SERIAL PRIMARY KEY, username varchar(255) NOT NULL, email varchar(255), "networkName" varchar(255) NOT NULL, "firstName" varchar(255), "lastName" varchar(255), "password" varchar(255), "roles" varchar(255), salt varchar(255), "createdAt" timestamp NOT NULL, "updatedAt" timestamp NOT NULL ); ALTER table users owner to cups;
DROP TABLE IF EXISTS write_lock; CREATE TABLE write_lock ( write_lock SERIAl PRIMARY KEY );
ALTER table write_lock owner to cups; Alter sequence write_lock_write_lock_seq restart with 2;
DROP INDEX IF EXISTS blocks_blocknum_idx; CREATE INDEX ON Blocks (blocknum);
DROP INDEX IF EXISTS blocks_channel_genesis_hash_idx; CREATE INDEX ON Blocks (channel_genesis_hash);
DROP INDEX IF EXISTS blocks_createdt_idx; CREATE INDEX ON Blocks (createdt);
DROP INDEX IF EXISTS transaction_txhash_idx; CREATE INDEX ON Transactions (txhash);
DROP INDEX IF EXISTS transaction_channel_genesis_hash_idx; CREATE INDEX ON Transactions (channel_genesis_hash);
DROP INDEX IF EXISTS transaction_createdt_idx; CREATE INDEX ON Transactions (createdt);
DROP INDEX IF EXISTS transaction_blockid_idx; CREATE INDEX ON Transactions (blockid);
DROP INDEX IF EXISTS transaction_chaincode_proposal_input_idx; CREATE INDEX ON Transactions ((md5 (chaincode_proposal_input)));
DROP INDEX IF EXISTS channel_channel_genesis_hash_idx; CREATE INDEX ON channel (channel_genesis_hash);
DROP INDEX IF EXISTS channel_channel_hash_idx; CREATE INDEX ON channel (channel_hash);
GRANT SELECT, INSERT, UPDATE,DELETE ON ALL TABLES IN SCHEMA PUBLIC to cups;