Commit Graph

94 Commits

Author SHA1 Message Date
Sergey Makinen
85b65c889a Fixes #15117: Fixed DB schema cache did not honor table prefixes 2017-11-11 23:42:41 +03:00
Alexander Makarov
2d672b6722 release version 2.0.13 2017-11-03 01:09:29 +03:00
Robert Korulczyk
5a8c3d537b Enable phpdoc_summary rule in php-cs-fixer config (#14675)
* Enable `phpdoc_summary` rule in php-cs-fixer config.

* Fix case in "PHPDoc".
2017-08-21 11:19:35 +02:00
Robert Korulczyk
1501c659ac Add empty lines before return statements. (#14682) [skip ci] 2017-08-21 01:58:49 +03:00
Alexander Makarov
1f26db9fb7 Applied code style fixes 2017-07-21 15:42:06 +03:00
Carsten Brandt
69673c0c94 Rename Object -> BaseObject for PHP 7.2 compatibility
issue #7936
2017-07-19 10:51:46 +02:00
nikosid
fe607b83d2 Fixes #14434: fixed metadata cache regression 2017-07-13 09:54:36 +03:00
Robert Korulczyk
fe8a0a6a2e Enable no_useless_else rule in php-cs-fixer (#14420) 2017-07-10 11:26:21 +03:00
Sergey Makinen
ecf8984096 Mention an usage magic in descriptions 2017-07-04 19:03:00 +03:00
Carsten Brandt
3e330f8b87 make schema cache version a constant 2017-07-04 14:44:24 +02:00
Sergey Makinen
164d3c83e9 Have I fixed these phpdocs? Let’s see… 2017-07-03 15:10:48 +03:00
Sergey Makinen
e0df642261 Add PHPDoc 2017-06-28 21:37:49 +03:00
Sergey Makinen
71a23cff50 Fix imports 2017-06-18 19:17:20 +03:00
Sergey Makinen
c8856ccd4e Fix merging issues & CS 2017-06-17 01:02:01 +03:00
Sergey Makinen
f820d2ca36 Merge branch 'master' into db-constraints 2017-06-16 16:52:43 +03:00
Robert Korulczyk
ba0ab403b5 Added php-cs-fixer coding standards validation to Travis CI (#14100)
* php-cs-fixer: PSR2 rule.

* php-cs-fixer: PSR2 rule - fix views.

* Travis setup refactoring.

* Add php-cs-fixer to travis cs tests.

* Fix tests on hhvm-3.12

* improve travis config

* composer update

* revert composer update

* improve travis config

* Fix CS.

* Extract config to separate classes.

* Extract config to separate classes.

* Add file header.

* Force short array syntax.

* binary_operator_spaces fixer

* Fix broken tests

* cast_spaces fixer

* concat_space fixer

* dir_constant fixer

* ereg_to_preg fixer

* function_typehint_space fixer

* hash_to_slash_comment fixer

* is_null fixer

* linebreak_after_opening_tag fixer

* lowercase_cast fixer

* magic_constant_casing fixer

* modernize_types_casting fixer

* native_function_casing fixer

* new_with_braces fixer

* no_alias_functions fixer

* no_blank_lines_after_class_opening fixer

* no_blank_lines_after_phpdoc fixer

* no_empty_comment fixer

* no_empty_phpdoc fixer

* no_empty_statement fixer

* no_extra_consecutive_blank_lines fixer

* no_leading_import_slash fixer

* no_leading_namespace_whitespace fixer

* no_mixed_echo_print fixer

* no_multiline_whitespace_around_double_arrow fixer

* no_multiline_whitespace_before_semicolons fixer

* no_php4_constructor fixer

* no_short_bool_cast fixer

* no_singleline_whitespace_before_semicolons fixer

* no_spaces_around_offset fixer

* no_trailing_comma_in_list_call fixer

* no_trailing_comma_in_singleline_array fixer

* no_unneeded_control_parentheses fixer

* no_unused_imports fixer

* no_useless_return fixer

* no_whitespace_before_comma_in_array fixer

* no_whitespace_in_blank_line fixer

* not_operator_with_successor_space fixer

* object_operator_without_whitespace fixer

* ordered_imports fixer

* php_unit_construct fixer

* php_unit_dedicate_assert fixer

* php_unit_fqcn_annotation fixer

* phpdoc_indent fixer

* phpdoc_no_access fixer

* phpdoc_no_empty_return fixer

* phpdoc_no_package fixer

* phpdoc_no_useless_inheritdoc fixer

* Fix broken tests

* phpdoc_return_self_reference fixer

* phpdoc_single_line_var_spacing fixer

* phpdoc_single_line_var_spacing fixer

* phpdoc_to_comment fixer

* phpdoc_trim fixer

* phpdoc_var_without_name fixer

* psr4 fixer

* self_accessor fixer

* short_scalar_cast fixer

* single_blank_line_before_namespace fixer

* single_quote fixer

* standardize_not_equals fixer

* ternary_operator_spaces fixer

* trailing_comma_in_multiline_array fixer

* trim_array_spaces fixer

* protected_to_private fixer

* unary_operator_spaces fixer

* whitespace_after_comma_in_array fixer

* `parent::setRules()` -> `$this->setRules()`

* blank_line_after_opening_tag fixer

* Update finder config.

* Revert changes for YiiRequirementChecker.

* Fix array formatting.

* Add missing import.

* Fix CS for new code merged from master.

* Fix some indentation issues.
2017-06-12 12:25:45 +03:00
SilverFire - Dmitry Naumenko
cb53b2feec Fixes #14081: Added yii\caching\CacheInterface to make custom cache extensions adoption easier 2017-06-11 19:18:33 +03:00
Sergey Makinen
73ac13e6d7 Implement retrieving dbms constraints 2017-05-15 20:55:25 +03:00
Sergey Makinen
ef4dadf437 Fixes #13592: Fixes Oracle’s yii\db\oci\Schema::setTransactionIsolationLevel() 2017-02-19 17:32:51 +03:00
Carsten Brandt
c19b2f7dc8 release version 2.0.11 2017-02-01 17:46:29 +01:00
Robert Korulczyk
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
nanodesu88
71d083d499 Fixes #12816: Added columnSchemaClass option for yii\db\Schema which adds ability to specify custom \yii\db\ColumnSchema class 2016-10-24 14:36:42 +03:00
PowerGamer1
3c1eb55f55 PHPDoc @return fix for insert() (#12757) [skip ci] 2016-10-17 16:36:25 +03:00
Robert Korulczyk
ecfaa9875d Fix phpdoc for constants in db\Schema [skip ci] (#12418) 2016-08-31 23:16:22 +03:00
Carsten Brandt
38d347c9f5 fix quoting column name in case of quoted table name
column name was not quoted if a table name was used, that was using the
table prefix feature.

fixes #11088
close #11238
2016-04-22 12:31:46 +02: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
eaeb926768 Adds char datatype to framework 2016-02-20 01:52:23 -08:00
githubjeka
2c3e9a4296 phpDoc of getTableSchema|loadTableSchema updated 2016-01-19 15:19:19 +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
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
Matvey Vasenin
b456f699cc Implemented SchemaBuilder 2015-07-08 15:38:21 +03:00
Paul Klimov
8e4518c81f Doc comments updated 2015-06-06 13:05:43 +03:00
Klimov Paul
fb0062114e Method yii\db\Schema::refreshTableSchema() added 2015-06-04 12:57:16 +03:00
John Was
a63fc2ff59 properly quote sequence name in Schema::getLastInsertId()
fixes #8483
close #8515
2015-05-21 22:42:34 +02:00
Qiang Xue
4488dbbff7 build cleanup [skip ci] 2015-05-10 13:29:32 -04:00
Klimov Paul
faf7bb73fa redundant call chain removed 2015-04-24 14:34:07 +03:00
Carsten Brandt
ef662b57be added missing @since annotations 2015-04-24 12:09:40 +02:00
Nikola Kovacs
f11bdfa2a7 Grammar fix: followings -> following 2015-04-21 15:08:16 +02:00
Klimov Paul
a0b8f74d2e yii\db\Schema::insert() primary key value composition fixed 2015-04-20 11:48:51 +03:00
Klimov Paul
6751a80ea0 yii\db\Schema::insert() now returns primary key value for empty sequence 2015-04-20 11:22:58 +03:00
Klimov Paul
767276362d Redundant typecast at yii\db\Schema::insert() removed 2015-04-14 12:31:32 +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
901d640b55 Fixes #7973: Added Schema::getSchemaNames method 2015-04-03 01:03:49 +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
187322052d Fixed converting double to PHP type 2015-02-26 02:37:47 +03:00
Alexander Makarov
5870a74672 Added Schema::DOUBLE to represent ANSI SQL Double Precision 2015-02-25 16:01:37 +03:00