Correct database design #11

Closed
pitmutt wants to merge 0 commits from rav001 into rvv001
pitmutt commented 2024-08-12 15:44:31 +00:00 (Migrated from git.vergara.tech)
No description provided.
pitmutt (Migrated from git.vergara.tech) reviewed 2024-08-12 15:45:53 +00:00
pitmutt (Migrated from git.vergara.tech) commented 2024-08-12 15:45:53 +00:00

Persistent creates IDs automatically

Persistent creates IDs automatically
pitmutt (Migrated from git.vergara.tech) reviewed 2024-08-12 15:46:10 +00:00
@ -62,4 +59,3 @@
time Int default=0
deriving Show Eq
-- | Block transactions table (child table)
ZgoBlockTx
pitmutt (Migrated from git.vergara.tech) commented 2024-08-12 15:46:10 +00:00

What is this table for?

What is this table for?
pitmutt (Migrated from git.vergara.tech) reviewed 2024-08-12 15:47:13 +00:00
@ -53,4 +53,2 @@
[mkPersist sqlSettings, mkMigrate "migrateAll"]
[persistLowerCase|
-- |
-- | Block table (ref. #49)
pitmutt (Migrated from git.vergara.tech) commented 2024-08-12 15:47:13 +00:00

There is no need to add the country_ prefix. Persistent will automatically create a zgoCountryCode accessor

There is no need to add the `country_` prefix. Persistent will automatically create a `zgoCountryCode` accessor
pitmutt (Migrated from git.vergara.tech) reviewed 2024-08-12 15:47:50 +00:00
@ -81,3 +71,3 @@
ZgoItem json
owner ZgoOwnerId
owner_id Int
name T.Text
pitmutt (Migrated from git.vergara.tech) commented 2024-08-12 15:47:50 +00:00

Text values should be T.Text instead of String

Text values should be `T.Text` instead of `String`
pitmutt (Migrated from git.vergara.tech) reviewed 2024-08-12 15:48:38 +00:00
@ -98,4 +83,2 @@
-- | (Owner child table)
-- |
ZgoOrder json
owner ZgoOwnerId
pitmutt (Migrated from git.vergara.tech) commented 2024-08-12 15:48:38 +00:00

Using the ZgoOwnerId automatically created by Persistent, we can declare relationships between tables.

Using the `ZgoOwnerId` automatically created by Persistent, we can declare relationships between tables.
pitmutt (Migrated from git.vergara.tech) reviewed 2024-08-12 15:49:10 +00:00
@ -104,4 +86,4 @@
timestamp Int
closed Word8
currency T.Text
price Double
pitmutt (Migrated from git.vergara.tech) commented 2024-08-12 15:49:10 +00:00

Persistent uses Double instead of Float

Persistent uses `Double` instead of `Float`
pitmutt (Migrated from git.vergara.tech) reviewed 2024-08-12 15:49:35 +00:00
@ -108,3 +90,3 @@
total Double
totalZec Double
totalzec Double
paid Bool
pitmutt (Migrated from git.vergara.tech) commented 2024-08-12 15:49:35 +00:00

Flags should be Bool not Word8

Flags should be `Bool` not `Word8`
pitmutt (Migrated from git.vergara.tech) reviewed 2024-08-12 15:50:08 +00:00
@ -155,9 +130,6 @@ share
paid Bool
expiration UTCTime
pitmutt (Migrated from git.vergara.tech) commented 2024-08-12 15:50:08 +00:00

Dates should be UTCTime

Dates should be `UTCTime`
pitmutt (Migrated from git.vergara.tech) reviewed 2024-08-12 15:51:17 +00:00
@ -171,4 +143,1 @@
-- |
-- | Price Table (ref. #56)
-- |
ZgoPrice
pitmutt (Migrated from git.vergara.tech) commented 2024-08-12 15:51:17 +00:00

These fields do not correspond with the definition in Mantis #56

These fields do not correspond with the definition in [Mantis #56](https://mantis.vergara.tech/view.php?id=56)
pitmutt (Migrated from git.vergara.tech) reviewed 2024-08-12 16:02:57 +00:00
@ -195,3 +159,1 @@
amount Double default=0.00
txid T.Text
memo T.Text
zaddress T.Text default=""
pitmutt (Migrated from git.vergara.tech) commented 2024-08-12 16:02:58 +00:00

These fields do not correspond with the definition in Mantis #58.

These fields do not correspond with the definition in [Mantis #58](https://mantis.vergara.tech/view.php?id=58).
pitmutt (Migrated from git.vergara.tech) reviewed 2024-08-12 16:03:53 +00:00
@ -230,3 +177,3 @@
expires UTCTime
expires Int
refreshtoken T.Text
accexpires Int
pitmutt (Migrated from git.vergara.tech) commented 2024-08-12 16:03:53 +00:00

Should be UTCTime

Should be `UTCTime`
pitmutt (Migrated from git.vergara.tech) reviewed 2024-08-12 16:04:06 +00:00
@ -232,3 +179,3 @@
accexpires Int
accCode T.Text
refexpires UTCTime
refexpires Int
pitmutt (Migrated from git.vergara.tech) commented 2024-08-12 16:04:06 +00:00

Should be UTCTime

Should be `UTCTime`

Pull request closed

Sign in to join this conversation.
No description provided.