909 Commits

Author SHA1 Message Date
ea2cab8876 adjusted ActiveRelationTrait phpdoc 2016-07-05 21:57:26 +02:00
0f640c7138 Make sure inverseOf relations are also populated during dynamic relational queries
Refs #6347
2016-07-04 15:07:37 +02:00
099b364b14 Fixed #9574: Implicit run ColumnSchemaBuilder::null() when default value is set to null. (#11813) 2016-06-25 15:52:11 +03:00
104712103b Fixes #11693: Handle QueryBuilder::batchInsert() calls with no data to insert. (#11812) 2016-06-25 15:51:09 +03:00
4e3c9e4a98 fixed scalar value for IN condition
fixes regression from 2.0.8 #10961

fixes #11536
2016-06-20 15:20:21 +02:00
e4dc2026bc note about JOIN syntax
fixes #7549
2016-06-20 13:04:08 +02:00
33dfddd0c2 Fixes #8644: Fixed trying to ENABLE/DISABLE TRIGGER ALL on a view in PostgreSQL 2016-06-19 15:33:00 +03:00
bafc8b3325 Fixes #10422, #9574: New proposal fix for ColumnSchemaBuilder not null column
* Added ability to explicitly set column nullability #10422

* Removed isNull property.

* add since tag.
2016-06-18 15:03:55 +03:00
7cea46bcb4 Changed SQLite fix #11652 according to https://github.com/yiisoft/yii2/pull/11653#issuecomment-224016289 2016-06-06 19:57:42 +03:00
0a60466729 Fixes #11527: Fixed bigPrimaryKey() for SQLite 2016-06-06 19:33:22 +03:00
418de14730 Merge pull request #11632 from nkovacs/psr2-fixes
Coding style fixes
2016-05-26 23:41:47 +02:00
9d327baa8b coding style fixes 2016-05-26 11:19:32 +02:00
dbb54f986c Updated phpDoc of scalar 2016-05-25 09:14:31 +03:00
a23cbda185 Code style fixed 2016-05-22 13:13:24 +03:00
e5bad89c34 Merge branch '11484-oci-schema' of https://github.com/SSiwek/yii2 into SSiwek-11484-oci-schema 2016-05-22 12:57:14 +03:00
bde00be202 ColumnSchemaBuilder can not work with custom types
In our project we use trait with custom types, example:
```php
trait MigrationToolTrait
{
    protected function dateTimeWithTZ ($precision = null)
    {
        if ('pgsql' === $this->db->driverName) {
            return $this->getDb()->getSchema()->createColumnSchemaBuilder(sprintf('timestamp(%d) with time zone', $precision));
        }

        return $this->dateTime($precision);
    }
}
```
usage:
```php
class m160516_161900_init
{
    use MigrationToolTrait;
    public function safeUp ()
    {
        $this->createTable('testing', [
            'id' => $this->primaryKey(),
            'startDate' => $this->dateTimeWithTZ()->notNull()->defaultExpression('now()'),
        ]);
    }
    public function safeDown ()
    {
        $this->dropTable('testing');
    }
}
```
In version 2.0.8 MigrateController generate notice:
PHP Notice 'yii\base\ErrorException' with message 'Undefined index: timestamp(0) with time zone' in vendor/yiisoft/yii2/db/ColumnSchemaBuilder.php:366

