-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into allow_scalars
- Loading branch information
Showing
14 changed files
with
77 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
# Upgrading Instructions for Yii Database | ||
|
||
This file contains the upgrade notes for the Yii Database. | ||
These notes highlight changes that could break your application when you upgrade it from one version to another. | ||
Even though we try to ensure backwards compatibility (BC) as much as possible, sometimes | ||
it isn't possible or very complicated to avoid it and still create a good solution to | ||
a problem. While upgrade to Yii 3.0 might require substantial changes to both your application and extensions, | ||
the changes are bearable and require "refactoring", not "rewrite". | ||
All the "Yes, it is" cool stuff, and Yii soul is still in place. | ||
The following upgrading instructions are cumulative. That is, if you want to upgrade from version A to version C and | ||
there is version B between A and C, you need to following the instructions for both A and B. | ||
|
||
Changes summary: | ||
## Upgrade from 1.x to 2.x | ||
|
||
## 1.x to 2.0 | ||
* `$columns` parameter of `Query::select()` and `Query::addSelect()` methods can also accept scalar values of `bool`, | ||
`float` or `int` types or array with scalar values. For example, `$query->select(1)` will be converted to `SELECT 1`. | ||
* Add `ColumnInterface` support and change type of parameter `$type` from `string` to `ColumnInterface|string` | ||
in `addColumn()` method of your classes that implement the following interfaces: | ||
|
||
## Yii2 to 1.0 | ||
* `Yiisoft\Db\Connection::$charset` has been removed. All supported PDO classes allow you to specify the connection | ||
charset in the DSN. | ||
- `Yiisoft\Db\Command\CommandInterface`; | ||
- `Yiisoft\Db\QueryBuilder\DDLQueryBuilderInterface`; | ||
|
||
… or inherit from the following classes: | ||
|
||
- `Yiisoft\Db\Command\AbstractCommand`; | ||
- `Yiisoft\Db\QueryBuilder\AbstractDDLQueryBuilder`; | ||
- `Yiisoft\Db\QueryBuilder\AbstractQueryBuilder`. | ||
|
||
`$columns` parameter of `Query::select()` and `Query::addSelect()` methods can also accept scalar values of `bool`, | ||
`float` or `int` types or array with scalar values. For example, `$query->select(1)` will be converted to `SELECT 1`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters