Alexander Makarov
5cecb09c1b
Fixes #9443 : Added `unsigned()` to `ColumnSchemaBuilder`
9 years ago
SilverFire - Dmitry Naumenko
cd87d67f34
Global DOCS update: ~~~ replaced with ```
9 years ago
Alexander Makarov
1b3770fd21
Use === instead of == where possible
9 years ago
Alexander Makarov
5ab4f0f090
Better quotes usage in strings
...
- Use single quote where interpolation isn't necessary
- Use interpolation when it's better than concatenation
9 years ago
jeicd
c2f83da8d8
Fix phpdoc
9 years ago
Carsten Brandt
34d5b45b35
proper fix for #8844 , convert array before using it
...
fixes #9415
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
a2568d1ec8
updated some comments and `@since` annotations
9 years ago
Carsten Brandt
6d9fe671de
various code style and whitespace adjustments
9 years ago
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
9 years ago
Matvey Vasenin
da941a7675
Improved `SchemaBuilder` implementation
9 years ago
pana1990
3f7ffd6707
Improved `SchemaBuilder` docs, refactored code
9 years ago
Matvey Vasenin
b456f699cc
Implemented `SchemaBuilder`
9 years ago
Alexander Mohorev
ae42a054bb
PSR-2 spaces, commas, etc
9 years ago
Alexander Mohorev
2134c72bb0
Undefined class Expression
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
vbelogai
672510d521
Update Schema.php
...
insert: added $columnSchemas initialization; added size parameter to pdoStatement->bindParam
10 years ago
Carsten Brandt
ef662b57be
added missing `@since` annotations
10 years ago
Klimov Paul
60aa5f3eb9
Redundant checks at `yii\db\oci\Schema::insert()` and `yii\db\pgsql\Schema::insert()` removed
10 years ago
Paul Klimov
31ef4c4504
Command execution at `yii\db\oci\Schema::insert()` fixed
10 years ago
Paul Klimov
4e8ee7b001
Use RETURNING for inserts for pgsql and oci to support PKs with a custom default value expression
10 years ago
John Was
67799ad092
fix typos
10 years ago
Jan Waś
edf400df96
add missing space
10 years ago
Jan Waś
6e48ed05c7
allow calling Command::insert() without any columns
10 years ago
John Was
901d640b55
Fixes #7973 : Added `Schema::getSchemaNames` method
10 years ago
John Was
664958548f
fix oci\Schema::findConstraints() and pgsql\Schema::findTableNames(); added missing view to oci tests
10 years ago
John Was
4d1ca9ff17
Fixes #7831 : Add order when fetching database table names and constraints
10 years ago
John Was
29304a185a
Fixes #7833 : Support (materialized) views and foreign tables along normal tables when fetching table schema
10 years ago
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
10 years ago
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
10 years ago
Alexander Makarov
5870a74672
Added Schema::DOUBLE to represent ANSI SQL Double Precision
10 years ago
wenbin1989
2202ae6cb8
Fixes #6080 : Oracle DB schema did not load column types correctly
10 years ago
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.
10 years ago
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; ```
10 years ago
wenbin1989
39a358c269
oracle db doesn't support `ON UPDATE` in FOREIGN KEY. remove `ON UPDATE` section in method `addForeignKey`.
10 years ago
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.
10 years ago
Qiang Xue
212c5ee3ef
Fixes #4254 : `SqlDataProvider` does not work with Oracle and SQL Server
10 years ago
mcd.php
20774165bc
Fixes #4644 : Added `\yii\db\Schema::createColumnSchema()` to be able to customize column schema used
10 years ago
RichWeber
92cd13a913
pull origin
10 years ago
Carsten Brandt
3a1e0f3a5c
property codestyle framework
10 years ago
Carsten Brandt
1f31f27787
phpdoc
10 years ago
Alexander Makarov
0edd8bc65a
Fixed missing and incorrect phpdoc
10 years ago
Qiang Xue
1f0d2ab7d9
Fixed Oracle DB type mapping. ( Fixes #4 )
10 years ago
Qiang Xue
91e0c5ae8a
Added Connection::useMaster() and refactored code.
10 years ago
Qiang Xue
e67d0b3c39
WIP
10 years ago
Qiang Xue
ff50f15056
proper quoting of sequence name.
10 years ago
Qiang Xue
b147e6516d
minor CS fixes [skip ci]
10 years ago
miramir
0322e427e7
fix unnecessary diff
10 years ago
Иван Багаев
93c567e7e1
Retriev quoteSimpleTableName
10 years ago
miramir
9c55cc48f8
Removing unnecessary methods
10 years ago