diff --git a/cardano-db/src/Cardano/Db/Schema.hs b/cardano-db/src/Cardano/Db/Schema.hs index ff76cce4c..874787fee 100644 --- a/cardano-db/src/Cardano/Db/Schema.hs +++ b/cardano-db/src/Cardano/Db/Schema.hs @@ -561,10 +561,10 @@ share PoolStat poolHashId PoolHashId noreference epochNo Word64 sqltype=word31type - numberOfBlocks Word64 sqltype=word31type - numberOfDelegators Word64 sqltype=word31type - stake Word64 sqltype=word31type - votingPower Word64 Maybe sqltype=word31type + numberOfBlocks Word64 sqltype=word64type + numberOfDelegators Word64 sqltype=word64type + stake Word64 sqltype=word64type + votingPower Word64 Maybe sqltype=word64type ExtraMigrations token Text diff --git a/doc/schema.md b/doc/schema.md index 0cfeaecc1..a25ca8c64 100644 --- a/doc/schema.md +++ b/doc/schema.md @@ -1,6 +1,5 @@ # Schema Documentation for cardano-db-sync -Schema version: 13.3.0.0 (from branch **kderme/prepare-release-13.3** which may not accurately reflect the version number) **Note:** This file is auto-generated from the documentation in cardano-db/src/Cardano/Db/Schema.hs by the command `cabal run -- gen-schema-docs doc/schema.md`. This document should only be updated during the release process and updated on the release branch. ### `schema_version` @@ -86,6 +85,7 @@ A table for transactions within a block on the chain. | `invalid_hereafter` | word64type | Transaction in invalid at or after this slot number. | | `valid_contract` | boolean | False if the contract is invalid. True if the contract is valid or there is no contract. | | `script_size` | word31type | The sum of the script sizes (in bytes) of scripts in the transaction. | +| `treasury_donation` | lovelace | | ### `tx_cbor` @@ -785,10 +785,10 @@ Stats per pool and per epoch. | `id` | integer (64) | | | `pool_hash_id` | integer (64) | The pool_hash_id reference. | | `epoch_no` | word31type | The epoch number. | -| `number_of_blocks` | word31type | Number of blocks created on the previous epoch. | -| `number_of_delegators` | word31type | Number of delegators in the mark snapshot. | -| `stake` | word31type | Total stake in the mark snapshot. | -| `voting_power` | word31type | Voting power of the SPO. | +| `number_of_blocks` | word64type | Number of blocks created on the previous epoch. | +| `number_of_delegators` | word64type | Number of delegators in the mark snapshot. | +| `stake` | word64type | Total stake in the mark snapshot. | +| `voting_power` | word64type | Voting power of the SPO. | ### `extra_migrations` diff --git a/schema/migration-2-0041-20240711.sql b/schema/migration-2-0041-20240711.sql index 92bc6a526..0d8386919 100644 --- a/schema/migration-2-0041-20240711.sql +++ b/schema/migration-2-0041-20240711.sql @@ -6,7 +6,7 @@ DECLARE BEGIN SELECT stage_two + 1 INTO next_version FROM schema_version ; IF next_version = 41 THEN - EXECUTE 'CREATe TABLE "pool_stat"("id" SERIAL8 PRIMARY KEY UNIQUE,"pool_hash_id" INT8 NOT NULL,"epoch_no" word31type NOT NULL,"number_of_blocks" word31type NOT NULL,"number_of_delegators" word31type NOT NULL,"stake" word31type NOT NULL,"voting_power" word31type NULL)' ; + EXECUTE 'CREATe TABLE "pool_stat"("id" SERIAL8 PRIMARY KEY UNIQUE,"pool_hash_id" INT8 NOT NULL,"epoch_no" word31type NOT NULL,"number_of_blocks" word64type NOT NULL,"number_of_delegators" word64type NOT NULL,"stake" word64type NOT NULL,"voting_power" word64type NULL)' ; -- Hand written SQL statements can be added here. UPDATE schema_version SET stage_two = next_version ; RAISE NOTICE 'DB has been migrated to stage_two version %', next_version ;