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
7131f844
Commit
7131f844
authored
Dec 11, 2011
by
Jan Sorgalla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplfy code
parent
b80a56d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
AbstractPlatform.php
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
+9
-13
No files found.
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
View file @
7131f844
...
...
@@ -1046,29 +1046,25 @@ abstract class AbstractPlatform
}
}
$tableSql
=
array
();
$defaultPrevented
=
false
;
if
(
null
!==
$this
->
_eventManager
&&
$this
->
_eventManager
->
hasListeners
(
Events
::
onSchemaCreateTable
))
{
$eventArgs
=
new
SchemaCreateTableEventArgs
(
$table
,
$columns
,
$options
,
$this
);
$this
->
_eventManager
->
dispatchEvent
(
Events
::
onSchemaCreateTable
,
$eventArgs
);
$defaultPrevented
=
$eventArgs
->
isDefaultPrevented
();
$tableSql
=
$eventArgs
->
getSql
();
if
(
$eventArgs
->
isDefaultPrevented
())
{
return
array_merge
(
$eventArgs
->
getSql
(),
$columnSql
);
}
}
if
(
!
$defaultPrevented
)
{
$tableSql
=
$this
->
_getCreateTableSQL
(
$tableName
,
$columns
,
$options
);
if
(
$this
->
supportsCommentOnStatement
())
{
foreach
(
$table
->
getColumns
()
AS
$column
)
{
if
(
$column
->
getComment
())
{
$tableSql
[]
=
$this
->
getCommentOnColumnSQL
(
$tableName
,
$column
->
getName
(),
$this
->
getColumnComment
(
$column
));
}
$sql
=
$this
->
_getCreateTableSQL
(
$tableName
,
$columns
,
$options
);
if
(
$this
->
supportsCommentOnStatement
())
{
foreach
(
$table
->
getColumns
()
AS
$column
)
{
if
(
$column
->
getComment
())
{
$sql
[]
=
$this
->
getCommentOnColumnSQL
(
$tableName
,
$column
->
getName
(),
$this
->
getColumnComment
(
$column
));
}
}
}
return
array_merge
(
$
tableS
ql
,
$columnSql
);
return
array_merge
(
$
s
ql
,
$columnSql
);
}
public
function
getCommentOnColumnSQL
(
$tableName
,
$columnName
,
$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