Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
file-storage
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
file-storage
Commits
2f54f1f0
Commit
2f54f1f0
authored
Sep 19, 2016
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- added sanity check
parent
f63daca4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
8 deletions
+33
-8
upgrade-5.8.1-5.8.2.sql
sql/postgresql/upgrade/upgrade-5.8.1-5.8.2.sql
+33
-8
No files found.
sql/postgresql/upgrade/upgrade-5.8.1-5.8.2.sql
View file @
2f54f1f0
delete
from
cr_folder_type_map
where
content_type
not
in
(
'file_storage_object'
,
'content_folder'
,
'content_extlink'
)
and
folder_id
in
(
select
o2
.
object_id
as
folder_id
from
acs_objects
o1
,
acs_objects
o2
where
o1
.
object_id
in
(
select
folder_id
from
fs_root_folders
)
and
o2
.
tree_sortkey
between
o1
.
tree_sortkey
and
tree_right
(
o1
.
tree_sortkey
)
and
o2
.
object_type
=
'content_folder'
);
-- samity check for existence of fs_root_folders
CREATE
OR
REPLACE
FUNCTION
inline_0
()
RETURNS
INTEGER
AS
$
BODY
$
declare
v_count
integer
;
begin
select
count
(
*
)
into
v_count
from
pg_tables
where
tablename
=
'fs_root_folders'
;
IF
v_count
>
0
THEN
delete
from
cr_folder_type_map
where
content_type
not
in
(
'file_storage_object'
,
'content_folder'
,
'content_extlink'
)
and
folder_id
in
(
select
o2
.
object_id
as
folder_id
from
acs_objects
o1
,
acs_objects
o2
where
o1
.
object_id
in
(
select
folder_id
from
fs_root_folders
)
and
o2
.
tree_sortkey
between
o1
.
tree_sortkey
and
tree_right
(
o1
.
tree_sortkey
)
and
o2
.
object_type
=
'content_folder'
);
return
0
;
END
IF
;
return
1
;
end
;
$
BODY
$
LANGUAGE
'plpgsql'
;
SELECT
inline_0
();
DROP
FUNCTION
inline_0
();
--- from file-storage-package-create.sql
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment