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
!399
exception handling during sync
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
exception handling during sync
mi_exception_handling
into
develop
Overview
0
Commits
3
Pipelines
0
Changes
2
Merged
Marcin
requested to merge
mi_exception_handling
into
develop
4 years ago
Overview
0
Commits
3
Pipelines
0
Changes
10
Expand
0
0
Merge request reports
Compare
version 3
version 3
07adac5a
4 years ago
version 2
85a1b770
4 years ago
version 1
3db8ef80
4 years ago
develop (base)
and
latest version
latest version
7940ea1b
3 commits,
4 years ago
version 3
07adac5a
3 commits,
4 years ago
version 2
85a1b770
3 commits,
4 years ago
version 1
3db8ef80
3 commits,
4 years ago
Show latest version
10 files
+
107
−
152
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
10
Search (e.g. *.vue) (Ctrl+P)
hive/db/sql_scripts/upgrade/upgrade_table_schema.sql
+
19
−
0
Options
do
$$
BEGIN
ASSERT
EXISTS
(
SELECT
*
FROM
pg_extension
WHERE
extname
=
'intarray'
),
'The database requires created "intarray" extension'
;
END
$$
;
CREATE
TABLE
IF
NOT
EXISTS
hive_db_patch_level
(
level
SERIAL
NOT
NULL
PRIMARY
KEY
,
@@ -215,6 +220,15 @@ IF NOT EXISTS (SELECT data_type FROM information_schema.columns
ELSE
RAISE
NOTICE
'SKIPPING hive_posts upgrade - adding total_votes and net_votes columns'
;
END
IF
;
IF
NOT
EXISTS
(
SELECT
data_type
FROM
information_schema
.
columns
WHERE
table_name
=
'hive_posts'
AND
column_name
=
'tags_ids'
)
THEN
ALTER
TABLE
ONLY
hive_posts
ADD
COLUMN
tags_ids
INTEGER
[];
ELSE
RAISE
NOTICE
'SKIPPING hive_posts upgrade - adding a tags_ids column'
;
END
IF
;
END
$
BODY
$
@@ -390,3 +404,8 @@ DROP INDEX IF EXISTS hive_posts_promoted_idx;
CREATE
INDEX
IF
NOT
EXISTS
hive_posts_promoted_id_idx
ON
hive_posts
(
promoted
,
id
)
WHERE
NOT
is_paidout
AND
counter_deleted
=
0
;
CREATE
INDEX
IF
NOT
EXISTS
hive_posts_tags_ids_idx
ON
hive_posts
USING
gin
(
tags_ids
gin__int_ops
);
DROP
TABLE
IF
EXISTS
hive_post_tags
;
Loading