octicon-git-branch(16/) Commit Graph

755 Commits

Author SHA1 Message Date
Carsten Brandt
34d5b45b35 proper fix for #8844, convert array before using it
fixes #9415
2015-08-14 12:26:36 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Nikola Kovacs
316e95b81d Remove length from SchemaBuilderTrait::text.
close #9307
2015-08-05 22:50:46 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Michael Härtl
b071587e0a Improve docs for bindParam() $value 2015-08-04 16:08:38 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
abc7dbbf0f added missing @since annotations 2015-08-04 12:40:12 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
41b25e94b0 improved parameter naming and documentation of schemabuilder
changes according to #9191
close #9191
2015-08-04 11:58:41 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
681db52ba6 refactored SchemaBuilder
- rename class to ColumnSchemaBuilder as this is more appropriate
- changed internal organisation to match how the rest of schema related classes work
  - the ColumnSchemaBuilder is now created the same way as QueryBuilder is
- removed static call magic and method annotations, now real methods are called as they are
- the whole code works on objects in a db context now instead of setting database connection in global state
- trait is now used by Migration by default but can be used in other contexts as well

Migration usage is now as follows:

```php
$this->createTable('example_table', [
  'id' => $this->primaryKey(),
  'name' => $this->string(64)->notNull(),
  'type' => $this->integer()->notNull()->defaultValue(10),
  'description' => $this->text(),
  'rule_name' => $this->string(64),
  'data' => $this->text(),
  'created_at' => $this->datetime()->notNull(),
  'updated_at' => $this->datetime(),
]);
```
2015-08-03 23:25:50 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
1948754d00 phpdoc and slight refactoring of SchemaBuilder 2015-08-03 17:38:13 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
d8bb724ec7 changed method visibility, fixed test break 2015-08-03 12:37:58 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
7150e830d9 do not use reserved php words as function in schemabuilder
there is a reason for them to be reserved, we should not add such workarounds to still use them.

close #9283
2015-08-03 11:21:58 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
8cfc89b21c adjusted pgsql/QueryBuilder batchInsert to match parent implementation
this also fixes #8551
2015-08-02 23:20:52 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
6e3da6b329 various phpdoc fixes 2015-08-02 22:53:08 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
a2568d1ec8 updated some comments and @since annotations 2015-08-02 19:56:49 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
6d9fe671de various code style and whitespace adjustments 2015-08-02 00:27:19 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
310f9152e1 Fixes #9268: Improved display of boolean parameters in logged SQL queries 2015-08-01 00:30:16 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
972165ccec Fixes #9006: Fixed bit column always returning true using certain version of PDO MySQL 2015-07-31 03:19:23 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
nidgetgod
b8fefe513c fixed: Oracle 11g 11.2.0.1.0 ORA-03113: end-of-file on communication channel
This is a workaround for an oracle bug:
https://code.google.com/p/yii/issues/detail?id=1779

close #8844
2015-07-26 02:08:47 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
bad507c459 Fixes #9063: Workaround for MySQL losing table case when adding index 2015-07-17 08:41:39 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Sitawit Suteepohnwiroj
5af6105ea7 Fixes #9127, Fixes #9128: Fixed MSSQL QueryBuilder::renameColumn() and QueryBuilder::renameTable() escaping 2015-07-16 18:22:40 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Sebastian Thierer
e0d2107e1b Mysql unique index creation fix. 2015-07-10 12:27:15 -03:00 octicon-file-diff(16/) octicon-file-code(16/)
Sebastian Thierer
82fbb568e0 Fix for 9056 2015-07-09 11:52:33 -03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
e88170ab82 Fixed phpdoc of SchemaBuilder 2015-07-09 00:17:26 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
8e1d982da4 Cleanup, added ->unique(), changelog 2015-07-08 15:55:09 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
pana1990
12ca324494 Fix phpdoc [skip ci] 2015-07-08 15:40:09 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Matvey Vasenin
da941a7675 Improved SchemaBuilder implementation 2015-07-08 15:40:09 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
pana1990
3f7ffd6707 Improved SchemaBuilder docs, refactored code 2015-07-08 15:39:34 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Matvey Vasenin
b456f699cc Implemented SchemaBuilder 2015-07-08 15:38:21 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Yasser Hassan
1df3bb29ea Clarify escaping column name quoting in createIndex()
Added information about when column names are not quoted when using createIndex() as discussed in #9017. "left parenthesis" was used rather than just "parenthesis" to reflect the exact code working.
2015-07-06 12:41:07 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
9c4c984200 improved docs and changelog for #8903 2015-07-02 15:20:32 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Aleksey Loban
db12282e59 \yii\db\pgsql\QueryBuilder add createIndex() for the creating specific indexes
close #8903
2015-07-02 15:05:33 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Mohorev
68c30c1034 Replace aliases of functions 2015-06-29 22:59:22 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
abe1094ac9 fixed querybuilder phpdoc 2015-06-24 14:20:02 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
d0c6cb7700 abort removing duplicate records when pk is not in result set
in this cases it does not make sense to remove duplicates as the result is not on record level anymore.
This could be the case after GROUP BY has been applied.

fixes #8772
2015-06-14 19:29:57 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
30f003381d revised AR documentation
fixed some incorrectness in update() and insert() and also fixes #8761
2015-06-12 00:55:12 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Qiang Xue
3e295a9dba Merge pull request #8712 from mongosoft/master
PSR-2 code style fixes
2015-06-08 20:13:14 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Mohorev
afe21a986a PSR-2 anonymous functions 2015-06-09 00:14:44 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Mohorev
ae42a054bb PSR-2 spaces, commas, etc 2015-06-09 00:05:06 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Mohorev
789cdfea86 PSR-2 switch statement 2015-06-08 23:28:44 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Paul Klimov
28877f8e99 Merge pull request #8652 from klimov-paul/8627-invalidate-table-schema-cache
Fix #8627: invalidate table schema cache on DDL
2015-06-08 21:18:58 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Mohorev
651ed4ee2c Undefined class NotSupportedException 2015-06-08 16:11:16 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Mohorev
2134c72bb0 Undefined class Expression 2015-06-08 16:10:41 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Mohorev
2288f339e6 Parameter type is not compatible with declaration 2015-06-08 16:07:27 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Klimov Paul
e683e3e79d Schema refresh moved to Migration::init(). 2015-06-08 11:32:09 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Paul Klimov
8e4518c81f Doc comments updated 2015-06-06 13:05:43 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Paul Klimov
0bfa2e2673 Reset of refreshTableName on yii\db\Command reuse ensured 2015-06-06 12:58:36 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
f68e970de2 link to PHP classes just as we do with normal classes
apidoc can handle this!
2015-06-05 21:53:24 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
ec76a3015a use yii\base\Event in BaseAR to fix phpdoc reference 2015-06-05 21:26:55 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Klimov Paul
6ea19e8f45 Schema refreshing added to yii\db\Migration::execute() 2015-06-04 13:56:23 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Klimov Paul
72f9e63e10 Table schema auto refreshing on DDL added to yii\db\Command 2015-06-04 13:53:11 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Klimov Paul
fb0062114e Method yii\db\Schema::refreshTableSchema() added 2015-06-04 12:57:16 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Klimov Paul
0d48f1041e Fixed yii\db\Command::getRawSql() unable to parse params specified without colon (':') 2015-06-02 13:45:28 +03:00 octicon-file-diff(16/) octicon-file-code(16/)