Commit Graph

82 Commits

Author SHA1 Message Date
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
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
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
vbelogai
672510d521 Update Schema.php
insert: added $columnSchemas initialization; added size parameter to pdoStatement->bindParam
2015-04-28 15:46:10 +03:00
Carsten Brandt
ef662b57be added missing @since annotations 2015-04-24 12:09:40 +02:00
Jan Was
5f099b3f8d Merge branch 'master' into 7374-inserting-ar-without-values 2015-04-21 09:49:46 +02:00
Klimov Paul
60aa5f3eb9 Redundant checks at yii\db\oci\Schema::insert() and yii\db\pgsql\Schema::insert() removed 2015-04-14 11:59:58 +03:00
Paul Klimov
31ef4c4504 Command execution at yii\db\oci\Schema::insert() fixed 2015-04-13 17:49:14 +03:00
Paul Klimov
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
John Was
67799ad092 fix typos 2015-04-11 16:41:33 +02:00
Jan Waś
edf400df96 add missing space 2015-04-11 02:25:26 +02:00
Jan Waś
6e48ed05c7 allow calling Command::insert() without any columns 2015-04-11 02:20:13 +02:00
John Was
901d640b55 Fixes #7973: Added Schema::getSchemaNames method 2015-04-03 01:03:49 +03:00
John Was
664958548f fix oci\Schema::findConstraints() and pgsql\Schema::findTableNames(); added missing view to oci tests 2015-03-30 23:51:53 +02:00
John Was
4d1ca9ff17 Fixes #7831: Add order when fetching database table names and constraints 2015-03-30 22:18:56 +03:00
John Was
29304a185a Fixes #7833: Support (materialized) views and foreign tables along normal tables when fetching table schema 2015-03-30 19:01:12 +03:00
Jan Was
48255a446d Fixes #7867: Fixes findUniqueIndexes not to perform any processing on unique index on function for pgsql, Implemented findUniqueIndexes for oci and mssql 2015-03-30 18:01:30 +03:00
John Was
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
Alexander Makarov
5870a74672 Added Schema::DOUBLE to represent ANSI SQL Double Precision 2015-02-25 16:01:37 +03:00
wenbin1989
2202ae6cb8 Fixes #6080: Oracle DB schema did not load column types correctly 2014-12-16 23:21:11 -05:00
Qiang Xue
6b52b03523 Fixes #6049: yii\db\Connection::getSchema() for Oracle should return false when the table does not exist. Oracle does not support ON UPDATE clause. 2014-11-15 08:38:24 -05:00
wenbin1989
3d25f76e59 Fix batchInsert bug in oci. default batchInsert sql is `` insert into tableName(col1, col2, col3...) value(col11, col12,col13.... ),(col21, col22,col23.... ); ` which is illegal in oracle db. Change it to ` insert into tableName(col1, col2, col3...) select 'col11', 'col12', 'col13' from dual union select 'col21', 'col22', 'col23' from dual union select 'col31', 'col32', 'col33' from dual; `` 2014-11-15 08:32:47 -05:00
wenbin1989
39a358c269 oracle db doesn't support ON UPDATE in FOREIGN KEY. remove ON UPDATE section in method addForeignKey. 2014-11-15 08:32:47 -05:00
wenbin1989
b733a18904 fix oci bugs: \yii\db\oci\Schema::findColumns($table) return true when table doesn't exist When table doesn't exist, query in method findColumns return empty array instead of throw a exception. 2014-11-15 08:32:47 -05:00
Qiang Xue
212c5ee3ef Fixes #4254: SqlDataProvider does not work with Oracle and SQL Server 2014-09-03 14:42:09 -04:00
mcd.php
20774165bc Fixes #4644: Added \yii\db\Schema::createColumnSchema() to be able to customize column schema used 2014-08-12 00:01:27 +04:00
Carsten Brandt
3a1e0f3a5c property codestyle framework 2014-07-30 00:21:31 +02:00
Carsten Brandt
1f31f27787 phpdoc 2014-07-29 22:19:14 +02:00
Alexander Makarov
0edd8bc65a Fixed missing and incorrect phpdoc 2014-07-25 17:26:35 +04:00
Qiang Xue
1f0d2ab7d9 Fixed Oracle DB type mapping. (Fixes #4) 2014-07-24 20:51:58 -04:00
Qiang Xue
91e0c5ae8a Added Connection::useMaster() and refactored code. 2014-07-11 21:04:26 -04:00
Qiang Xue
e67d0b3c39 WIP 2014-07-11 14:01:44 -04:00
Qiang Xue
ff50f15056 proper quoting of sequence name. 2014-07-10 14:06:47 -04:00
Qiang Xue
b147e6516d minor CS fixes [skip ci] 2014-07-10 11:59:27 -04:00