66 Commits

Author SHA1 Message Date
2c3e9a4296 phpDoc of getTableSchema|loadTableSchema updated 2016-01-19 15:19:19 +03:00
cd87d67f34 Global DOCS update: ~~~ replaced with ``` 2015-12-02 23:15:28 +02:00
1b3770fd21 Use === instead of == where possible 2015-10-10 01:04:35 +03:00
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
a2568d1ec8 updated some comments and @since annotations 2015-08-02 19:56:49 +02:00
b456f699cc Implemented SchemaBuilder 2015-07-08 15:38:21 +03:00
8e4518c81f Doc comments updated 2015-06-06 13:05:43 +03:00
fb0062114e Method yii\db\Schema::refreshTableSchema() added 2015-06-04 12:57:16 +03:00
a63fc2ff59 properly quote sequence name in Schema::getLastInsertId()
fixes #8483
close #8515
2015-05-21 22:42:34 +02:00
4488dbbff7 build cleanup [skip ci] 2015-05-10 13:29:32 -04:00
faf7bb73fa redundant call chain removed 2015-04-24 14:34:07 +03:00
ef662b57be added missing @since annotations 2015-04-24 12:09:40 +02:00
f11bdfa2a7 Grammar fix: followings -> following 2015-04-21 15:08:16 +02:00
a0b8f74d2e yii\db\Schema::insert() primary key value composition fixed 2015-04-20 11:48:51 +03:00
6751a80ea0 yii\db\Schema::insert() now returns primary key value for empty sequence 2015-04-20 11:22:58 +03:00
767276362d Redundant typecast at yii\db\Schema::insert() removed 2015-04-14 12:31:32 +03:00
31ef4c4504 Command execution at yii\db\oci\Schema::insert() fixed 2015-04-13 17:49:14 +03:00
4e8ee7b001 Use RETURNING for inserts for pgsql and oci to support PKs with a custom default value expression 2015-04-13 17:11:00 +03:00
901d640b55 Fixes #7973: Added Schema::getSchemaNames method 2015-04-03 01:03:49 +03:00
4f49feee8d fixes #7757: in oci schema fix query results row keys case when PDO::ATTR_CASE is set to PDO::CASE_LOWER
added test to check support for setting PDO::ATTR_CASE and fetching table schemas
fixed fetching table schemas for mysql when PDO::ATTR_CASE is set
added tests for oci
fixed fetching composite fks for oci
improvements in oci schema parsing
removed autoIncrement detection fro oci and added test to verify that
implement batchInsert for oci
fix detecting IntegrityException for oci
fixed creating raw sql by skipping object and resource params
fix command test failing for sqlite
2015-03-29 21:57:13 +02:00
187322052d Fixed converting double to PHP type 2015-02-26 02:37:47 +03:00
5870a74672 Added Schema::DOUBLE to represent ANSI SQL Double Precision 2015-02-25 16:01:37 +03:00
7b20bdeeb2 Fixes #6279: yii\db\Schema::getLastInsertID() was passing wrong default schema name to PDO 2014-11-27 16:51:29 +03:00
5fe6c55d6b Fixes #4586: Signed bigint and unsigned int will be converted into integers when they are loaded from DB by AR 2014-08-11 22:09:51 -04:00
92d65ab78b fix issue with postgreSQL and batch inserting boolean values
fixes #4654
2014-08-12 01:43:49 +02:00
20774165bc Fixes #4644: Added \yii\db\Schema::createColumnSchema() to be able to customize column schema used 2014-08-12 00:01:27 +04:00
3a1e0f3a5c property codestyle framework 2014-07-30 00:21:31 +02:00
6e6005b148 Refactored code. 2014-07-20 08:01:16 -04:00
fe2611186e Fixes #4051: Renamed yii\caching\GroupDependency to TagDependency and added support for associating multiple tags to a single cached data item 2014-07-15 00:10:57 -04:00
478380fb10 Fixed test brak. 2014-07-11 22:49:32 -04:00
43333d9cad Implemented master balancing. 2014-07-11 22:33:36 -04:00
e67d0b3c39 WIP 2014-07-11 14:01:44 -04:00
2018503c8d WIP 2014-07-11 12:59:32 -04:00
6578cfbdab updated phpdoc and classmap 2014-06-25 18:24:23 +02:00
bbbe2a3e4b Added support for transaction isolation levels
fixes #3220
2014-06-23 19:47:56 +02:00
0c14f47f9a Fixes #3793: Changed inline autocomplete hints style to get more IDEs support 2014-06-20 17:40:00 +04:00
8886fb235f Fixed handleException method visibility, removed unnecessary slashes from FQN 2014-05-07 20:56:51 +04:00
bea7cf8449 Moved exception handling to schema 2014-05-07 04:27:21 +04:00
d1ec2a0241 Better naming for Schema properties 2014-05-06 19:06:34 +04:00
ca23cd8a2c Implemented throwing \yii\db\IntegrityException on DB integrity errors 2014-05-06 18:26:27 +04:00
91965fd391 phpdoc formatting issues 2014-04-23 02:55:17 +02:00
7b908aa8a3 Fixes #2853: ActiveRecord did not handle resource-typed columns well 2014-04-21 20:16:16 -04:00
ec3aadfffb Fixes #2862: Using DbCache while enabling schema caching may cause infinite loops 2014-03-26 20:26:22 -04:00
bf3c75147d reverted breaking PHPdoc codestyle changes
issue #2852
2014-03-23 20:51:09 +01:00
8e11ad0360 refactored code to use Instance::ensure() 2014-03-18 12:31:27 -04:00
8c2e39235f Turn module and application into DI containers. 2014-03-17 23:57:01 -04:00
b5f8a4dc22 Reformat code te be PSR-2 compatible 2014-03-16 10:46:21 +06:00
e1f4a9cc8f Added Connection::enableSavepoint. 2014-02-15 23:00:30 -05:00
bea9e3fc06 Fixes #1645: Added support for nested DB transactions 2014-02-15 22:16:09 -05:00
eb3c6866dd Removed unused variable 2014-02-06 00:46:50 +04:00