Skip to content

Commit

Permalink
Add PoolRetirement SQLite table.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Jul 9, 2020
1 parent affc6f8 commit 52cc6b0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/core/src/Cardano/Pool/DB/Sqlite/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ PoolOwner sql=pool_owner

Primary poolOwnerPoolId poolOwnerSlot poolOwnerOwner poolOwnerIndex
Foreign PoolRegistration fk_registration_pool_id poolOwnerPoolId poolOwnerSlot ! ON DELETE CASCADE
Foreign PoolRetirement fk_retirement_pool_id poolOwnerPoolId poolOwnerSlot ! ON DELETE CASCADE
deriving Show Generic

-- Mapping of registration certificate to pool
Expand All @@ -98,6 +99,15 @@ PoolRegistration sql=pool_registration
Primary poolRegistrationPoolId poolRegistrationSlot
deriving Show Generic

-- Mapping of retirement certificates to pools
PoolRetirement sql=pool_retirement
poolRetirementPoolId W.PoolId sql=pool_id
poolRetirementSlot W.SlotId sql=slot
poolRetirementEpoch Word64 sql=epoch

Primary poolRetirementPoolId poolRetirementSlot
deriving Show Generic

-- Cached metadata after they've been fetched from a remote server.
PoolMetadata sql=pool_metadata
poolMetadataHash W.StakePoolMetadataHash sql=metadata_hash
Expand Down

0 comments on commit 52cc6b0

Please sign in to comment.