Sergey
292a545642
Fixes #16104 : Fixed `yii\db\pgsql\QueryBuilder::dropIndex()` to prepend index name with schema name
6 years ago
SilverFire - Dmitry Naumenko
c6ea3fb455
Revert "Fixed JsonExpressionBuilder to generate SQL NULL"
...
This reverts commit cf4bd39fc1
.
7 years ago
SilverFire - Dmitry Naumenko
cf4bd39fc1
Fixed JsonExpressionBuilder to generate SQL NULL
...
Fixes #15863
7 years ago
SilverFire - Dmitry Naumenko
5fa25b331d
Fixed encoding of empty ArrayExpression for PostgreSQL
7 years ago
SilverFire - Dmitry Naumenko
2eba4b54f8
Added tests to verify issue #15684
7 years ago
Dmitry Naumenko
de1750228d
Fixes #13879 : Added upsert support for `yii\db\QueryBuilder` and `yii\db\Command`
7 years ago
Zhukov Roman
40b038379f
Fixes #13019 : Support JSON in SchemaBuilderTrait
7 years ago
Dmitry Naumenko
d16586334d
Fixes #7640 : Implemented custom data types support. Added JSON support for MySQL and PostgreSQL, array support for PostgreSQL
7 years ago
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.
7 years ago
Sergey Makinen
73ac13e6d7
Implement retrieving dbms constraints
7 years ago
Bob Olde Hampsink
fab53b4a6e
Fixes #13582 : Added tests for all `yii\db\QueryBuilder::resetSequence` implementations, fixed SQLite implementation
8 years ago
SilverFire - Dmitry Naumenko
df733d1bbe
Fixed QueryBuilderTest
8 years ago
SilverFire - Dmitry Naumenko
2f8225a244
Fixed QueryBuilderTest to work with PgSQL and other DBMS
8 years ago
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
8 years ago
cuiliang
c0df003ac0
merge from master
8 years ago
SilverFire - Dmitry Naumenko
b77d74b6d6
Fixed broken PostgreSQLQueryBuilderTest::testCommentColumn()
9 years ago
SilverFire - Dmitry Naumenko
b08c82c5fe
Driver specific QueryBuilderTest::testCommentColumn() - improved to use replaceQuotes()
9 years ago
Chris Harris
91018f6c38
Corrected MSSQL driver name. Fixed array addition to not overwrite matching keys.
9 years ago
Chris Harris
732a51b551
All common column definitions and expected outputs now in `QueryBuilderTest::columnTypes()`. `DbmsSpecificQueryBuilderTest::columnTypes()` adds DBMS specific column definitions.
9 years ago
Chris Harris
0ca5a1a86a
Fixed test
9 years ago
Chris Harris
a997603ab6
More Postgres tests
9 years ago
Chris Harris
db5399b124
Added `$expectedColumnSchemaBuilder` back to test data
9 years ago
Chris Harris
3761682edf
Upgraded some tests. Fixed MySQL test fixtures to create all tables with InnoDB.
9 years ago
Chris Harris
eaeb926768
Adds `char` datatype to framework
9 years ago
Carsten Brandt
187c314d01
better fix for test break b9880f3247
9 years ago
SilverFire - Dmitry Naumenko
4e4fb02264
Fixed QueryBuilterTest for PgSQL
9 years ago
Matvey Vasenin
3cc8c09898
some test case added
9 years ago
Matvey Vasenin
ce6e92b736
add comment control methods
9 years ago
Nikola Kovacs
316e95b81d
Remove length from SchemaBuilderTrait::text.
...
close #9307
9 years ago
Carsten Brandt
56902298b4
fixed wrong expectation in QueryBuilder test
9 years ago
Carsten Brandt
0d778d0570
adjusted querybuilder tests to match implementation
9 years ago
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(),
]);
```
9 years ago
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
9 years ago
╃巡洋艦㊣
586684b050
2.0.5 bf7edc5
9 years ago
Alexander Makarov
6949992246
Simplified tests directory structure a bit
10 years ago
╃巡洋艦㊣
1468bd4d3d
version 2.0.1 84b42ab
10 years ago
Qiang Xue
ab1f32ef76
Fixes #4492 : Support PostgreSQL-specific syntax for `QueryBuilder::alterColumn()`
10 years ago
Carsten Brandt
d1a3d40014
added test case to acually create cols with virtual type
...
verify issue #3473
10 years ago
Qiang Xue
3411504508
Revert "Fixed test break."
...
This reverts commit 70b57766b1
.
11 years ago
Qiang Xue
70b57766b1
Fixed test break.
11 years ago
Carsten Brandt
5c748ddb42
added case insensitve LIKE to PostgresQueryBuilder
...
fixes #3252
also improved unit tests for querybuilder buildLikeCondition
11 years ago
SonicGD
b5f8a4dc22
Reformat code te be PSR-2 compatible
11 years ago
Alexander Makarov
1f6a823073
Short array syntax
11 years ago
Carsten Brandt
949dda5fdb
tagged tests with @group tags
11 years ago
Qiang Xue
02fd82c42a
Fixed build break.
11 years ago
Carsten Brandt
544e412af8
unit test cleanup
11 years ago
Alexander Makarov
0596fa82fd
code style fixes
11 years ago
gevik
f667b5785b
- Added drop/add primary key methods to Command.php
...
- Added drop/add primary key methods to QueryBuilder.php
- Added mysql specific dropPrimarykey method
- Added sqlite specific dropPrimarykey and addPrimaryKey methods
- Added uint testing for dropPrimarykey and addPrimaryKey methods
- Corrected postgresql column types, by adding length and precision
11 years ago
Carsten Brandt
af68ee9d27
Sqlite unit test for abstract db types
11 years ago
Carsten Brandt
c28b0183a5
whitespace
11 years ago