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
!145
A 'get_profile' implementation
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
A 'get_profile' implementation
mt-get-profile-impl
into
latest_deployed_develop
Overview
0
Commits
7
Pipelines
0
Changes
1
Merged
Mariusz Trela
requested to merge
mt-get-profile-impl
into
latest_deployed_develop
4 years ago
Overview
0
Commits
7
Pipelines
0
Changes
1
Expand
@bwrona
0
0
Merge request reports
Viewing commit
6b0913b6
Prev
Next
Show latest version
1 file
+
53
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
6b0913b6
Added a view `hive_accounts_info_view` into `upgrade.sql` file
· 6b0913b6
Mariusz Trela
authored
4 years ago
scripts/upgrade.sql
+
53
−
0
Options
@@ -90,3 +90,56 @@ $function$
JOIN
hive_posts_view
hp
ON
hp
.
id
=
trends
.
id
ORDER
BY
trends
.
trend
DESC
$
function
$
language
sql
DROP
VIEW
IF
EXISTS
public
.
hive_accounts_info_view
;
CREATE
OR
REPLACE
VIEW
public
.
hive_accounts_info_view
AS
SELECT
id
,
name
,
(
select
count
(
*
)
post_count
FROM
hive_posts
hp
WHERE
ha
.
id
=
hp
.
author_id
)
post_count
,
created_at
,
(
SELECT
GREATEST
(
created_at
,
COALESCE
(
(
select
max
(
hp
.
created_at
)
FROM
hive_posts
hp
WHERE
ha
.
id
=
hp
.
author_id
),
'1970-01-01 00:00:00.0'
),
COALESCE
(
(
select
max
(
hv
.
last_update
)
from
hive_votes
hv
WHERE
ha
.
id
=
hv
.
voter_id
),
'1970-01-01 00:00:00.0'
)
)
)
active_at
,
display_name
,
about
,
reputation
,
profile_image
,
location
,
website
,
cover_image
,
rank
,
following
,
followers
,
proxy
,
proxy_weight
,
lastread_at
,
cached_at
,
raw_json
FROM
hive_accounts
ha
Loading