STEEMSQL - A public SQL database with all blockchain data – Update 6

in steemsql •  2 years ago 

SteemSQL is a public MS-SQL database with all the blockchain data in it.

Previous posts:

What’s new?

With the impending arrival of hardfork 17.x, the date returned by the get_comment() API has changed. These changes have been reflected in the database structure, while keeping backward compatibility with current Hardfork 16.x.

The only impacted table is the Comments table. Let’s look at what changed.

Comment mode removed

In HF16 and previous version, the mode field contains the current status of a comment:

  • archived
  • first_payout
  • second_payout

In HF17, this field is no longer returned because:
The restriction to edit a comment has been removed (hence the “archived” value disappears)
The duplicate payout periods (24h and 30days) are replaced by a single 7 days period (hence “first_payout” and “second_payout” values will disappear).

To comply with both hardfork version, this field has been made nullable in the Comments table.
It will be definitely removed once the hardfork 17.x will be approved by witnesses.

New fields

New fields are returned by the get_comment() API

  • parent_author
  • parent_permlink
  • title
  • body
  • json_metadata

These fields will contains the same values as the one found in the related TxComments records.

The good news is that you no longer need to parse the Comments related TxComments record. This is especially true for the body field. Usually, the first record in TxComments contains the initial post and the subsequent records contain only incremental updates.

Now, you will be able to find the the latest full version of the post directly in the Comments table.

A mix of both

Please be aware that the Comments is currently in a “mix of both” state, meaning old comments records have not been updated.

To determine whether a record is “v16.x” or “v17.x”, you can check the mode field. If the value is NULL, then it is a “v17.x” record and it contains valid data in the above mentioned new fields.

Once the hardfork 17.x will be adopted by the majority of witnesses, I will reload all records from the Comments table (actually 2,256,603) to update them.

Thanks for reading!

All payout from this post will be dedicated keep SteemSQL running. Thanks for your support.

Support me and my work as a witness by voting for me here!

You like this post, do not forget to upvote or follow me or resteem

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  ·  2 years ago Reveal Comment

Thanks !! =)

Good news are always welcome :)