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
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
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
Jan Siqueira
f9473ebc61
Fix default value parsing in pgsql\Schema for null values
...
Fixes #10692
close #10694
2016-02-07 20:07:17 +01: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
Matvey Vasenin
3cc8c09898
some test case added
2015-08-17 10:17:51 +03:00
Carsten Brandt
abc7dbbf0f
added missing @since annotations
2015-08-04 12:40:12 +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
8cfc89b21c
adjusted pgsql/QueryBuilder batchInsert to match parent implementation
...
this also fixes #8551
2015-08-02 23:20:52 +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
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
Carsten Brandt
9c4c984200
improved docs and changelog for #8903
2015-07-02 15:20:32 +02:00
Aleksey Loban
db12282e59
\yii\db\pgsql\QueryBuilder add createIndex() for the creating specific indexes
...
close #8903
2015-07-02 15:05:33 +02:00
Alexander Mohorev
ae42a054bb
PSR-2 spaces, commas, etc
2015-06-09 00:05:06 +03:00
Carsten Brandt
ef662b57be
added missing @since annotations
2015-04-24 12:09:40 +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
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
Jan Waś
ced423b601
Fixes #8012 : Fixed fetching multiple relations between two tables for pgsql
2015-04-09 00:59:56 +03:00
John Was
901d640b55
Fixes #7973 : Added Schema::getSchemaNames method
2015-04-03 01:03:49 +03:00
Alexander Makarov
9f8ca6b3db
Removed join according to https://github.com/yiisoft/yii2/issues/7958#issuecomment-88872600
2015-04-02 16:17:19 +03:00
Jan Was
356d1b98a7
fix fetching pgsql indexes for older server versions
2015-04-02 12:35:24 +02:00
Jan Was
ec7bbe1914
fix fetching pgsql constraints for older server versions
2015-04-02 07:25:38 +02: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
Alexander Makarov
5870a74672
Added Schema::DOUBLE to represent ANSI SQL Double Precision
2015-02-25 16:01:37 +03:00
Jan Waś
1e5f159f78
override only mssql and sqlite QueryBuilder; throw an exception for composite in condition with a subquery
2015-01-31 22:20:41 -05:00
Jan Waś
f58d096920
fixes #6792 , use a simpler composite in condition implementation on dbs other than pgsql
2015-01-31 22:20:41 -05:00
Qiang Xue
9eedfd054e
Fixed test break.
2014-11-16 12:31:02 -05:00
Qiang Xue
ab1f32ef76
Fixes #4492 : Support PostgreSQL-specific syntax for QueryBuilder::alterColumn()
2014-11-16 10:47:46 -05:00
Alexander Mohorev
bb8550886e
PHP type casting
2014-10-25 15:30:03 +03:00
Carsten Brandt
78b5c7db66
fixed boolean handling for PostgreSQL
...
- do not allow boolean values for integer columns
- use native boolean type with boolean values
- removed workaround that turned out to be wrong when schema and values
are used correctly. Workaround resulted from wrong usage of boolean
values before.
fixes #4672
2014-08-28 11:20:17 +02:00
Carsten Brandt
25bf486b7f
save some function calls on AR insert
2014-08-12 18:13:49 +02:00
Carsten Brandt
c6274acf6c
ensure postgres boolean values are handled correctly
...
also fixed an issue with default value loading of bool columns.
fixes #3489 , fixes #4085 , fixes #3920
related to #4672
2014-08-12 02:19:53 +02:00
Carsten Brandt
92d65ab78b
fix issue with postgreSQL and batch inserting boolean values
...
fixes #4654
2014-08-12 01:43:49 +02: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
Qiang Xue
43333d9cad
Implemented master balancing.
2014-07-11 22:33:36 -04:00
Qiang Xue
e67d0b3c39
WIP
2014-07-11 14:01:44 -04:00