Skip to content
Snippets Groups Projects
Commit ecd829d4 authored by Dariusz Kędzierski's avatar Dariusz Kędzierski
Browse files

Payout field sizes correction: prevent overflow errors

parent 2c0b485e
No related branches found
No related tags found
5 merge requests!456Release candidate v1 24,!230Setup monitoring with pghero,!135Enable postgres monitoring on CI server,!16Dk issue 3 concurrent block query rebase,!15Dk issue 3 concurrent block query
......@@ -111,7 +111,7 @@ def build_metadata():
sa.Column('sc_trend', sa.Float(precision=6), nullable=False, server_default='0'),
sa.Column('sc_hot', sa.Float(precision=6), nullable=False, server_default='0'),
sa.Column('total_payout_value', sa.String(19), nullable=False, server_default=''),
sa.Column('total_payout_value', sa.String(30), nullable=False, server_default=''),
sa.Column('author_rewards', sa.BigInteger, nullable=False, server_default='0'),
sa.Column('author_rewards_hive', sa.BigInteger, nullable=False, server_default='0'),
......@@ -131,10 +131,10 @@ def build_metadata():
sa.Column('parent_author_id', sa.Integer, nullable=False),
sa.Column('parent_permlink_id', sa.Integer, nullable=False),
sa.Column('curator_payout_value', sa.String(19), nullable=False, server_default=''),
sa.Column('curator_payout_value', sa.String(30), nullable=False, server_default=''),
sa.Column('root_author_id', sa.Integer, nullable=False),
sa.Column('root_permlink_id', sa.Integer, nullable=False),
sa.Column('max_accepted_payout', sa.String(19), nullable=False, server_default=''),
sa.Column('max_accepted_payout', sa.String(30), nullable=False, server_default=''),
sa.Column('percent_steem_dollars', sa.Integer, nullable=False, server_default='-1'),
sa.Column('allow_replies', BOOLEAN, nullable=False, server_default='1'),
sa.Column('allow_votes', BOOLEAN, nullable=False, server_default='1'),
......
......@@ -106,7 +106,7 @@ CREATE TABLE IF NOT EXISTS hive_posts_new (
sc_trend NUMERIC(6) DEFAULT '0.0',
sc_hot NUMERIC(6) DEFAULT '0.0',
total_payout_value VARCHAR(19) DEFAULT '',
total_payout_value VARCHAR(30) DEFAULT '',
author_rewards BIGINT DEFAULT '0',
author_rewards_hive BIGINT DEFAULT '0',
......@@ -127,10 +127,10 @@ CREATE TABLE IF NOT EXISTS hive_posts_new (
-- columns from raw_json
parent_author_id INT DEFAULT '-1',
parent_permlink_id INT DEFAULT '-1',
curator_payout_value VARCHAR(19) DEFAULT '',
curator_payout_value VARCHAR(30) DEFAULT '',
root_author_id INT DEFAULT '-1',
root_permlink_id INT DEFAULT '-1',
max_accepted_payout VARCHAR(19) DEFAULT '',
max_accepted_payout VARCHAR(30) DEFAULT '',
percent_steem_dollars INT DEFAULT '-1',
allow_replies BOOLEAN DEFAULT '1',
allow_votes BOOLEAN DEFAULT '1',
......@@ -250,10 +250,10 @@ CREATE TABLE legacy_comment_data (
raw_json TEXT,
parent_author VARCHAR(16),
parent_permlink VARCHAR(255),
curator_payout_value VARCHAR(19),
curator_payout_value VARCHAR(30),
root_author VARCHAR(16),
root_permlink VARCHAR(255),
max_accepted_payout VARCHAR(19),
max_accepted_payout VARCHAR(30),
percent_steem_dollars INT,
allow_replies BOOLEAN,
allow_votes BOOLEAN,
......@@ -268,7 +268,7 @@ CREATE TYPE legacy_comment_type AS (
id BIGINT,
parent_author VARCHAR(16),
parent_permlink VARCHAR(255),
curator_payout_value VARCHAR(16),
curator_payout_value VARCHAR(30),
root_author VARCHAR(16),
root_permlink VARCHAR(255),
max_accepted_payout VARCHAR(16),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment