Skip to content

Add daily_fil stats table #219

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

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions migrations/008.do.daily-fil-stats.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE TABLE daily_fil (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, daily_fil isn't self explanatory. And what will this table track? Is it the FIL sent to addesses, or when we increased their balance in the smart contract?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, we want to track rewards transferred every Monday from "scheduled rewards" to participant wallets.

My proposals for a better table name:

  • daily_transfers
  • daily_reward_transfers

We are using the daily_ prefix in other table names to communicate that these tables store data with a daily granularity (i.e. they all use a day DATE NOT NULL column as the timestamp).

day DATE NOT NULL,
to_address TEXT NOT NULL,
amount BIGINT NOT NULL,
PRIMARY KEY (day, to_address)
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
)
)