@@ -23,6 +23,8 @@ import Cardano.Db.Types (
2323 dbInt65Encoder ,
2424 dbLovelaceDecoder ,
2525 dbLovelaceEncoder ,
26+ maybeDbLovelaceDecoder ,
27+ maybeDbLovelaceEncoder ,
2628 maybeDbWord64Decoder ,
2729 maybeDbWord64Encoder ,
2830 syncStateDecoder ,
@@ -202,7 +204,7 @@ epochParamDecoder =
202204 <*> dbLovelaceDecoder -- epochParamMinUtxoValue
203205 <*> dbLovelaceDecoder -- epochParamMinPoolCost
204206 <*> D. column (D. nullable D. bytea) -- epochParamNonce
205- <*> maybeIdDecoder CostModelId -- epochParamCostModelId (moved from position 20 to 19)
207+ <*> maybeIdDecoder CostModelId -- epochParamCostModelId
206208 <*> D. column (D. nullable D. float8) -- epochParamPriceMem
207209 <*> D. column (D. nullable D. float8) -- epochParamPriceStep
208210 <*> maybeDbWord64Decoder -- epochParamMaxTxExMem
@@ -214,7 +216,8 @@ epochParamDecoder =
214216 <*> D. column (D. nullable $ fromIntegral <$> D. int2) -- epochParamMaxCollateralInputs
215217 <*> idDecoder BlockId -- epochParamBlockId
216218 <*> D. column (D. nullable D. bytea) -- epochParamExtraEntropy
217- <*> D. column (D. nullable $ DbLovelace . fromIntegral <$> D. int8) -- epochParamCoinsPerUtxoSize (moved from position 19 to 31)
219+ <*> maybeDbLovelaceDecoder -- epochParamCoinsPerUtxoSize
220+ -- <*> D.column (D.nullable $ DbLovelace . fromIntegral <$> D.int8) -- epochParamCoinsPerUtxoSize
218221 <*> D. column (D. nullable D. float8) -- epochParamPvtMotionNoConfidence
219222 <*> D. column (D. nullable D. float8) -- epochParamPvtCommitteeNormal
220223 <*> D. column (D. nullable D. float8) -- epochParamPvtCommitteeNoConfidence
@@ -235,7 +238,7 @@ epochParamDecoder =
235238 <*> maybeDbWord64Decoder -- epochParamGovActionDeposit
236239 <*> maybeDbWord64Decoder -- epochParamDrepDeposit
237240 <*> maybeDbWord64Decoder -- epochParamDrepActivity
238- <*> D. column (D. nullable D. float8) -- epochParamPvtppSecurityGroup (moved from position 36 to 52)
241+ <*> D. column (D. nullable D. float8) -- epochParamPvtppSecurityGroup
239242 <*> D. column (D. nullable D. float8) -- epochParamMinFeeRefScriptCostPerByte
240243
241244entityEpochParamEncoder :: E. Params (Entity EpochParam )
@@ -267,7 +270,7 @@ epochParamEncoder =
267270 , epochParamMinUtxoValue >$< dbLovelaceEncoder
268271 , epochParamMinPoolCost >$< dbLovelaceEncoder
269272 , epochParamNonce >$< E. param (E. nullable E. bytea)
270- , epochParamCostModelId >$< maybeIdEncoder getCostModelId -- moved from position 20 to 19
273+ , epochParamCostModelId >$< maybeIdEncoder getCostModelId
271274 , epochParamPriceMem >$< E. param (E. nullable E. float8)
272275 , epochParamPriceStep >$< E. param (E. nullable E. float8)
273276 , epochParamMaxTxExMem >$< maybeDbWord64Encoder
@@ -279,7 +282,7 @@ epochParamEncoder =
279282 , epochParamMaxCollateralInputs >$< E. param (E. nullable $ fromIntegral >$< E. int2)
280283 , epochParamBlockId >$< idEncoder getBlockId
281284 , epochParamExtraEntropy >$< E. param (E. nullable E. bytea)
282- , epochParamCoinsPerUtxoSize >$< E. param ( E. nullable $ fromIntegral . unDbLovelace >$< E. int8) -- moved from position 19 to 31
285+ , epochParamCoinsPerUtxoSize >$< maybeDbLovelaceEncoder
283286 , epochParamPvtMotionNoConfidence >$< E. param (E. nullable E. float8)
284287 , epochParamPvtCommitteeNormal >$< E. param (E. nullable E. float8)
285288 , epochParamPvtCommitteeNoConfidence >$< E. param (E. nullable E. float8)
@@ -300,7 +303,7 @@ epochParamEncoder =
300303 , epochParamGovActionDeposit >$< maybeDbWord64Encoder
301304 , epochParamDrepDeposit >$< maybeDbWord64Encoder
302305 , epochParamDrepActivity >$< maybeDbWord64Encoder
303- , epochParamPvtppSecurityGroup >$< E. param (E. nullable E. float8) -- moved from position 36 to 52
306+ , epochParamPvtppSecurityGroup >$< E. param (E. nullable E. float8)
304307 , epochParamMinFeeRefScriptCostPerByte >$< E. param (E. nullable E. float8)
305308 ]
306309
@@ -434,9 +437,7 @@ data AdaPots = AdaPots
434437 deriving (Show , Eq , Generic )
435438
436439type instance Key AdaPots = AdaPotsId
437-
438- instance DbInfo AdaPots where
439- uniqueFields _ = [" block_id" ]
440+ instance DbInfo AdaPots
440441
441442entityAdaPotsDecoder :: D. Row (Entity AdaPots )
442443entityAdaPotsDecoder =
0 commit comments