We offer our change to fix it.
2016-05-22 12:03:44 +03:00
bb35fda6e9 Update Migration.php (#11605)
Typo in doc for safeDown
2016-05-21 15:32:34 +03:00
4d809af0ff Fixed @since tag 2016-05-13 17:29:25 +03:00
94d0bd9ae7 Fixed method name 2016-05-13 16:05:38 +03:00
27866bf9d6 Changed name to append(), fixed phpdoc, added changelog 2016-05-13 15:58:06 +03:00
66eabda770 Fixes #11195: Added ability to append custom string to schema builder column definition 2016-05-13 15:57:54 +03:00
5210fc8e42 Fixes #11532: Fixed casting of empty char value to null resulting in integrity constraint violation for not null columns 2016-05-13 15:34:35 +03:00
6b607d078f #11498: Fixed unable to saved serialized object into PostgreSQL binary column (#11499)
#11498: Fixed unable to saved serialized object into PostgreSQL binary column
2016-05-06 11:04:27 +02:00
5fc46d900b Moved setting of isPrimaryKey #11484 2016-05-03 08:03:33 +02:00
da355e8e4e Merge branch '#11428-oci-findcolumns-speedup' of https://github.com/SSiwek/yii2 into SSiwek-11428-oci-findcolumns-speedup 2016-05-01 15:51:41 +03:00
731769241b release version 2.0.8 2016-04-28 16:50:20 +02:00
5f8881cfbd #11428 (oci) speedup SQL SELECT in findColumns 2016-04-28 08:23:20 +02:00
edd6e719bb added missing since annotations and removed duplicate line 2016-04-28 03:02:17 +02:00
627233715b proper @since annotations 2016-04-28 02:25:32 +02:00
4411a74ebd proper fix for #9425, adjust changes from #11363
includes tests and fix that works in all cases.
2016-04-28 01:29:07 +02:00
e2e4f76229 Updated SqliteQueryBuilderTest to work with Composite in conditions
Updated code style, CHANGELOG
2016-04-25 23:36:41 +03:00
baab8d6a68 QueryBuilder now supports Traversable objects for IN clauses. 2016-04-25 23:36:32 +03:00
60f6ecf063 yii\db\BaseActiveRecord now triggers event EVENT_AFTER_REFRESH` after a record is refreshed
fixes #9604
close #10867
2016-04-22 17:14:41 +02:00
52e23e0317 fix issue with composite key in combination with join
fixes #10201
fixes #9047
close #9895
2016-04-22 16:39:06 +02:00
Sam
fc8708b712 Added missing function to ActiveRecordInterface interface.
close #9854
2016-04-22 14:50:30 +02:00
f8a844a90f Query helper method for filter values containing operators
Basic implementation proposal for yiisoft/yii2#2022

Shortcomings/todo's:
* filtering on non-scalars (where IN statements) not supported
* Numeric properties with a corresponding validation rule will yield
  errors when they contain an alphanumeric operator. These properties'
  rules should be defined as 'string' or 'safe'.
* no implementation example in Gii code (yet).

close #8505
2016-04-22 14:05:24 +02:00
38d347c9f5 fix quoting column name in case of quoted table name
column name was not quoted if a table name was used, that was using the
table prefix feature.

fixes #11088
close #11238
2016-04-22 12:31:46 +02:00
15432971d6 db/ColumnSchemaBuilder::buildCommentString() returns empty string by default 2016-04-20 09:26:07 +03:00
33d51825c0 Fixed order of column options in curbid\ColumnSchemaBuilder 2016-04-19 18:32:01 +03:00
1aa2f1d927 Removed sqlite/ColumnSchemaBuilder::comment() method override 2016-04-19 18:29:12 +03:00
0fe27b9d3b Refactored code in PR #9441 2016-04-19 17:48:25 +03:00
c9dfc90be0 Merge branch 'methods_for_schema_builder' of https://github.com/vaseninm/yii2 into vaseninm-methods_for_schema_builder 2016-04-19 12:21:33 +03:00
5316576361 Fixes after() column string builder (#11362) 2016-04-19 11:59:16 +03:00
2c325fbd48 Added @since, adjusted changelog #9425 2016-04-18 12:49:22 +03:00
df6cdf7ad5 Fixed code style 2016-04-18 10:14:20 +03:00
73eb62a3cd DBMS specific workarounds for unsupported SQL92 form of SELECT EXISTS() (#11369) 2016-04-17 17:44:52 +03:00
806eb57990 Fixes #9425: ActiveQuery::exists() should generate SELECT EXISTS() (#11363) 2016-04-16 13:34:20 +03:00
293feeb522 Update QueryInterface.php
Missing closing bracket in OR condition example
2016-04-13 15:23:16 +02:00
5921865459 Fixed: #11270 - Error when link record in one to many relation. (#11301)
Fixed: #11270 - Error when link record in one to many relation.
2016-04-08 10:36:38 +03:00
48a2df5d52 Fixes #11283: ActiveRecord::unlink() is not setting FK to null before deleting itself anymore 2016-04-06 12:41:53 +03:00