Edgard Lorraine Messias
2d8106a39c
Fixed testCreateTable and testAlterTable in CommandTest for MSSQL and OCI
9 years ago
Carsten Brandt
decd45201c
allow passing a single Expression object to select() and addSelect()
...
fixes #9883
9 years ago
Carsten Brandt
3826b6f4a3
added test for #9869
9 years ago
Carsten Brandt
989699614f
fixed test break
9 years ago
Carsten Brandt
4e7adc13ea
adjusted docs about Query::from() and subqueries
...
also added a test to verify behavior
close #9720
close #9266
9 years ago
AIZAWA, Hina
0f2a77ed36
Fixes #9442 : Fixed `yii\db\Migration::renameTable()` caused fatal error when using SQLite driver
9 years ago
Nikola Kovacs
316e95b81d
Remove length from SchemaBuilderTrait::text.
...
close #9307
9 years ago
Carsten Brandt
56902298b4
fixed wrong expectation in QueryBuilder test
9 years ago
Carsten Brandt
0d778d0570
adjusted querybuilder tests to match implementation
9 years ago
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(),
]);
```
9 years ago
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
9 years ago
Alexander Makarov
310f9152e1
Fixes #9268 : Improved display of boolean parameters in logged SQL queries
9 years ago
Alexander Makarov
357bce51bb
Tests for #9006
9 years ago
Alexander Makarov
8e1d982da4
Cleanup, added ->unique(), changelog
9 years ago
Matvey Vasenin
da941a7675
Improved `SchemaBuilder` implementation
9 years ago
Matvey Vasenin
b456f699cc
Implemented `SchemaBuilder`
9 years ago
Carsten Brandt
2872365000
added test case for #8918
9 years ago
Carsten Brandt
0858d0a834
added test for querybuilder select
...
close #8895
9 years ago
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
9 years ago
Carsten Brandt
879911810f
added test for createTable and alterTable
...
test for issue #8627
close #8628
9 years ago
Klimov Paul
72f9e63e10
Table schema auto refreshing on DDL added to `yii\db\Command`
9 years ago
Klimov Paul
fb0062114e
Method `yii\db\Schema::refreshTableSchema()` added
9 years ago
Klimov Paul
0d48f1041e
Fixed `yii\db\Command::getRawSql()` unable to parse params specified without colon (':')
9 years ago
Klimov Paul
a849e815df
Fixed `yii\db\ActiveQuery` produces incorrect SQL for aggregations, when `sql` field is set
9 years ago
Carsten Brandt
aa5887fec7
added missing use statement to fix #8572
...
- added unit tests for timestamp behavior and insert with expression
- fixed issue #8572
close #8596
9 years ago
Klimov Paul
51a442d6c8
Fixed `yii\db\ActiveRecord` does not updates attribute specified at `optimisticLock()` after save
9 years ago
John Was
a63fc2ff59
properly quote sequence name in Schema::getLastInsertId()
...
fixes #8483
close #8515
9 years ago
John Was
94acb2e126
add unit tests to check lastInsertId
10 years ago
John Was
01345874a3
add working QueryBuilder test for Oracle
10 years ago
Klimov Paul
6d96d3cbee
Fixed `yii\db\BaseActiveRecord::updateCounters()` fails for new record saved with counter attribute not set
10 years ago
Alexander Makarov
6949992246
Simplified tests directory structure a bit
10 years ago