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
5603b741
Commit
5603b741
authored
Dec 16, 2011
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Upgrade:
Deal with the case the cr_text_tr doesn't exist
parent
3cca694a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
upgrade-4.0.2.0.0-4.0.2.0.1.sql
sql/postgresql/upgrade/upgrade-4.0.2.0.0-4.0.2.0.1.sql
+23
-5
No files found.
sql/postgresql/upgrade/upgrade-4.0.2.0.0-4.0.2.0.1.sql
View file @
5603b741
...
...
@@ -13,11 +13,29 @@ where
;
delete
from
cr_text
;
alter
table
cr_text
disable
trigger
cr_text_tr
;
insert
into
cr_text
(
text_data
)
values
(
''
);
alter
table
cr_text
enable
trigger
cr_text_tr
;
create
or
replace
function
file_storage_object__name
(
integer
)
returns
varchar
as
$
body
$
DECLARE
v_count
integer
;
BEGIN
select
count
(
*
)
into
v_count
from
user_tab_columns
where
lower
(
table_name
)
=
'cr_text'
;
IF
0
=
v_count
THEN
return
1
;
END
IF
;
delete
from
cr_text
;
select
count
(
*
)
into
v_count
from
pg_trigger
where
lower
(
tgname
)
=
'cr_text_tr'
;
IF
0
=
v_count
THEN
insert
into
cr_text
(
text_data
)
values
(
''
);
ELSE
alter
table
cr_text
disable
trigger
cr_text_tr
;
insert
into
cr_text
(
text_data
)
values
(
''
);
alter
table
cr_text
enable
trigger
cr_text_tr
;
END
IF
;
RETURN
0
;
END
;
$
body
$
language
'plpgsql'
;
...
...
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