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
facca9fa
Commit
facca9fa
authored
Mar 13, 2015
by
Marco Pivetta
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #815 from Wilt/patch-1
Fix for inconsistent use of getSQLDeclaration
parents
6b6143ba
1f08072e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
7 deletions
+7
-7
types.rst
docs/en/reference/types.rst
+1
-1
AbstractPlatform.php
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
+1
-1
OraclePlatform.php
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
+1
-1
PostgreSqlPlatform.php
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
+2
-2
SQLServerPlatform.php
lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
+1
-1
SQLAzureFederationsSynchronizer.php
...BAL/Sharding/SQLAzure/SQLAzureFederationsSynchronizer.php
+1
-1
No files found.
docs/en/reference/types.rst
View file @
facca9fa
...
@@ -820,7 +820,7 @@ Now we implement our ``Doctrine\DBAL\Types\Type`` instance:
...
@@ -820,7 +820,7 @@ Now we implement our ``Doctrine\DBAL\Types\Type`` instance:
{
{
const MONEY = 'money'; // modify to match your type name
const MONEY = 'money'; // modify to match your type name
public function getS
ql
Declaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getS
QL
Declaration(array $fieldDeclaration, AbstractPlatform $platform)
{
{
return 'MyMoney';
return 'MyMoney';
}
}
...
...
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
View file @
facca9fa
...
@@ -2206,7 +2206,7 @@ abstract class AbstractPlatform
...
@@ -2206,7 +2206,7 @@ abstract class AbstractPlatform
$check
=
(
isset
(
$field
[
'check'
])
&&
$field
[
'check'
])
?
$check
=
(
isset
(
$field
[
'check'
])
&&
$field
[
'check'
])
?
' '
.
$field
[
'check'
]
:
''
;
' '
.
$field
[
'check'
]
:
''
;
$typeDecl
=
$field
[
'type'
]
->
getS
ql
Declaration
(
$field
,
$this
);
$typeDecl
=
$field
[
'type'
]
->
getS
QL
Declaration
(
$field
,
$this
);
$columnDef
=
$typeDecl
.
$charset
.
$default
.
$notnull
.
$unique
.
$check
.
$collation
;
$columnDef
=
$typeDecl
.
$charset
.
$default
.
$notnull
.
$unique
.
$check
.
$collation
;
}
}
...
...
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
View file @
facca9fa
...
@@ -890,7 +890,7 @@ END;';
...
@@ -890,7 +890,7 @@ END;';
$check
=
(
isset
(
$field
[
'check'
])
&&
$field
[
'check'
])
?
$check
=
(
isset
(
$field
[
'check'
])
&&
$field
[
'check'
])
?
' '
.
$field
[
'check'
]
:
''
;
' '
.
$field
[
'check'
]
:
''
;
$typeDecl
=
$field
[
'type'
]
->
getS
ql
Declaration
(
$field
,
$this
);
$typeDecl
=
$field
[
'type'
]
->
getS
QL
Declaration
(
$field
,
$this
);
$columnDef
=
$typeDecl
.
$default
.
$notnull
.
$unique
.
$check
;
$columnDef
=
$typeDecl
.
$default
.
$notnull
.
$unique
.
$check
;
}
}
...
...
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
View file @
facca9fa
...
@@ -504,7 +504,7 @@ class PostgreSqlPlatform extends AbstractPlatform
...
@@ -504,7 +504,7 @@ class PostgreSqlPlatform extends AbstractPlatform
$type
=
$column
->
getType
();
$type
=
$column
->
getType
();
// here was a server version check before, but DBAL API does not support this anymore.
// here was a server version check before, but DBAL API does not support this anymore.
$query
=
'ALTER '
.
$oldColumnName
.
' TYPE '
.
$type
->
getS
ql
Declaration
(
$column
->
toArray
(),
$this
);
$query
=
'ALTER '
.
$oldColumnName
.
' TYPE '
.
$type
->
getS
QL
Declaration
(
$column
->
toArray
(),
$this
);
$sql
[]
=
'ALTER TABLE '
.
$diff
->
getName
(
$this
)
->
getQuotedName
(
$this
)
.
' '
.
$query
;
$sql
[]
=
'ALTER TABLE '
.
$diff
->
getName
(
$this
)
->
getQuotedName
(
$this
)
.
' '
.
$query
;
}
}
...
@@ -546,7 +546,7 @@ class PostgreSqlPlatform extends AbstractPlatform
...
@@ -546,7 +546,7 @@ class PostgreSqlPlatform extends AbstractPlatform
}
}
if
(
$columnDiff
->
hasChanged
(
'length'
))
{
if
(
$columnDiff
->
hasChanged
(
'length'
))
{
$query
=
'ALTER '
.
$oldColumnName
.
' TYPE '
.
$column
->
getType
()
->
getS
ql
Declaration
(
$column
->
toArray
(),
$this
);
$query
=
'ALTER '
.
$oldColumnName
.
' TYPE '
.
$column
->
getType
()
->
getS
QL
Declaration
(
$column
->
toArray
(),
$this
);
$sql
[]
=
'ALTER TABLE '
.
$diff
->
getName
(
$this
)
->
getQuotedName
(
$this
)
.
' '
.
$query
;
$sql
[]
=
'ALTER TABLE '
.
$diff
->
getName
(
$this
)
->
getQuotedName
(
$this
)
.
' '
.
$query
;
}
}
}
}
...
...
lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
View file @
facca9fa
...
@@ -1517,7 +1517,7 @@ class SQLServerPlatform extends AbstractPlatform
...
@@ -1517,7 +1517,7 @@ class SQLServerPlatform extends AbstractPlatform
$check
=
(
isset
(
$field
[
'check'
])
&&
$field
[
'check'
])
?
$check
=
(
isset
(
$field
[
'check'
])
&&
$field
[
'check'
])
?
' '
.
$field
[
'check'
]
:
''
;
' '
.
$field
[
'check'
]
:
''
;
$typeDecl
=
$field
[
'type'
]
->
getS
ql
Declaration
(
$field
,
$this
);
$typeDecl
=
$field
[
'type'
]
->
getS
QL
Declaration
(
$field
,
$this
);
$columnDef
=
$typeDecl
.
$collation
.
$notnull
.
$unique
.
$check
;
$columnDef
=
$typeDecl
.
$collation
.
$notnull
.
$unique
.
$check
;
}
}
...
...
lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureFederationsSynchronizer.php
View file @
facca9fa
...
@@ -290,7 +290,7 @@ class SQLAzureFederationsSynchronizer extends AbstractSchemaSynchronizer
...
@@ -290,7 +290,7 @@ class SQLAzureFederationsSynchronizer extends AbstractSchemaSynchronizer
private
function
getCreateFederationStatement
()
private
function
getCreateFederationStatement
()
{
{
$federationType
=
Type
::
getType
(
$this
->
shardManager
->
getDistributionType
());
$federationType
=
Type
::
getType
(
$this
->
shardManager
->
getDistributionType
());
$federationTypeSql
=
$federationType
->
getS
ql
Declaration
(
array
(),
$this
->
conn
->
getDatabasePlatform
());
$federationTypeSql
=
$federationType
->
getS
QL
Declaration
(
array
(),
$this
->
conn
->
getDatabasePlatform
());
return
"--Create Federation
\n
"
.
return
"--Create Federation
\n
"
.
"CREATE FEDERATION "
.
$this
->
shardManager
->
getFederationName
()
.
" ("
.
$this
->
shardManager
->
getDistributionKey
()
.
" "
.
$federationTypeSql
.
" RANGE)"
;
"CREATE FEDERATION "
.
$this
->
shardManager
->
getFederationName
()
.
" ("
.
$this
->
shardManager
->
getDistributionKey
()
.
" "
.
$federationTypeSql
.
" RANGE)"
;
...
...
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