Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
476ad305
Commit
476ad305
authored
14 years ago
by
buczekp
Browse files
Options
Downloads
Patches
Plain Diff
test: workaround for running tests on hudson with psql 9
SVN: 19497
parent
38286357
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dbmigration/source/java/ch/systemsx/cisd/dbmigration/postgresql/PostgreSQLAdminDAO.java
+17
-20
17 additions, 20 deletions
...temsx/cisd/dbmigration/postgresql/PostgreSQLAdminDAO.java
with
17 additions
and
20 deletions
dbmigration/source/java/ch/systemsx/cisd/dbmigration/postgresql/PostgreSQLAdminDAO.java
+
17
−
20
View file @
476ad305
...
...
@@ -54,15 +54,13 @@ public class PostgreSQLAdminDAO extends AbstractDatabaseAdminDAO
private
static
final
String
CREATE_PLPGSQL
=
"create language plpgsql;"
;
private
static
final
String
CREATE_TABLE_DATABASE_VERSION_LOGS_SQL
=
"create table "
+
DatabaseVersionLogDAO
.
DB_VERSION_LOG
+
" (db_version varchar(4) not null, "
+
"module_name varchar(250), run_status varchar(10), run_status_timestamp timestamp, "
+
"module_code bytea, run_exception bytea);"
;
private
static
final
String
CREATE_TABLE_DATABASE_VERSION_LOGS_SQL
=
"create table "
+
DatabaseVersionLogDAO
.
DB_VERSION_LOG
+
" (db_version varchar(4) not null, "
+
"module_name varchar(250), run_status varchar(10), run_status_timestamp timestamp, "
+
"module_code bytea, run_exception bytea);"
;
private
static
final
Logger
operationLog
=
LogFactory
.
getLogger
(
LogCategory
.
OPERATION
,
PostgreSQLAdminDAO
.
class
);
private
static
final
Logger
operationLog
=
LogFactory
.
getLogger
(
LogCategory
.
OPERATION
,
PostgreSQLAdminDAO
.
class
);
/**
* Creates an instance.
...
...
@@ -140,8 +138,7 @@ public class PostgreSQLAdminDAO extends AbstractDatabaseAdminDAO
}
}
else
{
operationLog
.
error
(
"Database role '"
+
role
+
"' couldn't be created:"
,
ex
);
operationLog
.
error
(
"Database role '"
+
role
+
"' couldn't be created:"
,
ex
);
throw
ex
;
}
}
...
...
@@ -200,15 +197,15 @@ public class PostgreSQLAdminDAO extends AbstractDatabaseAdminDAO
getJdbcTemplate
().
execute
(
CREATE_PLPGSQL
);
}
catch
(
RuntimeException
ex
)
{
if
(
ex
instanceof
DataAccessException
&&
DBUtilities
.
isDuplicateObjectException
((
DataAccessException
)
ex
))
{
operationLog
.
warn
(
"Cannot create language PL/PgSQL since it already exists."
);
}
else
{
operationLog
.
error
(
"Failed to create language PL/PgSQL."
,
ex
);
throw
ex
;
}
//
if (ex instanceof DataAccessException
//
&& DBUtilities.isDuplicateObjectException((DataAccessException) ex))
//
{
//
operationLog.warn("Cannot create language PL/PgSQL since it already exists.");
//
} else
//
{
operationLog
.
error
(
"Failed to create language PL/PgSQL."
,
ex
);
//
throw ex;
//
}
}
}
...
...
@@ -262,7 +259,7 @@ public class PostgreSQLAdminDAO extends AbstractDatabaseAdminDAO
if
(
operationLog
.
isDebugEnabled
())
{
operationLog
.
debug
(
"Searching for mass upload files in directory '"
+
dumpFolder
.
getAbsolutePath
()
+
"'."
);
+
dumpFolder
.
getAbsolutePath
()
+
"'."
);
}
String
[]
csvFiles
=
dumpFolder
.
list
(
new
FilenameFilter
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment