Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
flyway
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
olmdm
flyway
Commits
66aadcf7
Commit
66aadcf7
authored
Sep 05, 2025
by
zhoufensong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释flyway对PostgreSQL重置角色为初始化值的操作
parent
c548d507
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
flyway-core/src/main/java/org/flywaydb/core/internal/database/postgresql/PostgreSQLConnection.java
+2
-3
No files found.
flyway-core/src/main/java/org/flywaydb/core/internal/database/postgresql/PostgreSQLConnection.java
View file @
66aadcf7
...
@@ -44,7 +44,7 @@ public class PostgreSQLConnection extends Connection<PostgreSQLDatabase> {
...
@@ -44,7 +44,7 @@ public class PostgreSQLConnection extends Connection<PostgreSQLDatabase> {
@Override
@Override
protected
void
doRestoreOriginalState
()
throws
SQLException
{
protected
void
doRestoreOriginalState
()
throws
SQLException
{
// Reset the role to its original value in case a migration or callback changed it
// Reset the role to its original value in case a migration or callback changed it
jdbcTemplate
.
execute
(
"SET ROLE '"
+
originalRole
+
"'"
);
//
jdbcTemplate.execute("SET ROLE '" + originalRole + "'");
}
}
@Override
@Override
...
@@ -98,4 +98,4 @@ public class PostgreSQLConnection extends Connection<PostgreSQLDatabase> {
...
@@ -98,4 +98,4 @@ public class PostgreSQLConnection extends Connection<PostgreSQLDatabase> {
public
<
T
>
T
lock
(
Table
table
,
Callable
<
T
>
callable
)
{
public
<
T
>
T
lock
(
Table
table
,
Callable
<
T
>
callable
)
{
return
new
PostgreSQLAdvisoryLockTemplate
(
jdbcTemplate
,
table
.
toString
().
hashCode
()).
execute
(
callable
);
return
new
PostgreSQLAdvisoryLockTemplate
(
jdbcTemplate
,
table
.
toString
().
hashCode
()).
execute
(
callable
);
}
}
}
}
\ No newline at end of file
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