Commit Graph

113 Commits

Author SHA1 Message Date
Robert Korulczyk
104712103b Fixes #11693: Handle QueryBuilder::batchInsert() calls with no data to insert. (#11812) 2016-06-25 15:51:09 +03:00
Nikola Kovacs
9d327baa8b coding style fixes 2016-05-26 11:19:32 +02:00
SilverFire - Dmitry Naumenko
a23cbda185 Code style fixed 2016-05-22 13:13:24 +03:00
SilverFire - Dmitry Naumenko
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
Alexander Makarov
27866bf9d6 Changed name to append(), fixed phpdoc, added changelog 2016-05-13 15:58:06 +03:00
Chris Harris
66eabda770 Fixes #11195: Added ability to append custom string to schema builder column definition 2016-05-13 15:57:54 +03:00
SSiwek
5fc46d900b Moved setting of isPrimaryKey #11484 2016-05-03 08:03:33 +02:00
SilverFire - Dmitry Naumenko
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
Carsten Brandt
731769241b release version 2.0.8 2016-04-28 16:50:20 +02:00
SSiwek
5f8881cfbd #11428 (oci) speedup SQL SELECT in findColumns 2016-04-28 08:23:20 +02:00
Carsten Brandt
edd6e719bb added missing since annotations and removed duplicate line 2016-04-28 03:02:17 +02:00
Carsten Brandt
627233715b proper @since annotations 2016-04-28 02:25:32 +02:00
SilverFire - Dmitry Naumenko
15432971d6 db/ColumnSchemaBuilder::buildCommentString() returns empty string by default 2016-04-20 09:26:07 +03:00
SilverFire - Dmitry Naumenko
0fe27b9d3b Refactored code in PR #9441 2016-04-19 17:48:25 +03:00
SilverFire - Dmitry Naumenko
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
Chris Harris
5316576361 Fixes after() column string builder (#11362) 2016-04-19 11:59:16 +03:00
PowerGamer1
73eb62a3cd DBMS specific workarounds for unsupported SQL92 form of SELECT EXISTS() (#11369) 2016-04-17 17:44:52 +03:00
Chris Harris
e8c3f6cc6f Fixing tests 2016-03-21 04:43:59 -07:00
Chris Harris
5c4001d84b Schema Builder Patterns Excel document in /docs folder (temp storage).
Fixed some schema builder patterns.
Added more information to upgrade docs.
2016-03-14 05:29:42 -07:00
Chris Harris
2f91889b70 Removed unsignedPrimaryKey() schema builder type; now, the unsigned() modifier works with primary key types e.g. pk()->unsigned() or bigpk()->unsigned(). 2016-02-26 17:48:03 -08:00
Chris Harris
81ff4752d9 Added CHECK modifier to PK schema pattern. Modified UNSIGNED tests to not include modifier by default (i.e. only present when testing DBMSes that support it). 2016-02-22 04:06:17 -08:00
Chris Harris
96fa375b16 Refactored to a more functional way of accessing database connection 2016-02-21 05:05:54 -08:00
Chris Harris
6a8348da5f AFTER column name is now escaped by safe method 2016-02-21 04:08:57 -08:00
Chris Harris
f52f60db0f Renamed category constants 2016-02-21 02:06:41 -08:00
Chris Harris
51b99320bd Sqlite specific schema builder class actually gets loaded now 2016-02-20 06:53:31 -08:00
Chris Harris
8c0b075bed Merge branch '9340-add-after-method-to-migrations-schema-builder' into 9562-add-char-datatype 2016-02-20 01:59:00 -08:00
Chris Harris
eaeb926768 Adds char datatype to framework 2016-02-20 01:52:23 -08:00
Chris Harris
0400eb9cee Resolved merge conflict in changelog 2016-02-18 02:34:02 -08:00
SilverFire - Dmitry Naumenko
387d5aa083 Merge branch '8573-oci-schema-number-mapping' of https://github.com/vbelogai/yii2 into vbelogai-8573-oci-schema-number-mapping 2016-01-17 13:29:04 +02:00
Chris Harris
bce61bd474 Add after() option to migrations schema builder 2015-12-28 06:34:46 -08:00
Alexander Makarov
5cecb09c1b Fixes #9443: Added unsigned() to ColumnSchemaBuilder 2015-12-26 15:20:21 +03:00
SilverFire - Dmitry Naumenko
cd87d67f34 Global DOCS update: ~~~ replaced with ``` 2015-12-02 23:15:28 +02:00
Alexander Makarov
1b3770fd21 Use === instead of == where possible 2015-10-10 01:04:35 +03:00
Alexander Makarov
5ab4f0f090 Better quotes usage in strings
- Use single quote where interpolation isn't necessary
- Use interpolation when it's better than concatenation
2015-10-10 00:23:52 +03:00
jeicd
c2f83da8d8 Fix phpdoc 2015-10-05 15:00:13 +06:00
Matvey Vasenin
a8ec3ebe14 add oracle support (need tested) 2015-08-19 17:10:10 +03:00
Matvey Vasenin
3cc8c09898 some test case added 2015-08-17 10:17:51 +03:00
Carsten Brandt
34d5b45b35 proper fix for #8844, convert array before using it
fixes #9415
2015-08-14 12:26:36 +02:00
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
Carsten Brandt
a2568d1ec8 updated some comments and @since annotations 2015-08-02 19:56:49 +02:00
Carsten Brandt
6d9fe671de various code style and whitespace adjustments 2015-08-02 00:27:19 +02:00
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
Matvey Vasenin
da941a7675 Improved SchemaBuilder implementation 2015-07-08 15:40:09 +03:00
pana1990
3f7ffd6707 Improved SchemaBuilder docs, refactored code 2015-07-08 15:39:34 +03:00
Matvey Vasenin
b456f699cc Implemented SchemaBuilder 2015-07-08 15:38:21 +03:00
Alexander Mohorev
ae42a054bb PSR-2 spaces, commas, etc 2015-06-09 00:05:06 +03:00
Alexander Mohorev
2134c72bb0 Undefined class Expression 2015-06-08 16:10:41 +03:00
prog5
1f8aafd36b #8573 fix 2015-06-03 17:57:47 +03:00
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
2015-05-29 01:37:47 +02:00
John Was
57db031d1c Merge branch 'master' into 7374-inserting-ar-without-values 2015-05-24 23:29:40 +02:00