user7200: This is how I started docker run, but cardano-graphql_cardano-graphql_1 keeps restarting due to this error related with 1589369664961_init/up.sql.
DOCKER_BUILDKIT=1 \
COMPOSE_DOCKER_CLI_BUILD=1 \
RESTORE_SNAPSHOT=https://update-cardano-mainnet.iohk.io/cardano-db-sync/13/db-sync-snapshot-schema-13-block-7560650-x86_64.tgz \
docker-compose up -d --build &&\
docker-compose logs -f

docker ps result:
CONTAINER ID   IMAGE                                                 COMMAND                  CREATED        STATUS          PORTS                                                                       NAMES
550b5a0b3d00   inputoutput/cardano-db-sync:12.0.0                    "/nix/store/5ghw8rqx…"   18 hours ago   Up 18 hours                                                                                 cardano-graphql_cardano-db-sync-extended_1
0556554a09e6   inputoutput/cardano-graphql-hasura:6.2.0              "docker-entrypoint.s…"   18 hours ago   Up 18 hours     0.0.0.0:8090->8080/tcp, :::8090->8080/tcp                                   cardano-graphql_hasura_1
7dc02c06cf4e   inputoutput/cardano-graphql:6.2.0-mainnet             "node index.js"          18 hours ago   Up 56 seconds   0.0.0.0:3100->3100/tcp, :::3100->3100/tcp                                   cardano-graphql_cardano-graphql_1
6b1e7a19e0d6   postgres:11.5-alpine                                  "docker-entrypoint.s…"   18 hours ago   Up 18 hours     0.0.0.0:5432->5432/tcp, :::5432->5432/tcp                                   cardano-graphql_postgres_1
6c35c01400ee   cardanosolutions/cardano-node-ogmios:v5.1.0-mainnet   "bash cardano-node-o…"   18 hours ago   Up 18 hours     3000/tcp, 12788/tcp, 0.0.0.0:1337->1337/tcp, :::1337->1337/tcp, 12798/tcp   cardano-graphql_cardano-node-ogmios_1

