Skip to content
Snippets Groups Projects
Commit 9bf7b6ed authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Merge branch 'children_count_fix' into 'develop'

Changed type of children column to the int type (smallint is too short)

See merge request !79
parents cf13acfb 1cdfca94
No related branches found
No related tags found
4 merge requests!456Release candidate v1 24,!230Setup monitoring with pghero,!135Enable postgres monitoring on CI server,!79Changed type of children column to the int type (smallint is too short)
...@@ -81,7 +81,7 @@ def build_metadata(): ...@@ -81,7 +81,7 @@ def build_metadata():
sa.Column('is_valid', BOOLEAN, nullable=False, server_default='1'), sa.Column('is_valid', BOOLEAN, nullable=False, server_default='1'),
sa.Column('promoted', sa.types.DECIMAL(10, 3), nullable=False, server_default='0'), sa.Column('promoted', sa.types.DECIMAL(10, 3), nullable=False, server_default='0'),
sa.Column('children', SMALLINT, nullable=False, server_default='0'), sa.Column('children', sa.Integer, nullable=False, server_default='0'),
# basic/extended-stats # basic/extended-stats
sa.Column('author_rep', sa.Float(precision=6), nullable=False, server_default='0'), sa.Column('author_rep', sa.Float(precision=6), nullable=False, server_default='0'),
...@@ -688,7 +688,7 @@ def setup(db): ...@@ -688,7 +688,7 @@ def setup(db):
JOIN tblChild ON p.Parent_Id = tblChild.Id JOIN tblChild ON p.Parent_Id = tblChild.Id
WHERE NOT p.is_deleted WHERE NOT p.is_deleted
) )
SELECT queried_parent, cast(count(1) AS smallint) AS children_count SELECT queried_parent, cast(count(1) AS int) AS children_count
FROM tblChild FROM tblChild
GROUP BY queried_parent GROUP BY queried_parent
) data_source ) data_source
......
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