upgrade version due to schema change and generate migration file
change sql filename
change sql filename
cabal-version: 3.0
name: cardano-chain-gen
version: 13.1.1.3
version: 13.2.0.0
synopsis: A fake chain generator for testing cardano DB sync.
description: A fake chain generator for testing cardano DB sync.
homepage: https://github.com/input-output-hk/cardano-db-sync
withCustomConfig commandLineForceIndexArgs babbageConfigDir testLabel $ \_ _ dbSyncEnv -> do
startDBSync dbSyncEnv
threadDelay 3_000_000
assertEqQuery dbSyncEnv DB.queryPgIndexesCount 159 "there wasn't the correct number of indexes"
assertEqQuery dbSyncEnv DB.queryPgIndexesCount 160 "there wasn't the correct number of indexes"
where
testLabel = "CLAcheckForceIndexesArg"
commandLineForceIndexArgs =
withCustomConfig commandLineNoForceIndexArgs babbageConfigDir testLabel $ \_ _ dbSyncEnv -> do
startDBSync dbSyncEnv
threadDelay 3_000_000
assertEqQuery dbSyncEnv DB.queryPgIndexesCount 94 "there wasn't the correct number of indexes"
assertEqQuery dbSyncEnv DB.queryPgIndexesCount 95 "there wasn't the correct number of indexes"
where
testLabel = "CLAcheckNoForceIndexesArg"
commandLineNoForceIndexArgs =
cabal-version: 3.0
name: cardano-db-sync
version: 13.1.1.3
version: 13.2.0.0
synopsis: The Cardano DB Sync node
description: A Cardano node that follows the Cardano chain and inserts data from the
chain into a PostgresQL database.
cabal-version: 3.0
name: cardano-db-tool
version: 13.1.1.3
version: 13.2.0.0
synopsis: Utilities to manage the cardano-db-sync databases.
description: Utilities and executable, used to manage and validate the
PostgreSQL db and the ledger database of the cardano-db-sync node
cabal-version: 3.0
name: cardano-db
version: 13.1.1.3
version: 13.2.0.0
synopsis: A base PostgreSQL component for the cardano-db-sync node.
description: Code for the Cardano DB Sync node that is shared between the
cardano-db-node and other components.
insertBlockChecked,
) where
import Cardano.Db.AlterTable (queryHasConstraint)
import Cardano.Db.Query
import Cardano.Db.Schema
import Cardano.Db.Text
entityKey,
)
import Database.PostgreSQL.Simple (SqlError)
import Cardano.Db.AlterTable (queryHasConstraint)
-- The original naive way of inserting rows into Postgres was:
--
ReaderT SqlBackend m ()
insertManyUnique vtype constraintName records = do
constraintExists <- queryHasConstraint constraintName
unless (null records)
$ handle exceptHandler (rawExecute (query constraintExists) values)
unless (null records) $
handle exceptHandler (rawExecute (query constraintExists) values)
where
query :: Bool -> Text
query constraintExists =
conflictQuery :: Bool -> Text
conflictQuery constraintExists =
if constraintExists
then Text.concat [" ON CONFLICT ON CONSTRAINT "
, unConstraintNameDB constraintName
, " DO NOTHING"]
else ""
then
Text.concat
[ " ON CONFLICT ON CONSTRAINT "
, unConstraintNameDB constraintName
, " DO NOTHING"
]
else ""
fieldNames, placeholders :: [Text]
(fieldNames, placeholders) =
let constraintName = uniqueDBName $ onlyOneUniqueDef (Proxy @record)
insertManyUnique vtype constraintName records
-- Insert, getting PostgreSQL to check the uniqueness constaint. If it is violated,
-- simply returns the Key, without changing anything.
insertCheckUnique ::
cabal-version: 3.0
name: cardano-db-test
version: 13.1.1.3
version: 13.2.0.0
synopsis: Tests for the base functionality of the cardano-db library
description: Code for the Cardano DB Sync node that is shared between the
cardano-db-node and other components.
cabal-version: 3.0
name: cardano-smash-server
version: 13.1.1.3
version: 13.2.0.0
synopsis: The Cardano smash server
description: Please see the README on GitHub at
<https://github.com/input-output-hk/cardano-db-sync/cardano-smash-server/#readme>
Up to date
# Schema Documentation for cardano-db-sync
Schema version: 13.1.1.3 (from branch **kderme/stake-dist-master** which may not accurately reflect the version number)
Schema version: 13.2.0.0 (from branch **kderme/stake-dist-master** 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`
max-file: "10"
cardano-db-sync:
image: inputoutput/cardano-db-sync:13.1.1.3
image: inputoutput/cardano-db-sync:13.2.0.0
environment:
- DISABLE_LEDGER=${DISABLE_LEDGER}
- NETWORK=${NETWORK:-mainnet}
* Removed call to tail, and the 'watchPulser' test Co-authored-by: Alexey Kuleshevich <[email protected]>
* Add `pvCanFollow` check to `GOV` STS * Add that `validHFAction` also looks at the current `EnactState`
Reimplementation of #496 targetting #819, which include the more general changes of #500.
Introduces `IOSimThreadIdMap` data type as an optimization over the previous time and memory innefficient Map data structure.
To prevent aborting the wrong Head `headId` was added to the `OnAbortTx`. Logic layer now aborts the head that is seen as initialized.
Co-authored-by: Torsten Schmits <[email protected]>