Correct database design #11
No reviewers
Labels
No milestone
No project
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Vergara_Tech/zgo-backend#11
Loading…
Reference in a new issue
No description provided.
Delete branch "rav001"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -39,4 +53,2 @@
[mkPersist sqlSettings, mkMigrate "migrateAll"]
[persistLowerCase|
ZgoBlock
block_id Int --Block Id number
Persistent creates IDs automatically
@ -51,3 +61,1 @@
blocktx_id Int -- Block Tx record Id
blocktx_txid String -- Block Tx Id
UniqueBlockTx blocktx_block_id blocktx_id
ZgoBlockTx
What is this table for?
@ -54,3 +64,2 @@
blocktx_txid String
deriving Show Eq
ZgoCountry
country_code String -- Two Character Country Code
There is no need to add the
country_
prefix. Persistent will automatically create azgoCountryCode
accessor@ -66,1 +71,3 @@
UniqueItemId item_owner item_id
ZgoItem json
owner_id Int
name T.Text
Text values should be
T.Text
instead ofString
@ -91,2 +83,2 @@
order_vatamount Float default=0.0 -- Orcer VAT amount'
UniqueOrderId order_id
ZgoOrder json
owner ZgoOwnerId
Using the
ZgoOwnerId
automatically created by Persistent, we can declare relationships between tables.@ -93,0 +86,4 @@
timestamp Int
closed Word8
currency T.Text
price Double
Persistent uses
Double
instead ofFloat
@ -93,0 +89,4 @@
price Double
total Double
totalzec Double
paid Bool
Flags should be
Bool
notWord8
@ -131,0 +128,4 @@
invoices Bool
tips Bool
paid Bool
expiration UTCTime
Dates should be
UTCTime
@ -143,2 +140,4 @@
txid HexStringDB
memo T.Text
deriving Show Eq
ZgoPrice
These fields do not correspond with the definition in Mantis #56
@ -167,3 +159,1 @@
tx_expiration Int default=0 -- Transaction Expiration Date/Time
tx_closed Word8 default=0 -- Transaction Closed flag
UniqueTxId tx_id
zaddress T.Text default=""
These fields do not correspond with the definition in Mantis #58.
@ -198,0 +176,4 @@
access_token T.Text
expires Int
refreshtoken T.Text
accexpires Int
Should be
UTCTime
@ -198,0 +178,4 @@
refreshtoken T.Text
accexpires Int
accCode T.Text
refexpires Int
Should be
UTCTime
WIP: Correct database designto Correct database designPull request closed