Logs of cardano-graphql_cardano-graphql_1:
{"name":"cardano-graphql","hostname":"7dc02c06cf4e","pid":1,"level":30,"module":"Server","msg":"Initializing","time":"2022-08-03T06:59:29.716Z","v":0}
{"name":"cardano-graphql","hostname":"7dc02c06cf4e","pid":1,"level":30,"module":"HasuraClient","msg":"Initializing","time":"2022-08-03T06:59:30.152Z","v":0}
{"name":"cardano-graphql","hostname":"7dc02c06cf4e","pid":1,"level":50,"msg":"Command failed: /usr/local/bin/hasura --skip-update-check --project /app/packages/api-cardano-db-hasura/hasura/project --endpoint http://hasura:8080 migrate apply --up all\ntime=\"2022-08-03T07:02:58Z\" level=fatal msg=\"apply failed: [postgres-error] query execution failed ($.args[0].args)\\r\\nFile: '1589369664961_init/up.sql'\\r\\n{\\n    \\\"check_metadata_consistency\\\": false,\\n    \\\"sql\\\": \\\"\\\\nCREATE VIEW \\\\\\\"AdaPots\\\\\\\" AS\\\\n  SELECT\\\\n    epoch_no AS \\\\\\\"epochNo\\\\\\\",\\\\n    deposits,\\\\n    fees,\\\\n    reserves,\\\\n    rewards,\\\\n    slot_no AS \\\\\\\"slotNo\\\\\\\",\\\\n    treasury,\\\\n    utxo\\\\nFROM ada_pots;\\\\n\\\\nCREATE TABLE IF NOT EXISTS \\\\\\\"Asset\\\\\\\" (\\\\n    \\\\\\\"assetId\\\\\\\" BYTEA PRIMARY KEY,\\\\n    \\\\\\\"assetName\\\\\\\" BYTEA,\\\\n    \\\\\\\"decimals\\\\\\\" INT,\\\\n    \\\\\\\"description\\\\\\\" VARCHAR(500),\\\\n    \\\\\\\"fingerprint\\\\\\\" CHAR(44),\\\\n    \\\\\\\"firstAppearedInSlot\\\\\\\" INT,\\\\n    \\\\\\\"logo\\\\\\\" VARCHAR(65536),\\\\n    \\\\\\\"metadataHash\\\\\\\" CHAR(40),\\\\n    \\\\\\\"name\\\\\\\" VARCHAR(50),\\\\n    \\\\\\\"policyId\\\\\\\" BYTEA,\\\\n    \\\\\\\"ticker\\\\\\\" VARCHAR(9),\\\\n    \\\\\\\"url\\\\\\\" VARCHAR(250)\\\\n);\\\\n\\\\nCREATE VIEW \\\\\\\"Block\\\\\\\" AS\\\\n SELECT (COALESCE(( SELECT sum((tx.fee)::bigint) AS sum\\\\n           FROM tx\\\\n          WHERE (tx.block_id = block.id)), (0)::NUMERIC))::bigint AS fees,\\\\n    block.hash,\\\\n    block.block_no AS \\\\\\\"number\\\\\\\",\\\\n    block.op_cert AS \\\\\\\"opCert\\\\\\\",\\\\n    previous_block.hash AS \\\\\\\"previousBlockHash\\\\\\\",\\\\n    next_block.hash AS \\\\\\\"nextBlockHash\\\\\\\",\\\\n    jsonb_build_object('major', block.proto_major, 'minor', block.proto_minor) AS \\\\\\\"protocolVersion\\\\\\\",\\\\n    block.size,\\\\n    block.tx_count AS \\\\\\\"transactionsCount\\\\\\\",\\\\n    block.epoch_no AS \\\\\\\"epochNo\\\\\\\",\\\\n    block.\\\\\\\"time\\\\\\\" AS \\\\\\\"forgedAt\\\\\\\",\\\\n    block.epoch_slot_no AS \\\\\\\"slotInEpoch\\\\\\\",\\\\n    block.slot_no AS \\\\\\\"slotNo\\\\\\\",\\\\n    slot_leader.id AS \\\\\\\"slot_leader_id\\\\\\\",\\\\n    slot_leader.pool_hash_id AS \\\\\\\"pool_hash_id\\\\\\\",\\\\n    block.vrf_key As \\\\\\\"vrfKey\\\\\\\"\\\\n   FROM (((block\\\\n     LEFT JOIN block previous_block ON ((block.previous_id = previous_block.id)))\\\\n     LEFT JOIN block next_block ON ((next_block.previous_id = block.id)))\\\\n     LEFT JOIN slot_leader ON ((block.slot_leader_id = slot_leader.id)));\\\\n\\\\nCREATE OR REPLACE VIEW \\\\\\\"Cardano\\\\\\\" AS\\\\n SELECT block.block_no AS \\\\\\\"tipBlockNo\\\\\\\",\\\\n    block.epoch_no AS \\\\\\\"currentEpochNo\\\\\\\"\\\\n   FROM block\\\\n  WHERE (block.block_no IS NOT NULL)\\\\n  ORDER BY block.block_no DESC\\\\n LIMIT 1;\\\\n \\\\nCREATE VIEW \\\\\\\"Collateral\\\\\\\" AS\\\\nSELECT\\\\n  source_tx_out.address,\\\\n  source_tx_out.value,\\\\n  tx.hash AS \\\\\\\"txHash\\\\\\\",\\\\n  source_tx.hash AS \\\\\\\"sourceTxHash\\\\\\\",\\\\n  collateral_tx_in.tx_out_index AS \\\\\\\"sourceTxIndex\\\\\\\",\\\\n  source_tx_out.id AS source_tx_out_id\\\\nFROM\\\\n  tx\\\\nJOIN collateral_tx_in\\\\n  ON collateral_tx_in.tx_in_id = tx.id\\\\nJOIN tx_out AS source_tx_out\\\\n  ON collateral_tx_in.tx_out_id = source_tx_out.tx_id\\\\n  AND collateral_tx_in.tx_out_index = source_tx_out.index\\\\nJOIN tx AS source_tx\\\\n  ON source_tx_out.tx_id = source_tx.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Delegation\\\\\\\" AS\\\\nSELECT\\\\n  delegation.id AS \\\\\\\"id\\\\\\\",\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  delegation.redeemer_id AS \\\\\\\"redeemerId\\\\\\\",\\\\n  delegation.tx_id AS \\\\\\\"tx_id\\\\\\\",\\\\n  pool_hash_id AS \\\\\\\"pool_hash_id\\\\\\\"\\\\nFROM delegation\\\\nJOIN stake_address on delegation.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Epoch\\\\\\\" AS\\\\nSELECT\\\\n  epoch.fees AS \\\\\\\"fees\\\\\\\",\\\\n  epoch.out_sum AS \\\\\\\"output\\\\\\\",\\\\n  epoch.no AS \\\\\\\"number\\\\\\\",\\\\n  epoch_param.nonce AS \\\\\\\"nonce\\\\\\\",\\\\n  epoch.tx_count AS \\\\\\\"transactionsCount\\\\\\\",\\\\n  epoch.start_time AS \\\\\\\"startedAt\\\\\\\",\\\\n  epoch.end_time AS \\\\\\\"lastBlockTime\\\\\\\",\\\\n  epoch.blk_count AS \\\\\\\"blocksCount\\\\\\\"\\\\nFROM epoch\\\\n  LEFT JOIN epoch_param on epoch.no = epoch_param.epoch_no;\\\\n\\\\nCREATE VIEW \\\\\\\"ShelleyEpochProtocolParams\\\\\\\" AS\\\\nSELECT\\\\n  epoch_param.influence AS \\\\\\\"a0\\\\\\\",\\\\n  epoch_param.coins_per_utxo_word AS \\\\\\\"coinsPerUtxoWord\\\\\\\",\\\\n  epoch_param.collateral_percent AS \\\\\\\"collateralPercent\\\\\\\",\\\\n  cost_model.costs AS \\\\\\\"costModels\\\\\\\",\\\\n  epoch_param.decentralisation AS \\\\\\\"decentralisationParam\\\\\\\",\\\\n  epoch_param.max_collateral_inputs AS \\\\\\\"maxCollateralInputs\\\\\\\",\\\\n  epoch_param.max_epoch AS \\\\\\\"eMax\\\\\\\",\\\\n  epoch_param.epoch_no AS \\\\\\\"epoch_no\\\\\\\",\\\\n  epoch_param.entropy AS \\\\\\\"extraEntropy\\\\\\\",\\\\n  epoch_param.key_deposit AS \\\\\\\"keyDeposit\\\\\\\",\\\\n  epoch_param.max_block_size AS \\\\\\\"maxBlockBodySize\\\\\\\",\\\\n  epoch_param.max_block_ex_mem AS \\\\\\\"maxBlockExMem\\\\\\\",\\\\n  epoch_param.max_block_ex_steps AS \\\\\\\"maxBlockExSteps\\\\\\\",\\\\n  epoch_param.max_bh_size AS \\\\\\\"maxBlockHeaderSize\\\\\\\",\\\\n  epoch_param.max_tx_ex_mem AS \\\\\\\"maxTxExMem\\\\\\\",\\\\n  epoch_param.max_tx_ex_steps AS \\\\\\\"maxTxExSteps\\\\\\\",\\\\n  epoch_param.max_tx_size AS \\\\\\\"maxTxSize\\\\\\\",\\\\n  epoch_param.max_val_size AS \\\\\\\"maxValSize\\\\\\\",\\\\n  epoch_param.min_fee_a AS \\\\\\\"minFeeA\\\\\\\",\\\\n  epoch_param.min_fee_b AS \\\\\\\"minFeeB\\\\\\\",\\\\n  epoch_param.min_pool_cost AS \\\\\\\"minPoolCost\\\\\\\",\\\\n  epoch_param.min_utxo_value AS \\\\\\\"minUTxOValue\\\\\\\",\\\\n  epoch_param.optimal_pool_count AS \\\\\\\"nOpt\\\\\\\",\\\\n  epoch_param.pool_deposit AS \\\\\\\"poolDeposit\\\\\\\",\\\\n  epoch_param.price_mem AS \\\\\\\"priceMem\\\\\\\",\\\\n  epoch_param.price_step AS \\\\\\\"priceStep\\\\\\\",\\\\n  jsonb_build_object('major', epoch_param.protocol_major, 'minor', epoch_param.protocol_major) AS \\\\\\\"protocolVersion\\\\\\\",\\\\n  epoch_param.monetary_expand_rate AS \\\\\\\"rho\\\\\\\",\\\\n  epoch_param.treasury_growth_rate AS \\\\\\\"tau\\\\\\\"\\\\nFROM epoch_param\\\\nJOIN cost_model\\\\n  ON epoch_param.cost_model_id = cost_model.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Redeemer\\\\\\\" AS\\\\nSELECT\\\\n  redeemer.fee AS \\\\\\\"fee\\\\\\\",\\\\n  redeemer.id AS \\\\\\\"id\\\\\\\",\\\\n  redeemer.index AS \\\\\\\"index\\\\\\\",\\\\n  redeemer.purpose AS \\\\\\\"purpose\\\\\\\",\\\\n  redeemer.script_hash AS \\\\\\\"scriptHash\\\\\\\",\\\\n  redeemer.tx_id AS \\\\\\\"txId\\\\\\\",\\\\n  redeemer.unit_mem AS \\\\\\\"unitMem\\\\\\\",\\\\n  redeemer.unit_steps AS \\\\\\\"unitSteps\\\\\\\"\\\\nFROM redeemer;\\\\n\\\\nCREATE VIEW \\\\\\\"Reward\\\\\\\" AS\\\\nSELECT\\\\n  reward.amount,\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  reward.earned_epoch AS \\\\\\\"earnedInEpochNo\\\\\\\",\\\\n  reward.pool_id AS pool_hash_id,\\\\n  reward.spendable_epoch AS \\\\\\\"receivedInEpochNo\\\\\\\",\\\\n  reward.type AS \\\\\\\"type\\\\\\\"\\\\nFROM reward\\\\nJOIN stake_address on reward.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Script\\\\\\\" AS\\\\nSELECT\\\\n  script.hash AS \\\\\\\"hash\\\\\\\",\\\\n  script.serialised_size AS \\\\\\\"serialisedSize\\\\\\\",\\\\n  script.type AS \\\\\\\"type\\\\\\\",\\\\n  script.tx_id AS \\\\\\\"txId\\\\\\\"\\\\nFROM script;\\\\n\\\\nCREATE VIEW \\\\\\\"SlotLeader\\\\\\\" AS\\\\nSELECT\\\\n  slot_leader.hash AS \\\\\\\"hash\\\\\\\",\\\\n  slot_leader.id AS \\\\\\\"id\\\\\\\",\\\\n  slot_leader.description AS \\\\\\\"description\\\\\\\",\\\\n  slot_leader.pool_hash_id AS \\\\\\\"pool_hash_id\\\\\\\"\\\\nFROM slot_leader;\\\\n\\\\nCREATE VIEW \\\\\\\"StakeDeregistration\\\\\\\" AS\\\\nSELECT\\\\n  stake_deregistration.id AS \\\\\\\"id\\\\\\\",\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  stake_deregistration.redeemer_id AS \\\\\\\"redeemerId\\\\\\\",\\\\n  stake_deregistration.tx_id AS \\\\\\\"tx_id\\\\\\\"\\\\nFROM stake_deregistration\\\\nJOIN stake_address on stake_deregistration.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"StakePool\\\\\\\" AS\\\\nWITH\\\\n  latest_block_times AS (\\\\n    SELECT pool.hash_id, max(block.time) AS blockTime\\\\n    FROM pool_update AS pool\\\\n    JOIN tx ON pool.registered_tx_id = tx.id\\\\n    JOIN block ON tx.block_id = block.id\\\\n    group by pool.hash_id\\\\n)\\\\nSELECT\\\\n  pool.fixed_cost AS \\\\\\\"fixedCost\\\\\\\",\\\\n  pool_hash.hash_raw AS \\\\\\\"hash\\\\\\\",\\\\n  pool_hash.view AS \\\\\\\"id\\\\\\\",\\\\n  pool.hash_id AS \\\\\\\"hash_id\\\\\\\",\\\\n  pool.id AS \\\\\\\"update_id\\\\\\\",\\\\n  pool.margin AS \\\\\\\"margin\\\\\\\",\\\\n  pool_metadata_ref.hash AS \\\\\\\"metadataHash\\\\\\\",\\\\n  block.block_no AS \\\\\\\"blockNo\\\\\\\",\\\\n  pool.registered_tx_id AS \\\\\\\"updated_in_tx_id\\\\\\\",\\\\n  pool.pledge AS \\\\\\\"pledge\\\\\\\",\\\\n  stake_address.view AS \\\\\\\"rewardAddress\\\\\\\",\\\\n  pool_metadata_ref.url AS \\\\\\\"url\\\\\\\"\\\\nFROM pool_update AS pool\\\\n  LEFT JOIN pool_metadata_ref ON pool.meta_id = pool_metadata_ref.id\\\\n  INNER JOIN tx ON pool.registered_tx_id = tx.id\\\\n  INNER JOIN latest_block_times ON latest_block_times.hash_id = pool.hash_id\\\\n  INNER JOIN block ON tx.block_id = block.id AND latest_block_times.blockTime = block.time\\\\n  JOIN stake_address on pool.reward_addr = stake_address.hash_raw\\\\n  JOIN pool_hash on pool_hash.id = pool.hash_id;\\\\n\\\\nCREATE VIEW \\\\\\\"StakePoolOwner\\\\\\\" AS\\\\nSELECT\\\\n  stake_address.hash_raw as \\\\\\\"hash\\\\\\\",\\\\n  pool_owner.pool_hash_id as \\\\\\\"pool_hash_id\\\\\\\"\\\\nFROM pool_owner\\\\n  LEFT JOIN stake_address ON pool_owner.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"StakePoolRetirement\\\\\\\" AS\\\\nSELECT\\\\n  retiring_epoch as \\\\\\\"inEffectFrom\\\\\\\",\\\\n  announced_tx_id as \\\\\\\"tx_id\\\\\\\",\\\\n  hash_id AS \\\\\\\"pool_hash_id\\\\\\\"\\\\nFROM pool_retire;\\\\n\\\\nCREATE VIEW \\\\\\\"StakeRegistration\\\\\\\" AS\\\\nSELECT\\\\n  stake_registration.id AS \\\\\\\"id\\\\\\\",\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  stake_registration.tx_id AS \\\\\\\"tx_id\\\\\\\"\\\\nFROM stake_registration\\\\nJOIN stake_address on stake_registration.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"ActiveStake\\\\\\\" AS\\\\nSELECT\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  amount AS \\\\\\\"amount\\\\\\\",\\\\n  epoch_no as \\\\\\\"epochNo\\\\\\\",\\\\n  epoch_stake.id AS \\\\\\\"id\\\\\\\",\\\\n  pool_hash.hash_raw AS \\\\\\\"stakePoolHash\\\\\\\",\\\\n  pool_hash.view AS \\\\\\\"stakePoolId\\\\\\\"\\\\nFROM epoch_stake\\\\nJOIN pool_hash\\\\n  ON pool_hash.id = epoch_stake.pool_id\\\\nJOIN stake_address on epoch_stake.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"TokenMint\\\\\\\" AS\\\\nSELECT\\\\n  CAST(CONCAT(multi_asset.policy, RIGHT(CONCAT(E'\\\\\\\\\\\\\\\\', multi_asset.name), -3)) as BYTEA) as \\\\\\\"assetId\\\\\\\",\\\\n  multi_asset.name AS \\\\\\\"assetName\\\\\\\",\\\\n  multi_asset.policy AS \\\\\\\"policyId\\\\\\\",\\\\n  quantity,\\\\n  tx_id\\\\nFROM ma_tx_mint\\\\nJOIN multi_asset\\\\n  ON ma_tx_mint.ident = multi_asset.id;\\\\n\\\\nCREATE VIEW \\\\\\\"TokenInOutput\\\\\\\" AS\\\\nSELECT\\\\n  CAST(CONCAT(policy, RIGHT(CONCAT(E'\\\\\\\\\\\\\\\\', name), -3)) as BYTEA) as \\\\\\\"assetId\\\\\\\",\\\\n  name as \\\\\\\"assetName\\\\\\\",\\\\n  policy AS \\\\\\\"policyId\\\\\\\",\\\\n  quantity,\\\\n  tx_out_id\\\\nFROM ma_tx_out\\\\nJOIN multi_asset\\\\n  ON ma_tx_out.ident = multi_asset.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Transaction\\\\\\\" AS\\\\nSELECT\\\\n  block.hash AS \\\\\\\"blockHash\\\\\\\",\\\\n  tx.block_index AS \\\\\\\"blockIndex\\\\\\\",\\\\n  tx.deposit AS \\\\\\\"deposit\\\\\\\",\\\\n  COALESCE(tx.fee, 0) AS fee,\\\\n  tx.hash,\\\\n  tx.id,\\\\n  block.time AS \\\\\\\"includedAt\\\\\\\",\\\\n  tx.invalid_before AS \\\\\\\"invalidBefore\\\\\\\",\\\\n  tx.invalid_hereafter AS \\\\\\\"invalidHereafter\\\\\\\",\\\\n  tx.script_size AS \\\\\\\"scriptSize\\\\\\\",\\\\n  tx.size,\\\\n  CAST(COALESCE((SELECT SUM(\\\\\\\"value\\\\\\\") FROM tx_out WHERE tx_id = tx.id), 0) AS bigint) AS \\\\\\\"totalOutput\\\\\\\",\\\\n  tx.valid_contract AS \\\\\\\"validContract\\\\\\\"\\\\nFROM\\\\n  tx\\\\nINNER JOIN block\\\\n  ON block.id = tx.block_id;\\\\n\\\\nCREATE VIEW \\\\\\\"TransactionInput\\\\\\\" AS\\\\nSELECT\\\\n  source_tx_out.address,\\\\n  tx_in.redeemer_id AS \\\\\\\"redeemerId\\\\\\\",\\\\n  source_tx_out.value,\\\\n  tx.hash AS \\\\\\\"txHash\\\\\\\",\\\\n  source_tx.hash AS \\\\\\\"sourceTxHash\\\\\\\",\\\\n  tx_in.tx_out_index AS \\\\\\\"sourceTxIndex\\\\\\\",\\\\n  source_tx_out.id AS source_tx_out_id\\\\nFROM\\\\n  tx\\\\nJOIN tx_in\\\\n  ON tx_in.tx_in_id = tx.id\\\\nJOIN tx_out AS source_tx_out\\\\n  ON tx_in.tx_out_id = source_tx_out.tx_id\\\\n  AND tx_in.tx_out_index = source_tx_out.index\\\\nJOIN tx AS source_tx\\\\n  ON source_tx_out.tx_id = source_tx.id;\\\\n\\\\nCREATE VIEW \\\\\\\"TransactionOutput\\\\\\\" AS\\\\nSELECT\\\\n  address,\\\\n  tx_out.address_has_script AS \\\\\\\"addressHasScript\\\\\\\",\\\\n  value,\\\\n  tx.hash AS \\\\\\\"txHash\\\\\\\",\\\\n  tx_out.id,\\\\n  index\\\\nFROM tx\\\\nJOIN tx_out\\\\n  ON tx.id = tx_out.tx_id;\\\\n\\\\nCREATE VIEW \\\\\\\"Utxo\\\\\\\" AS SELECT\\\\n  address,\\\\n  tx_out.address_has_script AS \\\\\\\"addressHasScript\\\\\\\",\\\\n  value,\\\\n  tx.hash AS \\\\\\\"txHash\\\\\\\",\\\\n  tx_out.id,\\\\n  index\\\\nFROM tx\\\\nJOIN tx_out\\\\n  ON tx.id = tx_out.tx_id\\\\nLEFT OUTER JOIN tx_in\\\\n  ON tx_out.tx_id = tx_in.tx_out_id\\\\n  AND tx_out.index = tx_in.tx_out_index\\\\nWHERE tx_in.tx_in_id IS NULL;\\\\n\\\\nCREATE VIEW \\\\\\\"Withdrawal\\\\\\\" AS\\\\nSELECT\\\\n  withdrawal.amount AS \\\\\\\"amount\\\\\\\",\\\\n  withdrawal.id AS \\\\\\\"id\\\\\\\",\\\\n  stake_address.view \\\\\\\"address\\\\\\\",\\\\n  withdrawal.redeemer_id AS \\\\\\\"redeemerId\\\\\\\",\\\\n  withdrawal.tx_id AS \\\\\\\"tx_id\\\\\\\"\\\\nFROM withdrawal\\\\nJOIN stake_address on withdrawal.addr_id = stake_address.id;\\\\n\\\\nCREATE INDEX idx_block_hash\\\\n    ON block(hash);\\\\n\\\\nCREATE INDEX idx_multi_asset_name\\\\n    ON multi_asset(name);\\\\n\\\\nCREATE INDEX idx_multi_asset_policy\\\\n    ON multi_asset(policy);\\\\n\\\\nCREATE INDEX idx_reward_type\\\\n    ON reward(type);\\\\n\\\\nCREATE INDEX idx_tx_hash\\\\n    ON tx(hash);\\\\n\\\\nCREATE INDEX idx_tx_in_consuming_tx\\\\n   ON tx_in(tx_out_id);\\\\n\\\\nCREATE INDEX idx_tx_out_tx\\\\n    ON tx_out(tx_id);\\\\n\\\\nCREATE function utxo_set_at_block(\\\\\\\"hash\\\\\\\" hash32type)\\\\nRETURNS SETOF \\\\\\\"TransactionOutput\\\\\\\" AS $$\\\\n  SELECT\\\\n    \\\\\\\"TransactionOutput\\\\\\\".address,\\\\n    \\\\\\\"TransactionOutput\\\\\\\".\\\\\\\"addressHasScript\\\\\\\",\\\\n    \\\\\\\"TransactionOutput\\\\\\\".value,\\\\n    \\\\\\\"TransactionOutput\\\\\\\".\\\\\\\"txHash\\\\\\\",\\\\n    \\\\\\\"TransactionOutput\\\\\\\".\\\\\\\"id\\\\\\\",\\\\n    \\\\\\\"TransactionOutput\\\\\\\".index\\\\n  FROM tx\\\\n  JOIN tx_out\\\\n    ON tx.id = tx_out.tx_id\\\\n  JOIN \\\\\\\"TransactionOutput\\\\\\\"\\\\n    ON tx.hash = \\\\\\\"TransactionOutput\\\\\\\".\\\\\\\"txHash\\\\\\\"\\\\n  LEFT OUTER JOIN tx_in\\\\n    ON tx_out.tx_id = tx_in.tx_out_id\\\\n    AND tx_out.index = tx_in.tx_out_index\\\\n  WHERE tx_in.tx_in_id IS NULL\\\\n  AND tx.block_id \\\\u003c= (SELECT id FROM block WHERE hash = \\\\\\\"hash\\\\\\\")\\\\n$$ LANGUAGE SQL stable;\\\\n\\\\n\\\"\\n}\\r\\n[42703] FatalError: column epoch_param.coins_per_utxo_word does not exist\"\n","time":"2022-08-03T07:02:58.766Z","v":0}


