Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acs-content-repository
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
acs-content-repository
Commits
78174c42
Commit
78174c42
authored
Jan 29, 2021
by
Weber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixing Weber left over data types from chat, cms and other packages
parent
b94f7fd1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
upgrade-5.9.1d3-5.9.1d4.sql
sql/postgresql/upgrade/upgrade-5.9.1d3-5.9.1d4.sql
+32
-0
upgrade-5.9.1d8-5.9.1d9.sql
sql/postgresql/upgrade/upgrade-5.9.1d8-5.9.1d9.sql
+5
-0
No files found.
sql/postgresql/upgrade/upgrade-5.9.1d3-5.9.1d4.sql
View file @
78174c42
...
@@ -91,6 +91,37 @@ END;
...
@@ -91,6 +91,37 @@ END;
$$
LANGUAGE
plpgsql
;
$$
LANGUAGE
plpgsql
;
-- fraber 2021-01-26: Issues upgrading Weber
--
create
or
replace
function
inline_0
()
returns
integer
as
$
body
$
declare
row
RECORD
;
BEGIN
FOR
row
IN
select
ot
.
object_type
,
ot
.
table_name
from
acs_object_types
ot
where
not
exists
(
select
*
from
information_schema
.
tables
ist
where
lower
(
ot
.
table_name
)
=
lower
(
ist
.
table_name
)
)
and
object_type
in
(
'ams_object_revision'
,
'journal_article'
,
'journal_issue'
,
'news_item'
)
order
by
ot
.
object_type
LOOP
delete
from
acs_attributes
where
object_type
=
row
.
object_type
;
delete
from
im_rest_object_types
where
object_type
=
row
.
object_type
;
delete
from
acs_objects
where
object_type
=
row
.
object_type
;
delete
from
acs_object_types
where
object_type
=
row
.
object_type
;
END
LOOP
;
return
0
;
end
;
$
body
$
language
'plpgsql'
;
select
inline_0
();
drop
function
inline_0
();
-- upgrade types
-- upgrade types
WITH
RECURSIVE
cr_types
as
(
WITH
RECURSIVE
cr_types
as
(
...
@@ -99,3 +130,4 @@ UNION ALL
...
@@ -99,3 +130,4 @@ UNION ALL
select
ot
.
object_type
from
acs_object_types
ot
,
cr_types
select
ot
.
object_type
from
acs_object_types
ot
,
cr_types
where
ot
.
supertype
=
cr_types
.
object_type
where
ot
.
supertype
=
cr_types
.
object_type
)
select
object_type
,
content_type__refresh_view
(
object_type
)
from
cr_types
;
)
select
object_type
,
content_type__refresh_view
(
object_type
)
from
cr_types
;
sql/postgresql/upgrade/upgrade-5.9.1d8-5.9.1d9.sql
View file @
78174c42
...
@@ -23,6 +23,11 @@ FOREIGN KEY (child_id) REFERENCES cr_items(item_id) ON DELETE CASCADE;
...
@@ -23,6 +23,11 @@ FOREIGN KEY (child_id) REFERENCES cr_items(item_id) ON DELETE CASCADE;
--
--
-- Add FK constraints for cr_item_rels with cascade operations
-- Add FK constraints for cr_item_rels with cascade operations
--
--
-- fraber 2021-01-26: Issues upgrading Weber
delete
from
cr_item_rels
where
item_id
in
(
select
item_id
from
cr_item_rels
cir
where
not
exists
(
select
*
from
cr_items
ci
where
ci
.
item_id
=
cir
.
item_id
));
ALTER
TABLE
cr_item_rels
DROP
CONSTRAINT
IF
EXISTS
cr_item_rels_item_id_fk
;
ALTER
TABLE
cr_item_rels
DROP
CONSTRAINT
IF
EXISTS
cr_item_rels_item_id_fk
;
ALTER
TABLE
cr_item_rels
ADD
CONSTRAINT
cr_item_rels_item_id_fk
ALTER
TABLE
cr_item_rels
ADD
CONSTRAINT
cr_item_rels_item_id_fk
FOREIGN
KEY
(
item_id
)
REFERENCES
cr_items
(
item_id
)
ON
DELETE
CASCADE
;
FOREIGN
KEY
(
item_id
)
REFERENCES
cr_items
(
item_id
)
ON
DELETE
CASCADE
;
...
...
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