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
8f5691bd
Commit
8f5691bd
authored
Dec 03, 2014
by
Gareth Evans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use name rather than index object
parent
88549007
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
AbstractPlatform.php
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
+4
-2
No files found.
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
View file @
8f5691bd
...
@@ -2308,12 +2308,13 @@ abstract class AbstractPlatform
...
@@ -2308,12 +2308,13 @@ abstract class AbstractPlatform
public
function
getUniqueConstraintDeclarationSQL
(
$name
,
Index
$index
)
public
function
getUniqueConstraintDeclarationSQL
(
$name
,
Index
$index
)
{
{
$columns
=
$index
->
getQuotedColumns
(
$this
);
$columns
=
$index
->
getQuotedColumns
(
$this
);
$name
=
new
Identifier
(
$name
);
if
(
count
(
$columns
)
===
0
)
{
if
(
count
(
$columns
)
===
0
)
{
throw
new
\InvalidArgumentException
(
"Incomplete definition. 'columns' required."
);
throw
new
\InvalidArgumentException
(
"Incomplete definition. 'columns' required."
);
}
}
return
'CONSTRAINT '
.
$
index
->
getQuotedName
(
$this
)
.
' UNIQUE ('
return
'CONSTRAINT '
.
$
name
->
getQuotedName
(
$this
)
.
' UNIQUE ('
.
$this
->
getIndexFieldDeclarationListSQL
(
$columns
)
.
$this
->
getIndexFieldDeclarationListSQL
(
$columns
)
.
')'
.
$this
->
getPartialIndexSQL
(
$index
);
.
')'
.
$this
->
getPartialIndexSQL
(
$index
);
}
}
...
@@ -2332,12 +2333,13 @@ abstract class AbstractPlatform
...
@@ -2332,12 +2333,13 @@ abstract class AbstractPlatform
public
function
getIndexDeclarationSQL
(
$name
,
Index
$index
)
public
function
getIndexDeclarationSQL
(
$name
,
Index
$index
)
{
{
$columns
=
$index
->
getQuotedColumns
(
$this
);
$columns
=
$index
->
getQuotedColumns
(
$this
);
$name
=
new
Identifier
(
$name
);
if
(
count
(
$columns
)
===
0
)
{
if
(
count
(
$columns
)
===
0
)
{
throw
new
\InvalidArgumentException
(
"Incomplete definition. 'columns' required."
);
throw
new
\InvalidArgumentException
(
"Incomplete definition. 'columns' required."
);
}
}
return
$this
->
getCreateIndexSQLFlags
(
$index
)
.
'INDEX '
.
$
index
->
getQuotedName
(
$this
)
.
' ('
return
$this
->
getCreateIndexSQLFlags
(
$index
)
.
'INDEX '
.
$
name
->
getQuotedName
(
$this
)
.
' ('
.
$this
->
getIndexFieldDeclarationListSQL
(
$columns
)
.
$this
->
getIndexFieldDeclarationListSQL
(
$columns
)
.
')'
.
$this
->
getPartialIndexSQL
(
$index
);
.
')'
.
$this
->
getPartialIndexSQL
(
$index
);
}
}
...
...
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