Commit Graph

72 Commits

Author SHA1 Message Date
Dmitry Naumenko
de1750228d Fixes #13879: Added upsert support for yii\db\QueryBuilder and yii\db\Command 2018-02-09 01:05:50 +03:00
Dmitry Naumenko
d16586334d Fixes #7640: Implemented custom data types support. Added JSON support for MySQL and PostgreSQL, array support for PostgreSQL 2018-02-05 04:59:14 +07:00
Klimov Paul
65f6b59b35 @inheritdoc notation changed 2018-01-23 13:11:24 +02:00
Robert Korulczyk
1501c659ac Add empty lines before return statements. (#14682) [skip ci] 2017-08-21 01:58:49 +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
f0c66c5a1d Fix an unknown variable usage bug 2017-07-04 19:01:36 +03:00
Sergey Makinen
164d3c83e9 Have I fixed these phpdocs? Let’s see… 2017-07-03 15:10:48 +03:00
Alexander Makarov
c91083fbe4 Fixed phpdoc [skip ci] 2017-06-30 00:13:04 +03:00
Sergey Makinen
452974cab3 Mark not supported constraint retrieving methods 2017-06-28 21:40:52 +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
Carsten Brandt
be658f82bf release version 2.0.12 2017-06-05 16:33:41 +02:00
Sergey Makinen
118fc08af8 Fix dropping unique/indexes 2017-05-15 20:55:26 +03:00
Sergey Makinen
73ac13e6d7 Implement retrieving dbms constraints 2017-05-15 20:55:25 +03:00
Sergey Makinen
a9fb0171f7 Fixes #13745: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in MSSQL and bug fixes in yii\db\QueryBuilder::buildLikeCondition() 2017-03-11 22:36:01 +03:00
Sergey Makinen
9a915ba10c Fixes #8120: Fixes LIKE special characters escaping for Cubrid/MSSQL/Oracle/SQLite in yii\db\QueryBuilder 2017-02-24 01:24:06 +03:00
João Pedro Pereira
3692941ead Fixes #11464: Foreign key name is not provided by schema 2017-01-16 00:27:20 +03:00
Chris Harris
ae83dd0524 Fixes #13128: Fixed incorrect position of {pos} string in ColumnSchemaBuilder __toString 2016-12-11 23:36:35 +03:00
Robert Korulczyk
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
Alexander Makarov
0061692e60 Replaced unnecessary double quotes with single quotes 2016-07-29 22:56:38 +03:00
Nikola Kovacs
9d327baa8b coding style fixes 2016-05-26 11:19:32 +02:00
Alexander Makarov
27866bf9d6 Changed name to append(), fixed phpdoc, added changelog 2016-05-13 15:58:06 +03:00
Chris Harris
66eabda770 Fixes #11195: Added ability to append custom string to schema builder column definition 2016-05-13 15:57:54 +03:00
Carsten Brandt
edd6e719bb added missing since annotations and removed duplicate line 2016-04-28 03:02:17 +02:00
Carsten Brandt
627233715b proper @since annotations 2016-04-28 02:25:32 +02:00
SilverFire - Dmitry Naumenko
15432971d6 db/ColumnSchemaBuilder::buildCommentString() returns empty string by default 2016-04-20 09:26:07 +03:00
SilverFire - Dmitry Naumenko
33d51825c0 Fixed order of column options in curbid\ColumnSchemaBuilder 2016-04-19 18:32:01 +03:00
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
5316576361 Fixes after() column string builder (#11362) 2016-04-19 11:59:16 +03:00
PowerGamer1
73eb62a3cd DBMS specific workarounds for unsupported SQL92 form of SELECT EXISTS() (#11369) 2016-04-17 17:44:52 +03:00
Chris Harris
5c4001d84b Schema Builder Patterns Excel document in /docs folder (temp storage).
Fixed some schema builder patterns.
Added more information to upgrade docs.
2016-03-14 05:29:42 -07: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
81ff4752d9 Added CHECK modifier to PK schema pattern. Modified UNSIGNED tests to not include modifier by default (i.e. only present when testing DBMSes that support it). 2016-02-22 04:06:17 -08:00
Chris Harris
96fa375b16 Refactored to a more functional way of accessing database connection 2016-02-21 05:05:54 -08:00
Chris Harris
6a8348da5f AFTER column name is now escaped by safe method 2016-02-21 04:08:57 -08:00
Chris Harris
f52f60db0f Renamed category constants 2016-02-21 02:06:41 -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
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
0407407b76 fix coding style to follow PSR-2 2015-10-05 13:58:47 +06:00
Matvey Vasenin
135803b890 correct getColumnDefinition for cubrid 2015-08-20 10:48:47 +03:00
Matvey Vasenin
341e16645a add cubrid support 2015-08-19 14:49:40 +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
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 Makarov
c0e448bacb Changed CUBRID type for Double 2015-02-26 02:28:59 +03:00
Alexander Makarov
5870a74672 Added Schema::DOUBLE to represent ANSI SQL Double Precision 2015-02-25 16:01:37 +03:00
Carsten Brandt
a375a62070 bump minimum required cubrid version
there is no reliable way to determine the cubrid PDO extension version used
and also no reliable way to detect which combination of server and client produces wrong behavior.

By requiering 9.3 or higher in both client and server we can be sure it works.

fixes #852
2014-10-12 04:06:13 +02:00