user5216: It looks like you are restoring a db-sync 13 snapshot while your db-sync version is 12.
For the moment there don't seem to be anymore snapshots for db-sync 12.
My guess is that if you remove the snapshot option and have it sync from scratch it will just work - but this will probably take a few days.
I wouldn't suggest using version 13 just yet since there are no compatible downstream components for this just yet. Maybe if you wait a few days for the official releases that would become an option.

7200: <p>This is how I started docker run, but cardano-graphql_cardano-graphql_1 keeps restarting due to this error related with <code>1589369664961_init/up.sql</code>.</p>
<pre><code>DOCKER_BUILDKIT=1 \
COMPOSE_DOCKER_CLI_BUILD=1 \
RESTORE_SNAPSHOT=https://update-cardano-mainnet.iohk.io/cardano-db-sync/13/db-sync-snapshot-schema-13-block-7560650-x86_64.tgz \
docker-compose up -d --build &amp;&amp;\
docker-compose logs -f
</code></pre>
<p><code>docker ps</code> result:</p>
<pre><code>CONTAINER ID   IMAGE                                                 COMMAND                  CREATED        STATUS          PORTS                                                                       NAMES
550b5a0b3d00   inputoutput/cardano-db-sync:12.0.0                    &quot;/nix/store/5ghw8rqx…&quot;   18 hours ago   Up 18 hours                                                                                 cardano-graphql_cardano-db-sync-extended_1
0556554a09e6   inputoutput/cardano-graphql-hasura:6.2.0              &quot;docker-entrypoint.s…&quot;   18 hours ago   Up 18 hours     0.0.0.0:8090-&gt;8080/tcp, :::8090-&gt;8080/tcp                                   cardano-graphql_hasura_1
7dc02c06cf4e   inputoutput/cardano-graphql:6.2.0-mainnet             &quot;node index.js&quot;          18 hours ago   Up 56 seconds   0.0.0.0:3100-&gt;3100/tcp, :::3100-&gt;3100/tcp                                   cardano-graphql_cardano-graphql_1
6b1e7a19e0d6   postgres:11.5-alpine                                  &quot;docker-entrypoint.s…&quot;   18 hours ago   Up 18 hours     0.0.0.0:5432-&gt;5432/tcp, :::5432-&gt;5432/tcp                                   cardano-graphql_postgres_1
6c35c01400ee   cardanosolutions/cardano-node-ogmios:v5.1.0-mainnet   &quot;bash cardano-node-o…&quot;   18 hours ago   Up 18 hours     3000/tcp, 12788/tcp, 0.0.0.0:1337-&gt;1337/tcp, :::1337-&gt;1337/tcp, 12798/tcp   cardano-graphql_cardano-node-ogmios_1
</code></pre>
<p>Logs of <code>cardano-graphql_cardano-graphql_1</code>:</p>
<pre><code>{&quot;name&quot;:&quot;cardano-graphql&quot;,&quot;hostname&quot;:&quot;7dc02c06cf4e&quot;,&quot;pid&quot;:1,&quot;level&quot;:30,&quot;module&quot;:&quot;Server&quot;,&quot;msg&quot;:&quot;Initializing&quot;,&quot;time&quot;:&quot;2022-08-03T06:59:29.716Z&quot;,&quot;v&quot;:0}
{&quot;name&quot;:&quot;cardano-graphql&quot;,&quot;hostname&quot;:&quot;7dc02c06cf4e&quot;,&quot;pid&quot;:1,&quot;level&quot;:30,&quot;module&quot;:&quot;HasuraClient&quot;,&quot;msg&quot;:&quot;Initializing&quot;,&quot;time&quot;:&quot;2022-08-03T06:59:30.152Z&quot;,&quot;v&quot;:0}
{&quot;name&quot;:&quot;cardano-graphql&quot;,&quot;hostname&quot;:&quot;7dc02c06cf4e&quot;,&quot;pid&quot;:1,&quot;level&quot;:50,&quot;msg&quot;:&quot;Command failed: /usr/local/bin/hasura --skip-update-check --project /app/packages/api-cardano-db-hasura/hasura/project --endpoint http://hasura:8080 migrate apply --up all\ntime=\&quot;2022-08-03T07:02:58Z\&quot; level=fatal msg=\&quot;apply failed: [postgres-error] query execution failed ($.args[0].args)\\r\\nFile: '1589369664961_init/up.sql'\\r\\n{\\n    \\\&quot;check_metadata_consistency\\\&quot;: false,\\n    \\\&quot;sql\\\&quot;: \\\&quot;\\\\nCREATE VIEW \\\\\\\&quot;AdaPots\\\\\\\&quot; AS\\\\n  SELECT\\\\n    epoch_no AS \\\\\\\&quot;epochNo\\\\\\\&quot;,\\\\n    deposits,\\\\n    fees,\\\\n    reserves,\\\\n    rewards,\\\\n    slot_no AS \\\\\\\&quot;slotNo\\\\\\\&quot;,\\\\n    treasury,\\\\n    utxo\\\\nFROM ada_pots;\\\\n\\\\nCREATE TABLE IF NOT EXISTS \\\\\\\&quot;Asset\\\\\\\&quot; (\\\\n    \\\\\\\&quot;assetId\\\\\\\&quot; BYTEA PRIMARY KEY,\\\\n    \\\\\\\&quot;assetName\\\\\\\&quot; BYTEA,\\\\n    \\\\\\\&quot;decimals\\\\\\\&quot; INT,\\\\n    \\\\\\\&quot;description\\\\\\\&quot; VARCHAR(500),\\\\n    \\\\\\\&quot;fingerprint\\\\\\\&quot; CHAR(44),\\\\n    \\\\\\\&quot;firstAppearedInSlot\\\\\\\&quot; INT,\\\\n    \\\\\\\&quot;logo\\\\\\\&quot; VARCHAR(65536),\\\\n    \\\\\\\&quot;metadataHash\\\\\\\&quot; CHAR(40),\\\\n    \\\\\\\&quot;name\\\\\\\&quot; VARCHAR(50),\\\\n    \\\\\\\&quot;policyId\\\\\\\&quot; BYTEA,\\\\n    \\\\\\\&quot;ticker\\\\\\\&quot; VARCHAR(9),\\\\n    \\\\\\\&quot;url\\\\\\\&quot; VARCHAR(250)\\\\n);\\\\n\\\\nCREATE VIEW \\\\\\\&quot;Block\\\\\\\&quot; AS\\\\n SELECT (COALESCE(( SELECT sum((tx.fee)::bigint) AS sum\\\\n           FROM tx\\\\n          WHERE (tx.block_id = block.id)), (0)::NUMERIC))::bigint AS fees,\\\\n    block.hash,\\\\n    block.block_no AS \\\\\\\&quot;number\\\\\\\&quot;,\\\\n    block.op_cert AS \\\\\\\&quot;opCert\\\\\\\&quot;,\\\\n    previous_block.hash AS \\\\\\\&quot;previousBlockHash\\\\\\\&quot;,\\\\n    next_block.hash AS \\\\\\\&quot;nextBlockHash\\\\\\\&quot;,\\\\n    jsonb_build_object('major', block.proto_major, 'minor', block.proto_minor) AS \\\\\\\&quot;protocolVersion\\\\\\\&quot;,\\\\n    block.size,\\\\n    block.tx_count AS \\\\\\\&quot;transactionsCount\\\\\\\&quot;,\\\\n    block.epoch_no AS \\\\\\\&quot;epochNo\\\\\\\&quot;,\\\\n    block.\\\\\\\&quot;time\\\\\\\&quot; AS \\\\\\\&quot;forgedAt\\\\\\\&quot;,\\\\n    block.epoch_slot_no AS \\\\\\\&quot;slotInEpoch\\\\\\\&quot;,\\\\n    block.slot_no AS \\\\\\\&quot;slotNo\\\\\\\&quot;,\\\\n    slot_leader.id AS \\\\\\\&quot;slot_leader_id\\\\\\\&quot;,\\\\n    slot_leader.pool_hash_id AS \\\\\\\&quot;pool_hash_id\\\\\\\&quot;,\\\\n    block.vrf_key As \\\\\\\&quot;vrfKey\\\\\\\&quot;\\\\n   FROM (((block\\\\n     LEFT JOIN block previous_block ON ((block.previous_id = previous_block.id)))\\\\n     LEFT JOIN block next_block ON ((next_block.previous_id = block.id)))\\\\n     LEFT JOIN slot_leader ON ((block.slot_leader_id = slot_leader.id)));\\\\n\\\\nCREATE OR REPLACE VIEW \\\\\\\&quot;Cardano\\\\\\\&quot; AS\\\\n SELECT block.block_no AS \\\\\\\&quot;tipBlockNo\\\\\\\&quot;,\\\\n    block.epoch_no AS \\\\\\\&quot;currentEpochNo\\\\\\\&quot;\\\\n   FROM block\\\\n  WHERE (block.block_no IS NOT NULL)\\\\n  ORDER BY block.block_no DESC\\\\n LIMIT 1;\\\\n \\\\nCREATE VIEW \\\\\\\&quot;Collateral\\\\\\\&quot; AS\\\\nSELECT\\\\n  source_tx_out.address,\\\\n  source_tx_out.value,\\\\n  tx.hash AS \\\\\\\&quot;txHash\\\\\\\&quot;,\\\\n  source_tx.hash AS \\\\\\\&quot;sourceTxHash\\\\\\\&quot;,\\\\n  collateral_tx_in.tx_out_index AS \\\\\\\&quot;sourceTxIndex\\\\\\\&quot;,\\\\n  source_tx_out.id AS source_tx_out_id\\\\nFROM\\\\n  tx\\\\nJOIN collateral_tx_in\\\\n  ON collateral_tx_in.tx_in_id = tx.id\\\\nJOIN tx_out AS source_tx_out\\\\n  ON collateral_tx_in.tx_out_id = source_tx_out.tx_id\\\\n  AND collateral_tx_in.tx_out_index = source_tx_out.index\\\\nJOIN tx AS source_tx\\\\n  ON source_tx_out.tx_id = source_tx.id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;Delegation\\\\\\\&quot; AS\\\\nSELECT\\\\n  delegation.id AS \\\\\\\&quot;id\\\\\\\&quot;,\\\\n  stake_address.view AS \\\\\\\&quot;address\\\\\\\&quot;,\\\\n  delegation.redeemer_id AS \\\\\\\&quot;redeemerId\\\\\\\&quot;,\\\\n  delegation.tx_id AS \\\\\\\&quot;tx_id\\\\\\\&quot;,\\\\n  pool_hash_id AS \\\\\\\&quot;pool_hash_id\\\\\\\&quot;\\\\nFROM delegation\\\\nJOIN stake_address on delegation.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;Epoch\\\\\\\&quot; AS\\\\nSELECT\\\\n  epoch.fees AS \\\\\\\&quot;fees\\\\\\\&quot;,\\\\n  epoch.out_sum AS \\\\\\\&quot;output\\\\\\\&quot;,\\\\n  epoch.no AS \\\\\\\&quot;number\\\\\\\&quot;,\\\\n  epoch_param.nonce AS \\\\\\\&quot;nonce\\\\\\\&quot;,\\\\n  epoch.tx_count AS \\\\\\\&quot;transactionsCount\\\\\\\&quot;,\\\\n  epoch.start_time AS \\\\\\\&quot;startedAt\\\\\\\&quot;,\\\\n  epoch.end_time AS \\\\\\\&quot;lastBlockTime\\\\\\\&quot;,\\\\n  epoch.blk_count AS \\\\\\\&quot;blocksCount\\\\\\\&quot;\\\\nFROM epoch\\\\n  LEFT JOIN epoch_param on epoch.no = epoch_param.epoch_no;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;ShelleyEpochProtocolParams\\\\\\\&quot; AS\\\\nSELECT\\\\n  epoch_param.influence AS \\\\\\\&quot;a0\\\\\\\&quot;,\\\\n  epoch_param.coins_per_utxo_word AS \\\\\\\&quot;coinsPerUtxoWord\\\\\\\&quot;,\\\\n  epoch_param.collateral_percent AS \\\\\\\&quot;collateralPercent\\\\\\\&quot;,\\\\n  cost_model.costs AS \\\\\\\&quot;costModels\\\\\\\&quot;,\\\\n  epoch_param.decentralisation AS \\\\\\\&quot;decentralisationParam\\\\\\\&quot;,\\\\n  epoch_param.max_collateral_inputs AS \\\\\\\&quot;maxCollateralInputs\\\\\\\&quot;,\\\\n  epoch_param.max_epoch AS \\\\\\\&quot;eMax\\\\\\\&quot;,\\\\n  epoch_param.epoch_no AS \\\\\\\&quot;epoch_no\\\\\\\&quot;,\\\\n  epoch_param.entropy AS \\\\\\\&quot;extraEntropy\\\\\\\&quot;,\\\\n  epoch_param.key_deposit AS \\\\\\\&quot;keyDeposit\\\\\\\&quot;,\\\\n  epoch_param.max_block_size AS \\\\\\\&quot;maxBlockBodySize\\\\\\\&quot;,\\\\n  epoch_param.max_block_ex_mem AS \\\\\\\&quot;maxBlockExMem\\\\\\\&quot;,\\\\n  epoch_param.max_block_ex_steps AS \\\\\\\&quot;maxBlockExSteps\\\\\\\&quot;,\\\\n  epoch_param.max_bh_size AS \\\\\\\&quot;maxBlockHeaderSize\\\\\\\&quot;,\\\\n  epoch_param.max_tx_ex_mem AS \\\\\\\&quot;maxTxExMem\\\\\\\&quot;,\\\\n  epoch_param.max_tx_ex_steps AS \\\\\\\&quot;maxTxExSteps\\\\\\\&quot;,\\\\n  epoch_param.max_tx_size AS \\\\\\\&quot;maxTxSize\\\\\\\&quot;,\\\\n  epoch_param.max_val_size AS \\\\\\\&quot;maxValSize\\\\\\\&quot;,\\\\n  epoch_param.min_fee_a AS \\\\\\\&quot;minFeeA\\\\\\\&quot;,\\\\n  epoch_param.min_fee_b AS \\\\\\\&quot;minFeeB\\\\\\\&quot;,\\\\n  epoch_param.min_pool_cost AS \\\\\\\&quot;minPoolCost\\\\\\\&quot;,\\\\n  epoch_param.min_utxo_value AS \\\\\\\&quot;minUTxOValue\\\\\\\&quot;,\\\\n  epoch_param.optimal_pool_count AS \\\\\\\&quot;nOpt\\\\\\\&quot;,\\\\n  epoch_param.pool_deposit AS \\\\\\\&quot;poolDeposit\\\\\\\&quot;,\\\\n  epoch_param.price_mem AS \\\\\\\&quot;priceMem\\\\\\\&quot;,\\\\n  epoch_param.price_step AS \\\\\\\&quot;priceStep\\\\\\\&quot;,\\\\n  jsonb_build_object('major', epoch_param.protocol_major, 'minor', epoch_param.protocol_major) AS \\\\\\\&quot;protocolVersion\\\\\\\&quot;,\\\\n  epoch_param.monetary_expand_rate AS \\\\\\\&quot;rho\\\\\\\&quot;,\\\\n  epoch_param.treasury_growth_rate AS \\\\\\\&quot;tau\\\\\\\&quot;\\\\nFROM epoch_param\\\\nJOIN cost_model\\\\n  ON epoch_param.cost_model_id = cost_model.id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;Redeemer\\\\\\\&quot; AS\\\\nSELECT\\\\n  redeemer.fee AS \\\\\\\&quot;fee\\\\\\\&quot;,\\\\n  redeemer.id AS \\\\\\\&quot;id\\\\\\\&quot;,\\\\n  redeemer.index AS \\\\\\\&quot;index\\\\\\\&quot;,\\\\n  redeemer.purpose AS \\\\\\\&quot;purpose\\\\\\\&quot;,\\\\n  redeemer.script_hash AS \\\\\\\&quot;scriptHash\\\\\\\&quot;,\\\\n  redeemer.tx_id AS \\\\\\\&quot;txId\\\\\\\&quot;,\\\\n  redeemer.unit_mem AS \\\\\\\&quot;unitMem\\\\\\\&quot;,\\\\n  redeemer.unit_steps AS \\\\\\\&quot;unitSteps\\\\\\\&quot;\\\\nFROM redeemer;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;Reward\\\\\\\&quot; AS\\\\nSELECT\\\\n  reward.amount,\\\\n  stake_address.view AS \\\\\\\&quot;address\\\\\\\&quot;,\\\\n  reward.earned_epoch AS \\\\\\\&quot;earnedInEpochNo\\\\\\\&quot;,\\\\n  reward.pool_id AS pool_hash_id,\\\\n  reward.spendable_epoch AS \\\\\\\&quot;receivedInEpochNo\\\\\\\&quot;,\\\\n  reward.type AS \\\\\\\&quot;type\\\\\\\&quot;\\\\nFROM reward\\\\nJOIN stake_address on reward.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;Script\\\\\\\&quot; AS\\\\nSELECT\\\\n  script.hash AS \\\\\\\&quot;hash\\\\\\\&quot;,\\\\n  script.serialised_size AS \\\\\\\&quot;serialisedSize\\\\\\\&quot;,\\\\n  script.type AS \\\\\\\&quot;type\\\\\\\&quot;,\\\\n  script.tx_id AS \\\\\\\&quot;txId\\\\\\\&quot;\\\\nFROM script;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;SlotLeader\\\\\\\&quot; AS\\\\nSELECT\\\\n  slot_leader.hash AS \\\\\\\&quot;hash\\\\\\\&quot;,\\\\n  slot_leader.id AS \\\\\\\&quot;id\\\\\\\&quot;,\\\\n  slot_leader.description AS \\\\\\\&quot;description\\\\\\\&quot;,\\\\n  slot_leader.pool_hash_id AS \\\\\\\&quot;pool_hash_id\\\\\\\&quot;\\\\nFROM slot_leader;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;StakeDeregistration\\\\\\\&quot; AS\\\\nSELECT\\\\n  stake_deregistration.id AS \\\\\\\&quot;id\\\\\\\&quot;,\\\\n  stake_address.view AS \\\\\\\&quot;address\\\\\\\&quot;,\\\\n  stake_deregistration.redeemer_id AS \\\\\\\&quot;redeemerId\\\\\\\&quot;,\\\\n  stake_deregistration.tx_id AS \\\\\\\&quot;tx_id\\\\\\\&quot;\\\\nFROM stake_deregistration\\\\nJOIN stake_address on stake_deregistration.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;StakePool\\\\\\\&quot; AS\\\\nWITH\\\\n  latest_block_times AS (\\\\n    SELECT pool.hash_id, max(block.time) AS blockTime\\\\n    FROM pool_update AS pool\\\\n    JOIN tx ON pool.registered_tx_id = tx.id\\\\n    JOIN block ON tx.block_id = block.id\\\\n    group by pool.hash_id\\\\n)\\\\nSELECT\\\\n  pool.fixed_cost AS \\\\\\\&quot;fixedCost\\\\\\\&quot;,\\\\n  pool_hash.hash_raw AS \\\\\\\&quot;hash\\\\\\\&quot;,\\\\n  pool_hash.view AS \\\\\\\&quot;id\\\\\\\&quot;,\\\\n  pool.hash_id AS \\\\\\\&quot;hash_id\\\\\\\&quot;,\\\\n  pool.id AS \\\\\\\&quot;update_id\\\\\\\&quot;,\\\\n  pool.margin AS \\\\\\\&quot;margin\\\\\\\&quot;,\\\\n  pool_metadata_ref.hash AS \\\\\\\&quot;metadataHash\\\\\\\&quot;,\\\\n  block.block_no AS \\\\\\\&quot;blockNo\\\\\\\&quot;,\\\\n  pool.registered_tx_id AS \\\\\\\&quot;updated_in_tx_id\\\\\\\&quot;,\\\\n  pool.pledge AS \\\\\\\&quot;pledge\\\\\\\&quot;,\\\\n  stake_address.view AS \\\\\\\&quot;rewardAddress\\\\\\\&quot;,\\\\n  pool_metadata_ref.url AS \\\\\\\&quot;url\\\\\\\&quot;\\\\nFROM pool_update AS pool\\\\n  LEFT JOIN pool_metadata_ref ON pool.meta_id = pool_metadata_ref.id\\\\n  INNER JOIN tx ON pool.registered_tx_id = tx.id\\\\n  INNER JOIN latest_block_times ON latest_block_times.hash_id = pool.hash_id\\\\n  INNER JOIN block ON tx.block_id = block.id AND latest_block_times.blockTime = block.time\\\\n  JOIN stake_address on pool.reward_addr = stake_address.hash_raw\\\\n  JOIN pool_hash on pool_hash.id = pool.hash_id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;StakePoolOwner\\\\\\\&quot; AS\\\\nSELECT\\\\n  stake_address.hash_raw as \\\\\\\&quot;hash\\\\\\\&quot;,\\\\n  pool_owner.pool_hash_id as \\\\\\\&quot;pool_hash_id\\\\\\\&quot;\\\\nFROM pool_owner\\\\n  LEFT JOIN stake_address ON pool_owner.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;StakePoolRetirement\\\\\\\&quot; AS\\\\nSELECT\\\\n  retiring_epoch as \\\\\\\&quot;inEffectFrom\\\\\\\&quot;,\\\\n  announced_tx_id as \\\\\\\&quot;tx_id\\\\\\\&quot;,\\\\n  hash_id AS \\\\\\\&quot;pool_hash_id\\\\\\\&quot;\\\\nFROM pool_retire;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;StakeRegistration\\\\\\\&quot; AS\\\\nSELECT\\\\n  stake_registration.id AS \\\\\\\&quot;id\\\\\\\&quot;,\\\\n  stake_address.view AS \\\\\\\&quot;address\\\\\\\&quot;,\\\\n  stake_registration.tx_id AS \\\\\\\&quot;tx_id\\\\\\\&quot;\\\\nFROM stake_registration\\\\nJOIN stake_address on stake_registration.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;ActiveStake\\\\\\\&quot; AS\\\\nSELECT\\\\n  stake_address.view AS \\\\\\\&quot;address\\\\\\\&quot;,\\\\n  amount AS \\\\\\\&quot;amount\\\\\\\&quot;,\\\\n  epoch_no as \\\\\\\&quot;epochNo\\\\\\\&quot;,\\\\n  epoch_stake.id AS \\\\\\\&quot;id\\\\\\\&quot;,\\\\n  pool_hash.hash_raw AS \\\\\\\&quot;stakePoolHash\\\\\\\&quot;,\\\\n  pool_hash.view AS \\\\\\\&quot;stakePoolId\\\\\\\&quot;\\\\nFROM epoch_stake\\\\nJOIN pool_hash\\\\n  ON pool_hash.id = epoch_stake.pool_id\\\\nJOIN stake_address on epoch_stake.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;TokenMint\\\\\\\&quot; AS\\\\nSELECT\\\\n  CAST(CONCAT(multi_asset.policy, RIGHT(CONCAT(E'\\\\\\\\\\\\\\\\', multi_asset.name), -3)) as BYTEA) as \\\\\\\&quot;assetId\\\\\\\&quot;,\\\\n  multi_asset.name AS \\\\\\\&quot;assetName\\\\\\\&quot;,\\\\n  multi_asset.policy AS \\\\\\\&quot;policyId\\\\\\\&quot;,\\\\n  quantity,\\\\n  tx_id\\\\nFROM ma_tx_mint\\\\nJOIN multi_asset\\\\n  ON ma_tx_mint.ident = multi_asset.id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;TokenInOutput\\\\\\\&quot; AS\\\\nSELECT\\\\n  CAST(CONCAT(policy, RIGHT(CONCAT(E'\\\\\\\\\\\\\\\\', name), -3)) as BYTEA) as \\\\\\\&quot;assetId\\\\\\\&quot;,\\\\n  name as \\\\\\\&quot;assetName\\\\\\\&quot;,\\\\n  policy AS \\\\\\\&quot;policyId\\\\\\\&quot;,\\\\n  quantity,\\\\n  tx_out_id\\\\nFROM ma_tx_out\\\\nJOIN multi_asset\\\\n  ON ma_tx_out.ident = multi_asset.id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;Transaction\\\\\\\&quot; AS\\\\nSELECT\\\\n  block.hash AS \\\\\\\&quot;blockHash\\\\\\\&quot;,\\\\n  tx.block_index AS \\\\\\\&quot;blockIndex\\\\\\\&quot;,\\\\n  tx.deposit AS \\\\\\\&quot;deposit\\\\\\\&quot;,\\\\n  COALESCE(tx.fee, 0) AS fee,\\\\n  tx.hash,\\\\n  tx.id,\\\\n  block.time AS \\\\\\\&quot;includedAt\\\\\\\&quot;,\\\\n  tx.invalid_before AS \\\\\\\&quot;invalidBefore\\\\\\\&quot;,\\\\n  tx.invalid_hereafter AS \\\\\\\&quot;invalidHereafter\\\\\\\&quot;,\\\\n  tx.script_size AS \\\\\\\&quot;scriptSize\\\\\\\&quot;,\\\\n  tx.size,\\\\n  CAST(COALESCE((SELECT SUM(\\\\\\\&quot;value\\\\\\\&quot;) FROM tx_out WHERE tx_id = tx.id), 0) AS bigint) AS \\\\\\\&quot;totalOutput\\\\\\\&quot;,\\\\n  tx.valid_contract AS \\\\\\\&quot;validContract\\\\\\\&quot;\\\\nFROM\\\\n  tx\\\\nINNER JOIN block\\\\n  ON block.id = tx.block_id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;TransactionInput\\\\\\\&quot; AS\\\\nSELECT\\\\n  source_tx_out.address,\\\\n  tx_in.redeemer_id AS \\\\\\\&quot;redeemerId\\\\\\\&quot;,\\\\n  source_tx_out.value,\\\\n  tx.hash AS \\\\\\\&quot;txHash\\\\\\\&quot;,\\\\n  source_tx.hash AS \\\\\\\&quot;sourceTxHash\\\\\\\&quot;,\\\\n  tx_in.tx_out_index AS \\\\\\\&quot;sourceTxIndex\\\\\\\&quot;,\\\\n  source_tx_out.id AS source_tx_out_id\\\\nFROM\\\\n  tx\\\\nJOIN tx_in\\\\n  ON tx_in.tx_in_id = tx.id\\\\nJOIN tx_out AS source_tx_out\\\\n  ON tx_in.tx_out_id = source_tx_out.tx_id\\\\n  AND tx_in.tx_out_index = source_tx_out.index\\\\nJOIN tx AS source_tx\\\\n  ON source_tx_out.tx_id = source_tx.id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;TransactionOutput\\\\\\\&quot; AS\\\\nSELECT\\\\n  address,\\\\n  tx_out.address_has_script AS \\\\\\\&quot;addressHasScript\\\\\\\&quot;,\\\\n  value,\\\\n  tx.hash AS \\\\\\\&quot;txHash\\\\\\\&quot;,\\\\n  tx_out.id,\\\\n  index\\\\nFROM tx\\\\nJOIN tx_out\\\\n  ON tx.id = tx_out.tx_id;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;Utxo\\\\\\\&quot; AS SELECT\\\\n  address,\\\\n  tx_out.address_has_script AS \\\\\\\&quot;addressHasScript\\\\\\\&quot;,\\\\n  value,\\\\n  tx.hash AS \\\\\\\&quot;txHash\\\\\\\&quot;,\\\\n  tx_out.id,\\\\n  index\\\\nFROM tx\\\\nJOIN tx_out\\\\n  ON tx.id = tx_out.tx_id\\\\nLEFT OUTER JOIN tx_in\\\\n  ON tx_out.tx_id = tx_in.tx_out_id\\\\n  AND tx_out.index = tx_in.tx_out_index\\\\nWHERE tx_in.tx_in_id IS NULL;\\\\n\\\\nCREATE VIEW \\\\\\\&quot;Withdrawal\\\\\\\&quot; AS\\\\nSELECT\\\\n  withdrawal.amount AS \\\\\\\&quot;amount\\\\\\\&quot;,\\\\n  withdrawal.id AS \\\\\\\&quot;id\\\\\\\&quot;,\\\\n  stake_address.view \\\\\\\&quot;address\\\\\\\&quot;,\\\\n  withdrawal.redeemer_id AS \\\\\\\&quot;redeemerId\\\\\\\&quot;,\\\\n  withdrawal.tx_id AS \\\\\\\&quot;tx_id\\\\\\\&quot;\\\\nFROM withdrawal\\\\nJOIN stake_address on withdrawal.addr_id = stake_address.id;\\\\n\\\\nCREATE INDEX idx_block_hash\\\\n    ON block(hash);\\\\n\\\\nCREATE INDEX idx_multi_asset_name\\\\n    ON multi_asset(name);\\\\n\\\\nCREATE INDEX idx_multi_asset_policy\\\\n    ON multi_asset(policy);\\\\n\\\\nCREATE INDEX idx_reward_type\\\\n    ON reward(type);\\\\n\\\\nCREATE INDEX idx_tx_hash\\\\n    ON tx(hash);\\\\n\\\\nCREATE INDEX idx_tx_in_consuming_tx\\\\n   ON tx_in(tx_out_id);\\\\n\\\\nCREATE INDEX idx_tx_out_tx\\\\n    ON tx_out(tx_id);\\\\n\\\\nCREATE function utxo_set_at_block(\\\\\\\&quot;hash\\\\\\\&quot; hash32type)\\\\nRETURNS SETOF \\\\\\\&quot;TransactionOutput\\\\\\\&quot; AS $$\\\\n  SELECT\\\\n    \\\\\\\&quot;TransactionOutput\\\\\\\&quot;.address,\\\\n    \\\\\\\&quot;TransactionOutput\\\\\\\&quot;.\\\\\\\&quot;addressHasScript\\\\\\\&quot;,\\\\n    \\\\\\\&quot;TransactionOutput\\\\\\\&quot;.value,\\\\n    \\\\\\\&quot;TransactionOutput\\\\\\\&quot;.\\\\\\\&quot;txHash\\\\\\\&quot;,\\\\n    \\\\\\\&quot;TransactionOutput\\\\\\\&quot;.\\\\\\\&quot;id\\\\\\\&quot;,\\\\n    \\\\\\\&quot;TransactionOutput\\\\\\\&quot;.index\\\\n  FROM tx\\\\n  JOIN tx_out\\\\n    ON tx.id = tx_out.tx_id\\\\n  JOIN \\\\\\\&quot;TransactionOutput\\\\\\\&quot;\\\\n    ON tx.hash = \\\\\\\&quot;TransactionOutput\\\\\\\&quot;.\\\\\\\&quot;txHash\\\\\\\&quot;\\\\n  LEFT OUTER JOIN tx_in\\\\n    ON tx_out.tx_id = tx_in.tx_out_id\\\\n    AND tx_out.index = tx_in.tx_out_index\\\\n  WHERE tx_in.tx_in_id IS NULL\\\\n  AND tx.block_id \\\\u003c= (SELECT id FROM block WHERE hash = \\\\\\\&quot;hash\\\\\\\&quot;)\\\\n$$ LANGUAGE SQL stable;\\\\n\\\\n\\\&quot;\\n}\\r\\n[42703] FatalError: column epoch_param.coins_per_utxo_word does not exist\&quot;\n&quot;,&quot;time&quot;:&quot;2022-08-03T07:02:58.766Z&quot;,&quot;v&quot;:0}
</code></pre>
 5216: <p>It looks like you are restoring a db-sync 13 snapshot while your db-sync version is 12.
For the moment there don't seem to be anymore snapshots for db-sync 12.</p>
<p>My guess is that if you remove the snapshot option and have it sync from scratch it will just work - but this will probably take a few days.</p>
<p>I wouldn't suggest using version 13 just yet since there are no compatible downstream components for this just yet. Maybe if you wait a few days for the official releases that would become an option.</p>
