Sergey Makinen
4e176ca325
Fixes #15108 : Fixed yii\db\Schema::getSchemaNames() for MSSQL and added tests for all DBMSes
2017-11-07 19:20:14 +03:00
Dmitry Naumenko
7e7faeebd1
Fixed excess escaping in Command::batchInsert() ( #13236 )
2017-10-23 22:43:39 +03:00
SilverFire - Dmitry Naumenko
b0148a5e8f
Added test to check issue #14274
2017-10-06 18:08:48 +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
0c0942d6e2
Enable phpdoc_add_missing_param_annotation rule in php-cs-fixer config. ( #14681 ) [skip ci]
2017-08-21 01:57:23 +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
Tigrov
2b7e8be1e8
Fixes #14192 : Fixed wrong default null value for TIMESTAMP when using PostgreSQL
2017-06-11 18:48:15 +03:00
Sergey Makinen
73ac13e6d7
Implement retrieving dbms constraints
2017-05-15 20:55:25 +03:00
Klimov Paul
d8e6a89af9
fixed tests without assettions
2017-04-13 16:17:35 +03:00
Alexander Makarov
3f8e8a89eb
Used more specific unit test assertions in framework tests
2017-03-14 09:45:31 +03:00
Bob Olde Hampsink
fab53b4a6e
Fixes #13582 : Added tests for all yii\db\QueryBuilder::resetSequence implementations, fixed SQLite implementation
2017-02-20 23:04:04 +03:00
Nikolay Oleynikov
323568c2e9
Remove trailing spaces from sources and tests ( #13621 ) [skip ci]
2017-02-19 17:34:22 +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
SilverFire - Dmitry Naumenko
df733d1bbe
Fixed QueryBuilderTest
2016-12-17 22:08:13 +02:00
SilverFire - Dmitry Naumenko
2f8225a244
Fixed QueryBuilderTest to work with PgSQL and other DBMS
2016-12-17 21:58:22 +02:00
Walt Sorensen
f76f0cff6c
Test against the current hhvm version ( #12971 )
...
* Test against the current hhvm version
This provides the current HHVM version (3.15.2 as of this PR) and will track with each release (i.e. will be 3.16 when 3.16 is released.
If testing against HHVM LST versions is desired follow this guide. https://docs.travis-ci.com/user/languages/php#HHVM-versions
Should be able to change to container based Trusty after Q1-17 https://blog.travis-ci.com/2016-11-08-trusty-container-public-beta/
* Try to create travis user for trusty hhvm and grant permissions
remove conditionals for apc and memcache
* more tweaks to grant privileges
* try 127.0.0.1 rather than localhost
* grant after db create
* try a different create user grant privileges form
* try to specify postgresql: "9.3" for hhvm
* need to look more into specifying postgresql: "9.3"
hhvm issues
* addon with no dash postgresql: "9.3"
* requested change && not ||
* redis-server isn't needed here
* Apply @cebe's patch for pgsql test failure
* Update .travis.yml
* Update CommandTest.php
* Update CommandTest.php
* Update CommandTest.php
try to fix hhvm tests
* Update CommandTest.php
2016-11-15 16:50:41 +01:00
Carsten Brandt
24809c5d73
fixed group annotations for #12889
2016-11-10 23:46:05 +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
Boudewijn Vahrmeijer
560e3eb0a3
Unit tests created for ActiveQuery ( #12889 )
...
* setup ActiveQueryTest
* basic unit tests for ActiveQuery are created:
- all protected & public methods are covered
- method return types are tested
- some functions are already full tested, others are supplied with @todo
* fix driver for mssql
* fix ::class to className()
* remove OCI tests
2016-11-01 20:48:58 +01:00
Carsten Brandt
06b045c8fe
created unit test to verify #12483
2016-09-07 11:21:15 +02:00
Alexander Makarov
01c4dde202
Added tests for column schema builder comment() method
2016-08-05 02:22:46 +03:00
Carsten Brandt
86f17c8dad
added tests classes for db related tests
2016-06-20 23:07:07 +02:00
Carsten Brandt
8ba032d147
refactored database tests
...
- changed test class naming for easier copying and searching of classes
- made base tests abstract and made MySQL an equal citisen in the test
hierarchie
- added missing db specific test classes
2016-06-20 19:26:43 +02:00
SilverFire - Dmitry Naumenko
b976f638d8
Added test for PgSQL BIGINT column to ensure typecasting works OK
...
Closes #11286
2016-05-15 23:05:30 +03:00
Paul Klimov
6b607d078f
#11498 : Fixed unable to saved serialized object into PostgreSQL binary column ( #11499 )
...
#11498 : Fixed unable to saved serialized object into PostgreSQL binary column
2016-05-06 11:04:27 +02:00
Carsten Brandt
8d8cd1a26d
adjusted dbms specific tests
2016-04-22 12:56:56 +02:00
SilverFire - Dmitry Naumenko
b77d74b6d6
Fixed broken PostgreSQLQueryBuilderTest::testCommentColumn()
2016-04-20 09:49:01 +03:00
SilverFire - Dmitry Naumenko
b08c82c5fe
Driver specific QueryBuilderTest::testCommentColumn() - improved to use replaceQuotes()
2016-04-20 09:40:21 +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
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
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
eaeb926768
Adds char datatype to framework
2016-02-20 01:52:23 -08:00
Carsten Brandt
187c314d01
better fix for test break b9880f3247
2016-02-17 14:27:10 +01:00
SilverFire - Dmitry Naumenko
4e4fb02264
Fixed QueryBuilterTest for PgSQL
2016-02-17 07:42:04 +02:00
Alexander Makarov
5cecb09c1b
Fixes #9443 : Added unsigned() to ColumnSchemaBuilder
2015-12-26 15:20:21 +03: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