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
854a67da
Commit
854a67da
authored
Jan 09, 2012
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DBAL-197 - Add blob to registered mapping types and test on all platforms.
parent
32574598
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
4 deletions
+24
-4
MsSqlPlatform.php
lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php
+1
-1
MySqlPlatform.php
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
+4
-0
OraclePlatform.php
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
+1
-0
PostgreSqlPlatform.php
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
+1
-0
SqlitePlatform.php
lib/Doctrine/DBAL/Platforms/SqlitePlatform.php
+1
-0
PostgreSqlSchemaManager.php
lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php
+2
-3
SchemaManagerFunctionalTestCase.php
...BAL/Functional/Schema/SchemaManagerFunctionalTestCase.php
+14
-0
No files found.
lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php
View file @
854a67da
...
@@ -764,7 +764,7 @@ class MsSqlPlatform extends AbstractPlatform
...
@@ -764,7 +764,7 @@ class MsSqlPlatform extends AbstractPlatform
'nvarchar'
=>
'string'
,
'nvarchar'
=>
'string'
,
'ntext'
=>
'text'
,
'ntext'
=>
'text'
,
'binary'
=>
'text'
,
'binary'
=>
'text'
,
'varbinary'
=>
'
text
'
,
'varbinary'
=>
'
blob
'
,
'image'
=>
'text'
,
'image'
=>
'text'
,
);
);
}
}
...
...
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
View file @
854a67da
...
@@ -679,6 +679,10 @@ class MySqlPlatform extends AbstractPlatform
...
@@ -679,6 +679,10 @@ class MySqlPlatform extends AbstractPlatform
'decimal'
=>
'decimal'
,
'decimal'
=>
'decimal'
,
'numeric'
=>
'decimal'
,
'numeric'
=>
'decimal'
,
'year'
=>
'date'
,
'year'
=>
'date'
,
'longblob'
=>
'blob'
,
'blob'
=>
'blob'
,
'mediumblob'
=>
'blob'
,
'tinyblob'
=>
'blob'
,
);
);
}
}
...
...
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
View file @
854a67da
...
@@ -811,6 +811,7 @@ LEFT JOIN all_cons_columns r_cols
...
@@ -811,6 +811,7 @@ LEFT JOIN all_cons_columns r_cols
'long raw'
=>
'text'
,
'long raw'
=>
'text'
,
'rowid'
=>
'string'
,
'rowid'
=>
'string'
,
'urowid'
=>
'string'
,
'urowid'
=>
'string'
,
'blob'
=>
'blob'
,
);
);
}
}
...
...
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
View file @
854a67da
...
@@ -767,6 +767,7 @@ class PostgreSqlPlatform extends AbstractPlatform
...
@@ -767,6 +767,7 @@ class PostgreSqlPlatform extends AbstractPlatform
'money'
=>
'decimal'
,
'money'
=>
'decimal'
,
'numeric'
=>
'decimal'
,
'numeric'
=>
'decimal'
,
'year'
=>
'date'
,
'year'
=>
'date'
,
'bytea'
=>
'blob'
,
);
);
}
}
...
...
lib/Doctrine/DBAL/Platforms/SqlitePlatform.php
View file @
854a67da
...
@@ -479,6 +479,7 @@ class SqlitePlatform extends AbstractPlatform
...
@@ -479,6 +479,7 @@ class SqlitePlatform extends AbstractPlatform
'real'
=>
'float'
,
'real'
=>
'float'
,
'decimal'
=>
'decimal'
,
'decimal'
=>
'decimal'
,
'numeric'
=>
'decimal'
,
'numeric'
=>
'decimal'
,
'blob'
=>
'blob'
,
);
);
}
}
...
...
lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php
View file @
854a67da
...
@@ -276,9 +276,8 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
...
@@ -276,9 +276,8 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
$precision
=
null
;
$precision
=
null
;
$scale
=
null
;
$scale
=
null
;
if
(
$this
->
_platform
->
hasDoctrineTypeMappingFor
(
$tableColumn
[
'type'
]))
{
$dbType
=
strtolower
(
$tableColumn
[
'type'
]);
$dbType
=
strtolower
(
$tableColumn
[
'type'
]);
if
(
strlen
(
$tableColumn
[
'domain_type'
]))
{
}
else
{
$dbType
=
strtolower
(
$tableColumn
[
'domain_type'
]);
$dbType
=
strtolower
(
$tableColumn
[
'domain_type'
]);
$tableColumn
[
'complete_type'
]
=
$tableColumn
[
'domain_complete_type'
];
$tableColumn
[
'complete_type'
]
=
$tableColumn
[
'domain_complete_type'
];
}
}
...
...
tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php
View file @
854a67da
...
@@ -547,6 +547,20 @@ class SchemaManagerFunctionalTestCase extends \Doctrine\Tests\DbalFunctionalTest
...
@@ -547,6 +547,20 @@ class SchemaManagerFunctionalTestCase extends \Doctrine\Tests\DbalFunctionalTest
$this
->
assertInstanceOf
(
'Doctrine\DBAL\Types\ArrayType'
,
$columns
[
'arr'
]
->
getType
(),
"The Doctrine2 should be detected from comment hint."
);
$this
->
assertInstanceOf
(
'Doctrine\DBAL\Types\ArrayType'
,
$columns
[
'arr'
]
->
getType
(),
"The Doctrine2 should be detected from comment hint."
);
}
}
/**
* @group DBAL-197
*/
public
function
testListTableWithBlob
()
{
$table
=
new
\Doctrine\DBAL\Schema\Table
(
'test_blob_table'
);
$table
->
addColumn
(
'id'
,
'integer'
,
array
(
'comment'
=>
'This is a comment'
));
$table
->
addColumn
(
'binarydata'
,
'blob'
,
array
());
$table
->
setPrimaryKey
(
array
(
'id'
));
$this
->
_sm
->
createTable
(
$table
);
$blobTable
=
$this
->
_sm
->
listTableDetails
(
'test_blob_table'
);
}
/**
/**
* @param string $name
* @param string $name
* @param array $data
* @param array $data
...
...
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