Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Merge requests
!367
issue
#89
: net_votes and total_votes are calculated during sync
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
issue
#89
: net_votes and total_votes are calculated during sync
mi_issue_89_total_votes
into
develop
Overview
2
Commits
3
Pipelines
0
Changes
5
Merged
Marcin
requested to merge
mi_issue_89_total_votes
into
develop
4 years ago
Overview
2
Commits
3
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
version 7
version 7
16094486
4 years ago
version 6
329e4327
4 years ago
version 5
eb1c6c0f
4 years ago
version 4
cb32570f
4 years ago
version 3
07cd28c7
4 years ago
version 2
cc9c0c7e
4 years ago
version 1
6d244fe6
4 years ago
develop (base)
and
latest version
latest version
b44b6b5e
3 commits,
4 years ago
version 7
16094486
2 commits,
4 years ago
version 6
329e4327
2 commits,
4 years ago
version 5
eb1c6c0f
3 commits,
4 years ago
version 4
cb32570f
2 commits,
4 years ago
version 3
07cd28c7
1 commit,
4 years ago
version 2
cc9c0c7e
1 commit,
4 years ago
version 1
6d244fe6
1 commit,
4 years ago
Show latest version
1 file
+
4
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
hive/db/sql_scripts/upgrade/upgrade_table_schema.sql
+
4
−
2
Options
@@ -204,8 +204,10 @@ IF NOT EXISTS (SELECT data_type FROM information_schema.columns
UPDATE
hive_posts
SET
total_votes
=
0
,
net_votes
=
0
;
-- Artificial number, requires to start update_posts_rshares for all blocks
ALTER
TABLE
ONLY
hive_posts
ALTER
COLUMN
total_votes
set
not
null
,
ALTER
COLUMN
net_votes
set
not
null
;
ALTER
COLUMN
total_votes
SET
NOT
NULL
,
ALTER
COLUMN
total_votes
SET
DEFAULT
0
,
ALTER
COLUMN
net_votes
SET
NOT
NULL
,
ALTER
COLUMN
net_votes
SET
DEFAULT
0
;
PERFORM
deps_restore_dependencies
(
'public'
,
'hive_posts'
);
ELSE
Loading