Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Tomáš Trávníček
doctrine-dbal
Commits
30458e8a
Commit
30458e8a
authored
Feb 20, 2011
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DBAL-42] Fix ALTER TABLE with Comments for Oracle and PostgreSQL.
parent
6e0bf10e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
OraclePlatform.php
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
+4
-4
PostgreSqlPlatform.php
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
+4
-4
No files found.
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
View file @
30458e8a
...
...
@@ -506,8 +506,8 @@ LEFT JOIN all_cons_columns r_cols
$fields
=
array
();
foreach
(
$diff
->
addedColumns
AS
$column
)
{
$fields
[]
=
$this
->
getColumnDeclarationSQL
(
$column
->
getQuotedName
(
$this
),
$column
->
toArray
());
if
(
$co
lumn
->
getComment
(
))
{
$commentsSQL
[]
=
$this
->
getCommentOnColumnSQL
(
$diff
->
name
,
$column
->
getName
(),
$
this
->
getColumnComment
(
$column
)
);
if
(
$co
mment
=
$this
->
getColumnComment
(
$column
))
{
$commentsSQL
[]
=
$this
->
getCommentOnColumnSQL
(
$diff
->
name
,
$column
->
getName
(),
$
comment
);
}
}
if
(
count
(
$fields
))
{
...
...
@@ -518,8 +518,8 @@ LEFT JOIN all_cons_columns r_cols
foreach
(
$diff
->
changedColumns
AS
$columnDiff
)
{
$column
=
$columnDiff
->
column
;
$fields
[]
=
$column
->
getQuotedName
(
$this
)
.
' '
.
$this
->
getColumnDeclarationSQL
(
''
,
$column
->
toArray
());
if
(
$columnDiff
->
hasChanged
(
'comment'
)
&&
$co
lumn
->
getComment
(
))
{
$commentsSQL
[]
=
$this
->
getCommentOnColumnSQL
(
$diff
->
name
,
$column
->
getName
(),
$
this
->
getColumnComment
(
$column
)
);
if
(
$columnDiff
->
hasChanged
(
'comment'
)
&&
$co
mment
=
$this
->
getColumnComment
(
$column
))
{
$commentsSQL
[]
=
$this
->
getCommentOnColumnSQL
(
$diff
->
name
,
$column
->
getName
(),
$
comment
);
}
}
if
(
count
(
$fields
))
{
...
...
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
View file @
30458e8a
...
...
@@ -353,8 +353,8 @@ class PostgreSqlPlatform extends AbstractPlatform
foreach
(
$diff
->
addedColumns
as
$column
)
{
$query
=
'ADD '
.
$this
->
getColumnDeclarationSQL
(
$column
->
getQuotedName
(
$this
),
$column
->
toArray
());
$sql
[]
=
'ALTER TABLE '
.
$diff
->
name
.
' '
.
$query
;
if
(
$co
lumn
->
getComment
(
))
{
$commentsSQL
[]
=
$this
->
getCommentOnColumnSQL
(
$diff
->
name
,
$column
->
getName
(),
$
this
->
getColumnComment
(
$column
)
);
if
(
$co
mment
=
$this
->
getColumnComment
(
$column
))
{
$commentsSQL
[]
=
$this
->
getCommentOnColumnSQL
(
$diff
->
name
,
$column
->
getName
(),
$
comment
);
}
}
...
...
@@ -397,8 +397,8 @@ class PostgreSqlPlatform extends AbstractPlatform
$sql
[]
=
"ALTER TABLE "
.
$diff
->
name
.
" "
.
$query
;
}
}
if
(
$columnDiff
->
hasChanged
(
'comment'
)
&&
$co
lumn
->
getComment
(
))
{
$commentsSQL
[]
=
$this
->
getCommentOnColumnSQL
(
$diff
->
name
,
$column
->
getName
(),
$
this
->
getColumnComment
(
$column
)
);
if
(
$columnDiff
->
hasChanged
(
'comment'
)
&&
$co
mment
=
$this
->
getColumnComment
(
$column
))
{
$commentsSQL
[]
=
$this
->
getCommentOnColumnSQL
(
$diff
->
name
,
$column
->
getName
(),
$
comment
);
}
}
...
...
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