-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup in the DB schema #718
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #718 +/- ##
========================================
Coverage 53.10% 53.10%
========================================
Files 23 23
Lines 3642 3642
========================================
Hits 1934 1934
Misses 1450 1450
Partials 258 258 Continue to review full report at Codecov.
|
typeenum smallint NOT NULL, | ||
asset bigint NOT NULL, -- 0=Algos, otherwise AssetIndex | ||
txid bytea NOT NULL, -- base32 of [32]byte hash | ||
txnbytes bytea NOT NULL, -- msgpack encoding of signed txn with apply data | ||
txn jsonb NOT NULL, -- json encoding of signed txn with apply data | ||
extra jsonb, | ||
extra jsonb NOT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think extra
should be nullable, it's rarely used. The asset close query handles the null case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We always write it in writer.go
. I think it's better to write it than having to handle the null case.
@@ -47,10 +47,10 @@ CREATE TABLE IF NOT EXISTS account ( | |||
rewardsbase bigint NOT NULL, | |||
rewards_total bigint NOT NULL, | |||
deleted bool NOT NULL, -- whether or not it is currently deleted | |||
created_at bigint NOT NULL DEFAULT 0, -- round that the account is first used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure we don't need DEFAULT 0
for genesis accounts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we write 0 explicitly.
No description provided.