Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 138 lines (92 sloc) 4.823 kb
7fbeaea @beberlei Update UPGRADE with last change
beberlei authored
1 # Upgrade to 2.3
2
4cc70c1 @schmittjoh improved exception messages when driver error occurs
schmittjoh authored
3 ## Doctrine\DBAL\Connection and Doctrine\DBAL\Statement
4
5 The query related methods including but not limited to executeQuery, exec, query, and executeUpdate
6 now wrap the driver exceptions such as PDOException with DBALException to add more debugging
7 information such as the executed SQL statement, and any bound parameters.
8
9 If you want to retrieve the driver specific exception, you can retrieve it by calling the
10 ``getPrevious()`` method on DBALException.
11
9fcd78d @schmittjoh added before/after example
schmittjoh authored
12 Before:
13
14 catch(\PDOException $ex) {
15 // ...
16 }
17
18 After:
19
20 catch(\Doctrine\DBAL\DBALException $ex) {
21 $pdoException = $ex->getPrevious();
22 // ...
23 }
24
ab57a01 @beberlei [DBAL-243] Remove Connection#setCharset()
beberlei authored
25 ## Doctrine\DBAL\Connection#setCharsetSQL() removed
26
27 This method only worked on MySQL and it is considered unsafe on MySQL to use SET NAMES UTF-8 instead
28 of setting the charset directly on connection already. Replace this behavior with the
29 connection charset option:
30
31 Before:
32
33 $conn = DriverManager::getConnection(array(..));
34 $conn->setCharset('UTF8');
35
36 After:
37
38 $conn = DriverManager::getConnection(array('charset' => 'UTF8', ..));
39
9b0bd88 @beberlei Remove Doctrine\DBAL\Table\Schema#renameColumn()
beberlei authored
40 ## Doctrine\DBAL\Schema\Table#renameColumn() removed
41
42 Doctrine\DBAL\Schema\Table#renameColumn() was removed, because it drops and recreates
43 the column instead. There is no fix available, because a schema diff
44 cannot reliably detect if a column was renamed or one column was created
45 and another one dropped.
46
11a2244 @beberlei Add sentence to clarify user solution for last commit
beberlei authored
47 You should use explicit SQL ALTER TABLE statements to change columns names.
48
fc3ead2 @beberlei Add BC break note about latest change
beberlei authored
49 ## Schema Filter paths
50
9b0bd88 @beberlei Remove Doctrine\DBAL\Table\Schema#renameColumn()
beberlei authored
51 The Filter Schema assets expression is not wrapped in () anymore for the regexp automatically.
fc3ead2 @beberlei Add BC break note about latest change
beberlei authored
52
53 Before:
54
55 $config->setFilterSchemaAssetsExpression('foo');
56
57 After:
58
59 $config->setFilterSchemaAssetsExpression('(foo)');
60
7fbeaea @beberlei Update UPGRADE with last change
beberlei authored
61 ## Creating MySQL Tables now defaults to UTF-8
62
63 If you are creating a new MySQL Table through the Doctrine API, charset/collate are
64 now set to 'utf8'/'utf8_general_ci' by default. Previously the MySQL server defaults were used.
65
d919b50 @beberlei DBAL-6 - Add support for BLOBs
beberlei authored
66 # Upgrade to 2.2
67
16a9572 @pborreli Fixed typos
pborreli authored
68 ## Doctrine\DBAL\Connection#insert and Doctrine\DBAL\Connection#update
d919b50 @beberlei DBAL-6 - Add support for BLOBs
beberlei authored
69
70 Both methods now accept an optional last parameter $types with binding types of the values passed.
7101ecd @beberlei Work a little bit on the setFetchMode()/traversable patch from damz
beberlei authored
71 This can potentially break child classes that have overwritten one of these methods.
72
73 ## Doctrine\DBAL\Connection#executeQuery
74
75 Doctrine\DBAL\Connection#executeQuery() got a new last parameter "QueryCacheProfile $qcp"
76
77 ## Doctrine\DBAL\Driver\Statement split
78
79 The Driver statement was split into a ResultStatement and the normal statement extending from it.
16a9572 @pborreli Fixed typos
pborreli authored
80 This separates the configuration and the retrieval API from a statement.
b8033f8 @beberlei [DBAL-203] SQLServerPlatform Refactoring
beberlei authored
81
82 ## MsSql Platform/SchemaManager renamed
83
84 The MsSqlPlatform was renamed to SQLServerPlatform, the MsSqlSchemaManager was renamed
85 to SQLServerSchemaManager.
86
87 ## Cleanup SQLServer Platform version mess
88
89 DBAL 2.1 and before were actually only compatible to SQL Server 2008, not earlier versions.
c878bd0 @beberlei Fix SQL Platform/Schema Manager problems.
beberlei authored
90 Still other parts of the platform did use old features instead of newly introduced datatypes
b8033f8 @beberlei [DBAL-203] SQLServerPlatform Refactoring
beberlei authored
91 in SQL Server 2005. Starting with DBAL 2.2 you can pick the Doctrine abstraction exactly
92 matching your SQL Server version.
93
94 The PDO SqlSrv driver now uses the new `SQLServer2008Platform` as default platform.
95 This platform uses new features of SQL Server as of version 2008. This also includes a switch
96 in the used fields for "text" and "blob" field types to:
97
98 "text" => "VARCHAR(MAX)"
99 "blob" => "VARBINARY(MAX)"
100
101 Additionally `SQLServerPlatform` in DBAL 2.1 and before used "DATE", "TIME" and "DATETIME2" for dates.
102 This types are only available since version 2008 and the introduction of an explicit
103 SQLServer 2008 platform makes this dependency explicit.
104
105 An `SQLServer2005Platform` was also introduced to differentiate the features between
106 versions 2003, earlier and 2005.
107
108 With this change the `SQLServerPlatform` now throws an exception for using limit queries
109 with an offset, since SQLServer 2003 and lower do not support this feature.
110
111 To use the old SQL Server Platform, because you are using SQL Server 2003 and below use
112 the following configuration code:
113
114 use Doctrine\DBAL\DriverManager;
115 use Doctrine\DBAL\Platforms\SQLServerPlatform;
116 use Doctrine\DBAL\Platforms\SQLServer2005Platform;
117
118 // You are using SQL Server 2003 or earlier
119 $conn = DriverManager::getConnection(array(
120 'driver' => 'pdo_sqlsrv',
121 'platform' => new SQLServerPlatform()
122 // .. additional parameters
123 ));
124
125 // You are using SQL Server 2005
126 $conn = DriverManager::getConnection(array(
127 'driver' => 'pdo_sqlsrv',
128 'platform' => new SQLServer2005Platform()
129 // .. additional parameters
130 ));
131
132 // You are using SQL Server 2008
133 $conn = DriverManager::getConnection(array(
134 'driver' => 'pdo_sqlsrv',
135 // 2008 is default platform
136 // .. additional parameters
137 ));
Something went wrong with that request. Please try again.