Commit Graph

18 Commits

Author SHA1 Message Date
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
91018f6c38 Corrected MSSQL driver name. Fixed array addition to not overwrite matching keys. 2016-02-26 12:44:20 -08:00
Chris Harris
732a51b551 All common column definitions and expected outputs now in QueryBuilderTest::columnTypes(). DbmsSpecificQueryBuilderTest::columnTypes() adds DBMS specific column definitions. 2016-02-26 03:53:05 -08:00
Chris Harris
0ca5a1a86a Fixed test 2016-02-24 04:31:50 -08:00
Chris Harris
a997603ab6 More Postgres tests 2016-02-24 04:06:32 -08:00
Chris Harris
db5399b124 Added $expectedColumnSchemaBuilder back to test data 2016-02-22 05:28:54 -08:00
Chris Harris
3761682edf Upgraded some tests. Fixed MySQL test fixtures to create all tables with InnoDB. 2016-02-22 04:53:14 -08:00
Chris Harris
eaeb926768 Adds char datatype to framework 2016-02-20 01:52:23 -08:00
Matvey Vasenin
3cc8c09898 some test case added 2015-08-17 10:17:51 +03:00
Matvey Vasenin
ce6e92b736 add comment control methods 2015-08-14 12:27:21 +03:00
Nikola Kovacs
316e95b81d Remove length from SchemaBuilderTrait::text.
close #9307
2015-08-05 22:50:46 +02:00
Carsten Brandt
56902298b4 fixed wrong expectation in QueryBuilder test 2015-08-04 12:58:03 +02:00
Carsten Brandt
0d778d0570 adjusted querybuilder tests to match implementation 2015-08-04 12:15:00 +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
7150e830d9 do not use reserved php words as function in schemabuilder
there is a reason for them to be reserved, we should not add such workarounds to still use them.

close #9283
2015-08-03 11:21:58 +02:00
Matvey Vasenin
da941a7675 Improved SchemaBuilder implementation 2015-07-08 15:40:09 +03:00
Matvey Vasenin
b456f699cc Implemented SchemaBuilder 2015-07-08 15:38:21 +03:00
Alexander Makarov
6949992246 Simplified tests directory structure a bit 2015-04-16 12:10:01 +03:00